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.
Link to comment
Share on other sites

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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.