Jump to content

Blank pages when attempting to read from a database


Buchead

Recommended Posts

Hello.....

I've just installed apache/mysql/php/phpmyadmin on an XP machine, and whilst it all works fine, when I write a page to retrieve any data from the database I get a completely blank page. No errors about not connecting to the database (tried using wrong password); just get nothing at all.

If I have a standard php page that doesn't involve a database it works fine! phpmyadmin allows me to update the databases, so that side of it appears to be ok.

It's running:

Apache/1.3.34 (win32)
PHP 5.1.1
Mysql 5.0
phpmyadmin 2.7.0

I've installed it on another PC (albeit slightly different versions) and it works fine, so I know my coding is ok!

Is anyone able to suggest what I've done wrong?

Thanks.
You probably have an error on your php script, but you don't have display errors on. (thus it comes out blank).

What you should do is edit you php.ini file
and look for these line(s) (change them to what you see below):

error_reporting  =  E_ALL & ~E_NOTICE
display_errors = On

It will help you to debug the page and find out why it isn't displaying properly.

It can happen if it failed to open the database, or you have a syntax error in your php script.

Chris

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.