Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 22nd, 2003, 08:31 PM
Authorized User
 
Join Date: Oct 2003
Location: KL, wilayah persekutuan, Malaysia.
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Default HTTP 404 Page not found

i successfully installed php 4.3.2 and apache 1.3 on my windows xp but errors occurs when i try to run the .php files.

Apache error log :
no such file or directory:script not found or unable to stat: c:/program files/phpphp.exe

Error on browser:
HTTP 404 Not found

There is a php_gd2.dll instead of php_gd.dll in my php.ini. Is this the same? When I uncomment the php_gd2.dll, I got the message that the gd library is not found. Does this mean that i have to install gd library?

Could anyone help me?

Reply With Quote
  #2 (permalink)  
Old October 22nd, 2003, 09:33 PM
Friend of Wrox
Points: 2,570, Level: 21
Points: 2,570, Level: 21 Points: 2,570, Level: 21 Points: 2,570, Level: 21
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: San Diego, CA, USA
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Looks like your PHP dir is missing the last slash. It should be c:/program files/php/php.exe, right?

php_gd2.dll is a new version of the GD library. PHP actually supports both external libraries, but expose the same image API functions to you. That way, you can write a PHP application that uses the image extension and for the most part it'll work regardless of the version of GD you have installed... make sense?


Take care,

Nik
http://www.bigaction.org/
Reply With Quote
  #3 (permalink)  
Old October 23rd, 2003, 06:56 AM
Authorized User
 
Join Date: Oct 2003
Location: KL, wilayah persekutuan, Malaysia.
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Could you please check if i am in the right track?
1. Downloaded and unzipped PHP to C:\Program Files\PHP
2. Copy php4.ts.dll to C:\Windows\System32 directory.
3. Open up the dlls subdirectory, and copy all of the files from here to C:\Windows\System32 directory
4. Copy php4isapi.dll from the sapi/ directory to WINDOWS/system directories.
5. Move php.ini-dist from installation directory to the WINDOWS/ directory and rename it to php.ini.
6. Open up php.ini and find a line that looks like extension_dir and change it to:
extension_dir = C:\Program Files\PHP\extensions
7. Omit the semicolon before extension = php_gd2.dll
8. Download and unzipped Apache to C:\Program Files\ Apache Group
9. When server information is asked type localhost in the first two fields and admin@localhost in the last field. Next, choose a complete install.
10. Go to C:\Program Files\Apache Group\Apache\conf\httpd.conf and
i. Find the ServerName field. Uncomment it by removing the pound sign (#), and type server's name.
ServerName localhost
ii. Find the DocumentRoot field.
DocumentRoot "C:/ Inetpub/wwwroot¡±
iii. Add the following lines anywhere in the httpd.conf
ScriptAlias /php/ "C:/Program Files/PHP/" Action application/x-httpd-php "/PHP/php.exe"
AddType application/x-httpd-php .php
11. Restart server by restart the Windows.

By the way, whenever i start my computer there is an error saying gd library not found. i thought that gd library is included in php version 4.3.2.

Reply With Quote
  #4 (permalink)  
Old October 23rd, 2003, 07:21 PM
Friend of Wrox
Points: 2,570, Level: 21
Points: 2,570, Level: 21 Points: 2,570, Level: 21 Points: 2,570, Level: 21
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: San Diego, CA, USA
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The php4isapi.dll file is ONLY for using PHP with IIS. You don't need it with Apache.

Your install steps look pretty much okay. I would've installed apache before installing PHP, but your way works. You're running PHP as a CGI, which means apache runs the php.exe interpreter for every script that's requested of your server. The other way to do it is install PHP as an apache module; that way, the PHP interpreter implementation is loaded in memory and accessed via a DLL.

For instructions on how to do this, read:
  http://www.php.net/install.apache#in...apache.windows


I don't understand why you get an error message when you start your computer. The only explanation is that you have some application that's trying to access the GD library during starup.

PHP comes with a version of the GD library in it's dlls directory. It also comes with a version of iconv.dll, which isn't part of GD, but GD uses it. These DLLs are named gds.dll and iconv.dll, if I recall correctly.

I would suggest getting PHP working with Apache FIRST before trying to install any additional extensions. By doing this, you can verify that your problems are due to the extension and NOT some other random installation problem.

Once you have PHP installed and working properly (that is, a simple phpinfo() script displays without error), then enable the GD extension.

Let me know how it goes.




Take care,

Nik
http://www.bigaction.org/
Reply With Quote
  #5 (permalink)  
Old October 26th, 2003, 06:27 PM
Authorized User
 
Join Date: Oct 2003
Location: KL, wilayah persekutuan, Malaysia.
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Default

A million thanks to you guys who helped me.i've finally got it working.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
http 404 brenden J2EE 1 February 16th, 2006 05:44 AM
Resource not found - HTTP -404 javz_1 Apache Tomcat 1 January 16th, 2006 05:35 AM
ERROR: HTTP 404 File not Found or unable to stat f rpk BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 January 4th, 2006 10:20 PM
HTTP 404 - again javacelt JSP Basics 1 November 1st, 2003 06:16 PM



All times are GMT -4. The time now is 02:45 PM.


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