logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Other Software View previous topic :: View next topic
Reply to topic   Topic: Unable to read from php.ini
Author
WicketGangsta



Joined: 05 Jan 2007
Posts: 3

PostPosted: Fri 05 Jan '07 10:58    Post subject: Unable to read from php.ini Reply with quote

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 Sad

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

PostPosted: Fri 05 Jan '07 15:51    Post subject: Reply with quote

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

PostPosted: Fri 05 Jan '07 21:21    Post subject: Reply with quote

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

PostPosted: Fri 05 Jan '07 23:48    Post subject: Reply with quote

is the extension_dir = "C:/php/ext/" correct set in php.ini?
Back to top
WicketGangsta



Joined: 05 Jan 2007
Posts: 3

PostPosted: Sat 06 Jan '07 1:44    Post subject: Reply with quote

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

PostPosted: Mon 08 Jan '07 17:24    Post subject: Reply with quote

(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 Very Happy )this is the Apache2 2.2.3 from Apachelounge and php5.2
Back to top


Reply to topic   Topic: Unable to read from php.ini View previous topic :: View next topic
Post new topic   Forum Index -> Other Software