IIS 6.0 / FileMaker Server / PHP - Configuration screwed up and I've got some questions...???

I've got a web site setup in IIS with a certificate installed.  I've got PHP installed and I started playing with FileMaker Server 9 this weekend.  Upon installing it my PHP congiguration got screwed up because FM tried to install its own.  Now I've got D:\PHP and then filemaker also installed PHP to C:\Program Files\FileMaker\......\PHP.

When I look at Web Service Extensions in IIS it shows the PHP ISAPI Extension is still using D:\PHP\php5isapi.dll, however, none of my PHP stuff works right now because it's using the php.ini file that FileMaker installed.  It can't find CURL now (which is still enabled in D:\PHP\php.ini) and none of my PHP scripts are working correctly.

I have no idea how to get this fixed, so I was thinking I'd remove FileMaker/IIS/PHP and re-install from scratch.  The problem with that is that I already have my certificate installed to the web site in IIS and I don't know how to re-install it later without having to pay for a re-issue.

Any information on how I can fix this problem w/o re-installing would be great.  But I do need to just start over I'd like to know how I can backup my web site's certificate so that I can re-install later w/o having to pay again for re-issue.

Thanks!
LVL 11
Andrew AngellCo-Owner / DeveloperAsked:
Who is Participating?
 
administradoresConnect With a Mentor Commented:
You can use the registry method also in 5.2.2 but is the second place that php will check

windows order:

PHPRC enviorement variable
Registry (HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath)
PHP install directory (HKEY_LOCAL_MACHINE\SOFTWARE\PHP\InstallDir)
Windows directory
0
 
Andrew AngellCo-Owner / DeveloperAuthor Commented:
And another thing that's really confusing to me right now is that my php pages are coming up not found even when I click to browse from within IIS.  I'm trying to just get phpinfo() to work again but I'm getting page not found.

I've got a page called phpinfo.php in localhost/phptraining/phpinfo.php.  If I browse to http://localhost/phptraining/ I get the can't view directory message, but then when I add the filename on there I get page not found.

Basically it seems that all my PHP pages are giving me page not found now.  I'm as confused as ever.
0
 
Andrew AngellCo-Owner / DeveloperAuthor Commented:
Ok, I got that part fixed.  I had changed the PHP ISAPI Extension to point to the FileMaker isapi.dll file instead of the one I had installed manually.  When I did that apparently it turned off Allow so .php wasn't being used.  I turned Allow back on and how my phpinfo works again.

still back to the original problem, though, where my PHP install is screwded up because there are 2 installs on the machine.
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
administradoresCommented:
Try to locate the new php.ini file in the windows folders and rename it or delete it and test if the scripts works again.
0
 
Andrew AngellCo-Owner / DeveloperAuthor Commented:
Ok, well actually I jus tuninstalled FM Server in hopes it would remove what it did and get me back to how I was before.  Well, it did indeed remove the php.ini file that was included in the FM install...however my scripts still can't find CURL right now!?  

I double checked my php.ini and curl is enabled.  I also have the necessary .dll's for curl in PATH as well as the PHP directory....just like it's always been.

I'm still getting undefined call to CURL, though, and I'm also getting errors with my time errors again:

Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function.

I had fixed that in php.ini so it used my timezone and that error had gone away.

The php.ini FM installed is now gone, and I searched the system for php.ini and the only one I find is mine at D:\PHP.  I checked it, yet again, and all my extensions are still enabled as they were as well as all the other changes I had made to this file.

I also double checked the isapi.dll used in IIS again, and it's using D:\PHP\php5isapi.dll as it should.

I'm totally lost.  I have no idea why PHP can't find CURL or my timezone settings that are set in php.ini.  What the heck is it looking at???
0
 
Andrew AngellCo-Owner / DeveloperAuthor Commented:
Does this help you at all?  http://www.angelleye.com/phptraining/phpinfo.php

I don't know if that displays anything about curl installs or not.  I don't see anything myself, but figured I'd put it here for you guys to see too.

In my mind I should be right back to a regular install of IIS/PHP. I don't understand what's gone wrong here.  I have 1 PHP install, 1 php.ini file, everything still just as it was before.  But PHP is acting like I've never made a single change past initial install.
0
 
administradoresCommented:
PHP is looking for the php.ini in C:\WINDOWS as your phpinfo says so you must set your windows variable PHPRC to d:\PHP
0
 
Andrew AngellCo-Owner / DeveloperAuthor Commented:
Ok I'm a little confused.  I see where it shows that it's looking for php.ini in C:\Windows, however, I don't even have a php.ini file in C:\Windows.  So how is PHP even working at all???

Also, I'm not exactly sure what PHPRC to D:\PHP means?  Are you talking about enviornment variable in the advanced tab of my computer properties?  That is indeed set to D:\PHP.

Or are you talking about something else?
0
 
Andrew AngellCo-Owner / DeveloperAuthor Commented:
And here's another thing.  If you look at the date portion of that phpinfo page, it's showing Default timezone is America/Chicago, which is what I set in D:\PHP\php.ini in order to fix that timezone problem.  But I'm getting that error right now when I run those scripts, even though this phpinfo page is showing it should be set to that.

0
 
administradoresCommented:
PHPRC is the envorement var yes, that's correct so.

did you restart your server?
0
 
Andrew AngellCo-Owner / DeveloperAuthor Commented:
I went ahead and rebooted again just to be sure.  Same problem, though.  It still shows it's looking in C:\Windows for php.ini but php.ini does not exist there.  However, PHP is working enough to show me phpinfo(), but it's not enabling everything I've got enabled in my D:\PHP.ini.

I'm as lost as ever.

Back to the PATH enviornment variable, C:\Windows, C:\Windows\System32, many others, and D:\PHP all exist on that line...as they always have.  I guess I never really even looked at phpinfo() to see if it ever said D:\PHP\php.ini instead of C:\Windows but I guess it must have..??
0
 
administradoresCommented:
PHPRC must be set as windows enviorement variable.

make sure this windows command echo %phprc% outputs d:\php\

from php documentation.

php.ini is searched in these locations (in order):

SAPI module specific location (PHPIniDir directive in Apache 2, -c command line option in CGI and CLI, php_ini parameter in NSAPI, PHP_INI_PATH environment variable in THTTPD)

The PHPRC environment variable. Before PHP 5.2.0 this was checked after the registry key mentioned below.

HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath (Windows Registry location)

Current working directory (for CLI)

The web server's directory (for SAPI modules), or directory of PHP (otherwise in Windows)

Windows directory (C:\windows or C:\winnt) (for Windows), or --with-config-file-path compile time option
0
 
administradoresCommented:
Also  if you don't have php.ini in c:\windows php use an internal configuration using the default values.
0
 
Andrew AngellCo-Owner / DeveloperAuthor Commented:
Forgive my ignorance, but you're losing me again.  I'm a Classic ASP guy that moved to PHP.  The initial install of everything went very smoothly following guides and I never had to mess with any of this stuff.

When I first installed PHP I unzipped to D:\PHP and then I added D:\PHP to the PATH in enviornment variables.  I added the PHP ISAPI Extension into IIS and pointed it to D:\PHP\php5asapi.dll.  I then edited my php.ini file how as necessary and rebooted.  Everything worked beautifully.

As it stands now all of those settings are still exactly the same, but for some reason it's looking to C:\Windows instead of D:\PHP.  I've been looking at the docs and I don't quite understand the order...seems like that's mostly for Apache..??  

I placed a copy of my D:\PHP\php.ini file in C:\Windows and rebooted and now it is actually working.  However, it doesn't seem "correct" and I'd like to figure out what's changed that's causing it to look to C:\Windows instead of D:\PHP.  If you could bare with me a little longer that'd be cool.  Thanks!
0
 
Andrew AngellCo-Owner / DeveloperAuthor Commented:
do I need to edit that registry key?
0
 
Andrew AngellCo-Owner / DeveloperAuthor Commented:
Ok, no I don't think so.  That key doesn't exist in my registry and it says that was before PHP 5.2.
0
 
administradoresCommented:
Mae sure HKEY_LOCAL_MACHINE\SOFTWARE\PHP\InstallDir is set to D:\PHP
0
 
Andrew AngellCo-Owner / DeveloperAuthor Commented:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Intel\DMIX;D:\PHP;C:\Program Files\DataDirect\slodbc55\

That is what my PATH in enviornment variables is.  The only difference between now and before is the addition of C:\Program Files\DataDirect\slodbc55\ on the end.  I just installed new ODBC drivers as well so that must have been added at that time.

So I'm still not understanding why it's looking at C:\Windows now instead of D:\PHP.  
0
 
administradoresCommented:
well, php does not look at the PATH variable for the ini file, and it looks in c:\windows because is the default place to look when all other place fails.

You can download php sourcecode and read from there and then you will understand all of this or just set PHPRC or makesure HKEY_LOCAL_MACHINE\SOFTWARE\PHP\InstallDir is set to d:\php or use one of the other methods, i think when you uninstalled filemaker you changed the installdir key. forget the PATH variable nd you can use google to search PHPRC and meaby you can understand. hope the above helps.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.