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:
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
  #1  
Old July 17th, 2007, 05:33 AM
migselv46 migselv46 is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Jul 2007
Posts: 6 migselv46 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 22 m 57 sec
Reputation Power: 0
Angry Bug ?: Page size too big ?

Hi,
I have installed Apache2.0.59 and PHP5. It works fine when serving minor pages but the Apache/PHP hangs when the page gets bigger. I created a page with nothing fancy on (no php-stuff) - just aaaabbbbbcccc... to test the error I got on a php-page (named .php that is). I can create the page with approximate 12.000 characters and when the page has .php extension the page does not work - I only get some of the page. If I rename the same page to .html the page is served fine. I tracked this error down so that I can see that the error comes when I add just ONE character - that is it works fine with lets say 11.792 characters - but when adding just one 'x' the page hangs and I only get some of the page. When removing the 'x' again - the page is served fine.
I tried to install the same Apache and PHP version on another pc and this works fine. So there is some kind of link between the pc and the Apache/PHP but I simply cannot figure this out!
Have anyone experienced this and does anyone have a solution or workaround?

Reply With Quote
  #2  
Old July 17th, 2007, 06:06 AM
Andrew's Avatar
Andrew Andrew is offline
Moderator
Click here for more information
 
Join Date: Apr 2007
Location: United Kingdom
Posts: 1,933 Andrew User rank is Private First Class (20 - 50 Reputation Level)Andrew User rank is Private First Class (20 - 50 Reputation Level)  Folding Points: 2429 Folding Title: Novice Folder
Time spent in forums: 3 Days 23 h 49 m 33 sec
Reputation Power: 3
Orkut
Never heard of anything like this before but perhaps you should check your Memory Usage during the time the page is being served, and if needed adjust the memory settings in httpd.conf.

Also have a look at the max_execution time setting in php.ini, that kills the script if it runs for too long. Try adjusting that a little.
__________________
Ubuntu User #13389

Reply With Quote
  #3  
Old July 17th, 2007, 06:18 AM
migselv46 migselv46 is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Jul 2007
Posts: 6 migselv46 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 22 m 57 sec
Reputation Power: 0
Thanks but this can not be it. As written in the first post the page is only approximately 12 kB big. This is absolutely small and does not come anywhere near the limits. Max_execution_time is set to 30 seconds and memory_limit to 8M. This is more than enough.

Reply With Quote
  #4  
Old July 17th, 2007, 04:53 PM
Andrew's Avatar
Andrew Andrew is offline
Moderator
Click here for more information
 
Join Date: Apr 2007
Location: United Kingdom
Posts: 1,933 Andrew User rank is Private First Class (20 - 50 Reputation Level)Andrew User rank is Private First Class (20 - 50 Reputation Level)  Folding Points: 2429 Folding Title: Novice Folder
Time spent in forums: 3 Days 23 h 49 m 33 sec
Reputation Power: 3
Orkut
Quote:
Originally Posted by migselv46
Thanks but this can not be it. As written in the first post the page is only approximately 12 kB big. This is absolutely small and does not come anywhere near the limits. Max_execution_time is set to 30 seconds and memory_limit to 8M. This is more than enough.


Does phpinfo() work correctly? What is the precise PHP version?

Reply With Quote
  #5  
Old July 21st, 2007, 01:40 AM
migselv46 migselv46 is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Jul 2007
Posts: 6 migselv46 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 22 m 57 sec
Reputation Power: 0
Hi,
Yes phpinfo() works correctly. Actually everything (mysql, php commands etc) works correctly except for pages larger than approximately 12.000 characters (12kB).
The version is 5.2.3 but I have tryed to install php4 as well which had the same bug. Also I tried to install same versions of both Apache and php on anther pc where it works fine - also with very large pages.
I'm guessing that it is some kind of setting that have been made on the pc/Windows system that does not work properly with PHP. But I don't know of any of such settings (I am running Windows XP).

Reply With Quote
  #6  
Old July 21st, 2007, 11:09 AM
cwf's Avatar
cwf cwf is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 343 cwf User rank is Private First Class (20 - 50 Reputation Level)cwf User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 2 Days 18 h 8 m 34 sec
Reputation Power: 2
I have only seen one other thread in a forum where part of a page (an image) is output (http://www.programmingtalk.com/showthread.php?t=36835) This thread did not have a solution.

Check your web server log for errors. Also, view the source of the page and see if there are any errors visible in the source. If a PHP error is being output inside of an open tag, usually in a form, that element is not rendered on the page and the error only appears in the "view source" (in addition to the log file.)

Last edited by cwf : July 21st, 2007 at 11:41 AM.

Reply With Quote
  #7  
Old July 24th, 2007, 04:35 AM
migselv46 migselv46 is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Jul 2007
Posts: 6 migselv46 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 22 m 57 sec
Reputation Power: 0
I have checked the server logs - nothing here.
The php-page is really just a html page (with a .php extension) - I am not including any '<?php' tags at all. It is only tekst. And some '<br/>' tags. In the source code for the page the data is also missing.
The problem arose on my web page. Actually you can see the pages online as the error displays. The complete code can only be seen in the first link, whereas the second fails.
Code:
<a href='http://www.formel1info.dk/oversigter/oversigtKval07.html'>OK as a .html-page</a><br/>
<a href='http://www.formel1info.dk/oversigter/oversigtKval07.php'>Bad as a .php-page</a>

(hope it is legal to put links here - otherwise can not really show the error )

Thanks for the link to the other thread. I am beginning to think that the problem is indeed a Microsoft issue as is guessed in the other thread.

Last edited by migselv46 : July 24th, 2007 at 04:41 AM.

Reply With Quote
  #8  
Old July 24th, 2007, 11:05 AM
cwf's Avatar
cwf cwf is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 343 cwf User rank is Private First Class (20 - 50 Reputation Level)cwf User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 2 Days 18 h 8 m 34 sec
Reputation Power: 2
Does your page have a DOCTYPE declared? It does not matter for this problem, but I did not see it when I viewed the source of the page (or when I ran your page through the w3.org validator.)

I was just going to say that you should validate your html (for the DOCTYPE problem) - http://validator.w3.org/check?uri=www.formel1info.dk%2Foversigter%2Foversi gtKval07.html

But, in doing this I discovered why you are having a PHP problem. You have <script> tags in your html. This tells PHP to start parsing PHP code. You should be using - <script type="text/javascript"> for javascript.

Reply With Quote
  #9  
Old July 25th, 2007, 03:05 AM
migselv46 migselv46 is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Jul 2007
Posts: 6 migselv46 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 22 m 57 sec
Reputation Power: 0
I am afraid it is not as simple as that. If you see my first post you will notice that the testpage I created earlier was only consisting of 'a', 'b' 'c' and some <br/>-tags. Also as I wrote - the error comes after just adding one(!) 'x'.
I have created two new testpages where it is very clear. The only difference is one 'x'.
Code:
On 'http://www.formel1info.dk/test1.php' the page is served OK.
On 'http://www.formel1info.dk/test2.php' that consists of just ONE extra 'x' the page is not served complete.

The access_log writes as:
83.92.30.173 - - [25/Jul/2007:09:55:25 +0200] "GET /test1.php HTTP/1.1" 200 12550
83.92.30.173 - - [25/Jul/2007:09:55:42 +0200] "GET /test2.php HTTP/1.1" 200 12551
Nothing in the error_log.

Reply With Quote
  #10  
Old July 25th, 2007, 06:08 AM
marcoerra marcoerra is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Jul 2007
Posts: 5 marcoerra User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 27 m 12 sec
Reputation Power: 0
Same problem here

I'm having the same problem with my web server.
I have Suse 10.1 with apache 2.2.0 and php 5.1.2, freshly instaled.
During the first 2 weeks everything works fine but today php pages that responde larger than exactly 18000 bytes (18k) hang with no errors logged in the server side.
I had a previous instalation of redhat 9 with apache 2 and php 4 that work for 2 years and last month the same thing happened thats why i reinstaled everything with newer versions.
I'm completly lost with this one, does anyone has ideas ?
Is there any configuration variable in apache or php that is limiting this ?

Reply With Quote
  #11  
Old July 25th, 2007, 09:33 AM
cwf's Avatar
cwf cwf is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 343 cwf User rank is Private First Class (20 - 50 Reputation Level)cwf User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 2 Days 18 h 8 m 34 sec
Reputation Power: 2
Try changing the php.ini output_buffering = setting to OFF to see if it has an effect on the problem. This is the only PHP output size related setting that I am aware of.

Reply With Quote
  #12  
Old July 25th, 2007, 11:42 AM
marcoerra marcoerra is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Jul 2007
Posts: 5 marcoerra User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 27 m 12 sec
Reputation Power: 0
Quote:
Originally Posted by cwf
Try changing the php.ini output_buffering = setting to OFF to see if it has an effect on the problem. This is the only PHP output size related setting that I am aware of.

I've changed all possible options in output_buffering (On, Off, different values) and with off the pages larger than 18k doesn't work, with On none works and with values less than ~11000 works but larger doesn't work.

Reply With Quote
  #13  
Old July 26th, 2007, 04:35 AM
marcoerra marcoerra is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Jul 2007
Posts: 5 marcoerra User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 27 m 12 sec
Reputation Power: 0
Very strange thing, in my internal network the site works fine but when accessing form another location it gives me the error, is it possible that it is a problem with my ISP ?

Reply With Quote
  #14  
Old July 26th, 2007, 11:34 AM
PrimeMogul PrimeMogul is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Jul 2007
Posts: 1 PrimeMogul User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 44 m 31 sec
Reputation Power: 0
sendbuffersize

I have a similar trouble with an older version PHP 4.3.9 Apache/2.0.52 (Red Hat) on Redhat SELinux 2.6.9-22.ELsmp.

Large static files (like 1.5 meg *.pdf) can take multiple restarts on slower connections. Small files (40k .htmp or .php) intermitantly fail, but usually succeed on reload.

Somewhere else I read to increase Apache's SendBufferSize. But mine is already 130k, so is larger than these files I am having trouble with. I put a time in the pdf pages, they are being created in about 1/50th of a second.

I also wonder if it is a TCP/IP (or firewall?) problem.

Reply With Quote
  #15  
Old July 26th, 2007, 12:38 PM
marcoerra marcoerra is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Jul 2007
Posts: 5 marcoerra User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 27 m 12 sec
Reputation Power: 0
Quote:
Originally Posted by PrimeMogul
I have a similar trouble with an older version PHP 4.3.9 Apache/2.0.52 (Red Hat) on Redhat SELinux 2.6.9-22.ELsmp.

Large static files (like 1.5 meg *.pdf) can take multiple restarts on slower connections. Small files (40k .htmp or .php) intermitantly fail, but usually succeed on reload.

Somewhere else I read to increase Apache's SendBufferSize. But mine is already 130k, so is larger than these files I am having trouble with. I put a time in the pdf pages, they are being created in about 1/50th of a second.

I also wonder if it is a TCP/IP (or firewall?) problem.


Eureka, it work.
I made a cat to:
cat /proc/sys/net/core/wmem_max

and added the directive in httpd.conf the value retuned, in my case:
SendBufferSize 131070

Restart apache and the site started responding ok.

Let's hope it keeps responding.

Thanks a lot.

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Installation > Bug ?: Page size too big ?


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