|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
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 |
|
#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? |
|
#3
|
|||
|
|||
|
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? |
|
#4
|
|||||
|
|||||
|
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:
Specify what files apache should look for: Quote:
Then make sure that you specify the correct path to php: Quote:
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 |
|
#5
|
|||
|
|||
|
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? |
|
#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 |
|
#7
|
|||
|
|||
|
RE: Problems with Apache Config - WinXP
It was the register_globals. Thanks, got it sorted.
|
|
#8
|
|||
|
|||
|
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.
|
|
#9
|
|||
|
|||
|
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 'C 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!! |
|
#10
|
|||
|
|||
|
RE: Problems with Apache Config - WinXP
'C
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... |
|
#11
|
|||
|
|||
|
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!!
|
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Installation > Problems with Apache Config - WinXP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|