Click to See Complete Forum and Search --> : NT4+IIS4 + php4.01pl2


Anon
08-10-2000, 01:23 PM
I have tried everything listed in every how-to-do-php website on the net.
Yes to:
giving everyone and I_Usr_name FULL ACCESS to the scripts folder from permissions
giving first script and then execute rights to the folder from the IIS console
putting the php.ini in c:\winnt and then in c:php
making sure there's only ONE php.ini file
giving everyone and the I_Usr_name full access to the c:\php folder
stopping and restarting IIS from the command prompt.

All my php pages give my browser is "The specified module could not be found"
HOWEVER if I am at my server and run php from the command proprompt, it works fine.

Has anyone out there got IIS4 (not 3, not 5, not apache) working with phpo4.01pl2?? (not php3)

thanks
harry@urgentmail.com

Anon
08-11-2000, 04:52 AM
Hiya,

Just to let you know I have NT4 Service Pack 4 running IIS 4.0 and PHP 4.01pl2.

Everything seems to be working fine at the moment.

All I can suggest is make sure you only have 1 php.ini file, get rid of php3.ini (if you have one left) and reboot the server after installation. (Just restarting the service didn't seem to be enough)

Also I didn't have to change any default permissions.

Let me know how you get on!

Mark

Anon
08-13-2000, 03:45 AM
Thanks for the help Mark. But unfortunately a reboot didnt get it to go either.

I sure wish I knew what the name of "Specified Module" that wasn't found ! Then maybe I'd have a clue as to what php wants from me.

In the IIS console's applications section, Did you use
php.exe "%s" "%s"
or did you use the
php4isapi.dll "%s" "%s"

Sigh. Well Mark - can you tell me which version of the INI file (the optimized or regular dist) did you use and maybe if you feel comfortable emailing it to me?
(I'll understand if you arent fond of sending you php.ini file to a stranger)

Harry

Anon
08-13-2000, 04:00 AM
Oh by the way - the first time I try to load one of my test pages (any of my php pages) I get this as the resulting page

HTTP/1.1 500 Server Error

then any reloads will give me the
"The specified module could not be found" message.

Is that a helpful clue?

ALSO Note that while
http://www.eporndirect.com/phpdir/HELLO.PHP
results in these errors,
http://www.eporndirect.com/phpdir/test.html
comes out fine.

I believe that tells me I have the folder rights set correctly so the I_Usr_name anonymous visitor can access this directory. I am sure the trouble lies in either php.ini not done correctly or one of the exe or dll's PHP uses is not where it should be.

oi!
harry

Anon
08-14-2000, 03:16 AM
Harry,

I just saw your message and something struck me. I'm guessing you configured PHP via the Microsoft Management Console (MMC) by doing the following, am I correct? [By the way, I have PHP4 running on 2 boxes, both running NT4 SP5 & IIS 4 and have gotten a bit familiar with the ins and outs of configuring PHP on IIS.]

1. Running MMC
2. Right-clicking on your webserver and selecting Properties from the popup menu.
3. Clicking the "Home Directory" tab
4. Clicking the [Configuration...] button
5. In the "App Mappings" tab section, you added a mapping for the file extension you use for your PHP scripts (I use .php, but others use .phtml, .php3, etc.).

Now here's what I'd like to know: How EXACTLY did you configure the mapping? In other words, assuming you decompressed the PHP distribution files to C:\PHP (I'm going to assume the drive letter here), does your setup look like the following?

+-------------------------------------------------
| Add/Edit Application Extension Mapping
+-------------------------------------------------
| Executable: C:\PHP\php4isapi.dll
| Extension: .php
| Method Exclusions:
| [x] Script engine
| [x] Check that file exists [OK] [Cancel] [Help]
+-------------------------------------------------

or does it look like this?

+-------------------------------------------------
| Add/Edit Application Extension Mapping
+-------------------------------------------------
| Executable: C:\PHP\php.exe %s %s
| Extension: .php
| Method Exclusions:
| [x] Script engine
| [x] Check that file exists [OK] [Cancel] [Help]
+-------------------------------------------------

Note the ISAPI module does NOT have the ... %s %s... business, and even the .EXE version does NOT have quotes around the %s's. This is important.

Also, if you are using the ISAPI module, did you in the Properties for the webserver click on the "ISAPI Filters" tab and add a filter called PHP which also contained the path to the php4isapi.dll file (with NO %s %s either)?

Final notes (and please excuse these comments if they are too obvious, but I've found many people, including myself, at times falling prey to the simple things):

* Are you loading your PHP scripts thru the webserver as opposed to locally from the HD? (e.g., loading http://yourwebsite/phpfile and not C:\wwwroot\phpfile, which doesn't work)

* Are you PHP scripts in files with extensions which are in the App Mappings? (e.g., no good having your PHP scripts in files like myscript.PHP if you set the App Mapping for .PHP3)

* Note the checkbox above "[x] Check that file exists" is not checked by default in IIS, but it is handy to do so, as it avoids the webserver giving detailed information in error messages when someone lists a URL to an invalid PHP file, such as http://yourwebsite/doesnotexist.php, but rather gives the 404 error, which is more appropriate. Just a suggestion.

* The win32 version of PHP4 still needs a little work, even when you DO have it setup and working. Basic PHP scripts should work fine, but the session handling features still have kinks. So don't get disheartened if you have problems even when it's working. In many cases it IS user-error, but at times you will have things not work and it may be due to bugs that are still being worked on. Be sure, once you're up and running, that if you have serious trouble getting something to work, to check the appropriate sites (PHP Builder, PHP.NET's bug database, etc.) for possible insight into whether it's you or the engine.

Hope this was of some help. If not, please provide more details of your config and we'll see if we can't get things working.

Anon
08-14-2000, 04:41 AM
Hi harry!

My php.ini is as follows, actually I'll mail it to you, send me you email address to mfell-crook@warwickint.com and I'll mail it you back.

Just checked and my PHP directory is actually in c:\winnt. Not sure if this makes a difference.

Also I configured to PHP in iis by simply pointing to c:\winnt\php.exe (no %s or anything)

Cheers

Mark

Anon
08-14-2000, 05:35 PM
You are a frigging genius! I Got my php engine working!
woo hoo;-)

Someone ought to tell the php.net boys to take down that faulty info about the %s %s parameters nonsense...........I wasted at least ten days of developement time....

you da man Frank!

ok, now onto tackling MySql working with php......

harry

Anon
08-15-2000, 11:13 AM
I recommend not using NT or IIS. Anyone using M$ products voluntarily is probably going to burn in hell for eternity. <grin>
(too bad that my workstation runs NT and I have no choice.. also gaming at home practically requires Win98 but nowadays I practically never boot to Win)

No, serious. IIS/NT is crappy when compared to iPlanet or Apache running on any decent UNIX variant. Scripting, development etc capabilities in UNIX are superior to NT, and ASP and FrontPage Extensions support for other servers than IIS eliminate the last single reason to run NT/IIS. Besides, ASP and FP are also crap if you ask my opinion. Too bad I will have to tolerate those because I work for an ISP. Business is business and what customers want they get.

It's never too late to abandon crappy M$ software and embrace the wonderful open source phenomenon! Praise the root, in the name of GNU, Linux and Apache, amen. ;)
(oops, sorry if I insulted someone's deepest religious feelings)


-jani

Anon
08-15-2000, 12:27 PM
So you're answer to my problem is that Bill Gate's produces ****ty products that are only in existence because of mass marketing so I need to replace every piece of OS and software on my server?

What can I say? (besides "Duh!") You're half right.
Bill and his products are evil and they are inferior; I agree with that half.
But you seem to have missed the obvious point that I *AM* trying to replace inferior ASP - otherwise why would I being installing PHP?

However, when someone is asking a technical question, the ANSWER is rarely "replacing everything you're using, install all new stuff and then take a few weeks to learn how to use the new stuff". When I call my ISP's tech support (and also MS's support) that is usually what I hear. And that's why I dont call any more

my last job and my current job hired me for the most part because I CAN make the EXISTING ****ty MS products work. jani, Work on your trouble shooting skills on every MS piece of crap out there - learn to give solutions - and you will find yourself in a better job than at an ISP.

or ignore that advice and enjoy life at an ISP.
Harry
PS: Frank closed this thread kids - the answers are in his post.