php.ini not used in Azure project

Jun 17, 2009 at 10:50 AM

Hi all,

I found myself in the situation that php-cgi.exe didn't use the php.ini file, that's in the same directory. I'm using Visual Studio 2010 on windows 7 RC. php.ini is tried to be loaded from c:\Windows. since this will not exist in the clouod, or not be accessible for changes on php.ini, i need to find a way to tell php-cgi.exe, from where to read php.ini.

Any ideas?

jan

Coordinator
Jun 17, 2009 at 12:06 PM

Check http://us3.php.net/manual/en/configuration.file.php

You can put php.ini in the current working directory, PHP should use that one.

Jun 17, 2009 at 12:49 PM

Maartenba,

I know, but it doesn’t. The php.ini is located aside php-cgi.exe and all the other files from the default install.

jan

jan schenk | developer evangelist | developer & platform strategy group

phone: +49 89 3176 6558 | mobile: +49 151 5895 6104 | blog: blogs.msdn.com/jansche

Microsoft Deutschland GmbH, Konrad-Zuse-Straße 1,D - 85716 Unterschleißheim, http://www.microsoft.com/germany

Geschäftsführer: Achim Berg (Vorsitzender), Marcel Schneider, Benjamin O. Orndorff, Keith Dolliver, Amtsgericht München, HRB 70438

Coordinator
Jun 18, 2009 at 11:53 AM

I have filed a question on the Windows Azure forum for this: http://social.msdn.microsoft.com/Forums/en-US/windowsazure/thread/3cc061d9-d3c9-4c47-a6c2-7aa6ff706fd3

Coordinator
Jun 19, 2009 at 11:46 AM

Solution from Steve Marx:

Are you using Visual Studio?  If so, be sure to make php.ini as Content so it gets copied with the rest of the output.

This is what I've done and put it in %RoleRoot%\php\php.ini without having to change any config.  (This seems to be the first place PHP looks for it.)