Skip to main content
Inspiring
March 6, 2008
Answered

.php pages not showing any content

  • March 6, 2008
  • 5 replies
  • 765 views
I am building a small site powered by at MySQL database using PHP on the front end. I use WAMP server as my local testing server but having a small problem. I made 2 new pages today that do not show any content when tested. My other .php pages show up fine, but the 2 newest ones do not. I have uploaded them to the testing server. Even the HTML from the page will not show up when tested in the browser. Any ideas are appreciated. Am i missing something?
This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer Newsgroup_User
fbcojman wrote:
> I am building a small site powered by at MySQL database using PHP on the front
> end. I use WAMP server as my local testing server but having a small problem.
> I made 2 new pages today that do not show any content when tested.

Almost certainly it means you have a parse error in your PHP code, but
display_errors is turned off. Add this to the very top of your page, and
see what error message is produced:

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


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

5 replies

Inspiring
March 7, 2008
Michael Fesser wrote:
> This should be done in the php.ini (and error_reporting set to E_ALL|
> E_STRICT). If the script has a parse error, then it might not get
> executed at all, so the above line won't change anything.

Yes, I agree that it should be done in php.ini, particularly if it's a
local testing server. I frequently recommend the technique of using
ini_set() for people on shared hosting where display_errors is turned
off. Even for a local environment, it's a quick way to determine whether
display_errors is turned on. I was under the impression that it would
reveal a parse error, but I've just tested it, and realized that it
doesn't. All the more reason to turn on display_errors in a local
testing environment.

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Inspiring
March 7, 2008
That would be useful for someone who can change such things - many hosts
would not give you access to php.ini, however.

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
==================


"Michael Fesser" <netizen@gmx.de> wrote in message
news:2d61t310ms0j8uqbre0bmshflkc7s943b0@4ax.com...
> .oO(David Powers)
>
>>fbcojman wrote:
>>> I am building a small site powered by at MySQL database using PHP on the
>>> front
>>> end. I use WAMP server as my local testing server but having a small
>>> problem.
>>> I made 2 new pages today that do not show any content when tested.
>>
>>Almost certainly it means you have a parse error in your PHP code, but
>>display_errors is turned off. Add this to the very top of your page, and
>>see what error message is produced:
>>
>><?php ini_set('display_errors', '1'); ?>
>
> This should be done in the php.ini (and error_reporting set to E_ALL|
> E_STRICT). If the script has a parse error, then it might not get
> executed at all, so the above line won't change anything.
>
> Micha

Inspiring
March 7, 2008
.oO(David Powers)

>fbcojman wrote:
>> I am building a small site powered by at MySQL database using PHP on the front
>> end. I use WAMP server as my local testing server but having a small problem.
>> I made 2 new pages today that do not show any content when tested.
>
>Almost certainly it means you have a parse error in your PHP code, but
>display_errors is turned off. Add this to the very top of your page, and
>see what error message is produced:
>
><?php ini_set('display_errors', '1'); ?>

This should be done in the php.ini (and error_reporting set to E_ALL|
E_STRICT). If the script has a parse error, then it might not get
executed at all, so the above line won't change anything.

Micha
Newsgroup_UserCorrect answer
Inspiring
March 6, 2008
fbcojman wrote:
> I am building a small site powered by at MySQL database using PHP on the front
> end. I use WAMP server as my local testing server but having a small problem.
> I made 2 new pages today that do not show any content when tested.

Almost certainly it means you have a parse error in your PHP code, but
display_errors is turned off. Add this to the very top of your page, and
see what error message is produced:

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


--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Inspiring
March 7, 2008
Yes, thank you. I assumed it was something easy. As soon as i turned on show errors on my wamp server i was able to see the error in my line of code. I had used parenthesis instead of brackets in my variable declaration. Thanks for the quick replies.