I have a PHP page that runs flawlessly on Apache 2.2.8 (for Windows), PHP 5.2.5 (for Windows), and Windows XP.
Now I am to deploy the PHP on the production server. It is CentOS 4.2 (32-bit x86), with Apache 2.2.14 and PHP 5.2.11. Both Apache and PHP are compiled, with all the needed components. The compilation process ran smoothly.
However, my PHP page only loads partially in the production server. The production server's never loads the page fully, ie, when showing the codes in a browser, it never reaches the closing </html> part. And it has nothing to do with bandwitdh either, I have tried browsing locally from the server itself.
I have to admit that my php page is quite large, about 9 kilobytes. It also has a lot of "echo" commands. The page also contains a lot of tab.
Recently I found out that it has something to do with output_buffering parameter in php.ini. Starting from zero, if I increase the output_buffering value, the loaded portion of my PHP page also increases. So I think if I max the output_buffering value, my PHP page will be fully loaded by the server.
Alas, that's not the case.
See, when I reach certain value, the loaded portion of the PHP page decreases again. The page reaches its biggest portion in output_buffering=1024. Increasing it to 1025, for example, doesn't change anything. But when I set it to 1210, the
Here's what happen when I set output_buffering=0. The page does not load fully, it only shows the HTML header and the toolbar.

output_buffering=0
At output_buffering=512, more portions of the PHP page starts to show up, evident by the code lines below the toolbar.

output_buffering=512
Apparently, output_buffering=1024 is the "optimum" setting, although it still fails to load the PHP page fully. The page you see below is not the full PHP page, by the way.

output_buffering=1024
I don't know if it is relevant, but originally, the php.ini has extension_dir = './' Problem is, I don't know what does it mean by './' (is it /usr/local/apache2/php ? is it /usr/local/apache2/lib ?). On the other hand, I need to dl php_mapscript.so into my PHP page, which I put in PHP installation prefix (/usr/local/apache2/php). So I hardcoded the extension_dir into '/usr/local/apache2/php'.
In short, what's wrong? Why the production server cannot load my PHP page fully? What should I do? Please help. 🙁