views:

1863

answers:

5

using Fast CGI I can't get it to read the php.ini file. See my phpinfo below.

System Windows NT WIN-PAFTBLXQWYW 6.0 build 6001
Build Date Mar 5 2009 19:43:24
Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--enable-debug-pack" "--with-snapshot-template=d:\php-sdk\snap_5_2\vc6\x86\template" "--with-php-build=d:\php-sdk\snap_5_2\vc6\x86\php_build" "--disable-zts" "--disable-isapi" "--disable-nsapi" "--with-pdo-oci=D:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8=D:\php-sdk\oracle\instantclient10\sdk,shared" "--enable-htscanner=shared"
Server API CGI/FastCGI
Virtual Directory Support disabled
Configuration File (php.ini) Path C:\Windows
Loaded Configuration File (none)
Scan this dir for additional .ini files (none)

My php.ini file is residing in both my c:\php and my c:\windows I've made sure it has read permissions in both places from network service.

I've added various registry settings, Environment Variables and followed multiple tutorials found on the web and no dice as of yet. Rebooted after each.

My original install was using MS "Web Platform Installer" however I have since rebooted.

Any ideas on where to go from here would be most welcome.

A: 

Does the configuration file path match where you've put php.ini?

Just create a file called getinfo.php with the following:

<?php phpinfo(); ?>

Save it in your root directory, and go to http://www.yourwebsite.com/getinfo.php to see what it is.

John at CashCommons
Yes. I've attempted to put the php.ini in the c:\windows (yes I know it's bad practice [attempting to get it to work before securing it]. I've also changed the PHPRC var in order to try and get that directory changed away from c:\windows but it still displays c:\windows in the phpinfo() as shown above.
Martin Murphy
A: 

You need 64bit version of php and fast-cgi.
I didn't find 64-bit installer of php, so you need to compile php from source.

Sharique
fast-cgi is working and executing properly but it is not showing that it loaded the config file.
Martin Murphy
It means fast-cgi 64-bit (I think). Also look for 32-bit module (php here) compatibility in 64 bit IIS.look at http://learn.iis.net/page.aspx/248/configuring-fastcgi-extension-for-iis-60/#FastCGI_Extension_1.5
Sharique
A: 

I can't tell you what is wrong with your installation, but I have successfully installed PHP on Windows Vista 64-bit. I don't recall having any problems.

My phpinfo file says:

System Windows NT AQUA 6.0 build 6002
Build Date Apr 9 2009 08:22:37
Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--enable-debug-pack" "--with-snapshot-template=d:\php-sdk\snap_5_2\vc6\x86\template" "--with-php-build=d:\php-sdk\snap_5_2\vc6\x86\php_build" "--with-pdo-oci=D:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8=D:\php-sdk\oracle\instantclient10\sdk,shared"
Server API ISAPI
Virtual Directory Support enabled
Configuration File (php.ini) Path C:\Windows
Loaded Configuration File C:\PHP\php.ini
Scan this dir for additional .ini files (none)

The version of PHP I installed was PHP 5.2.9-2 zip package - 8 April 2009 from http://www.php.net/downloads.php. This is a 32-bit package, but does run fine under Vista-64. I had previously had troubles getting the 64-bit versions to run, so I settled on the 32-bit version instead. It worked for me.

You will note that I used ISAPI, which is recommended over CGI. Either way, I don't think it should make a difference.

If you do want to run 64-bit PHP on Windows, you might want to try to do it by installing Apache first with the instructions given here: http://www.elxis.org/guides/developers-guides/64bit-apache-php-mysql-windows.html However, I can't vouch for this as I haven't tried this particular set of instructions. But it does look quite complete.

Those instructions (if you haven't already seen them) might also give you some hints as to where the various PHP files have to be.

The other thing to check is to review the PHP writeup on Installation on Windows systems at: http://ca2.php.net/install.windows - the user comments are especially useful and may give you ideas to try before having to go the uninstall/reinstall route.

Hope something in here helps.

lkessler
You say you compiled PHP on Vista x64 but then posted a phpinfo from a BSD install. How is that relevant and or helpful?
Cody Caughlan
Oops. My mistake. I posted the phpinfo from my website, rather than from my own machine. I shouldn't have used such similar URLs for my local and hosted sites, and I should have looked more closely at the PHP info. I've now updated the phpinfo in my answer. Thanks for pointing this out.
lkessler
A: 

On Windows XP I have had better success in putting my php.ini in C:\Windows\system32. Since you're in x64 try putting in C:\Windows\system64. I would then usually place an alias to this in C:\php for easier access, but thats not strictly necessary.

Of course, restart IIS after you put the file in that location.

Cody Caughlan
+2  A: 

I finally figured out the problem. Windows Server 2008 by default apparently has "hide file extensions for known file types" enabled by default. I hadn't noticed it because it was displaying the extensions for other files around it

I had renamed my file to php.ini.ini at some point accidentally and it was appearing to me as php.ini due to the setting.

Felt really dumb when I figured it out. But looking at the directory with that setting on it's actually very difficult to tell.

Martin Murphy
Wow. 3 months to find your answer. Hope it didn't delay your work that long. I wish our answers could have helped you more.
lkessler