473,326 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

php.ini - errors not being thrown

Hi guys,

I'm somewhat new to PHP, so please excuse what I hope is an easy
question.

I've experienced some issues lately where the code on my development
environment throws no errors, but when I upload to a shared hosting
server errors are thrown.

The latest was when I had output before calling header(); which should
normally throw an error. As mentioned above, this threw no errors on
my local machine but did only when I uploaded to another server.

My setup is:
- PHP 5.2.5
- Windows XP
- Apache

The following is from my php.ini:
- display_errors:On
- error_reporting:8191

I also have error_reporting(E_ALL | E_STRICT); in my project.

Can anyone please let me know what you would run in production in
terms of exception throwing?

Thanks,

Michael
Jun 2 '08 #1
3 1505
Michael Sharman wrote:
Hi guys,

I'm somewhat new to PHP, so please excuse what I hope is an easy
question.

I've experienced some issues lately where the code on my development
environment throws no errors, but when I upload to a shared hosting
server errors are thrown.

The latest was when I had output before calling header(); which should
normally throw an error. As mentioned above, this threw no errors on
my local machine but did only when I uploaded to another server.

My setup is:
- PHP 5.2.5
- Windows XP
- Apache

The following is from my php.ini:
- display_errors:On
- error_reporting:8191

I also have error_reporting(E_ALL | E_STRICT); in my project.

Can anyone please let me know what you would run in production in
terms of exception throwing?

Thanks,

Michael
To start with, is this the syntax you have in your php.ini file? It
should be:

display_errors=on
error_reporting=E_ALL
(or E_ALL | E_STRICT)

Next, are you sure this is the php.ini file you're using? What does
phpinfo() show for these settings and the php.ini file being used?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Jun 2 '08 #2
On May 18, 12:12 am, Jerry Stuckle <jstuck...@attglobal.netwrote:
Michael Sharman wrote:
Hi guys,
I'm somewhat new to PHP, so please excuse what I hope is an easy
question.
I've experienced some issues lately where the code on my development
environment throws no errors, but when I upload to a shared hosting
server errors are thrown.
The latest was when I had output before calling header(); which should
normally throw an error. As mentioned above, this threw no errors on
my local machine but did only when I uploaded to another server.
My setup is:
- PHP 5.2.5
- Windows XP
- Apache
The following is from my php.ini:
- display_errors:On
- error_reporting:8191
I also have error_reporting(E_ALL | E_STRICT); in my project.
Can anyone please let me know what you would run in production in
terms of exception throwing?
Thanks,
Michael

To start with, is this the syntax you have in your php.ini file? It
should be:

display_errors=on
error_reporting=E_ALL
(or E_ALL | E_STRICT)

Next, are you sure this is the php.ini file you're using? What does
phpinfo() show for these settings and the php.ini file being used?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================
Hi Jerry,

Thanks for your response. I have the following in my php.ini:

error_reporting = E_ALL | E_STRICT
display_errors = On

The "Loaded Configuration File" is "C:\Program Files\PHP\php.ini"

phpinfo(); is showing:
- display_errors:On
- error_reporting:8191

Michael
Jun 2 '08 #3
On Sat, 17 May 2008 16:00:49 +0200, Michael Sharman <sh****@gmail.com>
wrote:
Hi guys,

I'm somewhat new to PHP, so please excuse what I hope is an easy
question.

I've experienced some issues lately where the code on my development
environment throws no errors, but when I upload to a shared hosting
server errors are thrown.

The latest was when I had output before calling header(); which should
normally throw an error. As mentioned above, this threw no errors on
my local machine but did only when I uploaded to another server.
This could have something to do with output buffering locally and not on
production? Or something like implicit_flush...
My setup is:
- PHP 5.2.5
- Windows XP
- Apache

The following is from my php.ini:
- display_errors:On
- error_reporting:8191

I also have error_reporting(E_ALL | E_STRICT); in my project.

Can anyone please let me know what you would run in production in
Production would be run in E_ALL, with display_errors of and log_errors to
a file of your choice.

Some starters for hunting the reason down:
1) Compare the phpinfo() output of your develelopment & production server.
Any noticable differences?

2) Are you sure this is not because differences unrelated to code
directly? (like file permissions, installed extentions, database user
permissions etc.)

3) Is the error not shown, or simple not being thrown? Trigger_error()
should tell you wether deliberate errors make it to your screen. For good
measure, add a trigger_error() just after a point your production
environment throws an error, so run-time settings are more or less as
identical as you can get them. If it's just that the error doesn't exist,
I refer you to option (2) )

4) Any particular errors / common themes about the errors thrown?

5) Is there a difference in PHP versions between development & production?

6) Any calls set_error_handler() / set_exception_handler() anywhere in the
code?
--
Rik Wasmus
....spamrun finished
Jun 2 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ewan B | last post by:
Hi, I'm using Xerces to parse XML files using SAX2, and am wondering if there is any information as to what exceptions are being thrown when certain validation errors occur. Taking a simple...
1
by: Ersin Gençtürk | last post by:
We couldn't find why these errors happen.They doesn't appear everytime.And they appear different pages at different times.Is there somebody know why these happenes ? First user gets this error :...
3
by: clintonb | last post by:
Some programmers, and even Microsoft documents, say you should only throw exceptions for exceptional situations. So how are others handling all the other unexceptional errors? How are you...
2
by: Anthony Biondo Jr | last post by:
I was wondering how to handle an error in a web service. If our web service encounters a connection error or any other error what is the best practice for returning an error? Do you return a...
2
by: George1776 | last post by:
All, I've recently upgraded our production ASP.NET/C# application from framework 1.1 to 2.0. Since then I've been plagued by out-of-memory errors and problems with the cache object (which may...
2
by: Greg | last post by:
I have a bizarre situation in which serialisation is failing routinely under a specific condition, and I'm wondering if the details ring a bell with anyone here. I have 2 classes that my...
7
by: iKiLL | last post by:
Hi all I am still pretty new to .Net and C#. I have come from a VB6 Background.
7
by: brett.estabrook | last post by:
I have written a multi-threaded c# windows service in .net 1.1 (Visual Studio .net 2003). The service has several threads that poll a Sql 6.5 database on another machine. Each thread will execute a...
0
by: Luc The Perverse | last post by:
I am designing an application which will upload files to a remote server (incidentally HTTP post if that makes any difference). This is a "client application" which, hopefully, hundreds of people...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.