TotalChoice Hosting Family Forums: Where Are Php Error Messages? - TotalChoice Hosting Family Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Where Are Php Error Messages?

#1 User is offline   KL21 

  • Group: Members
  • Posts: 2
  • Joined: 29-May 05

Posted 29 May 2005 - 01:49 PM

I'm writing PHP scripts, uploading them to the TCH server and then executing them online. When I have any sort of PHP error my browser displays a totally blank page, no error messages. Where can I find the PHP error messages? I've tried my error logs and also looking at the source for the web page. But there's nothing there. Any suggestions? Hopefully this is an easy question. Thanks!

#2 User is offline   TCH-Rob 

  • Help Desk Manager
  • PipPipPipPip
  • Group: Members
  • Posts: 7,818
  • Joined: 11-March 03

Posted 29 May 2005 - 02:07 PM

Add the following commands to your .htaccess file in the folder containing the php script (or create an .htaccess file if none exists.)

php_flag display_errors on
php_value error_reporting 7

#3 User is offline   TweezerMan 

  • Immediate Family
  • PipPipPipPip
  • Group: Members
  • Posts: 1,767
  • Joined: 26-September 04

Posted 29 May 2005 - 02:22 PM

Welcome to the forums, KL21! :thumbup1:
David Phillips (TweezerMan)
The Tweezer's Edge v3

#4 User is online   TCH-Bruce 

  • Lead Forum Moderator
  • PipPipPipPip
  • Group: Admins
  • Posts: 22,012
  • Joined: 11-August 03

Posted 29 May 2005 - 02:32 PM

Welcome to the forums, KL21 :dance:
Bruce Richards
Lead Forum Moderator
TotalChoice Hosting, L.L.C.
Webhosting by Total Choice Web Hosting - General Support Forum

I am the Lead Forum Moderator. While I can assist in answering most of your hosting related questions, I am unable to answer questions about specifics relating to your account such as billing and server related issues. Should you need assistance in these areas, please contact our Help Desk or our many other options. Another good place to find answers is with our help pages, tutorials and movie tutorials.

#5 User is offline   borfast 

  • Immediate Family
  • PipPipPipPip
  • Group: Members
  • Posts: 3,276
  • Joined: 04-January 03

Posted 29 May 2005 - 02:57 PM

Welcome to the forums, KL21.

Another way to get the error messages to display in the resulting page is to use the error_reporting() function.
Raul Santos
-=[ http://www.borfast.com ]=-
Because the people who are crazy enough to think they can change the world, are the ones who do!
Get Firefox!

#6 User is offline   KL21 

  • Group: Members
  • Posts: 2
  • Joined: 29-May 05

Posted 29 May 2005 - 03:41 PM

Thanks, the .htaccess file worked. This makes life SO much easier!

#7 User is offline   stevevan 

  • Immediate Family
  • PipPipPipPip
  • Group: Members
  • Posts: 3,537
  • Joined: 26-April 03

Posted 29 May 2005 - 03:42 PM

Welcome to the forums! See how helpful the family is here? I even learned something on this one!
Steve, W4SJV

"When all else fails (and it will)...there's Amateur Radio!"
"It is better to let people THINK you're a fool than to open your mouth and remove all doubt."

#8 User is offline   TCH-Rob 

  • Help Desk Manager
  • PipPipPipPip
  • Group: Members
  • Posts: 7,818
  • Joined: 11-March 03

Posted 29 May 2005 - 06:41 PM

WooooHoooo! Happy to hear you got it working.

#9 User is offline   TCH-Don 

  • Volunteer Moderator
  • PipPipPipPip
  • Group: Moderators
  • Posts: 11,679
  • Joined: 30-November 02

Posted 29 May 2005 - 07:03 PM

:dance: Welcome to the forums, KL21 :D
Don Rosenquist
Forum Moderator
TotalChoice Hosting, L.L.C.
Web Hosting by Total Choice Web Hosting - For Your Family - Web Hosting Family!

Any links or suggestions for third party software/sites should be used at your own risk.
My opinions and recommendations are not necessarily those of TCH and TCH is not responsible.

I am a Forum Moderator and a volunteer. While I can assist in answering most of your hosting related questions, I am unable to answer questions about specifics relating to your account such as billing and server related questions. Should you need assistance in these areas, please contact our Help Desk.


treasure your pets

The Turtle says "A little knowledge is a dangerous thing,
so keep learning!"

#10 User is offline   Deverill 

  • Immediate Family
  • PipPipPipPip
  • Group: Members
  • Posts: 3,317
  • Joined: 21-July 03

Posted 29 May 2005 - 07:43 PM

Welcome to the forums and your new home, KL21!
"A winner is simply willing to do what a loser won't."

#11 User is offline   section31 

  • Immediate Family
  • PipPipPipPip
  • Group: Members
  • Posts: 335
  • Joined: 11-January 03

Posted 29 July 2005 - 07:38 AM

TCH-Rob, on May 29 2005, 01:07 PM, said:

Add the following commands to your .htaccess file in the folder containing the php script (or create an .htaccess file if none exists.)

php_flag display_errors on
php_value error_reporting 7
<{POST_SNAPBACK}>


Why is it that error_reporting(E_ALL) doesn't report all errors, yet using that .htaccess file does?
<A HREF="ymsgr:sendIM?sectionthirty1">
<IMG SRC="http://www.tchstatus.com:8080/yahoo/sectionthirty1"></A>

#12 User is offline   TweezerMan 

  • Immediate Family
  • PipPipPipPip
  • Group: Members
  • Posts: 1,767
  • Joined: 26-September 04

Posted 29 July 2005 - 06:27 PM

I'm just guessing here, but I think that if the error reporting level is set in your script, and the script has severe errors in it that prevent the script from running, PHP never gets to execute your error_reporting() function so it can tell you what's wrong.

When the error reporting level set in the .htaccess file, PHP reads the .htaccess file first before looking at your script and will set the error reporting level even if the PHP script is complete jibberish. ;)
David Phillips (TweezerMan)
The Tweezer's Edge v3

#13 User is offline   section31 

  • Immediate Family
  • PipPipPipPip
  • Group: Members
  • Posts: 335
  • Joined: 11-January 03

Posted 29 July 2005 - 10:18 PM

Sounds about right. Thanks.
<A HREF="ymsgr:sendIM?sectionthirty1">
<IMG SRC="http://www.tchstatus.com:8080/yahoo/sectionthirty1"></A>

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users