Admin Web Interface gives 500 Server Error

I have just finished following installation instructions from http://randystech.com/index.php?option=com_content&view=article&id=89:install-asterisk-on-ubuntu-1004&catid=4:linux-server&Itemid=8

I did change the versions to the lastest availble so I have installed the following versions:

dahdi-linux-complete-2.6.0+2.6.0.tar.gz
libpri-1.4.12.tar.gz
asterisk-1.8.10.0.tar.gz
asterisk-addons-1.6.2.3.tar.gz

Everything seems to have worked out fine except that when I go to the admin, I get a 500 Server Error. The PHP Error log shows that the problem is caused by an file include:

I took a look at functions.inc.php to try and figure out why. I discovered that the $dirname variable is incorrect. However, it’s fine until the notifications.class.php file needs to be loaded.

The path of my web files is /var/www/. I added the follow line after line 95 in functions.inc.php:

I also added the following to line 21:

and I received the following output:

Initial Dirname: /var/www/admin Dirname (ci_def): /var/www/admin Dirname (ci_lan_def): /var/www/admin Dirname (ci_config): /var/www/admin Dirname (ci_uri_string): /var/www/admin Dirname (notifications): /var/www/html/admin

I’m not sure why the $dirname variable changes.

Any ideas why the $dirname is changing and how I can fix it?

Thanks,

You must be missing a dependency.

This is a good start if using a Redhat variant.

yum install gcc gcc-c++ wget bison mysql-devel mysql-server php php-mysql php-pear php-pear-DB php-mbstring nano ntp tftp-server httpd make ncurses-devel libtermcap-devel sendmail sendmail-cf caching-nameserver sox newt-devel libxml2-devel libtiff-devel php-gd audiofile-devel gtk2-devel

Also you can’t use Asterisk add-ons 1.6 with 1.8. 1.8 includes the addons. Suggest you read the install guides and readme that comes with each download.