[SOLVED] Apache stoped working after installing PHP
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Arch, Ubuntu Server 12.04, Slack64-14.1
Posts: 86
Rep:
Apache stoped working after installing PHP
i installed apache2 "sudo apt-get install apache2"
I saw the "it works" page after i changed the ports.conf listen to 127.0.0.1:80
then
I installed php per this page...
except for the "sudo apt-get install apache2" cuz apache is already installed http://www.howtogeek.com/howto/ubunt...che-on-ubuntu/
now i can't see the "it works" page
i uninstalled everything i saw when running "dpkg --list|grep -e httpd -e apache -e mysql -e php" i removed them using "apt-get autoremove"
i installed LAMP from the tasksel menu but it still doesn't work
i did notice that my ports.conf file is the same cuz it still has the change i made to "listen"
Could you please post the results of the dpkg --get-selections command? This should give us a list of packages installed on the server and will allow us to better answer your question.
Distribution: Arch, Ubuntu Server 12.04, Slack64-14.1
Posts: 86
Original Poster
Rep:
like this?
ii apache2 2.2.22-1ubuntu1 Apache HTTP Server metapackage
ii apache2-mpm-prefork 2.2.22-1ubuntu1 Apache HTTP Server - traditional non-threaded model
ii apache2-utils 2.2.22-1ubuntu1 utility programs for webservers
ii apache2.2-bin 2.2.22-1ubuntu1 Apache HTTP Server common binary files
ii apache2.2-common 2.2.22-1ubuntu1 Apache HTTP Server common files
ii libapache2-mod-php5 5.3.10-1ubuntu3.4 server-side, HTML-embedded scripting language (Apache 2 module)
ii libdbd-mysql-perl 4.020-1build2 Perl5 database interface to the MySQL database
ii libmysqlclient18 5.5.24-0ubuntu0.12.04.1 MySQL database client library
ii mysql-client-5.5 5.5.24-0ubuntu0.12.04.1 MySQL database client binaries
ii mysql-client-core-5.5 5.5.24-0ubuntu0.12.04.1 MySQL database core client binaries
ii mysql-common 5.5.24-0ubuntu0.12.04.1 MySQL database common files, e.g. /etc/mysql/my.cnf
ii mysql-server 5.5.24-0ubuntu0.12.04.1 MySQL database server (metapackage depending on the latest version)
ii mysql-server-5.5 5.5.24-0ubuntu0.12.04.1 MySQL database server binaries and system database setup
ii mysql-server-core-5.5 5.5.24-0ubuntu0.12.04.1 MySQL database server binaries
ii php5-cli 5.3.10-1ubuntu3.4 command-line interpreter for the php5 scripting language
ii php5-common 5.3.10-1ubuntu3.4 Common files for packages built from the php5 source
ii php5-mysql 5.3.10-1ubuntu3.4 MySQL module for php5
Distribution: Arch, Ubuntu Server 12.04, Slack64-14.1
Posts: 86
Original Poster
Rep:
Quote:
Originally Posted by arun5002
If you had uninstalled all apache2 and php5 package.Try these command to enable Php5 in Apache2
But i reinstalled them via the LAMP installation in tasksel
should i remove them and reinstall per these instructions?
for now i'll skip to the restart apache step and move forward
thx arun!
Distribution: Arch, Ubuntu Server 12.04, Slack64-14.1
Posts: 86
Original Poster
Rep:
#sudo /etc/init.d/apache2 restart - restarted
To enable php5 module with apache2
#sudo a2enmod php5 - already enabled
check whether apache2 syntax ok message
#apache2ctl -t "/usr/sbin/apache2ctl: 87: ulimit: error setting limit (Operation not permitted)
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
Syntax OK"
#sudo apache2ctl -S[/QUOTE] - "apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80 is a NameVirtualHost
default server 127.0.1.1 (/etc/apache2/sites-enabled/000-default:1)
port 80 namevhost 127.0.1.1 (/etc/apache2/sites-enabled/000-default:1)
Syntax OK
"
Look after your Apache log for analysing the error.whether apache2 throws you any error while startup.Check whether you had installed following package.
Here are some libraries you need to install to make Apache2 available to PHP:
sudo apt-get install libapache2-mod-php5
These libraries you need to install to make php5 available to mysql
sudo apt-get install php5-mysql
To enable php5 with apache2
#sudo a2enmod php5
#apache2ctl -M check whether you had enabled php5 module to apache2
Last edited by jsaravana87; 10-30-2012 at 10:51 PM.
Distribution: Arch, Ubuntu Server 12.04, Slack64-14.1
Posts: 86
Original Poster
Rep:
I did. Nothing stood out but i don't know what i'm looking at.
error_log
Sat Oct 27 16:10:24 2012] [notice] Apache/2.2.22 (Ubuntu) configured -- resuming normal operations
[Sat Oct 27 17:17:15 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sat Oct 27 17:17:35 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sat Oct 27 17:20:41 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sat Oct 27 17:20:44 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sat Oct 27 17:23:36 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sat Oct 27 17:28:44 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sat Oct 27 17:40:42 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sat Oct 27 17:42:47 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sat Oct 27 19:59:23 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sun Oct 28 08:29:15 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sun Oct 28 08:32:46 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sun Oct 28 08:32:52 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sun Oct 28 08:34:58 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sun Oct 28 08:35:08 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sun Oct 28 08:35:18 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sun Oct 28 08:35:55 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sun Oct 28 08:36:00 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sun Oct 28 08:36:33 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sun Oct 28 08:36:43 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sun Oct 28 08:57:39 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sun Oct 28 08:57:46 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sun Oct 28 09:09:36 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sun Oct 28 09:10:37 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sun Oct 28 09:11:27 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sun Oct 28 09:13:48 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sun Oct 28 09:14:14 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sun Oct 28 09:14:44 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sun Oct 28 09:15:37 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sun Oct 28 09:18:14 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sun Oct 28 10:19:13 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sun Oct 28 10:29:54 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sun Oct 28 10:29:56 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sun Oct 28 10:30:27 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sun Oct 28 10:30:45 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sun Oct 28 10:50:00 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sun Oct 28 10:50:59 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sun Oct 28 10:51:16 2012] [error] [client 192.168.1.67] File does not exist: /var/www/favicon.ico
[Sun Oct 28 10:54:08 2012] [notice] caught SIGTERM, shutting down
[Sun Oct 28 10:54:13 2012] [notice] Apache/2.2.22 (Ubuntu) configured -- resuming normal operations
[Sun Oct 28 10:54:18 2012] [notice] caught SIGTERM, shutting down
[Sun Oct 28 10:54:19 2012] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.4 with Suhosin-Patch configured -- resuming normal operations
[Sun Oct 28 10:55:27 2012] [notice] caught SIGTERM, shutting down
[Sun Oct 28 10:55:28 2012] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.4 with Suhosin-Patch configured -- resuming normal operations
[Sun Oct 28 11:07:13 2012] [notice] caught SIGTERM, shutting down
[Sun Oct 28 11:07:14 2012] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.4 with Suhosin-Patch configured -- resuming normal operations
[Sun Oct 28 11:20:18 2012] [notice] caught SIGTERM, shutting down
[Sun Oct 28 11:20:19 2012] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.4 with Suhosin-Patch configured -- resuming normal operations
[Sun Oct 28 11:26:44 2012] [notice] caught SIGTERM, shutting down
[Sun Oct 28 11:26:45 2012] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.4 with Suhosin-Patch configured -- resuming normal operations
[Sun Oct 28 15:05:07 2012] [notice] caught SIGTERM, shutting down
[Sun Oct 28 15:14:32 2012] [notice] Apache/2.2.22 (Ubuntu) configured -- resuming normal operations
[Sun Oct 28 15:14:33 2012] [notice] Graceful restart requested, doing restart
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[Sun Oct 28 15:14:33 2012] [notice] Apache/2.2.22 (Ubuntu) configured -- resuming normal operations
[Sun Oct 28 17:50:53 2012] [notice] caught SIGTERM, shutting down
[Sun Oct 28 17:50:54 2012] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.4 with Suhosin-Patch configured -- resuming normal operations
[Sun Oct 28 17:58:13 2012] [notice] caught SIGTERM, shutting down
[Sun Oct 28 17:58:14 2012] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.4 with Suhosin-Patch configured -- resuming normal operations
[Sun Oct 28 18:07:20 2012] [notice] caught SIGTERM, shutting down
[Sun Oct 28 18:07:21 2012] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.4 with Suhosin-Patch configured -- resuming normal operations
[Mon Oct 29 08:41:43 2012] [notice] caught SIGTERM, shutting down
[Mon Oct 29 08:41:44 2012] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.4 with Suhosin-Patch configured -- resuming normal operations
[Tue Oct 30 00:16:39 2012] [notice] caught SIGTERM, shutting down
[Tue Oct 30 00:16:40 2012] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.4 with Suhosin-Patch configured -- resuming normal operations
[Tue Oct 30 00:34:43 2012] [notice] caught SIGTERM, shutting down
[Tue Oct 30 00:34:44 2012] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.4 with Suhosin-Patch configured -- resuming normal operations
[Tue Oct 30 00:46:12 2012] [notice] caught SIGTERM, shutting down
[Tue Oct 30 00:46:13 2012] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.4 with Suhosin-Patch configured -- resuming normal operations
[Tue Oct 30 00:50:23 2012] [notice] caught SIGTERM, shutting down
[Tue Oct 30 00:50:24 2012] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.4 with Suhosin-Patch configured -- resuming normal operations
[Tue Oct 30 01:06:43 2012] [notice] caught SIGTERM, shutting down
[Tue Oct 30 01:06:44 2012] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.4 with Suhosin-Patch configured -- resuming normal operations
[Tue Oct 30 01:07:15 2012] [notice] caught SIGTERM, shutting down
[Tue Oct 30 01:07:16 2012] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.4 with Suhosin-Patch configured -- resuming normal operations
[Tue Oct 30 20:27:38 2012] [notice] Graceful restart requested, doing restart
[Tue Oct 30 20:27:38 2012] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.4 with Suhosin-Patch configured -- resuming normal operations
[Tue Oct 30 20:27:56 2012] [notice] Graceful restart requested, doing restart
[Tue Oct 30 20:27:56 2012] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.4 with Suhosin-Patch configured -- resuming normal operations
[Tue Oct 30 20:28:05 2012] [notice] caught SIGTERM, shutting down
[Tue Oct 30 20:28:06 2012] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.4 with Suhosin-Patch configured -- resuming normal operations
[Tue Oct 30 21:38:11 2012] [notice] caught SIGTERM, shutting down
[Tue Oct 30 21:38:12 2012] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.4 with Suhosin-Patch configured -- resuming normal operations
Distribution: Arch, Ubuntu Server 12.04, Slack64-14.1
Posts: 86
Original Poster
Rep:
I'm going to try removing or purging the programs and mods and reinstal
i'll look up how to completely remove programs
i guess "remove" doesn't get everythign
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.