Wrox Programmer Forums
|
BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5
This is the forum to discuss the Wrox book Beginning PHP4 by Wankyu Choi, Allan Kent, Chris Lea, Ganesh Prasad, Chris Ullman; ISBN: 9780764543647
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 24th, 2003, 04:38 PM
Authorized User
 
Join Date: Dec 2003
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default php installation folders / pws

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!

 
Old December 24th, 2003, 07:39 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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/
 
Old December 25th, 2003, 12:16 PM
Authorized User
 
Join Date: Dec 2003
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
 
Old December 25th, 2003, 04:43 PM
Authorized User
 
Join Date: Dec 2003
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
 
Old January 7th, 2004, 02:08 PM
Authorized User
 
Join Date: Dec 2003
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.
 
Old January 7th, 2004, 02:52 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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/
 
Old January 7th, 2004, 03:14 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

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
:::::::::::::::::::::::::::::::::
 
Old January 7th, 2004, 06:37 PM
Authorized User
 
Join Date: Dec 2003
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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!
 
Old January 7th, 2004, 06:47 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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/
 
Old January 7th, 2004, 09:48 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

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
:::::::::::::::::::::::::::::::::





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with PHP installation mek Beginning PHP 0 June 28th, 2005 10:36 AM
Still having problem with PWS /PHP Meeza BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 3 January 23rd, 2005 06:28 PM
PWS installation needed Shubhasree Dreamweaver (all versions) 1 September 26th, 2004 09:55 AM
PWS + PHP G-Zilla Wrox Book Feedback 2 July 4th, 2003 12:57 PM
Ch. 1: PHP Installation Troubles: php3 vs php manjito BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 4 June 12th, 2003 03:59 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.