php.ini in Windows Vista
I hate it when something that should be simple just ends up boggling my mind. What started as a 5 minute task took me over 6 hours to figure out, due to a silly Windows Vista permission problem.
I was trying to load GD into my local windows development. It should have been as easy as uncommenting the line in the .ini and restarting Apache. With Vista though, nothing is easy.
The phpinfo() was telling me that the ini file that was being read was from my PHP directory. Really, with Vista, it isn't. If there is no ini in Windows, then it uses the default values. Which, OK, that's fine, but a little frustrating. Had it been just that, it would have been a 30 minute problem.
However, you have to be running as administrator in order to save something into C:\windows. The catch is, I was not getting any error messages. Everything appeared to be fine when I saved, but actually I was not saving the file.
In order to correct, I had to run my text editor with administrative privileges and then save the php.ini. Presto, everything worked after that. I think anyway. What is weird though is via command line php --ini shows it loading from the php directory, where as from phpinfo(), it shows the ini in the windows directory. Also weird, php -m showed all along the GD Lib loaded, where as the phpinfo() did not. I don't for the life of me understand the deviation in the cmd line, when I know for a fact that GD was not loaded.
Maybe someone smarter than I can explain it to me?
3 Comments
Jump to comment form | comments rssWarning: Invalid argument supplied for foreach() in /home/niceguy/public_html/var/cache/templates/c71f60f688f84ae1cdfd7639a9815a39.php on line 3