Start ::
PostNuke 0.7 Support ::
Tutorials and Solutions ::
Easy way to show php errors for debuggin
Moderated by: Support Team
-
- rank:
-
Professional
- registered:
- February 2005
- Status:
- offline
- last visit:
- 09.04.08
- Posts:
- 1480
When debugging PHP or trying to solve problems like a Blank Page, the first thing you will be told is to show PHP errors, and the usual ways you will be told to try are:
- =>changing php.ini
- =>adding an htaccess file to your PN root
These both work well - when you can use them. Many don't have shell access and cannot change their php.ini files, and some will not be able to use htaccess because of other server configurations over which they have no control.
Fortunately, PHP has many ways to do things.
Go to config.php and at around lines 77-80 you will see the following:
Add a line and change the first flag from 0 to 1 so it looks like this:
Now you will see error messages on your pages. (There are a few that won't show up, but most will.)
Make sure you comment out the last line when you are done. Putting // in front of error_reporting will turn it off. This is important because the error messages will confuse the devil out of ordinary users and can give hackers information you don't want them to have about your file structure.
Hope this tip helps folks. It is a quick and easy way to turn PHP errors on and off while mucking around.
Peter
edited by: pheski, Sep 14, 2007 - 09:45 AM
-----
Peace
______________________________________
The commonest cause of problems is solutions. -
- rank:
-
Professional
- registered:
- September 2002
- Status:
- offline
- last visit:
- 14.08.08
- Posts:
- 855
Please put the into the Wiki
-----
best regards from Kiel, sailing city
Steffen Voss
Member of the PostNuke Steering Committee
Follow The Zikulan at Twitter -
- rank:
-
Professional
- registered:
- February 2005
- Status:
- offline
- last visit:
- 09.04.08
- Posts:
- 1480
I went to add it to the Wiki and someone had gotten there before me.
I'm happy to be able to contribute.
Peter
-----
Peace
______________________________________
The commonest cause of problems is solutions.
Start ::
PostNuke 0.7 Support ::
Tutorials and Solutions ::
Easy way to show php errors for debuggin
