-   Linux - Software (
-   -   php5 apache2 mysql4 don't work, php does not seem to read php.ini (

atom 03-24-2005 10:51 AM

[solved] php5 apache2 mysql4 don't work, php does not seem to read php.ini
Hi everyone, and thanks for reading this.

I'm setting up a server on FC 3. Done the same thing on RH9 and it worked, and i'm stumped.

I downloaded apache2, php5 (src) and mysql (standard bin they provide).
I compiled apache2. Installed, configured, starts fine.
Compiled php5 as sapi module for apache2. Apache loads module fine, phpinfo() displays fine. php works (at least as code is concerned). I compiled it with mysql support too, but now i'm clueless as to why it does not work. this is my php5 compilation command:
./configure \
--prefix=/usr/local/php5/ \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-config-file-path=/etc \
--with-zlib \
--with-bz2 \
--with-jpeg \
--with-tiff \
--enable-ftp \
--with-gd \
--with-mysql=/usr/local/mysql/ \
--with-mysql-sock=/var/lib/mysql/mysql.sock \
echo -e "\n\nconfigure complete\a"
sleep 5
echo -e "\n\nstarting compilation\a"
echo -e "\n\ninstalling...\a"
make install
echo -e "\n\nall done. \n"

now it compiles fine. But when it's run it does not seem to read the php.ini, or even try and use the mysql.sock that was compiled in. However, the path to the php.ini is set fine. (according to phpinfo()).

Any ideas anyone?

oh, btw, it's this server, if anyone wants to check...

Thanks again for any help... this has been getting on my nerves for some time now.

trevelluk 03-24-2005 11:17 AM

I think the path to the php.ini actually needs to include the filename. So it should be /etc/php.ini, not just /etc

This is the way that it's set up here anyway (admittedly, this is the Windows version of PHP, but I'd imagine that the Linux version is the same).

atom 03-24-2005 11:20 AM

Tried that too, didn't work.

Anyway both *should* work, because php.ini is always php.ini... i'll try with /etc/ this time :D... i'll keep you guys posted. In the meantime, ideas are still welcome, I don't think this will work either.


trevelluk 03-24-2005 11:35 AM

Just a thought, but what are the permissions on the php.ini file? You could try giving read access to everyone and see if this helps.

atom 03-24-2005 11:42 AM


-rw-r--r--  1 root root  41177 mar  9 14:28 php.ini
Yeah, i thought of that... it would seem it isn't connected. I'll try giving the file to user apache (group apache) and see if that's what's preventing it to read it.


-rw-r--r--  1 apache apache  41177 mar  9 14:28 php.ini
No change whatsoever.

Meanwhile, i'll try mrproper-ing the php source and see if that's what's blocking it. I'll also try the v. 2.0.53 version of apache, 2.0.52 was masked with php5 out of portage for a reason...

atom 03-24-2005 12:05 PM

Problem solved. Apparently version 2.0.52 does not work well with php5. Everything should work now.

Thanks for your time :D

All times are GMT -5. The time now is 01:33 PM.