Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Can't get PHP installed with Apache
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Littlenux
n00b
n00b


Joined: 07 Mar 2011
Posts: 27

PostPosted: Wed Mar 09, 2011 9:56 am    Post subject: [Solved] Can't get PHP installed with Apache Reply with quote

Hello,

I have Apache2 installed and PHP too, but the PHP module for Apache seem missing.
I have put:
"-D PHP5" in the APACHE2_OPTS option of /etc/conf.d/apache2

USE="apache2 php" in /etc/make.conf

and done:
Code:
emerge apache

but nothing change. I think it's a flag problem but I don't know how to set it.

Thanks for your help.


Last edited by Littlenux on Thu Mar 10, 2011 2:43 pm; edited 1 time in total
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Wed Mar 09, 2011 10:43 am    Post subject: Reply with quote

Did you restart apache?
Back to top
View user's profile Send private message
Littlenux
n00b
n00b


Joined: 07 Mar 2011
Posts: 27

PostPosted: Wed Mar 09, 2011 11:18 am    Post subject: Reply with quote

desultory wrote:
Did you restart apache?

Yes
Back to top
View user's profile Send private message
cjubon
Guru
Guru


Joined: 03 Jul 2007
Posts: 450
Location: Vienna/Europe

PostPosted: Wed Mar 09, 2011 1:52 pm    Post subject: Reply with quote

you have to uncomment the following line in your httpd.conf:
# AddType application/x-httpd-php .php5

or else, in the relevant /etc/apache2/modules.d/ conf file
(I don't remember exactly and I'm not on my linux machine right now)
_________________
Mandrake Dec 2001 · Debian "Woody" Aug 2002 · Gentoo Jan 2004 · Funtoo Oct 2009
Back to top
View user's profile Send private message
Littlenux
n00b
n00b


Joined: 07 Mar 2011
Posts: 27

PostPosted: Wed Mar 09, 2011 4:31 pm    Post subject: Reply with quote

cjubon wrote:
you have to uncomment the following line in your httpd.conf:
# AddType application/x-httpd-php .php5

or else, in the relevant /etc/apache2/modules.d/ conf file
(I don't remember exactly and I'm not on my linux machine right now)


Well, I have no AddType in httpd.conf and no php module in /etc/apache2/modules.d/

I think the problem is that th PHP module is not compiled with Apache but I don't know how to do that.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6095
Location: Dallas area

PostPosted: Wed Mar 09, 2011 4:42 pm    Post subject: Reply with quote

You should have a /usr/lib/apache2/modules/libphp5.so file if you compile php with apache support
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
Littlenux
n00b
n00b


Joined: 07 Mar 2011
Posts: 27

PostPosted: Wed Mar 09, 2011 4:53 pm    Post subject: Reply with quote

I don't have, here is the listing of /usr/lib/apache2/modules/ :
Code:
mod_actions.so          mod_authz_dbm.so        mod_cgi.so              mod_env.so              mod_log_config.so       mod_speling.so
mod_alias.so            mod_authz_default.so    mod_cgid.so             mod_expires.so          mod_logio.so            mod_ssl.so
mod_auth_basic.so       mod_authz_groupfile.so  mod_dav.so              mod_ext_filter.so       mod_mem_cache.so        mod_status.so
mod_authn_alias.so      mod_authz_host.so       mod_dav_fs.so           mod_file_cache.so       mod_mime.so             mod_unique_id.so
mod_authn_anon.so       mod_authz_owner.so      mod_dav_lock.so         mod_filter.so           mod_mime_magic.so       mod_userdir.so
mod_authn_dbm.so        mod_authz_user.so       mod_deflate.so          mod_headers.so          mod_negotiation.so      mod_usertrack.so
mod_authn_default.so    mod_autoindex.so        mod_dir.so              mod_include.so          mod_rewrite.so          mod_vhost_alias.so
mod_authn_file.so       mod_cache.so            mod_disk_cache.so       mod_info.so             mod_setenvif.so
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6095
Location: Dallas area

PostPosted: Wed Mar 09, 2011 4:56 pm    Post subject: Reply with quote

what does "emerge -pv php" return?
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
Littlenux
n00b
n00b


Joined: 07 Mar 2011
Posts: 27

PostPosted: Wed Mar 09, 2011 5:12 pm    Post subject: Reply with quote

"emerge -pv php" result:
Code:
These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] dev-lang/php-5.3.5  USE="apache2* berkdb bzip2 cli crypt ctype fileinfo filter gd gdbm hash iconv ipv6 json mysql* nls posix readline session simplexml snmp ssl tokenizer truetype unicode xml zlib -adabas -bcmath -birdstep -calendar -cdb -cgi -cjk -curl -curlwrappers -db2 -dbmaker -debug -doc -embed -empress -empress-bcs -enchant -esoob -exif -firebird -flatfile -fpm -frontbase -ftp -gd-external -gmp -imap -inifile -interbase -intl -iodbc -kerberos -kolab -ldap -ldap-sasl -libedit -mhash -mssql -mysqli -mysqlnd -oci8 -oci8-instant-client -odbc -pcntl -pdo -phar -pic -postgres -qdbm -recode -sapdb -sharedext -sharedmem -soap -sockets -solid -spell -sqlite -sqlite3 -suhosin -sybase-ct -sysvipc -threads -tidy -wddx -xmlreader -xmlrpc -xmlwriter -xpm -xsl -zip" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

 * IMPORTANT: 5 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.
Back to top
View user's profile Send private message
patrix_neo
Guru
Guru


Joined: 08 Jan 2004
Posts: 520
Location: The Maldives

PostPosted: Wed Mar 09, 2011 5:20 pm    Post subject: Reply with quote

I so happens to have php/apache2 setup. And mine works.

Do you have this ?:

Code:

~ # cat /etc/apache2/httpd.conf |grep -i php
LoadModule php5_module modules/libphp5.so


and this?
Code:

ls -l `locate libphp5.so`
lrwxrwxrwx 1 root root      36  9 jan 16.16 /usr/lib64/apache2/modules/libphp5.so -> /usr/lib64/php5.3/apache2/libphp5.so
-rw-r--r-- 1 root root 8681528  9 jan 16.16 /usr/lib64/php5.3/apache2/libphp5.so
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6095
Location: Dallas area

PostPosted: Wed Mar 09, 2011 5:27 pm    Post subject: Reply with quote

Littlenux wrote:
"emerge -pv php" result:
Code:
These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] dev-lang/php-5.3.5  USE="apache2* berkdb bzip2 cli crypt ctype fileinfo filter gd gdbm hash iconv ipv6 json mysql* nls posix readline session simplexml snmp ssl tokenizer truetype unicode xml zlib -adabas -bcmath -birdstep -calendar -cdb -cgi -cjk -curl -curlwrappers -db2 -dbmaker -debug -doc -embed -empress -empress-bcs -enchant -esoob -exif -firebird -flatfile -fpm -frontbase -ftp -gd-external -gmp -imap -inifile -interbase -intl -iodbc -kerberos -kolab -ldap -ldap-sasl -libedit -mhash -mssql -mysqli -mysqlnd -oci8 -oci8-instant-client -odbc -pcntl -pdo -phar -pic -postgres -qdbm -recode -sapdb -sharedext -sharedmem -soap -sockets -solid -spell -sqlite -sqlite3 -suhosin -sybase-ct -sysvipc -threads -tidy -wddx -xmlreader -xmlrpc -xmlwriter -xpm -xsl -zip" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

 * IMPORTANT: 5 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.


I think you need to recompile php, it looks like it's wanting to pickup new flags (I think that's what the asterisks mean)
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
palettentreter
Tux's lil' helper
Tux's lil' helper


Joined: 06 Feb 2006
Posts: 104

PostPosted: Wed Mar 09, 2011 5:50 pm    Post subject: Reply with quote

I'm having the same problem. /usr/lib64/apache2/libphp5.so just went away when upgrading from php-5.3.3-r1 to 5.3.5:

# qlist dev-lang/php | grep libphp
/usr/lib64/php5.3/apache2/libphp5.so

# qlist -Iv dev-lang/php
dev-lang/php-5.3.5

# tar -tjf /usr/portage/packages/dev-lang/php-5.3.3-r1.tbz2 | grep libphp
./usr/lib64/apache2/modules/libphp5.so

# eix -I dev-lang/php
[I] dev-lang/php
Available versions:
(5) 5.2.14{tbz2} 5.3.3-r1{tbz2}
(5.2) 5.2.16 5.2.17
(5.3) 5.3.4 5.3.5{tbz2} ~5.3.5-r1
{adabas apache2 bcmath berkdb birdstep bzip2 calendar cdb cgi cjk +cli concurrentmodphp crypt +ctype curl curlwrappers db2 dbase dbmaker debug discard-path doc embed empress empress-bcs enchant esoob exif fdftk +fileinfo +filter firebird flatfile force-cgi-redirect fpm frontbase ftp gd gd-external gdbm gmp +hash +iconv imap inifile interbase intl iodbc ipv6 +json kerberos kolab ldap ldap-sasl libedit mcve mhash msql mssql mysql mysqli mysqlnd ncurses nls oci8 oci8-instant-client odbc pcntl +pcre pdo +phar pic +posix postgres qdbm readline recode (+)reflection sapdb +session sharedext sharedmem +simplexml snmp soap sockets solid spell (+)spl sqlite sqlite3 ssl suhosin sybase-ct sysvipc threads tidy +tokenizer truetype unicode wddx (+)xml (+)xmlreader xmlrpc (+)xmlwriter xpm xsl yaz zip zlib}
Installed versions: 5.3.5(5.3){tbz2}(12:55:00 AM 02/03/2011)(apache2 berkdb bzip2 calendar cli crypt ctype fileinfo filter ftp gd gdbm hash iconv imap json kerberos ldap mysql nls pdo phar pic posix postgres readline session simplexml ssl suhosin threads tokenizer truetype unicode xml xpm zip zlib -adabas -bcmath -birdstep -cdb -cgi -cjk -curl -curlwrappers -db2 -dbmaker -debug -doc -embed -empress -empress-bcs -enchant -esoob -exif -firebird -flatfile -fpm -frontbase -gd-external -gmp -inifile -interbase -intl -iodbc -ipv6 -kolab -ldap-sasl -libedit -mhash -mssql -mysqli -mysqlnd -oci8 -oci8-instant-client -odbc -pcntl -qdbm -recode -sapdb -sharedext -sharedmem -snmp -soap -sockets -solid -spell -sqlite -sqlite3 -sybase-ct -sysvipc -tidy -wddx -xmlreader -xmlrpc -xmlwriter -xsl)

why does the ebuild do this?
Back to top
View user's profile Send private message
patrix_neo
Guru
Guru


Joined: 08 Jan 2004
Posts: 520
Location: The Maldives

PostPosted: Wed Mar 09, 2011 5:55 pm    Post subject: Reply with quote

If interested, here is my USE-flags:

dev-lang/php:

[ebuild   R   ] dev-lang/php-5.3.5  USE="apache2 berkdb bzip2 cli crypt ctype exif fileinfo filter gd gdbm hash iconv ipv6 json ldap mysql nls phar posix readline session simplexml spell sqlite ssl tokenizer truetype unicode xml zlib


apache2:

[ebuild   R   ] www-servers/apache-2.2.16  USE="ldap ssl " APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif speling status unique_id userdir usertrack vhost_alias


I removed the non-used USE-flags from it.
Back to top
View user's profile Send private message
palettentreter
Tux's lil' helper
Tux's lil' helper


Joined: 06 Feb 2006
Posts: 104

PostPosted: Wed Mar 09, 2011 6:15 pm    Post subject: Reply with quote

yes, it's the apache2 useflag on php that should make it install the apache module, right? Could you tell me which package installed the symlink you have in /usr/lib64/apache2/modules? I.e. I need the output of "qfile /usr/lib64/apache2/modules/libphp5.so". BTW, all the other files in my /usr/lib64/apache2/modules are actual files, not symlinks, and as shown above, it used to be the same with php-5.3.3-r1. So what has happened? Rebuilding php doesn't help. And even if it had, it shouldn't have been necessary in the first place when the apache2 useflag has always been set and other useflags didn't change either...
Back to top
View user's profile Send private message
patrix_neo
Guru
Guru


Joined: 08 Jan 2004
Posts: 520
Location: The Maldives

PostPosted: Wed Mar 09, 2011 6:34 pm    Post subject: Reply with quote

palettentreter wrote:
yes, it's the apache2 useflag on php that should make it install the apache module, right? Could you tell me which package installed the symlink you have in /usr/lib64/apache2/modules? I.e. I need the output of "qfile /usr/lib64/apache2/modules/libphp5.so". BTW, all the other files in my /usr/lib64/apache2/modules are actual files, not symlinks, and as shown above, it used to be the same with php-5.3.3-r1. So what has happened? Rebuilding php doesn't help. And even if it had, it shouldn't have been necessary in the first place when the apache2 useflag has always been set and other useflags didn't change either...


qfile:

 ~ # qfile /usr/lib64/apache2/modules/libphp5.so
 ~ # qfile /usr/lib64/php5.3/apache2/libphp5.so
dev-lang/php (/usr/lib64/php5.3/apache2/libphp5.so)


It was a long time ago I was installing this. But either it was a manual work you had to do. If you dont have /usr/lib64/php5.x/apache2/libphp5.so, you cant have a symlink to it, I guess? It just have to be found at ../modules/libphp5.so as a symlink or actual file for Apache to be able to load the module according to

httpd.conf:

LoadModule php5_module modules/libphp5.so


btw, I have a multilib setup. Maybe that is changing the behaviour, when looking at the libphp5.so place, if you are on a true 64-bit only setup? And, yes, you certainly need USE-flag apache2 for the dev-php install.
Back to top
View user's profile Send private message
Littlenux
n00b
n00b


Joined: 07 Mar 2011
Posts: 27

PostPosted: Wed Mar 09, 2011 7:08 pm    Post subject: Reply with quote

patrix_neo wrote:
I so happens to have php/apache2 setup. And mine works.

Do you have this ?:

Code:

~ # cat /etc/apache2/httpd.conf |grep -i php
LoadModule php5_module modules/libphp5.so


and this?
Code:

ls -l `locate libphp5.so`
lrwxrwxrwx 1 root root      36  9 jan 16.16 /usr/lib64/apache2/modules/libphp5.so -> /usr/lib64/php5.3/apache2/libphp5.so
-rw-r--r-- 1 root root 8681528  9 jan 16.16 /usr/lib64/php5.3/apache2/libphp5.so


Result before compilation:
Code:
gentoo ~ # cat /etc/apache2/httpd.conf |grep -i php
gentoo ~ # LoadModule php5_module modules/libphp5.so
-bash: LoadModule: command not found
gentoo ~ # ls -l `locate libphp5.so`
total 44
-rw-r--r-- 1 root    root     4766 Mar  1 22:16 index.html
-rw-r--r-- 1 root    root    27206 Mar  1 19:20 msg
drwxr-xr-x 7 portage portage  4096 Nov 27 17:52 portage-2.1.9.25
drwxr-xr-x 3 root    root     4096 Mar  4 02:32 portage-recover



Anon-E-moose wrote:
I think you need to recompile php, it looks like it's wanting to pickup new flags (I think that's what the asterisks mean)

That was the problem !
After "emerge php", "apache2ctl modules" return "php5_module (shared)"

Remarque 1: I had already do this "emerge php", so several compilations is perhaps necessary or I had done it before putting USE="apache2 php" in /etc/make.conf, I don't remember. So, Anon-E-moose you remarque about the asterix is certainly right.

Remarque 2: /usr/lib/apache2/modules/libphp5.so is now well present.

Remarque 3: "ls -l `locate libphp5.so`" return exactly the same result after compilation so it's not significant.

So thanks a lot! But now I have a new problem :-(

I had restart Apache and I can see it in the process list but when I try to get 127.0.0.1/index.html I have nothing.
With "netstat -ln --tcp" I can see port 80 is not listening :x I will examine httpd.conf but if you have an idea...
Back to top
View user's profile Send private message
Stonic
n00b
n00b


Joined: 03 Jun 2007
Posts: 47

PostPosted: Wed Mar 09, 2011 8:47 pm    Post subject: Reply with quote

Do you get any errors when starting apache2? Check:

/var/log/apache2/error_log after you start it (I know in some cases, the init script reports apache started OK, but error log says otherwise).

You might need to check the vhost configurations for apache as well:

Code:
/etc/apache2/vhosts.d/00_default_vhost.conf

-and-
Code:
/etc/apache2/vhosts.d/default_vhost.include
Back to top
View user's profile Send private message
patrix_neo
Guru
Guru


Joined: 08 Jan 2004
Posts: 520
Location: The Maldives

PostPosted: Wed Mar 09, 2011 9:37 pm    Post subject: Reply with quote

Littlenux wrote:
patrix_neo wrote:
I so happens to have php/apache2 setup. And mine works.

Do you have this ?:

Code:

~ # cat /etc/apache2/httpd.conf |grep -i php
LoadModule php5_module modules/libphp5.so


and this?
Code:

ls -l `locate libphp5.so`
lrwxrwxrwx 1 root root      36  9 jan 16.16 /usr/lib64/apache2/modules/libphp5.so -> /usr/lib64/php5.3/apache2/libphp5.so
-rw-r--r-- 1 root root 8681528  9 jan 16.16 /usr/lib64/php5.3/apache2/libphp5.so


Result before compilation:
Code:
gentoo ~ # cat /etc/apache2/httpd.conf |grep -i php
gentoo ~ # LoadModule php5_module modules/libphp5.so
-bash: LoadModule: command not found
gentoo ~ # ls -l `locate libphp5.so`
total 44
-rw-r--r-- 1 root    root     4766 Mar  1 22:16 index.html
-rw-r--r-- 1 root    root    27206 Mar  1 19:20 msg
drwxr-xr-x 7 portage portage  4096 Nov 27 17:52 portage-2.1.9.25
drwxr-xr-x 3 root    root     4096 Mar  4 02:32 portage-recover



Anon-E-moose wrote:
I think you need to recompile php, it looks like it's wanting to pickup new flags (I think that's what the asterisks mean)

That was the problem !
After "emerge php", "apache2ctl modules" return "php5_module (shared)"

Remarque 1: I had already do this "emerge php", so several compilations is perhaps necessary or I had done it before putting USE="apache2 php" in /etc/make.conf, I don't remember. So, Anon-E-moose you remarque about the asterix is certainly right.

Remarque 2: /usr/lib/apache2/modules/libphp5.so is now well present.

Remarque 3: "ls -l `locate libphp5.so`" return exactly the same result after compilation so it's not significant.

So thanks a lot! But now I have a new problem :-(

I had restart Apache and I can see it in the process list but when I try to get 127.0.0.1/index.html I have nothing.
With "netstat -ln --tcp" I can see port 80 is not listening :x I will examine httpd.conf but if you have an idea...


LoadModule is not a command through the console/terminal. It is a part of the configuration file. You can find that one at:

/etc/apache2/httpd.conf

You will find a lot of LoadModule lines in httpd.conf. Just put it at the top of all those LoadModule lines. Then you are a step closer to a proper setup for apache/php.
Back to top
View user's profile Send private message
Littlenux
n00b
n00b


Joined: 07 Mar 2011
Posts: 27

PostPosted: Wed Mar 09, 2011 10:10 pm    Post subject: Reply with quote

Stonic wrote:
Do you get any errors when starting apache2? Check:

/var/log/apache2/error_log after you start it (I know in some cases, the init script reports apache started OK, but error log says otherwise).

You might need to check the vhost configurations for apache as well:

Code:
/etc/apache2/vhosts.d/00_default_vhost.conf

-and-
Code:
/etc/apache2/vhosts.d/default_vhost.include

/var/log/apache2/error_log report nothing since the compilation. No "resuming normal operation" or no "shuting down" when stoping/restarting Apache. This is strange.

Code:
# apache2ctl virtualhosts

return:
Code:
apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.0.11 for ServerName
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
_default_:443          localhost (/etc/apache2/vhosts.d/00_default_ssl_vhost.conf:11)
*:80                   is a NameVirtualHost
         default server localhost (/etc/apache2/vhosts.d/00_default_vhost.conf:38)
         port 80 namevhost localhost (/etc/apache2/vhosts.d/00_default_vhost.conf:38)
Syntax OK


/etc/apache2/vhosts.d/00_default_vhost.conf
and
/etc/apache2/vhosts.d/default_vhost.include

seem ok.
Back to top
View user's profile Send private message
Littlenux
n00b
n00b


Joined: 07 Mar 2011
Posts: 27

PostPosted: Wed Mar 09, 2011 10:25 pm    Post subject: Reply with quote

patrix_neo wrote:

LoadModule is not a command through the console/terminal. It is a part of the configuration file. You can find that one at:

/etc/apache2/httpd.conf

You will find a lot of LoadModule lines in httpd.conf. Just put it at the top of all those LoadModule lines. Then you are a step closer to a proper setup for apache/php.


OK, I have failed to catch the "httpd.conf" word in your original message.

For the record, since the recompilation the PHP module is loaded but it does not appear in /etc/apache2/httpd.conf. Here is how it work:
In /etc/apache2/httpd.conf there's an include line: "Include /etc/apache2/modules.d/*.conf"
and in /etc/apache2/modules.d/ there's a "70_mod_php5.conf" file which load the PHP module.
Back to top
View user's profile Send private message
patrix_neo
Guru
Guru


Joined: 08 Jan 2004
Posts: 520
Location: The Maldives

PostPosted: Wed Mar 09, 2011 11:15 pm    Post subject: Reply with quote

Littlenux wrote:
patrix_neo wrote:

LoadModule is not a command through the console/terminal. It is a part of the configuration file. You can find that one at:

/etc/apache2/httpd.conf

You will find a lot of LoadModule lines in httpd.conf. Just put it at the top of all those LoadModule lines. Then you are a step closer to a proper setup for apache/php.


OK, I have failed to catch the "httpd.conf" word in your original message.

For the record, since the recompilation the PHP module is loaded but it does not appear in /etc/apache2/httpd.conf. Here is how it work:
In /etc/apache2/httpd.conf there's an include line: "Include /etc/apache2/modules.d/*.conf"
and in /etc/apache2/modules.d/ there's a "70_mod_php5.conf" file which load the PHP module.


I dont know exactly how all those config-files interact with eachother. I do know that most if not ALL config options was moved back in to httpd.conf again. This happened late 2010 if my memory is correct.
I did NOT touch any 70_mod_php5.conf files either. When examining the file, it supposedly loads the module and adds the php handler. Very annoying splitting options among files, in my opinion. But options is good - I suppose.

[edit] Happy news. I did an experiment and commented the LoadModule-line for php5 in /etc/apache2/httpd.conf and restarted apache with success. I can report that php works with the 70_mod_php5.conf. I did learn something new this day too. How about that. 8O
Back to top
View user's profile Send private message
Littlenux
n00b
n00b


Joined: 07 Mar 2011
Posts: 27

PostPosted: Thu Mar 10, 2011 3:05 pm    Post subject: Reply with quote

For the record, about Apache which do not listen:

A simple emerge apache + restart does not solve the problem
I had to:
emerge --unmerge apache
rm -r /etc/apache2/
emerge apache
then apache worked again but without PHP...

so I do again:
apache2ctl stop
emerge php
apache2ctl start
then again apache start without listen on port 80...

One point I noticed: when Apache was working well there was several Apache process (normal), when Apache was not listening there was only a single process and I had to kill it, apache2ctl stop did nothing.

At this point I give up, something seem broken. I reload a backup.
Back to top
View user's profile Send private message
chiefbag
Guru
Guru


Joined: 01 Oct 2010
Posts: 542
Location: The Kingdom

PostPosted: Thu Mar 10, 2011 9:12 pm    Post subject: Reply with quote

For the record its better to use the init files for starting and stopping.
Code:
/etc/init.d/apache2 start
/etc/init.d/apache2 stop
/etc/init.d/apache2 reload
/etc/init.d/apache2 restart
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum