Webinterface doesn't work anymore after fixing issues with php-eaccelerator

I had the same problems as descriped here: http://www.freepbx.org/forum/freepbx-distro/distro-discussion-help/freepbx-distro-upgrade-issue .

I resolved it as described in the thread by removing the eaccelerator module and changing the httpd.conf file.
Not at least apache is working again, unfortunately I can’t open the webinterface anymore, in /var/log/httpd/error_log it only shows following error when trying to access the interface:

[Wed Oct 19 10:52:03 2011] [error] [client 192.168.1.132] PHP Warning: include_once(/etc/asterisk/freepbx.conf) [function.include-once]: failed to open stream: No such file or directory in /var/www/html/index.php on line 19
[Wed Oct 19 10:52:03 2011] [error] [client 192.168.1.132] PHP Warning: include_once() [function.include]: Failed opening ‘/etc/asterisk/freepbx.conf’ for inclusion (include_path=’.:/usr/share/pear:/usr/share/php’) in /var/www/html/index.php on line 19
[Wed Oct 19 10:52:03 2011] [error] [client 192.168.1.132] PHP Fatal error: Call to undefined function getampadminusers() in /var/www/html/index.php on line 22

as found in other threads i tried to execute:
/usr/src/freepbx/install_amp

Which run flawlessly but didn’t resolve the issue.
also running
/var/lib/asterisk/bin/module_admin
with parameters “upgradeall” and "reload"
or a
yum reinstall freepbx

so right now I’m completly stuck. The asterisk itself still runs without any problems.
any help would be appreciated :-).

oh I forgot to mention, the freepbx version used is the newest 2.9.x version.

What are the first 30 lines of your /var/www/html/index.php file? Also have you been upgrading using our upgrade scripts?

thanks for your help.
which upgrade scripts?
The freepbx updates I did out from the gui, and the rest over “yum update”. If there are other scripts to do that i never noticed them…

here are the first 30 lines:

<?php function in_marray($needle = '', $haystack = '') { foreach ($haystack as $key => $value) { $return = in_array($needle, $haystack[$key]); if ($return == TRUE) { return TRUE; } } return FALSE; } $bootstrap_settings['freepbx_auth'] = false; // don't include any of the functions.inc.php files from modules, this CLI version of // module_admin is somtimes the only way to recover from a bad module being loaded into // a system. // $restrict_mods = array('core' => true); if ([email protected]_once(getenv('FREEPBX_CONF') ? getenv('FREEPBX_CONF') : '/etc/freepbx.conf')) { include_once('/etc/asterisk/freepbx.conf'); } $admin_users = getAmpAdminUsers(); $admin_users_count = count($admin_users); if (!$admin_users_count) { $vars = array( 'action', 'admin_user', 'admin_pass1', 'admin_pass2', 'fop_pass1',

The upgrade scripts I’m referring to can be found at http://www.freepbx.org/forum/freepbx-distro/distro-discussion-help/release-versions.

Also can you verify that you have a /etc/freepbx.conf file?

the /etc/freepbx.conf file exists.
I can’t run the update scripts yet or my coworkers will kill me ;-). Will do it after working hours. Will tell afterwards if it solved the problems.
Just a stupid question, why this script weren’t executed automatically when upgrading over the gui?

I’m not sure I fully understand the question about why the scripts are executed automatically when upgrading over the GUI. If your referring to the update scripts, it’s because the updates do more than just GUI updates which are handled by FreePBX’s Module Admin. Module Admin though doesn’t have anything to do with the underlying operating system so those updates are separate.

Ok. I executed all the scripts without errors. Unfortunately I still get the same error logs when trying to access the gui. After executing the scripts I also tried again to execute
/usr/src/freepbx/install_amp
but didn’t help.

Would you have any other suggestions?

About my question, I wasn’t aware of that this scripts also update the system. Why not making an extra package for them, which depends on the new packages and executes in the postinstall scripts other necesarry changes. I guess I’m not the only one who didn’t notice that it is necesary to download and execute seperate scripts to update the system.

I just went throught the issue again, as it seems the file /etc/freepbx.conf exists, but not the file /etc/asterisk/freepbx.conf which index.php tries to include.
So I made a symlink at /etc/asterisk/freepbx.conf pointing at /etc/freepbx.conf in the hope that it is the file it is expecting to include. Then I had to make the file /etc/freepbx.conf world readable (?). Like that at least there are no errors at all anymore in the error_log, but I still can’t access the page. It just returns me a “internal server error” message (which is also logged correctly in access_log), but nothing else.
I just checked an almost 2 month old backup and noticed than also then, the /etc/asterisk/freepbx.conf file didn’t exist, but the system was working perfectly anyway.

So I’m completely lost right now…
If nobody has any other idea, i will make a fresh install and try to take over the configuration. But I’d still like to know what went wrong…