Author |
|
WicketGangsta
Joined: 05 Jan 2007 Posts: 3
|
Posted: Fri 05 Jan '07 10:58 Post subject: Unable to read from php.ini |
|
|
Hi,
I'm not sure this is the correct section, but here is my problem.
I have a server currently running Apache 2.2.3 (downloaded from this site) and PHP 5.1.2. It seems that either Apache or PHP can't read my php.ini. I have tried to enable a few modules in PHP, but it didn't work
I use the same version of PHP on another server (Apache 2.0.59) and there is no problems, so I believe Apache is causing the problem.
Does anyone know what I can do ?
Thanks in advance,
WicketGangsta |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Fri 05 Jan '07 15:51 Post subject: |
|
|
add PHPIniDir to httpd.conf where your php.ini is.
e.g.
Code: |
PHPIniDir "C:/php"
LoadModule php5_module "C:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
|
|
|
Back to top |
|
WicketGangsta
Joined: 05 Jan 2007 Posts: 3
|
Posted: Fri 05 Jan '07 21:21 Post subject: |
|
|
I have already tried that solution, but still doesn't work. I can see by running phpinfo(); that my path for php.ini is correct. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Fri 05 Jan '07 23:48 Post subject: |
|
|
is the extension_dir = "C:/php/ext/" correct set in php.ini? |
|
Back to top |
|
WicketGangsta
Joined: 05 Jan 2007 Posts: 3
|
Posted: Sat 06 Jan '07 1:44 Post subject: |
|
|
Yes it is. It seems that PHP doesn't read my php.ini at all :'( |
|
Back to top |
|
Bruce
Joined: 28 Nov 2006 Posts: 77 Location: Mars
|
Posted: Mon 08 Jan '07 17:24 Post subject: |
|
|
(Hello this is how I have mine and recommend you get the 5.2 from php.net and put a space between LoadModule and AddHandler the following is a coppy of my httpd.config)
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
#LoadModule ssl_module modules/mod_ssl.so
LoadModule perl_module modules/mod_perl.so
LoadModule php5_module "C:/PHP/php5apache2_2.dll"
AddHandler application/x-httpd-php .php
#configure the path to php.ini
PHPIniDir "C:/PHP"
(before doing this in my php.ini-recommended I put
extension_dir = "C:/PHP/ext"
and saved as php.ini after you save as you mite have to rename from php
to php.ini
and mine worked the first time
I hope this helps )this is the Apache2 2.2.3 from Apachelounge and php5.2 |
|
Back to top |
|