开发者

Two matching programs, one will pull mysql data, the other wont

开发者 https://www.devze.com 2022-12-15 17:07 出处:网络
I\'ve got two matching开发者_JS百科 php programs, one held on the development folders, the other on the live folders, both on the same machine.The live version can pull data from the database and disp

I've got two matching开发者_JS百科 php programs, one held on the development folders, the other on the live folders, both on the same machine. The live version can pull data from the database and display it, the development version cannot and kills the page as solid white.

Both are identical and both are reaching for the same database.

I wish I had a better way to describe that.

Anyone have a clue? What could I check?


Look in your server logs. You're running PHP under Apache, I'd presume - so you may find some clues in Apache logs.


Try to turn ON error reporting... I might help you get more details on what's happening. Then we will be able to help more :)

In a .htaccess (if host support it):

php_flag display_errors on
php_value error_reporting 4095

As PHP code:

error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 'On');
ini_set('log_errors','On');
ini_set('error_log', $_SERVER['DOCUMENT_ROOT'] . '/php_error.log');


I have had this issue a few times. Usually, it turns out that the 2 instances of the application are not exactly the same.

I use something like: http://winmerge.org/ or any other differencing program just to be sure they are the same. I like WinMerge because you can feed it 2 folders of files and it will traverse sub directories and tell me all the differences in all the files.


I would recommend using CSDiff or a similar program to make sure that these programs are truly the same. I've been in your situation before and swore up and down that both environments were an exact mirror of each other, only to find I had overlooked some small detail...

0

精彩评论

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