Php error with Dialup Admin and FreeBSD
Scott Lambert
lambert at lambertfam.org
Fri Jun 1 19:11:53 CEST 2012
On Fri, Jun 01, 2012 at 04:58:20PM +0100, Kaya Saman wrote:
> Hi,
>
> I'm trying to test FreeRADIUS on FreeBSD which is the easy part
> however, I need a web ui and so Dialup Admin directly comes with the
> port on FreeBSD.....
>
> Trying to get it running I am having difficulty with php it seems??
>
> I get a green screen saying "Dialup Admin" and that's it. On the left
> hand side of the screen I have this:
>
> <?php
> $auth_user = $HTTP_SERVER_VARS["PHP_AUTH_USER"];
> if ($auth_user){
> if (is_file("../html/buttons/$auth_user/buttons.html.php3"))
> include("../html/buttons/$auth_user/buttons.html.php3");
> else{
> if (is_file("../html/buttons/default/buttons.html.php3"))
> include("../html/buttons/default/buttons.html.php3");
> }
> }
> else{
> if (is_file("../html/buttons/default/buttons.html.php3"))
> include("../html/buttons/default/buttons.html.php3");
> }
> ?>
>
> I went through the install guide here:
>
> http://wiki.freeradius.org/Dialup-admin#Apache+Configuration
>
> However, I am using Php5.4 which gets installed by default on FreeBSD
> unless using a "Legacy" port.
>
I left php4 on the machine running Dialup Admin. I think I first
tried 5.x but the Dialup Admin code is old and hasn't been updated
for deprecated and removed features, IIRC. We originally installed
it in a jail on FreeBSD 6.x. The machine is now running FreeBSD
8.3. However, we've left the installed Apache/PHP ports alone.
It's firewalled off from public access.
Are you sure you spelled the AddType rule correctly in httpd.conf
to tell it that .php3 files are php applications?
AddType application/x-httpd-php .php3
That's my first guess for why you are seeing php code output in the
page rather than executed.
If I had it to do over again, I would probably use the DaloRADIUS
web interface instead of Dialup Admin. We populate the DB with
scripts from our billing/provisioning system and just use Dialup
Admin for read-only access to call logs for the occasional tech
support calls.
--
Scott Lambert KC5MLE Unix SysAdmin
lambert at lambertfam.org
More information about the Freeradius-Users
mailing list