shinokage — 2011-01-11T19:24:38-05:00 — #1
Okay, so, I had PHP, Apache, and MySQL installed with WAMP, but I needed an extension to be used that I thought I couldn't change with it using WAMP (I don't know now, I've uninstalled it). So now I'm installing everything manually, but I came across a problem, which I thought I found an answer to in the PHP manual:
How do I know if my php.ini is being found and read? It seems like it isn't as my changes aren't being implemented.
To be sure your php.ini is being read by PHP, make a call to phpinfo(). Near the top, there will be a listing called Configuration File (php.ini). This will tell you where PHP is looking for php.ini and whether or not it's being read. If just a directory PATH exists, then it's not being read, and you should put your php.ini in that directory. If php.ini is included within the PATH, it is being read.
If php.ini is being read and you're running PHP as a module, then be sure to restart your web server after making changes to php.ini
See also php_ini_loaded_file().
How do I add my PHP directory to the PATH on Windows?
- On Windows NT+ and Windows Server 2000+:
- Go to Control Panel and open the System icon (Start -> Settings -> Control Panel -> System, or just Start -> Control Panel -> System for Windows XP/2003+)
- Go to the Advanced tab
- Click on the 'Environment Variables' button
- Look into the 'System Variables' pane
- Find the Path entry (you may need to scroll to find it)
- Double click on the Path entry
- Enter your PHP directory at the end, including ';' before (e.g. ;C:\php)
- Press OK
So I did all that, but from what I can tell it's still not reading the file. Any suggestions?
zarin_denatrose — 2011-01-11T23:32:51-05:00 — #2
Try setting the PHPIniDir variable in your Apache httpd.conf file. Mine is set like this:
LoadModule php5_module "/server/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
These paths are relative to the root of the drive they reside on in windows.
If you want to test this before digging through your conf file, just paste this code at the end, and substitute your own paths.
You will need to reset your server for any changes to take effect.
shinokage — 2011-01-12T15:20:59-05:00 — #3
Arg, it didn't work.... I think my computer's just retarded -_- (I even remembered to restart apache and everything )
Thank you anyways. With all this trouble I can just upload it and develop from my host's server. I can always reinstall WAMP....
zarin_denatrose — 2011-01-12T15:23:20-05:00 — #4
Hold on now, there are things that can be done.
First off, where is your new server being set up, where was the old one, and what is the current php.ini that is being loaded?
shinokage — 2011-01-12T17:30:07-05:00 — #5
Well, my original server was saved under c:\program files\wamp\ or something like that. But I uninstalled it.
I have no clue what php.ini file is being used because I don't have one in the place it's supposedly looking (according to that FAQ thing I posted before).
The phpinfo page says:
Configuration File (php.ini) Path: C:\Windows
Loaded Configuration File: C:\Programs\PHP\5.3.5\php.ini
But every time I try to make changes, nothing happens... >.>