[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2007-08-04
19
Medium Priority
?
746 Views
Last Modified: 2012-08-14
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!
0
Comment
Question by:Andrew Angell
  • 11
  • 8
19 Comments
 
LVL 11

Author Comment

by:Andrew Angell
ID: 19632151
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
 
LVL 11

Author Comment

by:Andrew Angell
ID: 19632158
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
 
LVL 5

Expert Comment

by:administradores
ID: 19632160
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
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
LVL 11

Author Comment

by:Andrew Angell
ID: 19632195
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
 
LVL 11

Author Comment

by:Andrew Angell
ID: 19632202
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
 
LVL 5

Expert Comment

by:administradores
ID: 19632246
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
 
LVL 11

Author Comment

by:Andrew Angell
ID: 19632254
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
 
LVL 11

Author Comment

by:Andrew Angell
ID: 19632260
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
 
LVL 5

Expert Comment

by:administradores
ID: 19632262
PHPRC is the envorement var yes, that's correct so.

did you restart your server?
0
 
LVL 11

Author Comment

by:Andrew Angell
ID: 19632285
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
 
LVL 5

Expert Comment

by:administradores
ID: 19632295
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
 
LVL 5

Expert Comment

by:administradores
ID: 19632298
Also  if you don't have php.ini in c:\windows php use an internal configuration using the default values.
0
 
LVL 11

Author Comment

by:Andrew Angell
ID: 19632308
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
 
LVL 11

Author Comment

by:Andrew Angell
ID: 19632311
do I need to edit that registry key?
0
 
LVL 11

Author Comment

by:Andrew Angell
ID: 19632315
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
 
LVL 5

Accepted Solution

by:
administradores earned 2000 total points
ID: 19632339
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
 
LVL 5

Expert Comment

by:administradores
ID: 19632346
Mae sure HKEY_LOCAL_MACHINE\SOFTWARE\PHP\InstallDir is set to D:\PHP
0
 
LVL 11

Author Comment

by:Andrew Angell
ID: 19632410
%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
 
LVL 5

Expert Comment

by:administradores
ID: 19632931
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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
It’s a season to be thankful, and we’re thankful for users like you who engage on site, solve technology problems, and network with others in the industry. What tech are we most thankful for? Keep reading.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses
Course of the Month17 days, 18 hours left to enroll

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question