Solved

when using php operatpr @ what exactly happen to the errors in the script?

Posted on 2011-09-15
5
285 Views
Last Modified: 2012-05-12
when using php operatpr @ what exactly happen to the errors in the script?
0
Comment
Question by:Nura111
  • 2
  • 2
5 Comments
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 167 total points
ID: 36545210
They still exist, you just don't see them.  If they are 'fatal', your script will crash and you won't know why.
0
 

Author Comment

by:Nura111
ID: 36545494
ok I have a lamp web application on apache where notmally I would find the errors?
(unless im echoing them to the screen (e.g die(ShowError("Server Query Error"));)

      }
0
 
LVL 109

Assisted Solution

by:Ray Paseur
Ray Paseur earned 333 total points
ID: 36545631
Parse errors should still show up.  But if you try something like this:

$fp = @fopen('/path/to/nowhere', 'r');

and the file does not exist the value of $fp will be set to FALSE, however the warning will not be issued.

A principle to live by: Unless you know exactly what you are doing, and you expect errors, and you really want to suppress the messages, never use the @ notation.  
0
 

Author Comment

by:Nura111
ID: 36545665
I never seed the Parse errors should still show up in the web application im working on so isnt there is a log file they where they are suppose to be? Im confused about where would I suppose to see php wrrors in general because when Im testing things on lcalhost xmapp for expmple I see all error and warning on the screen  and in the web application I dont..
0
 
LVL 109

Assisted Solution

by:Ray Paseur
Ray Paseur earned 333 total points
ID: 36545706
Probably in the web application the errors are written to a log and 'display_errors' is set to FALSE
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question