PHP Installation
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Installation

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old July 7th, 2003, 03:37 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
Problems with Apache Config - WinXP

I have installed Apache - followed numerous tutorials on the web as to how to configure PHP4 to Apache - I have reconfigured the httpd conf file as instructed from numerous sites - and I can not figure out what I am doing wrong.

My html files are being served by Apache - but the php files are not. This is the error that I am getting in my log after trying to test a file called foo.php.

-----------------------------------

[Mon Jul 07 14:22:34 2003] [error] [client 127.0.0.1] (2)No such file or directory: script not found or unable to stat: c:/php4/php.exe/foo.php

-----------------------------------

Any help is greatly appreciated. I am very new to this (I have not had a chance to even start learning PHP because I can't get the server configured!!!!

FrequeNC
www.theartofevolution.com

Reply With Quote
  #2  
Old July 7th, 2003, 11:23 AM
Jester Jester is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: England
Posts: 271 Jester User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Problems with Apache Config - WinXP

Where are you saving foo.php?

From the error it looks like the script is saved in the directory created by the php install - it has to be within the apache server root accessable using http://localhost/blah/blah/foo.php

Is this the case?

Reply With Quote
  #3  
Old July 7th, 2003, 11:58 AM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
RE: Problems with Apache Config - WinXP

Where is php installed on your system?

What does your 'ScriptAlias' for php look like in your apache config?

Reply With Quote
  #4  
Old July 7th, 2003, 12:04 PM
mugane mugane is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Charlottesville, VA USA
Posts: 425 mugane User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via AIM to mugane Send a message via Yahoo to mugane
RE: Problems with Apache Config - WinXP

in your apache "httpd.conf" file make sure you specify your document root: e.g. use the line:
Quote:
DocumentRoot "C:/path/www"

Specify what files apache should look for:
Quote:
<IfModule mod_dir.c>
DirectoryIndex index.php index.html
</IfModule>

Then make sure that you specify the correct path to php:
Quote:
LoadModule php4_module "C:pathphp4apache.dll"
<IfModule mod_mime.c>
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
</IfModule>


If this fails, you may want to consider installing the evaluation version of Zend Studio. If you have an Internet connection, this application will install and automatically configure both php and apache. You do not need to buy or use the studio software in order to benefit from this automated installation. It does not expire with the evaluation.

Good luck,

Peter

Reply With Quote
  #5  
Old July 8th, 2003, 03:29 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Problems with Apache Config - WinXP

That is what I was missing -

--------------
LoadModule php4_module "C:pathphp4apache.dll"
--------------

I couldn't figure out what was going on - I had specified the correct path to the root directory in Apache -

I don't fully understand what I did to configure Apache - at least it is working now. I have another question for anyone good at PHP - and I don't know if this has something to do with the Apache configuration either.

If I create a form and pass it to another page simply just to show the variables (in a tutorial that I did at webmonkey) My variables are not showing up on the following php page. Here is the code for my form

-------------------

<html>
<head>
<title>My Form</title>
</head>
<body>

<form action="bad_words.php" method=get>

My name is:
<br> <input type="text" name="YourName">

<p> My favorite dirty word is:
<br> <input type="text" name="FavoriteWord">
<p>

<input type="submit" name="submit" value="Enter My Data!">
</form>


</body>
</html>

--------------------

Simple enough - it is just sending two variables to bad_words.php

Here is bad_words.php

---------------

<html>
<head>
<title>What did you say?!</title>

</head>

<body bgcolor="#FFFFFF" text="#000000">

<p>
Hi <?php print $YourName; ?>

<p>
You like the word <b> <?php print $FavoriteWord; ?> !?! </b>

<p>You oughta be ashamed of yourself!

</body>
</html>

------------------------

The code is correct as far as I can tell - it is not lacking - after I couldn't get it to work for me I copied the source directly from the tutorial. It worked on their site - but not on mine. Any ideas?

Reply With Quote
  #6  
Old July 8th, 2003, 11:17 AM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
RE: Problems with Apache Config - WinXP

What is happening here is that you probably have the setting for register_globals in your php.ini file set to off. Off is the default now.

All you need to do is use the superglobal arrays that are populated by php:


Hi <?php print $_GET['YourName']; ?>

That should do it for you...for more info on the superglobals see:

http://www.php.net/manual/en/language.variables.predefined.php



Reply With Quote
  #7  
Old July 9th, 2003, 01:20 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Problems with Apache Config - WinXP

It was the register_globals. Thanks, got it sorted.

Reply With Quote
  #8  
Old July 9th, 2003, 10:42 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Problems with Apache Config - WinXP

Same problem: I installed Apache 2.0.46 with PHP4.3.2 sapi module on WindowsXP on my desktop and it worked. I did exactly the same on my lap-top and get the error "script not found or unable to stat". Apache serves HTML pages ok and php.exe works okay via command prompt. The LoadModule php4_module "c:/php/sapi/php4apache2.dll" instruction is also correct in my config file.

Reply With Quote
  #9  
Old July 11th, 2003, 12:56 AM
mrsrands mrsrands is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Minburn, Iowa, USA
Posts: 2 mrsrands User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to mrsrands
RE: Problems with Apache Config - WinXP

HI!

just installed apache2 and php4.32

php works fine, server works fine...BUT

i get errors regarding the extensions not loading.

each error comes up twice, then the server starts. It says: in Unknown on line 0
PHP Warning: Unknown(): Unable to load dynamic library 'Crogram FilesApache GroupApache2phpextensionsphp_zlib.dll' - The specified module could not be found. (eight dlls)

however, the dlls are in the extenstions folder in c:program filesapache groupphpextensions.

I installed php4 into c:program filesapache groupphp
I copied the php4ts.dll into C:windowssystem32 along with the php.ini

I loaded the module apache2.dll

If I move the php.ini into the "htdocs" root directory, i do not get the errors, but then php is running with defaults and I cannot login to my secure program.

Any ideas?

emails are welcome at mrsrands@yahoo.com

Thanks!!

Reply With Quote
  #10  
Old July 11th, 2003, 01:08 AM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
RE: Problems with Apache Config - WinXP

'Crogram FilesApache GroupApache2phpextensionsphp_zlib.dll'

is where it is complaining it can't find the dll's...

you said you installed into

c:program filesapache groupphpextensions

check the extension_dir setting in the php.ini and make sure it is correct...

Reply With Quote
  #11  
Old July 11th, 2003, 01:30 AM
mrsrands mrsrands is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Minburn, Iowa, USA
Posts: 2 mrsrands User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to mrsrands
RE: Problems with Apache Config - WinXP

Well, only one is not working now....the zlib.dll and its in the same file. But one error instead of 8 is much better!!

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Installation > Problems with Apache Config - WinXP


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway