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

.php pages not showing any content

Participant ,
Mar 06, 2008 Mar 06, 2008
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?
TOPICS
Server side applications
749
Translate
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 , Mar 06, 2008 Mar 06, 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 C...
Translate
LEGEND ,
Mar 06, 2008 Mar 06, 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/
Translate
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
Participant ,
Mar 07, 2008 Mar 07, 2008
LATEST
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.
Translate
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
LEGEND ,
Mar 06, 2008 Mar 06, 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
Translate
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
LEGEND ,
Mar 07, 2008 Mar 07, 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

Translate
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
LEGEND ,
Mar 07, 2008 Mar 07, 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/
Translate
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