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?


Jun 17, 2009 at 12:06 PM


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

Jun 17, 2009 at 12:49 PM


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 schenk | developer evangelist | developer & platform strategy group

phone: +49 89 3176 6558 | mobile: +49 151 5895 6104 | blog:

Microsoft Deutschland GmbH, Konrad-Zuse-Straße 1,D - 85716 Unterschleißheim,

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

Jun 18, 2009 at 11:53 AM

I have filed a question on the Windows Azure forum for this:

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.)