HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   ISPConfig won't start, gives PHP fatal error (http://www.howtoforge.com/forums/showthread.php?t=55636)

ChaoticReality 4th January 2012 22:00

ISPConfig won't start, gives PHP fatal error
 
A few hours ago, I completed an install of the latest ISPConfig on Ubuntu 11.04 Server. Followed the Perfect Server guide and with the addition of an iptables rule to allow access on port 8080, everything seemed to be working fine.

However, several hours later I found myself unable to connect to the admin interface. netstat -tap reveals that apache2 is no longer listening on port 8080 and the iptables rules appear to have vanished.

/var/log/ispconfig/ispconfig.log is empty, but the cron.log is full of this message:

Code:

PHP Fatal error:  Call to a member function connect() on a non-object in /usr/local/ispconfig/server/server.php on line 43

If I try and start the server manually as root using the provided shell script, I get exactly the same error in my terminal. I had a look at the php script and it would appear to be an error that originates with something in app.inc.php not loading properly.

I have tentatively ruled out non-loading of the include files as there's no error relating to that anywhere (and I would expect PHP to throw an error if a require_once file wasn't found.

Running the update script (just in case) yielded this error:
Code:

PHP Notice:  Undefined variable: conf in /tmp/ispconfig3_install/install/update.php on line 76
Unable to resolve hostname

and then dumped back into terminal.

I am officially stumped, especially as everything was working fine before and then just suddenly stopped. I have rebooted the server and nothing has changed. Any suggestions?

Thanks in advance!

cbj4074 4th January 2012 22:12

What happens when you start Apache on the terminal?

Code:

# service apache2 start

ChaoticReality 4th January 2012 22:20

Thanks for your quick reply.

Apache starts as normal with no visible error messages:

Code:

root@syd:/usr/local/ispconfig/server/lib# service apache2 start
 * Starting web server apache2                                                                                                                [ OK ]
root@syd:/usr/local/ispconfig/server/lib#

Nothing new in /var/logs/apache2/error.log either.

till 5th January 2012 09:18

1) Check the file /etc/hostname and ensure that it contains a line for your hostname. You can get the current hostname of your server by executing the command:

hostname

2) Then run the ispconfig update again and choose to reconfigure services during update.

ChaoticReality 5th January 2012 15:44

Hi Till,

/etc/hostname contains the correct hostname for the server and matches the output of the hostname command.

The update script and attempting to manually restart are still producing the same errors as in my previous post.

Any other ideas?

Thanks,
Mike

till 5th January 2012 16:25

Quote:

/etc/hostname contains the correct hostname for the server and matches the output of the hostname command.
According to php, the hostname is unresolvable.

Please post the exavt output of the command:

hostname -f

and the content of the file /etc/resolv.conf

ChaoticReality 5th January 2012 16:38

Thanks for your help so far.

Code:

root@syd:~# hostname -f
syd.chaoticreality.net

Code:

root@syd:~# cat /etc/resolv.conf
domain levonline.com
search levonline.com
nameserver 217.70.32.11
nameserver 217.70.32.10

I'm still confused as to why the problem has developed now, after I had no problem setting up and running ISPConfig initially and nothing on the system has changed (as far as I know).

till 5th January 2012 16:44

Make a backup of the resolv.conf file and replace its whole content with these details:

Code:

nameserver 8.8.8.8
nameserver 8.8.4.4

then try to do the ispconfig update again.

ChaoticReality 5th January 2012 17:11

Still the same error. I have also just tried putting the hostname and correct IP into /etc/hosts and that also doesn't solve the issue.

Incidentally, PHP can definitely resolve the hostname fine. I have just run this script in terminal and it returns the correct IP address:
Code:

<?php
$ip = gethostbyname('syd.chaoticreality.net');
echo $ip;
?>


till 5th January 2012 17:44

Have you disabled php functions like exec in your php.ini file? If thats the case, the ispconfig updater and other ispconfig functions will fail.


All times are GMT +2. The time now is 11:24.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.