Author |
|
PickOn
Joined: 25 Jun 2007 Posts: 16
|
Posted: Sat 07 Jul '07 13:39 Post subject: Apache2.0.59 and php5.2.3 configuration problem |
|
|
Hi All,
my problem still continue with this Apache2.0.59 and php5.2.3 on windows XP P, it looks so weird and frustrating, for I've no more idea left with me to make the test file info.php to work, at first I try to config my Apache2.0.59 and php5.2.3 to run on CGI binary form with almost days trying to make it work with steps and advice but no joy? my Apache works OK after uninstall and re-installed back. So I decide to config it on the Apache module form for I've seen so much success with other trying it on this method of installation, but for me there is still no joy on these Apache module as well, and I know if I will ever get a help to make it work this will be the place that I will able to get that help, when I try to load my browser with http://localhost/info.php, I got a 404 Error, with this Error message on my log file
[Fri Jul 06 22:24:55 2007] [error] [client 127.0.0.1] script 'C:/Program Files/Apache Group/Apache2/htdocs/hello.php' not found or unable to stat
[Fri Jul 06 22:25:19 2007] [error] [client 127.0.0.1] script 'C:/Program Files/Apache Group/Apache2/htdocs/info.php' not found or unable to stat
[Sat Jul 07 08:14:17 2007] [notice] Apache/2.0.59 (Win32) PHP/5.2.3 configured
One more thing I try to run the apache.exe on my Command after my C:\Documents and Settings\Pick On> with the forlder I install Apache on as. C:\Program Files\Apache Group\Apache? and got in return this message
'C:\Documents' is not recognized as an internal or external command,
operable program or batch file.
C:\Documents and Settings\Pick On>
Pls dose this means this problems could be with my system??
Pls any idea will be welcome and appreciate by me Thanks!!
[/list][/list] |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Mon 09 Jul '07 16:22 Post subject: |
|
|
Hello,
not found or unable to stat means that the file is not found
If you have any spaces in your config name like C:/Program Files
you have to use quotes arround that in your httpd.conf.
e.g.
Code: |
<Directory "C:/Program Files/Apache Group/Apache2/htdocs">
|
|
|
Back to top |
|
Tinkeringtoad
Joined: 01 Jul 2007 Posts: 5
|
Posted: Tue 10 Jul '07 4:53 Post subject: |
|
|
Hello.
I understand your dismay.
You have a configuration problem someplace.
Where is the question.
Some Questions first need to be answered to get the ball rolling.
1) Did you compile this yourself or is this one of two other options available.
a) Is this a binary type install. AKA. You installed apache from a distribution site that has compiled apache for distribution.
b) Is this a compiled apache server but not in a executable type form like sequence a) suggets but rather a zip folder with a compiled apache server.
2) You start your statement off about you opening a command prompt.
Yet your prompt does not suggest that you are in the bin folder of the apache2 folder.
You need to be there to use the apache commands to install the server as a service or to do other things in that folder.
There should be a batch file for that version in the apache2 bin folder saying start apache and stop apache.
If you did not compile apache and or compile it with the path that you actually are running the server from. The httpd.conf file needs to be edited to show the correct paths in several spots.
For php to work you need to do several things first off you need a apache server that you can use aka one that works.
In the php distribution which im not sure what kind you have there is a php.ini file that needs to be editied some dll files need to be added to the apache bin and or modules folder also.
Then some more editing in the httpd.conf file to tell apache where the php folder is.
For that version you may also need to add some files to the windows directory to make things easier for you.
Well ill check back in a few days to see if you replyed to this post.
Also that version of php and apache are a wrong combination.
That version of apache was not designed to run php5
You can make it work but some thigns might fail and its a unsafe combination to run a server with if you are going to use it for the net.
For testing is fine i guess but no production or live content should be run on it. That version of apache has some problems and security leaks to it also.
You should really use the updated version which i think is 2.4.4 |
|
Back to top |
|
PickOn
Joined: 25 Jun 2007 Posts: 16
|
Posted: Tue 10 Jul '07 11:24 Post subject: |
|
|
Hello James,
I wish that could have been the problem on my httpd.conf, I made a check the quotes looks Ok!! |
|
Back to top |
|
PickOn
Joined: 25 Jun 2007 Posts: 16
|
Posted: Tue 10 Jul '07 13:29 Post subject: |
|
|
Hi,
I'm very please to receive message from you, with thought and ideas about this Apache2.0.59 and php5.2.3 and thanks all for that!!
But first as you said, this are the answers to get the ball rolling and we live to learn everyday!!
1) Apache2.0.59-win32-x86-no_ssl.msi
Type: Windows Installer package
Author: Apache Software Foundation
Sbject: The Apache HTTP Web Server
Size: 4.23MB
Publisher: Unknown Publisher
As you can see I download it from one of there mirror site and then installed it on my system with the advice and type of methods to install it on my system from the Foundation and with help from the basic users and with the help of Guru on this Apache and php also? it looks Ok after installing in my system?
a) PHP5.2.3-win32.zip
Type: Compressed (zipped) Folder
Download from php.net, extrated on a folder on my "Drive" as C:\php5
This is where im kindly asking for help from all with this, for with the little knowledge I've with this Apache and PHP configuration with windows XP, for all I've dose for the second time is to run it as Apache module, by adding this on my httpd.conf
LoadModule php5_module "c:/php5/php5apache2.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:/php5"
and remane php.ini-recommended to php.ini with changes as extension_dir= "C:\php5\ext"
Windows: "\path1;\path2"
include_path = ".;c:\php5\includes"
and put to the PATH (;C:\php5) on my Enviroment Variable restart my XP and so on, before trying to test my info.php and hello.php file save on my Apache httpd.conf folder then load my browser with http://localhost/info.php which comes out ERROR 404 not found?
this is where my knowledge comes on this basic method to test Apache and PHP on windows XP P,
2)Statement off my Command Prompt comes on when I try to investigate if I can be able to locate Apache bin from "cmd" by typing first after the "C:\Document and Setting\xyx\> with "C:\Programe Files\Apache Group\Apache2\bin\ then Enter, when I got the message,
'C:\Documents' is not recognized as an internal or external command,
operable program or batch file. I also try the "apache.exe" as one with the "C:\Program Files\Apache> it comes out the same message?
You'll now more
Quote: | I understand your dismay.
You have a configuration problem someplace.
Where is the question.
|
So will you please explain more about this "AKA" and to make php work with Apache and the best combination of Apache and PHP, with link of this updated version which you think is 2.4.4, and where also it says about the wrong combination of PHP and Apache version, because I do know there are some Security side effect when running as Apache module!!
Thanks!! |
|
Back to top |
|
PickOn
Joined: 25 Jun 2007 Posts: 16
|
Posted: Tue 10 Jul '07 17:07 Post subject: |
|
|
Hi All,
PHP tries to speak to me with an Error report, will someone please help me on this Error report!!
PHP Error
Quote: | Error parsing C:\php5\php.ini on line 509 |
|
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Tue 10 Jul '07 17:24 Post subject: |
|
|
What is on line 509? can you post that line? |
|
Back to top |
|
PickOn
Joined: 25 Jun 2007 Posts: 16
|
Posted: Tue 10 Jul '07 18:54 Post subject: |
|
|
Hi,
I dont know where to look exactly for line 509!! could it be between (Paths and Directories) or (File Uploads) on php.ini? you see im using an ordinary Note Pad with no line marking on it |
|
Back to top |
|
venoel
Joined: 03 Jul 2007 Posts: 5
|
Posted: Wed 11 Jul '07 6:31 Post subject: |
|
|
Hi!
At first. Do you place php.ini into c:\windows directory? Try to move this file into c:\windows.
Second. You can reach 509 line by pressing DownKey 509 times or by using text editor with line marking. |
|
Back to top |
|
PickOn
Joined: 25 Jun 2007 Posts: 16
|
Posted: Wed 11 Jul '07 10:59 Post subject: |
|
|
Hi,
I'm very please to received a message from you and thanks for your respond and idea!!!
I try to move php.ini into C:\Windows directory, but I do see two type of C:\Windows on my (Local Disk C:\) One got almost all of my system items, like system32, explorer.exe, and even control.ini and desktop.ini
The other got only two files with the same name as, pfirewall.log
So which one should I move it to?
And with your direction on reaching line 509, the Error might be between this copy below
Quote: | ; Magic quotes
;
; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = Off
; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
magic_quotes_runtime = Off
; Use Sybase-style magic quotes (escape ' with '' instead of \').
magic_quotes_sybase = Off
; Automatically add files before or after any PHP document.
auto_prepend_file =
auto_append_file =
; As of 4.0b4, PHP always outputs a character encoding by default in
; the Content-type: header. To disable sending of the charset, simply
; set it to be empty.
;
; PHP's built-in default is text/html
default_mimetype = "text/html"
;default_charset = "iso-8859-1"
; Always populate the $HTTP_RAW_POST_DATA variable.
;always_populate_raw_post_data = On
|
|
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Wed 11 Jul '07 11:44 Post subject: |
|
|
Do not copy your php.ini into Windows folder! Only ONE php.ini in your C:\php5 folder!
You declared that in your httpd.conf => PHPIniDir "C:/php5"
Open the php.ini file with notepad!
After opening click on View => enable Statusbar so you can see the line numbers!
Because here I can't see an error. |
|
Back to top |
|
PickOn
Joined: 25 Jun 2007 Posts: 16
|
Posted: Wed 11 Jul '07 11:48 Post subject: |
|
|
Hey PHP Error line 509, solve
But this Error 404 not found still contiune with below
Quote: | [Wed Jul 11 10:33:01 2007] [error] [client 127.0.0.1] File does not exist: C:/Documents and Settings/Pick On/My Documents/My Website
[Wed Jul 11 10:33:24 2007] [error] [client 127.0.0.1] script 'C:/Program Files/Apache Group/Apache2/htdocs/info.php' not found or unable to stat
[Wed Jul 11 10:33:45 2007] [error] [client 127.0.0.1] script 'C:/Program Files/Apache Group/Apache2/htdocs/hello.php' not found or unable to stat
|
|
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Wed 11 Jul '07 13:03 Post subject: |
|
|
Windows does not show known file extension. Make sure that your file name is not hello.php.txt |
|
Back to top |
|
PickOn
Joined: 25 Jun 2007 Posts: 16
|
Posted: Thu 12 Jul '07 10:20 Post subject: |
|
|
Hi James,
I wish that could have been the problem, I made a check it with the right extension!! |
|
Back to top |
|
PickOn
Joined: 25 Jun 2007 Posts: 16
|
Posted: Fri 13 Jul '07 11:53 Post subject: |
|
|
Hello all!!!
I just want to Thank you for been with me over this installation of Apache and php, I've finally make then work, it was so amusing to see my php work with Apache from the phpinfo.php, now is to install mysql for the ball rolling to truly start!!
Thanks!!
When the go becomes weird the weird becomes pro |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Fri 13 Jul '07 12:09 Post subject: |
|
|
Got another Idea why your script didn't work! I guess you used <? and not <?php to start your script.
To use <? also
enable change in php.ini short_open_tag = Off to short_open_tag = On
Didn't got that earlier in my mind |
|
Back to top |
|
PickOn
Joined: 25 Jun 2007 Posts: 16
|
Posted: Fri 13 Jul '07 12:14 Post subject: |
|
|
Hey not at all, I try it from Custom which give me the best info and it cool on hidden |
|
Back to top |
|