PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 8th, 2012, 07:19 PM
dobs dobs is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2012
Posts: 8 dobs User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 15 m 36 sec
Reputation Power: 0
No errors?

Hello DevShed. I had a quick question that google doesn't seem to answer for me. I am trying to run this script:

Code:
<?php
require("noFileExistsHere.php");
echo "Hi Earth :)";
?>


In order to produce an error. However, instead I get no error whatsoever. No output of any kind in fact. I have definitely made sure to enable error reporting in /etc/php/php.ini..

Code:
 display_errors
   Default Value: On
   Development Value: On
   Production Value: On

 display_startup_errors
   Default Value: On
   Development Value: On
   Production Value: On

 error_reporting
   error_reporting E_ERROR  E_WARNING  E_PARSE
   Default Value: E_ALL E_NOTICE E_STRICT E_DEPRECATED
   Development Value: E_ALL
   Production Value: E_ALL E_DEPRECATED E_STRICT

 html_errors
   Default Value: On
   Development Value: On
   Production value: On

 log_errors
   Default Value: On
   Development Value: On
   Production Value: On


To no avail. Any ideas?

Reply With Quote
  #2  
Old November 8th, 2012, 10:03 PM
web_developer's Avatar
web_developer web_developer is offline
Web Developer
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2006
Posts: 480 web_developer User rank is First Lieutenant (10000 - 20000 Reputation Level)web_developer User rank is First Lieutenant (10000 - 20000 Reputation Level)web_developer User rank is First Lieutenant (10000 - 20000 Reputation Level)web_developer User rank is First Lieutenant (10000 - 20000 Reputation Level)web_developer User rank is First Lieutenant (10000 - 20000 Reputation Level)web_developer User rank is First Lieutenant (10000 - 20000 Reputation Level)web_developer User rank is First Lieutenant (10000 - 20000 Reputation Level)web_developer User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 6 Days 11 h 27 m 59 sec
Reputation Power: 111
Try enabling error reporting on top of the script:

PHP Code:
 ini_set ('display_errors'true);
error_reporting (E_ALL); 
__________________
I will try my best !!!

Reply With Quote
  #3  
Old November 8th, 2012, 11:31 PM
E-Oreo's Avatar
E-Oreo E-Oreo is offline
Lost in code
Dev Shed God 7th Plane (8000 - 8499 posts)
 
Join Date: Dec 2004
Posts: 8,057 E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)E-Oreo User rank is General 92nd Grade (Above 100000 Reputation Level)  Folding Points: 945 Folding Title: Novice Folder
Time spent in forums: 2 Months 1 Day 6 h 4 m 32 sec
Reputation Power: 7104
The lines you posted from your /etc/php/php.ini are supposed to be comments. Is that literally what you have in there? (If so, PHP will fail to parse it correctly)

On a development machine that section should look like this:
Code:
; display_errors
;   Default Value: On
;   Development Value: On
;   Production Value: Off
display_errors = On

; display_startup_errors
;   Default Value: Off
;   Development Value: On
;   Production Value: Off
display_startup_errors = On

; error_reporting
;   Default Value: E_ALL & ~E_NOTICE
;   Development Value: E_ALL | E_STRICT
;   Production Value: E_ALL & ~E_DEPRECATED
error_reporting = E_ALL | E_STRICT

; html_errors
;   Default Value: On
;   Development Value: On
;   Production value: Off
html_errors = On

; log_errors
;   Default Value: Off
;   Development Value: On
;   Production Value: On
log_errors = On
__________________
PHP FAQ
How to program a basic, secure login system using PHP
Connect with me on LinkedIn


Quote:
Originally Posted by Spad
Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

Reply With Quote
  #4  
Old November 10th, 2012, 01:12 PM
dobs dobs is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2012
Posts: 8 dobs User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 15 m 36 sec
Reputation Power: 0
Quote:
Originally Posted by web_developer
Try enabling error reporting on top of the script:

PHP Code:
 ini_set ('display_errors'true);
error_reporting (E_ALL); 


That worked. However, now it causes an error for this script:

Code:
<?php
mysql_connect("localhost", "root", "mypass") or die(mysql_error());
echo "Connected to MySQL!!!<br />";
mysql_select_db("data") or die(mysql_error());
echo "Connected to Database!!";
?>


When this script previously produced the proper output. When I view this page without errors enabled it shows me the proper output, but when I enable errors it makes it so that instead of showing: "Connected to Database!!" it shows me this:

Code:
 Fatal error: Call to undefined function mysql_connect() in /home/user/code/php/connect.php on line 2


Is there some other configuration that I have messed up somewhere? Oh, and yes I have restarted the http daemon.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > No errors?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap