php script appears as a blank screen

3.2k Views Asked by At

I'm trying to run a php script on my website through my file manager but it just shows a white blank screen. I ran a couple of test php scripts on my file manager and runs well. The php script that runs a blank screen has been tested offline with WAMP and works fine, The php script involves connecting to a database which it does, uses simple_html_dom for web scraping and inserting to a database. Can someone please help. Surely if it works offline it should work online no error messages are showing

2

There are 2 best solutions below

0
On

Turn on your error reporting first :

error_reporting(E_ALL);

It might be occurring because you have switched off the error_reporting and the connection is not being successful.
Check if your database connection credentials are correct.

If the problem still exists, refer to this page :

PHP Blank Screen - Solutions

0
On

Make your error reporting on by

error_reporting(E_ALL);

Also, please check php's error log file.

Every page crash is printed there.

Generally, in php folders of WAMP, XAMPP.

For XAMPP in Windows, the file location is:

xampp\php\logs\php_error_log