OK all… I beat my head against the wall for awhile on this one.
Here was my situation and below is the fix:
- Mysql was up and running.
- Apache was a-ok.
- php was version 5.1.6
- Last time this box ran a-ok, there was a diff flav of php on it.
- This time… I was prompted for credentials when I visited http://mybox/admin But I could NEVER authenticate!
- If I modified /etc/amportal.conf and changed database to “none”… I could get in.
Below is how I fixed it:
- Modify your www/admin/header_auth.php to look like this:
if (!empty($_SERVER[‘HTTPS’])) {
$baselink = ($_SERVER[‘HTTPS’]!=’’?‘https://’:‘http://’).$_SERVER[‘HTTP_HOST’].$_SERVER[‘PHP_SELF’];
}
else{
$baselink = (‘http://’).$_SERVER[‘HTTP_HOST’].$_SERVER[‘PHP_SELF’];
}
The original like 16 or so was throwing an exception that https wasn’t defined.
- I also got errors inside php because something was depricted… So I changed this from OFF to ON in my /etc/php.ini
allow_call_time_pass_reference = On
;Off
Once I did the above… I didn’t have to restart anything… I simply authenticated right in.
In closing…
I hope this saves some other poor sap the headache I got from this… And to the freePBX dev team… Please incorporate this fix.
Blessings to all! JC Rocks!