Forum Moderators: phranque

Message Too Old, No Replies

Apache2 on Windows XP showing errors

         

anshul

6:20 am on Jun 8, 2006 (gmt 0)

10+ Year Member



I'd previously used Apache2 good on Windows XP. Now, I moved to new office and installed Apache2 on all machines.

Problem is when I try code like this:
PHP Code:


<?php
echo file_get_contents('http://www.example.com/');
?>

Apache pops up problem in both IE and Firefox and I can't see output of above simple common PHP line, which I used in all previous machines.

What's the problem with my Apache2/ PHP setup? I'm not getting it. Please help.

coopster

9:36 pm on Jun 8, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You'll need to be a bit more specific, what exactly is the error message you are receiving?

Also, in regards to ...

>> and installed Apache2 on all machines

... did you really need it on all machines? You probably only need one server on your network, no?

anshul

5:56 am on Jun 9, 2006 (gmt 0)

10+ Year Member



You're right, but our people want a local Apache2 server in all Windows XP also.

In all the machines: It pops up a error Window: Apche HTTP Server has encountered a problem and needs to close. We are sorry for the inconvenience.

Few phpinfo() information:


allow_call_time_pass_reference On
allow_url_fopen On
always_populate_raw_post_data Off
max_execution_time 30
max_input_time -1

PHP version is 4.4.2 and Apache is 2.0.53.0

Error signature
szAppName: Apache.exe szAppVer: 2.0.53.0 szModName: php4ts.dll szModVer: 4.4.2.2 offset: 000c5fca

All installation are having same errors.

coopster

2:38 pm on Jun 9, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Well, if you can run phpinfo() without issue then you know the server is running and the PHP is parsing. Next I would try replacing the file_get_contents() with a readfile() or something, just to see if you can read files from the OS or from a URI. If that works, then we either have a PHP version bug or perhaps it is a memory mapping issue (file_get_contents() differs in that it will use memory mapping techniques if supported by your OS to enhance performance).

If it is a memory mapping issue, you should check your Apache config on those Windows boxes to make sure you have it properly configured. There are some tips and links in message number 3 of Installing PHP5 Under Windows XP and Apache [webmasterworld.com]. Although the thread refers to PHP5, the tips apply to all Windows binary installations. Please read that message and the associated links. And if you make changes to the server configuration file(s), don't forget to restart Apache.

anshul

7:44 am on Jun 27, 2006 (gmt 0)

10+ Year Member



I'm using PHP Version 4.4.2 on Microsoft Windows XP Professional Version 2002 Service Pack 2.

I tried combinations/ both of:

EnableMMAP Off
EnableSendfile Off

Its not working. So should I try another version of PHP for my Windows XP? Okay, I'm trying again fresh download of PHP 4.4.2 from [php.net...]

After all, PHP 4.4.2 seems a good version of PHP just below PHP 5!