WAMP, can't get errors

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

WAMP, can't get errors

Postby 0sinner » Tue Aug 18, 2009 4:39 pm

Hello all,

I'm trying to run a WAMP (Windows, Apache, MySQL, PHP) server from my computer for developing a site.

I got Apache up and running and I've successfully installed PHP, but it's not working completely as I expected.

I tried a regular page with just phpinfo() and it works fine in Google Chrome.

My first problem:

Internet Explorer and chrome seem to try to load the page twice for some reason, and after the phpinfo comes up for a brief fraction of a second, it switches to a "could not load" the site error page. Firefox does this as well. What's going on?

My second problem:

In php.ini I set:
error_reporting = E_ALL | E_STRICT
display_errors = On
display_startup_errors = On
log_errors = On
log_errors_max_len = 0 (I've also tried setting this to 1024)
error_log = (Path to my work folder)\php_errors.log

I've run this with php files that have no errors and they load up fine. Whenever I'm trying to load a php file I'm developing however, it fails!

In Google chrome I'm told that the connection resets, in IE the webpage cannot be loaded, and I can't remember what Firefox says. Not only does it not show any errors, the error log file I specified remains empty!


Not sure what to do I looked around and I realized I had yet to check my apache log to see what's going on:
Here's what I've observed:

Trying to load up a phpinfo file (in IE):
apache's access.log reports:
127.0.0.1 - - [18/Aug/2009:17:24:21 -0400] "GET /index.php?=PHPE9568F34-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2524
127.0.0.1 - - [18/Aug/2009:17:24:21 -0400] "GET /index.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2146
(This ends up with generic "Internet Explorer cannot display the webpage." Why are there two requests?)

apache's error.log reports:
[Tue Aug 18 17:24:22 2009] [notice] Parent: child process exited with status 3221225477 -- Restarting.
httpd.exe: Could not reliably determine the server's fully qualified domain name, using xxx.xxx.xxx.xxx for ServerName
[Tue Aug 18 17:24:22 2009] [notice] Apache/2.2.13 (Win32) PHP/5.3.0 configured -- resuming normal operations

and proceeds with some regular "created child process," "child process is running," "acquired start mutex," "starting 64 worker threads," etc.

same unchanged php info file (in Google Chrome):
apache's access.log reports:
127.0.0.1 - - [18/Aug/2009:17:26:56 -0400] "GET /index.php?=PHPE9568F34-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2524
127.0.0.1 - - [18/Aug/2009:17:26:56 -0400] "GET /index.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2146

apache's error.log reports:
[Tue Aug 18 17:26:56 2009] [notice] Parent: child process exited with status 3221225477 -- Restarting.
httpd.exe: Could not reliably determine the server's fully qualified domain name, using xxx.xxx.xxx.xxx for ServerName
[Tue Aug 18 17:26:56 2009] [notice] Apache/2.2.13 (Win32) PHP/5.3.0 configured -- resuming normal operations


If you guys could tell me what's wrong with this stuff I'll fix it and try it again with a php file that has an intentional error in it and see if that works too.

Thanks for any help guys!


EDIT:
I made it sound like only IE sends two http requests, but chrome does as well.
0sinner
Forum Newbie
 
Posts: 12
Joined: Tue Aug 18, 2009 4:06 pm

Re: WAMP, can't get errors

Postby jackpf » Tue Aug 18, 2009 4:42 pm

I've had this before - it seems that if you get into an infinite loop with recursion, apache will just give up and restart...and obviously that resets the connection.

Are you getting into infinite loops at all? :D

And with IE requesting the page twice...I don't know, it could be something similar to the firefox bug. Basically, it requests the page twice if you don't specify a charset.
User avatar
jackpf
DevNet Resident
 
Posts: 2119
Joined: Sun Feb 15, 2009 8:22 pm
Location: Ipswich, UK

Re: WAMP, can't get errors

Postby 0sinner » Tue Aug 18, 2009 4:53 pm

@jackpf:

No infinite recursion: The only php on the test page is the following line
<?php phpinfo(); ?>

How would I go about setting a charset? Maybe that'll fix some of my problems?

Also it's worth noting that the page loads fine in Google Chrome and it appears to request the page twice as well.
0sinner
Forum Newbie
 
Posts: 12
Joined: Tue Aug 18, 2009 4:06 pm

Re: WAMP, can't get errors

Postby 0sinner » Tue Aug 18, 2009 4:56 pm

Sorry to double post!

I just realized something with the google chrome loading of the page:

I went to view the source of what google chrome was loading and I scrolled all the way to the bottom. The very last line that was loaded was:

<tr><td class="e">ignore_user_abort</td><td class="v">

It appears to me that Google chrome also loses the connection halfway through loading the phpinfo page, but it just leaves whatever it got so far instead of switching to a generic error page.

Any other ideas?
0sinner
Forum Newbie
 
Posts: 12
Joined: Tue Aug 18, 2009 4:06 pm

Re: WAMP, can't get errors

Postby jackpf » Tue Aug 18, 2009 6:02 pm

Hmm....that's mighty strange.

Is it just pages with phpinfo(), or all pages?

For example, if you put:
Syntax: [ Download ] [ Hide ]
echo 'hello';
what happens?
User avatar
jackpf
DevNet Resident
 
Posts: 2119
Joined: Sun Feb 15, 2009 8:22 pm
Location: Ipswich, UK

Re: WAMP, can't get errors

Postby 0sinner » Tue Aug 18, 2009 6:39 pm

@jackpf

echo 'hello' works.

I started thinking that it only happens when php sends back alot of information.

I then made an echo function that sends back over 300kb of information, expecting it to fail partway through.

No such luck though, the entire page loaded.

Any other ideas?
0sinner
Forum Newbie
 
Posts: 12
Joined: Tue Aug 18, 2009 4:06 pm

Re: WAMP, can't get errors

Postby jackpf » Tue Aug 18, 2009 7:37 pm

It seems to be stalling on getting the ini setting for ignore_user_abort then, since that's where the output stops.

What happens with this:
Syntax: [ Download ] [ Hide ]
var_dump(ini_get('ignore_user_abort'));



Also, what's the ini setting for ignore_user_abort in your php.ini file?
User avatar
jackpf
DevNet Resident
 
Posts: 2119
Joined: Sun Feb 15, 2009 8:22 pm
Location: Ipswich, UK

Re: WAMP, can't get errors

Postby 0sinner » Tue Aug 18, 2009 8:09 pm

string(1) "0"

Ok. I'm guessing that means that it's a string of length 1 containing only "0" (which I'm guessing means "off").

I just checked through the php.ini file and it is not set anywhere. There is a line that sets it but is commented out.

I'm not too sure that this is the issue simply because I only sampled the output from google chrome only once.

Notice the above quote from the access.log:
127.0.0.1 - - [18/Aug/2009:17:24:21 -0400] "GET /index.php?=PHPE9568F34-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2524
127.0.0.1 - - [18/Aug/2009:17:24:21 -0400] "GET /index.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2146
127.0.0.1 - - [18/Aug/2009:17:26:56 -0400] "GET /index.php?=PHPE9568F34-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2524
127.0.0.1 - - [18/Aug/2009:17:26:56 -0400] "GET /index.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2146

Correct me if I'm wrong but I believe the last number in the log entries is the number of bytes that were sent. For whatever reason there is a discrepancy of 378 bytes. I believe that it may be that it flushes the data periodically but as soon as php fails the connection gets reset. The difference in the number of bytes sent I believe can only be attributed to other processes running on my computer making php take longer to complete its operations.

Any other ideas?
0sinner
Forum Newbie
 
Posts: 12
Joined: Tue Aug 18, 2009 4:06 pm

Re: WAMP, can't get errors

Postby 0sinner » Tue Aug 18, 2009 8:14 pm

I just checked... I think the last number is just the size of the cache that sent the data or something, because I changed the size of the PHP file (by adding some static text) and it gave the same sizes. So just ignore my guesses above.
0sinner
Forum Newbie
 
Posts: 12
Joined: Tue Aug 18, 2009 4:06 pm

Re: WAMP, can't get errors

Postby jackpf » Tue Aug 18, 2009 8:37 pm

Ooooh, that url request is for the image at the top of the phpinfo() page I do believe.

So yeah, your browser will request the page, then request the image. Hence two requests to the same(ish) url.

As for the lack of output...I have no idea to be perfectly honest. Is it only phpinfo()? If so...is it really that big a deal?

I know that's very trivial and unhelpful of me...but I'm out of ideas. Have you tried reinstalling apache & php?
User avatar
jackpf
DevNet Resident
 
Posts: 2119
Joined: Sun Feb 15, 2009 8:22 pm
Location: Ipswich, UK

Re: WAMP, can't get errors

Postby Eran » Tue Aug 18, 2009 8:57 pm

You're encountering segmentation faults, which plague the 2.2 line of apache. Something is probably causing this, but the source could be hard to track (for this reason I stayed on 2.0 for a long time).
Check the following:
- what modules are activated for apache? (especially mod_deflate)
- did you make any changes from the default configuration to the document root <directory> directive? perhaps added custom rewrite rules
- do you have an .htaccess file setting additional directives to the directory the stores the file causing the faults?
You might consider reinstalling apache or even downgrading to the latest 2.0 version.
User avatar
Eran
DevNet Master
 
Posts: 3549
Joined: Fri Jan 18, 2008 1:36 am
Location: Israel, ME

Re: WAMP, can't get errors

Postby 0sinner » Tue Aug 18, 2009 9:35 pm

@jackpf

As I mentioned in my first post, I think these problems are a symptom of a greater problem that's ultimately causing the error messages to fail to be displayed or logged. Without error messages I don't think I'd be able to develop or debug my solutions.

@pytrin

Maybe it's just me but I feel kinda unsafe going back versions. Aren't there lots of security vulnerabilities and performance issues fixed in the newer versions?

However for a development machine I don't think it really matters. I'll try to go back to the last build of Apache 2.0 then. Will I need to get an older version of PHP?
0sinner
Forum Newbie
 
Posts: 12
Joined: Tue Aug 18, 2009 4:06 pm

Re: WAMP, can't get errors

Postby jackpf » Tue Aug 18, 2009 9:58 pm

Wow...I've never even heard of apache 2.2 segmentation faults. 8O

Nice one.
User avatar
jackpf
DevNet Resident
 
Posts: 2119
Joined: Sun Feb 15, 2009 8:22 pm
Location: Ipswich, UK

Re: WAMP, can't get errors

Postby Eran » Wed Aug 19, 2009 3:24 am

However for a development machine I don't think it really matters. I'll try to go back to the last build of Apache 2.0 then. Will I need to get an older version of PHP?


This does not affect PHP in any way. The 2.0 line is still being supported for security fixes, so that is not a concern either (2.2 has some new features etc). In fact, as surprising as it sounds, many hosting providers are still running apache 1.3 as its considered very stable precisely to avoid the problems you are encountering right now.
User avatar
Eran
DevNet Master
 
Posts: 3549
Joined: Fri Jan 18, 2008 1:36 am
Location: Israel, ME

Re: WAMP, can't get errors

Postby 0sinner » Wed Aug 19, 2009 12:02 pm

That is surprising.

I've downloaded and installed Apache 2.0.63 with openssl and will test it shortly.

I have another question.

I think I downloaded the thread safe PHP. Is there a difference? and when should I use which?
0sinner
Forum Newbie
 
Posts: 12
Joined: Tue Aug 18, 2009 4:06 pm

Next

Return to Installation and Configuration

Who is online

Users browsing this forum: No registered users and 2 guests