Zaptagious Posted January 22, 2011 Share Posted January 22, 2011 Hey, I know there was a thread about this but it was marked solved so I didn't know if I should post in there. So yea, I used the little script in that thread, written below: <?php echo "testing ?> It obviously has an error in it, but when i uploaded it to my website (http://www.mattiaslundin.com/phpscripts/errortest.php) it doesn't generate an error like it should, it's completely blank. I did go into php.ini and here's what the error things say: ; display_errors ; Default Value: E_ALL ; Development Value: E_ALL ; Production Value: E_ALL ; display_startup_errors ; Default Value: Off ; Development Value: On ; Production Value: Off ; error_reporting ; Default Value: E_ALL ; Development Value: E_ALL ; Production Value: E_ALL ; html_errors ; Default Value: On ; Development Value: On ; Production value: Off ; log_errors ; Default Value: Off ; Development Value: On ; Production Value: On I also went into phpinfo() and display_errors is on and error_reporting has the value 22519 whatever that means. Started with PHP very recently and it's already frustrating the hell outta me Grateful for any help! Quote Link to comment https://forums.phpfreaks.com/topic/225336-error-messages-dont-appear-even-after-changing-in-phpini-and-phpinfo/ Share on other sites More sharing options...
Pikachu2000 Posted January 22, 2011 Share Posted January 22, 2011 Any line that starts with a semicolon is a comment, and is not parsed when php loads the .ini file. You should have the following in there for development use: error_reporting = -1 display_errors = On Quote Link to comment https://forums.phpfreaks.com/topic/225336-error-messages-dont-appear-even-after-changing-in-phpini-and-phpinfo/#findComment-1163653 Share on other sites More sharing options...
Zaptagious Posted January 22, 2011 Author Share Posted January 22, 2011 What, so I just copy /paste that somewhere into the php.ini file? I'm totally worthless at this Quote Link to comment https://forums.phpfreaks.com/topic/225336-error-messages-dont-appear-even-after-changing-in-phpini-and-phpinfo/#findComment-1163657 Share on other sites More sharing options...
Pikachu2000 Posted January 22, 2011 Share Posted January 22, 2011 If I were you, I'd copy paste this somewhere close to the part you posted above. I added the comment block so you'd be able to spot it easier in the future. You will need to stop and restart Apache for the changes to take effect. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; DEVELOPMENT ERROR REPORTING LEVELS ;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; error_reporting = -1 display_errors = On ;;;;;;;;;;;;;;;;;;;;;;;; END ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Quote Link to comment https://forums.phpfreaks.com/topic/225336-error-messages-dont-appear-even-after-changing-in-phpini-and-phpinfo/#findComment-1163662 Share on other sites More sharing options...
Zaptagious Posted January 22, 2011 Author Share Posted January 22, 2011 I added the stuff to php.ini and restarted apache but it still doesn't appear any error messages Quote Link to comment https://forums.phpfreaks.com/topic/225336-error-messages-dont-appear-even-after-changing-in-phpini-and-phpinfo/#findComment-1163670 Share on other sites More sharing options...
Pikachu2000 Posted January 22, 2011 Share Posted January 22, 2011 Create a file with the following code in it, save it as info.php and upload it. Then load the script in your browser and see what the values of display_errors and error_reporting are listed as. <?php phpinfo(); ?> Quote Link to comment https://forums.phpfreaks.com/topic/225336-error-messages-dont-appear-even-after-changing-in-phpini-and-phpinfo/#findComment-1163676 Share on other sites More sharing options...
Zaptagious Posted January 22, 2011 Author Share Posted January 22, 2011 Display_error: Off error_reporting: 22519 Quote Link to comment https://forums.phpfreaks.com/topic/225336-error-messages-dont-appear-even-after-changing-in-phpini-and-phpinfo/#findComment-1163681 Share on other sites More sharing options...
Pikachu2000 Posted January 22, 2011 Share Posted January 22, 2011 I just realized something. You said this is on your website? Is it a dedicated server? If not, how did you restart Apache on it? Quote Link to comment https://forums.phpfreaks.com/topic/225336-error-messages-dont-appear-even-after-changing-in-phpini-and-phpinfo/#findComment-1163685 Share on other sites More sharing options...
Zaptagious Posted January 22, 2011 Author Share Posted January 22, 2011 I have to admit I don't actually t know the answer to the first question, all I know is I bought the domain from one.com and installed XAMPP. I restarted Apache by going into the XAMPP Control Panel, clicked the Stop button, and then the Start button Quote Link to comment https://forums.phpfreaks.com/topic/225336-error-messages-dont-appear-even-after-changing-in-phpini-and-phpinfo/#findComment-1163687 Share on other sites More sharing options...
Pikachu2000 Posted January 22, 2011 Share Posted January 22, 2011 You installed XAMPP on what? I think you may be conflating two different things here. Quote Link to comment https://forums.phpfreaks.com/topic/225336-error-messages-dont-appear-even-after-changing-in-phpini-and-phpinfo/#findComment-1163708 Share on other sites More sharing options...
Zaptagious Posted January 22, 2011 Author Share Posted January 22, 2011 What do you mean? I installed it on my computer. Quote Link to comment https://forums.phpfreaks.com/topic/225336-error-messages-dont-appear-even-after-changing-in-phpini-and-phpinfo/#findComment-1163712 Share on other sites More sharing options...
Pikachu2000 Posted January 22, 2011 Share Posted January 22, 2011 Then we need to establish exactly what problem you're trying to solve here. Are you trying to get error reporting working on your hosted web site, or locally on your pc? The question you initially asked implied you want to get error reporting working on your hosted web site. Quote Link to comment https://forums.phpfreaks.com/topic/225336-error-messages-dont-appear-even-after-changing-in-phpini-and-phpinfo/#findComment-1163718 Share on other sites More sharing options...
Zaptagious Posted January 22, 2011 Author Share Posted January 22, 2011 Well the error reporting neither works on my web site or locally on my PC :/ Quote Link to comment https://forums.phpfreaks.com/topic/225336-error-messages-dont-appear-even-after-changing-in-phpini-and-phpinfo/#findComment-1163719 Share on other sites More sharing options...
Pikachu2000 Posted January 22, 2011 Share Posted January 22, 2011 What I posted above will work for you locally. Add it to the php.ini file on your pc, and restart Apache. As far as on your hosted site, you need to look through the hosting company's FAQ's to determine how to enable it site-wide, but frankly display_errors shouldn't be used on a live site. Error logging should be used instead. That info should also be in the host's FAQ's. Quote Link to comment https://forums.phpfreaks.com/topic/225336-error-messages-dont-appear-even-after-changing-in-phpini-and-phpinfo/#findComment-1163733 Share on other sites More sharing options...
Zaptagious Posted January 22, 2011 Author Share Posted January 22, 2011 Yea that makes sense, screw the hosted site then But it's still not working locally, I tried with a simple testing script, I first made sure it was faulty; got a blank page on both my website as well as locally. Then I made sure it would work; it did work on my website but not locally (by dragging the .php file into the browser). I made sure to add the stuff in php.ini and apache is running. I'm sorry for being a pain in the ass :I the script is <?php print "testing"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/225336-error-messages-dont-appear-even-after-changing-in-phpini-and-phpinfo/#findComment-1163745 Share on other sites More sharing options...
Pikachu2000 Posted January 22, 2011 Share Posted January 22, 2011 You can't drag the php file into your browser. It has to parsed by the web server by calling it in via http://localhost/your_directory/your_filename.php. Quote Link to comment https://forums.phpfreaks.com/topic/225336-error-messages-dont-appear-even-after-changing-in-phpini-and-phpinfo/#findComment-1163748 Share on other sites More sharing options...
Zaptagious Posted January 23, 2011 Author Share Posted January 23, 2011 How do i do that the easiest way? Is there function for that in for example notepad++ to parse it through localhost? or can i put it in a specific folder? the adress now looks like this:http://localhost/C:/Users/Mattias/Desktop/Stuff/Projects/Webdesign/mattiaslundin.com/phpscripts/errortest.php I'm assuming I did something wrong because it says: Access forbidden! You don't have permission to access the requested object. It is either read-protected or not readable by the server. If you think this is a server error, please contact the webmaster. Error 403 localhost 2011-01-23 14:02:26 Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1 Sorry for being an idiot Quote Link to comment https://forums.phpfreaks.com/topic/225336-error-messages-dont-appear-even-after-changing-in-phpini-and-phpinfo/#findComment-1163954 Share on other sites More sharing options...
Zaptagious Posted January 23, 2011 Author Share Posted January 23, 2011 I figured it out! I put the file in /xampp/htdocs and ran it through there and now it seems to work fine with error messages Thanks for putting up with me Quote Link to comment https://forums.phpfreaks.com/topic/225336-error-messages-dont-appear-even-after-changing-in-phpini-and-phpinfo/#findComment-1164004 Share on other sites More sharing options...
Pikachu2000 Posted January 23, 2011 Share Posted January 23, 2011 Glad you got it figured out. Quote Link to comment https://forums.phpfreaks.com/topic/225336-error-messages-dont-appear-even-after-changing-in-phpini-and-phpinfo/#findComment-1164009 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.