开发者

Identifying a PHP problem that doesn't prints a ERROR and the code isn't yours

开发者 https://www.devze.com 2023-02-06 08:48 出处:网络
I\'ve to make a website works and I don\'t know what to do right now. I can run it in a virtual machine with Ubuntu, on my company\'s server in Debian, on a WAMP... but I can\'t get it working in a se

I've to make a website works and I don't know what to do right now. I can run it in a virtual machine with Ubuntu, on my company's server in Debian, on a WAMP... but I can't get it working in a server from a client.

I think the problem is with the gets. The form that I can't modify is sended by get, using the next url:

http://domain.com/SGAP/dades_proj_edit.php?idedit=2011854&id=&projectname=afsdfasdf&comptitle=asasfdafsdafs&codarea=ECIV&grauimp=1&codtipus=2&codsubtipus=6&subtipusdef=fdsaafasfddfs&codpais=8&clientid=2&promotor=asdfa&entfin=fsdafadsfds&impcontract=2&initdate=21%2F01%2F2011&findate=30%2F01%2F2011&uteflag=false&utepartic=&utepercent=0&descprelim=fdsadasdadfsadfs&codprojstatus=1&statusstamp=25%2F01%2F2011&cruserid=&action=update

Firefox shows a blanc page with no error. I've tried to force to show all errors with error_reporting(E_ALL) and开发者_如何转开发 ini_set("error_reporting", E_ALL) to show if something happens but the wait page is showed with 0 errors.

I supposed that was a $_GET error and I tried to put on the top of the page and in the end of it a <?php if($_GET["test"]) echo "Works"; ?> and call the webpage with: domain.com/SGAP/dades_proj.edit.php?test=testing and it works from top to end... I don't know where is the error.

What I can check to figure where is the white page comming? Thank you in advance!


Here's what I would do.

Start at the top of the file/stack, and add this code:

<?
$myUniqueCounter = 0;
error_log(++$myUniqueCounter . ', line ' . __LINE__ );

Then, copy and paste the error_log line all over the file/stack, and see where it stops logging.


I have occasionally seen php die without a blank output. Generally, the only way to solve this is to remove everything from the file, and then add code back in one line at a time. When it stops working, you know that whatever you just added caused the fault. You can try running php with the -l flag, to check the syntax, but this might not find the problem; the only sure way really is to just to add or remove things until the output changes.

I know this isn't much help, but there is no other way to debug the problem, short of executing php itself with a debugger... actually, you could do that; can you run php from gdb? That might help you find what is causing the issue, but no guarantees.

0

精彩评论

暂无评论...
验证码 换一张
取 消