|
Subject:
|
php installation folders / pws
|
|
Posted By:
|
kc5f
|
Post Date:
|
12/24/2003 3:38:53 PM
|
Since the http://www.php4win.de/ site shown in the book is inactive, I did as suggested and went to htt://www.php.net and downloaded the PHP 4.3.4 zip package. However, when I unzipped it, it ended up all in the single php directory, without subdirectories. I copied all of the files as specified in the book, and changed the paths as necessary in php.ini and the registry, but I don't think it worked.
When I go to c:\php at a command prompt and key in "php -i" I do get the proper html data. I'm using PWS on Windows 98, and it appears to work properly. (I've been using it before this, and the access for the home directory is set to allow Read, Execute and Scripts.)
However, when I create the phpinfo.php file in the book and navigate in IE6.0 to http://localhost/phpinfo.php I get "The page cannot be displayed". When I go to other (non-php) pages in localhost, they display properly.
Can you offer any suggestions? Thanks!
|
|
Reply By:
|
nikolai
|
Reply Date:
|
12/24/2003 6:39:58 PM
|
You unzipped the file incorrectly. The zip file contains many sub-directories. Also, you need to put your php.ini file in your system path; usually this goes into c:\windows on win98 machines.
There should be no need to modify the registry directly... unless there's something quirky with PWS.
I suggest starting over, and make sure you unzip the file keeping the directory names.
Take care,
Nik http://www.bigaction.org/
|
|
Reply By:
|
kc5f
|
Reply Date:
|
12/25/2003 11:16:25 AM
|
I did have the php.ini file in the C:\Windows and modified as shown on page 17. The registry update is also described there, to point to the php4isapi.dll file.
However, I will try downloading the whole thing again and try something other than "extract", which put all of the files in a single directory.
Thanks for the advice - I'll let you know what happens!
- Steve
|
|
Reply By:
|
kc5f
|
Reply Date:
|
12/25/2003 3:43:52 PM
|
I have now reinstalled php, and everything came out in the proper subdirectories. However, it's still not working. As background, here's a summary:
Using Windows/98 with working PWS 4.0 Downloaded php-4.6.4-Win32.zip from php.net and unzipped into c:\php Copied all files from dlls dir to c:\windows\system Copied all files from mibs to c:\usr\mibs Copied php4ts.dll to c:\windows\system Copied php.ini-dist to c:\windows\php.ini and edited extension_dir and doc_root. (No extensions changed: gd is now part of php) Updated pws-php4cgi.reg to '".php"="c:\\php\\php.exe"' and ran to update registry PWS Manager properties set to "Execute" for localhost directory c:\inetpub\wwwroot Downloaded and installed mdac_typ.exe (Microsoft ver 2.8) Rebooted
When I use IE6.0 to go to http://localhost/phpinfo.php I get "The page cannot be displayed." I get the same message no matter what php page I give it - existing or not. If I give it a nonexistent htm page name, it says instead, "The page cannot be found." I can give it a valid htm page name in the same directory as phpinfo.php and it will show it correctly, so pws is functioning correctly.
I'm about to start a course in php using this book, and thought it would be good to get php up and running before classes start. Any help would truly be appreciated. Thanks!
- Steve
|
|
Reply By:
|
kc5f
|
Reply Date:
|
1/7/2004 1:08:26 PM
|
Since no one had any suggestions, I took a tack not in the book, but suggested by a friend:
1. Uninstall PWS and PHP 2. Download EasyPHP from http://www.easyphp.org 3. Install EasyPHP
That's really how easy it was. It installs and configures Apache 1.3.27, PHP 4.3.3, PhpMyAdmin 2.5.3 and MySQL 4.0.15 and worked immediately after the 2- or 3-minute installation.
|
|
Reply By:
|
nikolai
|
Reply Date:
|
1/7/2004 1:52:01 PM
|
I'm glad you decided to go with Apache, and that everything's working. Sorry we couldn't help you out -- the most frequent "answer guys" on this list use either Apache or Xitami.
That is, I use Apache and Rich uses Xitami. (Right Rich?)
Take care,
Nik http://www.bigaction.org/
|
|
Reply By:
|
richard.york
|
Reply Date:
|
1/7/2004 2:14:11 PM
|
That's true! I've never even heard of PWS.. so I thought it best to not attempt to comment on a technology I knew nothing about. I've got Xitami at home and Apache on my remotely hosted server... someday I'll get off of my can and figure out how to put Apache on my home machine as well...
Sorry Steve! Glad to hear you've got a working set-up now!
: ) Rich
::::::::::::::::::::::::::::::::: Smiling Souls http://www.smilingsouls.net :::::::::::::::::::::::::::::::::
|
|
Reply By:
|
kc5f
|
Reply Date:
|
1/7/2004 5:37:27 PM
|
Thanks guys, for the encouragement on Apache. PWS is Microsoft's Personal Web Server in Windows/98. It was replaced by IIS in the newer OS's, and from everything I've read, it's a bear to get running with PHP. I had heard the same about Apache, but getting this one running was a dream, so I'm glad I went ahead and tried it!
|
|
Reply By:
|
nikolai
|
Reply Date:
|
1/7/2004 5:47:37 PM
|
Actually, getting PHP to work with Apache is surprisingly simple, even if they are installed separately. You need to modify a couple configuration files, which can be intimidating when you're new to it, but overall it's very simple.
1) You need to load PHP as an Apache module:
LoadModule php4_module c:/php/sapi/php4apache.dll AddModule mod_php4.c
2) You need to tell Apache which files should be processed by PHP.
AddType application/x-httpd-php .php .php4 .html
That's pretty much it.
Take care,
Nik http://www.bigaction.org/
|
|
Reply By:
|
richard.york
|
Reply Date:
|
1/7/2004 8:48:58 PM
|
Well Nik you made it sound so easy I decided to give it a try.. and after a minimal amount of fuss I got the Apache server installed and PHP set up as an Apache module. It actually wasn't so bad! One detail that bears mentioning though is you left out copying the php4ts.dll to the system32 folder! I was scanning the PHP manual and happened to notice that there which saved me from a few minutes of hair pulling.
I think I'm quite happy with the results though, seems marginally faster than xitami.. especially for me since I use the IMAP module to get email message counts on my site and use a dial-up connection.. I like that its more peppy!If I'm connected to the net it just drags and drags getting those mailbox message counts.. shaved a little time off I think.
Thanks Nik! : ) Rich
::::::::::::::::::::::::::::::::: Smiling Souls http://www.smilingsouls.net :::::::::::::::::::::::::::::::::
|
|
Reply By:
|
nikolai
|
Reply Date:
|
1/7/2004 9:06:12 PM
|
Oh yeah, I kinda forgot about that part. I just assumed that part of any standard PHP install was moving the PHP dlls into the system path -- I didn't know it was Apache specific! =)
Anyway, you can actually run Apache *and* Xitami on the same machine. You can even run several instances of Apache or PHP on the same machine. Just configure each server to listen on a different port.
While testing an application I wrote on multiple versions of PHP, I had a few different Apache servers running on ports 8420, 8430, 8432, and 8433. The first digit, 8, was just a throwback to port 80 being the default HTTP port. The last three digits reference the PHP version running on the server listening to that port. For example, port 8432 was running PHP version 4.3.2.
The only caveat to this (and it's kinda nice, actually), is that all PHP instances use the same PHP.ini file for configuration, since PHP just looks for "php.ini" in your system root dir (i.e. %WINDOWS%, usually C:\WINNT or C:\WINDOWS).
Running it as a module certainly speeds things up since you don't have to run the exe every time you request a page. That's how the CGI-world works. When you consider that each time a page is requested, PHP has to parse php.ini for configuration details, you can imagine how much time you save by just having the configuration loaded once.
Take care,
Nik http://www.bigaction.org/
|