473,587 Members | 2,447 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error reporting

I have PHP 4.3.7 running on my client's Windows 2003 server. The same
computer also runs SQL Server and I am trying to connect from PHP to a
database. This fails, so I would like to track down the cause for this
failure.

However, PHP does not display error messages about the failure. I have tried
these:

php.ini:
display_errors = On

test.php:
error_reporting (E_ALL);

phpinfo() says error_reporting is set to 2047 (E_ALL).

Yet I still do not get any errors.

Even when I write arglebargle code, PHP still produces a blank HTML-page
instead of syntax error message.

Are there any other settings in addition to the two forementioned which may
affect error reporting?

-Jani
Jul 17 '05 #1
9 2998
"Jani Jalkala" <ja**********@m ail.htk.fi> wrote in message
news:cl******** *******@read3.i net.fi...
I have PHP 4.3.7 running on my client's Windows 2003 server. The same
computer also runs SQL Server and I am trying to connect from PHP to a
database. This fails, so I would like to track down the cause for this
failure.

However, PHP does not display error messages about the failure. I have tried these:

php.ini:
display_errors = On

test.php:
error_reporting (E_ALL);

phpinfo() says error_reporting is set to 2047 (E_ALL).

Yet I still do not get any errors.

Even when I write arglebargle code, PHP still produces a blank HTML-page
instead of syntax error message.

Are there any other settings in addition to the two forementioned which may affect error reporting?

-Jani


Does PHP code without withoug database access code run properly?

Show us your code. We are only guessing that you want to connect to SQL
Server. You only said it runs on the same box. For all I know you're trying
to access a mySQL server on some other box. You didn't say how you were
attempting to connect. ODBC? For all we know, you are using incorrect
function calls all around.

- Virgil
Jul 17 '05 #2
The database connection was only a reference to what I was ultimately trying
to achieve. At the moment, I don't want help with the connection problems.

My problem was about PHP not displaying error messages, even after I have
(supposedly) turned on all necessary directives in php.ini and manually with
error_reporting ().

The following code in test.php:

<?php
arglebargle
?>

Does not display error messages, but this HTML output:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html;
charset=windows-1252"></HEAD>
<BODY></BODY></HTML>
"Virgil Green" <vj*@DESPAMobsy dian.com> wrote in message
news:a4******** *********@newss vr22.news.prodi gy.com...
"Jani Jalkala" <ja**********@m ail.htk.fi> wrote in message
news:cl******** *******@read3.i net.fi...
I have PHP 4.3.7 running on my client's Windows 2003 server. The same
computer also runs SQL Server and I am trying to connect from PHP to a
database. This fails, so I would like to track down the cause for this
failure.

However, PHP does not display error messages about the failure. I have tried
these:

php.ini:
display_errors = On

test.php:
error_reporting (E_ALL);

phpinfo() says error_reporting is set to 2047 (E_ALL).

Yet I still do not get any errors.

Even when I write arglebargle code, PHP still produces a blank HTML-page
instead of syntax error message.

Are there any other settings in addition to the two forementioned which

may
affect error reporting?

-Jani


Does PHP code without withoug database access code run properly?

Show us your code. We are only guessing that you want to connect to SQL
Server. You only said it runs on the same box. For all I know you're

trying to access a mySQL server on some other box. You didn't say how you were
attempting to connect. ODBC? For all we know, you are using incorrect
function calls all around.

- Virgil

Jul 17 '05 #3

"Jani Jalkala" <ja**********@m ail.htk.fi> wrote in message
news:0l******** ******@read3.in et.fi...
"Virgil Green" <vj*@DESPAMobsy dian.com> wrote in message
news:a4******** *********@newss vr22.news.prodi gy.com...

Does PHP code without withoug database access code run properly?

Show us your code. We are only guessing that you want to connect to SQL
Server. You only said it runs on the same box. For all I know you're trying
to access a mySQL server on some other box. You didn't say how you were
attempting to connect. ODBC? For all we know, you are using incorrect
function calls all around.

- Virgil

The database connection was only a reference to what I was ultimately

trying to achieve. At the moment, I don't want help with the connection problems.

My problem was about PHP not displaying error messages, even after I have
(supposedly) turned on all necessary directives in php.ini and manually with error_reporting ().

The following code in test.php:

<?php
arglebargle
?>

Does not display error messages, but this HTML output:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html;
charset=windows-1252"></HEAD>
<BODY></BODY></HTML>


That code did exactly the same thing on my server.

This, however, gave a fatal error:

<?php
arglebargle();
?>

- Virgil

Jul 17 '05 #4
I would understand if PHP interpreted "arglebargl e" as an undefined constant
and simply did nothing on that line, but in that case I would expect a
completely empty output, not the HTML-page it PHP seens to generate.

I have been using PHP on a server provided by our ISP for a while, and a few
years ago they removed displayed error reports due to security reasons,
after which erroneous code started to result in this same empty HTML page
instead of error messages.

Thus I am fairly sure that in my current case PHP does correctly recognize
the errors in the code, but for some reason chooses to not display the error
messages.

In any case, I tried "arglebargle(); " as a function call, but that didn't
change the output at all.
"Virgil Green" <vj*@DESPAMobsy dian.com> wrote in message
news:2J******** *******@newssvr 22.news.prodigy .com...

The following code in test.php:

<?php
arglebargle
?>

Does not display error messages, but this HTML output:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html;
charset=windows-1252"></HEAD>
<BODY></BODY></HTML>


That code did exactly the same thing on my server.

This, however, gave a fatal error:

<?php
arglebargle();
?>

- Virgil

Jul 17 '05 #5
On Tue, 08 Jun 2004 15:53:21 GMT, "Jani Jalkala" <ja**********@m ail.htk.fi>
wrote:
"Virgil Green" <vj*@DESPAMobsy dian.com> wrote in message
news:2J******* ********@newssv r22.news.prodig y.com...
>
> The following code in test.php:
>
> <?php
> arglebargle
> ?>
>
> Does not display error messages, but this HTML output:
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META http-equiv=Content-Type content="text/html;
> charset=windows-1252"></HEAD>
> <BODY></BODY></HTML>


That code did exactly the same thing on my server.

This, however, gave a fatal error:

<?php
arglebargle();
?>


I would understand if PHP interpreted "arglebargl e" as an undefined constant
and simply did nothing on that line, but in that case I would expect a
completely empty output, not the HTML-page it PHP seens to generate.


FWIW isn't the HTML snippet above generated by IE when it gets no output, and
not generated by PHP and/or the webserver? Try viewing a blank file through a
webserver with IE - I get the snippet above in view source from IE, but from
Mozilla I get a blank screen i.e. the actual output.

--
Andy Hassall <an**@andyh.co. uk> / Space: disk usage analysis tool
http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space
Jul 17 '05 #6
Oh yes, you are right about that. Still doesn't explain why PHP doesn't
display error messages.
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META http-equiv=Content-Type content="text/html;
> charset=windows-1252"></HEAD>
> <BODY></BODY></HTML>
FWIW isn't the HTML snippet above generated by IE when it gets no output,

and not generated by PHP and/or the webserver? Try viewing a blank file through a webserver with IE - I get the snippet above in view source from IE, but from Mozilla I get a blank screen i.e. the actual output.

--
Andy Hassall <an**@andyh.co. uk> / Space: disk usage analysis tool
http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space

Jul 17 '05 #7

"Jani Jalkala" <ja**********@m ail.htk.fi> wrote in message
news:Rh******** *******@read3.i net.fi...
"Virgil Green" <vj*@DESPAMobsy dian.com> wrote in message
news:2J******** *******@newssvr 22.news.prodigy .com...

The following code in test.php:

<?php
arglebargle
?>

Does not display error messages, but this HTML output:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html;
charset=windows-1252"></HEAD>
<BODY></BODY></HTML>
That code did exactly the same thing on my server.

This, however, gave a fatal error:

<?php
arglebargle();
?>

- Virgil

I would understand if PHP interpreted "arglebargl e" as an undefined

constant and simply did nothing on that line, but in that case I would expect a
completely empty output, not the HTML-page it PHP seens to generate.

I have been using PHP on a server provided by our ISP for a while, and a few years ago they removed displayed error reports due to security reasons,
after which erroneous code started to result in this same empty HTML page
instead of error messages.

Thus I am fairly sure that in my current case PHP does correctly recognize
the errors in the code, but for some reason chooses to not display the error messages.

In any case, I tried "arglebargle(); " as a function call, but that didn't
change the output at all.


Earlier, you indicated that you had display_errors on in your php.ini file.
Can you confirm that this is also true via phpinfo()? Too often I see people
look in their php.ini only to discover that something else has affected the
settings and they are not really running with those settings.

Please try the code I presented and include a phpinfo() call before the call
to the fake function. Confirm all the parameters from there and report back
along with any output resulting from the fake functions.

- Virgil
Jul 17 '05 #8
Ok, seems that it indeed was my mistake in configuring PHP.

Firstly, I had confused "error_reportin g" for "display_errors " when I was
looking at the output from phpinfo(). You were right about that, phpinfo()
did say that display_errors is Off.

After I got that right in my head and applied them to php.ini properly (I
thought), it still didn't work.

Then I browsed through all of php.ini, and noticed that I had changed these
settings in the beginning of the file, in "About this file" section, while
later in the same file the same settings were set to Off. Thus when PHP
interpreted php.ini it took the settings appearing later in the file than my
modifications.

Thanks for your help Virgil and Andy!
"Virgil Green" <vj*@DESPAMobsy dian.com> wrote in message
news:6_******** *******@newssvr 23.news.prodigy .com...

"Jani Jalkala" <ja**********@m ail.htk.fi> wrote in message
news:Rh******** *******@read3.i net.fi...
"Virgil Green" <vj*@DESPAMobsy dian.com> wrote in message
news:2J******** *******@newssvr 22.news.prodigy .com...

>
> The following code in test.php:
>
> <?php
> arglebargle
> ?>
>
> Does not display error messages, but this HTML output:
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META http-equiv=Content-Type content="text/html;
> charset=windows-1252"></HEAD>
> <BODY></BODY></HTML>

That code did exactly the same thing on my server.

This, however, gave a fatal error:

<?php
arglebargle();
?>

- Virgil
I would understand if PHP interpreted "arglebargl e" as an undefined

constant
and simply did nothing on that line, but in that case I would expect a
completely empty output, not the HTML-page it PHP seens to generate.

I have been using PHP on a server provided by our ISP for a while, and a

few
years ago they removed displayed error reports due to security reasons,
after which erroneous code started to result in this same empty HTML page instead of error messages.

Thus I am fairly sure that in my current case PHP does correctly recognize the errors in the code, but for some reason chooses to not display the

error
messages.

In any case, I tried "arglebargle(); " as a function call, but that didn't change the output at all.


Earlier, you indicated that you had display_errors on in your php.ini

file. Can you confirm that this is also true via phpinfo()? Too often I see people look in their php.ini only to discover that something else has affected the settings and they are not really running with those settings.

Please try the code I presented and include a phpinfo() call before the call to the fake function. Confirm all the parameters from there and report back along with any output resulting from the fake functions.

- Virgil

Jul 17 '05 #9

"Jani Jalkala" <ja**********@m ail.htk.fi> wrote in message
news:pT******** *******@read3.i net.fi...
"Virgil Green" <vj*@DESPAMobsy dian.com> wrote in message
news:6_******** *******@newssvr 23.news.prodigy .com...

"Jani Jalkala" <ja**********@m ail.htk.fi> wrote in message
news:Rh******** *******@read3.i net.fi...
"Virgil Green" <vj*@DESPAMobsy dian.com> wrote in message
news:2J******** *******@newssvr 22.news.prodigy .com...
>
> >
> > The following code in test.php:
> >
> > <?php
> > arglebargle
> > ?>
> >
> > Does not display error messages, but this HTML output:
> >
> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> > <HTML><HEAD>
> > <META http-equiv=Content-Type content="text/html;
> > charset=windows-1252"></HEAD>
> > <BODY></BODY></HTML>
>
> That code did exactly the same thing on my server.
>
> This, however, gave a fatal error:
>
> <?php
> arglebargle();
> ?>
>
> - Virgil
>
I would understand if PHP interpreted "arglebargl e" as an undefined constant
and simply did nothing on that line, but in that case I would expect a
completely empty output, not the HTML-page it PHP seens to generate.

I have been using PHP on a server provided by our ISP for a while, and a
few
years ago they removed displayed error reports due to security
reasons, after which erroneous code started to result in this same empty HTML

page instead of error messages.

Thus I am fairly sure that in my current case PHP does correctly recognize the errors in the code, but for some reason chooses to not display the

error
messages.

In any case, I tried "arglebargle(); " as a function call, but that didn't change the output at all.


Earlier, you indicated that you had display_errors on in your php.ini

file.
Can you confirm that this is also true via phpinfo()? Too often I see

people
look in their php.ini only to discover that something else has affected

the
settings and they are not really running with those settings.

Please try the code I presented and include a phpinfo() call before the

call
to the fake function. Confirm all the parameters from there and report

back
along with any output resulting from the fake functions.

- Virgil

Ok, seems that it indeed was my mistake in configuring PHP.

Firstly, I had confused "error_reportin g" for "display_errors " when I was
looking at the output from phpinfo(). You were right about that, phpinfo()
did say that display_errors is Off.

After I got that right in my head and applied them to php.ini properly (I
thought), it still didn't work.

Then I browsed through all of php.ini, and noticed that I had changed

these settings in the beginning of the file, in "About this file" section, while
later in the same file the same settings were set to Off. Thus when PHP
interpreted php.ini it took the settings appearing later in the file than my modifications.

Thanks for your help Virgil and Andy!


Excellent news!

phpinfo() is definitely your friend. I "often" encounter situations where a
setting has been set in multiple places in the php.ini or in the wrong
php.ini. phpinfo() will always tell you what's actually happening rather
than what you think is happening.

- Virgil
Jul 17 '05 #10

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

Similar topics

0
1111
by: Bazza5385 | last post by:
I have installed Reporting Services Developer Edition on a box running XP SP2 and using .NET 2003. When i try to create a new Reporting Services project i receive the following error. "There is in error in XML Document(0,0)". I am unable to find out why this is happening. As a test i have installed reporting services on another machine also running XP SP2, this one appears
0
1167
by: kt | last post by:
We want to automatically turn off the error reporting options using Windows API functions for the following functions area Click on Start, Settings, Control Panel, System, the Advanced tab and Error Reporting (at the bottom of the screen), which launches the Error Reporting screen. Another way to get to that screen: Open My Computer, right-click on Properties, click on Advanced tab and Error Reporting. Any assistance would be welcome.
0
2638
by: Joshua V. | last post by:
We are trying to implement Windows Error Reporting from within our VB.Net application. Basically we want to replace the standard unhandled exception message we use with the Windows Error Reporting message. This will provide our users the ability to send the crash report to Microsoft, which in turn will allow us to get it. We did a search for Visual Studio help to see what that might turn up and came across the “ReportFault”...
5
692
by: Paul Furman | last post by:
What is the proper way to turn off error reporting? I'm on a shared server so... "Note: Although display_errors may be set at runtime (with ini_set ()), it won't have any affect if the script has fatal errors. This is because the desired runtime action does not get executed." .... has me confused if this will really work. Sorry I'm rusty on this. "To set at runtime, use the error_reporting(). See also the
2
5314
by: RdS | last post by:
Hello, I use sourcesafe and vb 2003 for my dev environment. on the sourcesafe server I also have sql2005 and reporting services installed. The web app references this sql server for db. When I compile the app on my local machine which is used for development I am able to lauch application with no problem. When I run my web app on my local machine which uses my IIS 5 (WinXP Pro) the application runs fine. But if I connect to server...
1
1368
by: Melissa Nava | last post by:
Have an online system. Currently the error reporting either does: A) logs to a file, B) databases errors or C) emails individual errors. Also have phone notifications for systematically calling the programmer on-call. There are pros and cons of each, of course... I'm curious as to what others do for their error reporting. Mind you this is a 24/7 application, and if something happens I have to
1
2432
by: Horst Wutscher | last post by:
Hello, I hope somebody can help me! I get an error message from ASP.NET 2.0 if i want open one report from SQL Server 2005 - Reporting Services over the url, for example: http://severname/reportserver/department/report-test If i open the Report over the normal -Graphik URL, http://reports, it
0
1050
by: Horst Wutscher | last post by:
Hello, I hope somebody can help me, because i know 1% over ASP.NET Framework! I get an error message from ASP.NET 2.0 if i want open one report from SQL Server 2005 - Reporting Services over the url, for example: http://severname/reportserver/department/report-test If i open the Report over the normal -Graphik URL, http://reports, it
8
5014
by: Paul Furman | last post by:
How do I turn off MySQL error reporting? I set error_reporting(0); but that doesn't seem to be working.
0
2235
by: fperri | last post by:
Hi, I am trying to configure reporting services which I just added to an already existing installation of SQL Server 2005. When I am in the reporting services configuration manager and I am trying to create the reporting services database I get the following error: Verifying Database Edition The feature: "Using other editions of SQL Server for report data sources and/or the report server database" is not supported in this edition of...
0
7924
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
7854
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8219
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8349
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7978
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
5722
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3845
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3882
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1192
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.