nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

how to log php error in a file

This is a discussion on how to log php error in a file within the Web servers forums, part of the Mastering Servers category; i need ur help.. i need to log php page errors in a file rather than displaying in Browser. Pl. ...


Go Back   nixCraft Linux Forum > Mastering Servers > Web servers

Linux answers from nixCraft.


Web servers Discussion on Apache, Nginx and Lighttpd HTTP/web server and configuration issues.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 21-01-2009, 02:52 PM
kasimani's Avatar
Senior Member
User
 
Join Date: Jul 2006
Location: India, Delhi
OS: CentOS, RedHat, Fedora, Ubuntu
Posts: 151
Thanks: 3
Thanked 1 Time in 1 Post
Rep Power: 4
kasimani is on a distinguished road
Send a message via Yahoo to kasimani
Question how to log php error in a file

i need ur help.. i need to log php page errors in a file rather than displaying in Browser.

Pl. help me.. and also guide me how to repeat logging error in files.

Thanks in adv.
Reply With Quote
  #2 (permalink)  
Old 21-01-2009, 07:56 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,710
Thanks: 11
Thanked 244 Times in 183 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

PHP Log All Errors to a Log File to Get Detailed Information
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
  #3 (permalink)  
Old 03-03-2009, 08:53 PM
Junior Member
User
 
Join Date: Mar 2009
Location: UK
OS: M$ Windows
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Will is on a distinguished road
Default

On a side note...

To turn off error reporting in your script, place this line at the top of the script:

error_reporting(0);

You can also use this @$variable = somefunction() / $variable;

This will execute the command without showing errors, because of the @ prefix.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
NFS error: unable to find the file on client side samengr File Servers 1 25-08-2009 06:48 AM
File System Error During Boot svoltmer Ubuntu / Debian 3 21-02-2008 01:50 PM
Invalid ICMP type 3 code 3 error to a broadcast -samba error raj Linux software 0 09-07-2006 04:38 AM
error: File not found by glob: (rpm_filename) toor Linux software 2 06-07-2006 12:18 PM
error shell script no such file or directory /bin/sh Linux software 1 08-01-2006 08:34 PM


All times are GMT +5.5. The time now is 03:44 AM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38