开发者

PHP.ini Settings Are Ignored By PHP5.3.5 Running With Windows 7 And Apache 2.2.15

开发者 https://www.devze.com 2023-02-05 01:14 出处:网络
I did an install of PHP5.3.5 on Windows 7 Home Premium using the MSI installer download. I got it to overwrite a previous version of PHP5 in C:\\php5\\

I did an install of PHP5.3.5 on Windows 7 Home Premium using the MSI installer download. I got it to overwrite a previous version of PHP5 in C:\php5\

When first testing it, the server failed to start. I fixed this by adding the path to PHP in the Apache2.2 httpd file where the installer had inserted 2 lines of coded pointing to the ini file directory and the PHP DLL but had left out the directory path. After doing this, the server starts ok and I can run phpinfo to view the PHP settings in my web browser on local host.

In the phpinfo it states that the loaded configuration file is C:\php5\php.ini as expected. But if I make any changes to the settings, and reboot the server, none of the changes are reflected in phpinfo. Yes, I do refresh the browser window.

If I rename the php.ini to something else to make it invisible phpinfo then correctly identifies that there is no php.ini file loaded.

So the sett开发者_JS百科ings in php.ini are being ignored and some default settings are being used (but I have no idea where these are derived from). As far as I can tell, there are no other php.ini files on my computer.

In phpinfo it states that the Configuration File (php.ini) Path is C:\Windows but this is the same as on a Windows XP computer that I work on. And in the windows folder I don't see any php.ini file.

In the windows registry, there is no mention of PHP5, and the PATH environment variable starts with C:\php5\;

So hopefully someone can suggest how I can get PHP5 to take notice of the C:\php5\php.ini settings. :)


You may have more than one php.ini file. If you do, and you don't realize that you do, you will be slowly driven insane [I speak from experience].

So, have you upgraded from a previous version of php to your current version? If so, delete all previous version php.ini files. Check your environment and system variable paths. Eliminate any references to previous versions.

You say youp're running Apache, but is MSII also running, or did you turn it off?

You may have to go into registry ( I no longer use MS OS so I don't know what or how VISTA or Sys7 implement Registry. I used XP when I had this problem and I had to manually eliminate Registry entries for previous versions of PHP.

Lots a luck!

0

精彩评论

暂无评论...
验证码 换一张
取 消