|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
|
|
#1
|
|||
|
|||
|
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? |
|
#2
|
||||
|
||||
|
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 |
|
#3
|
|||
|
|||
|
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.
|
|
#4
|
||||
|
||||
|
Quote:
Does phpinfo() work correctly? What is the precise PHP version? |
|
#5
|
|||
|
|||
|
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). |
|
#6
|
||||
|
||||
|
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. |
|
#7
|
|||
|
|||
|
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. |
|
#8
|
||||
|
||||
|
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. |
|
#9
|
|||
|
|||
|
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. |
|
#10
|
|||
|
|||
|
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 ? |
|
#11
|
||||
|
||||
|
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.
|
|
#12
|
|||
|
|||
|
Quote:
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. |
|
#13
|
|||
|
|||
|
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 ?
|
|
#14
|
|||
|
|||
|
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. |
|
#15
|
|||
|
|||
|
Quote:
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. |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Installation > Bug ?: Page size too big ? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|