Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

PHP files showing white screen

New Here ,
Feb 24, 2008 Feb 24, 2008

Copy link to clipboard

Copied

I use Bluehost as my hosting service and this problem has never occurred before using them as a test server. I run Mac OS X and recently followed the tutorial on setting up a PHP5 environment on my Mac. Problem is after doing everything as told and testing the php to see if it is operating, which it is, I tried viewing th PHP files (which only have database connections for dynamic message comments) and they only display white screens!! I had the site already designed and wanted to switch to this local host method so I don't update my site's files when testing changes to my pages...but this is not acceptable. I see that many people have the same problem on the net, but there are no solutions, just complaints. All the HTML pages display in the browser fine in my browser: http://localhost/~username/Sitefolder/, so why is that the php files render whitescreens?

Apache is running, PHP is running.....I am using my old Bluehost SQL databases, but this should not be an issue. I don't wish to install MYSQL on my machine when I have it through my rovider, and i know this isn't the cause of the issue. Is this some faulty php syntax on Dreamweaver's part?
TOPICS
Server side applications

Views

354
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Feb 25, 2008 Feb 25, 2008
Travis Coats wrote:
> All the HTML pages display in the browser fine in my browser:
> http://localhost/~username/Sitefolder/, so why is that the php files render
> whitescreens?

It means that you have an error in your PHP pages, and that your host
has disabled the display of error messages (good for security). Put the
following code at the very top of one of your PHP pages:

<?php ini_set('display_errors', '1'); ?>

Reload the page, and see what error message is generated. I suspect that
...

Votes

Translate
LEGEND ,
Feb 25, 2008 Feb 25, 2008

Copy link to clipboard

Copied

Travis Coats wrote:
> All the HTML pages display in the browser fine in my browser:
> http://localhost/~username/Sitefolder/, so why is that the php files render
> whitescreens?

It means that you have an error in your PHP pages, and that your host
has disabled the display of error messages (good for security). Put the
following code at the very top of one of your PHP pages:

<?php ini_set('display_errors', '1'); ?>

Reload the page, and see what error message is generated. I suspect that
you have an include file that cannot be found (probably the wrong path
in the include command).

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 29, 2008 Feb 29, 2008

Copy link to clipboard

Copied

LATEST
The problem WAS the MySQL connection. I am guessing in order not to have to use a local database on my machine, I should rewrite the connect code to reflect my host's database location.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines