Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Tutorials and Tips

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 02-16-2016, 09:36 PM
FounderSim FounderSim is offline
Member
 
Join Date: Sep 2014
Posts: 65
Gender: Male
Credits: 7,436
FounderSim is on a distinguished road
Default Turning on PHP-Errors/Warnings?

At times, I do something screwed up and the page turns blank. It would be nice if I could turn on debugging somehow.

Where is it turned off at in the script so I can turn it on?
__________________
Reply With Quote
  #2  
Old 02-17-2016, 08:42 AM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 86,970
Kyttias is on a distinguished road
Default

Mysidia doesn't turn off errors. Fatal errors that cause white pages cannot be helped, they're caused by syntax errors (typos) and the framework isn't prepared to handle that. If no errors appear, then error reporting is turned off at the server level (which is always done on public hosting because they expect people to be hosting production-ready sites) so contact your hosting if you feel they aren't displaying errors and see if it can be turned off just for you (probably not, because hosting is usually shared) (or if you're self-hosting with WAMP, modify the error_reporting parameter in apache's php.ini file).

You should still be able to check your error log regardless (google or ask your hosting provider how to find it).
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.
Reply With Quote
  #3  
Old 02-17-2016, 11:47 AM
pachoofoosh's Avatar
pachoofoosh pachoofoosh is offline
Artist
 
Join Date: Dec 2012
Location: New York
Posts: 98
Gender: Unknown/Other
Credits: 15,228
pachoofoosh is on a distinguished road
Default

Quote:
Originally Posted by FounderSim View Post
At times, I do something screwed up and the page turns blank. It would be nice if I could turn on debugging somehow.

Where is it turned off at in the script so I can turn it on?
If your host doesn't let you edit the php.ini file, you can put this at the top of your classes/class_appcontroller.php file (it's included in every main page so the errors will show on every page), under the <?php tag:

PHP Code:
error_reporting(E_ALL & ~E_NOTICE); 
And then when you are done debugging, you can just remove that line of code. ^^
__________________
The calzones... betrayed me?
Reply With Quote
  #4  
Old 02-17-2016, 08:29 PM
FounderSim FounderSim is offline
Member
 
Join Date: Sep 2014
Posts: 65
Gender: Male
Credits: 7,436
FounderSim is on a distinguished road
Default

Quote:
Originally Posted by Kyttias View Post
Mysidia doesn't turn off errors. Fatal errors that cause white pages cannot be helped, they're caused by syntax errors (typos) and the framework isn't prepared to handle that. If no errors appear, then error reporting is turned off at the server level (which is always done on public hosting because they expect people to be hosting production-ready sites) so contact your hosting if you feel they aren't displaying errors and see if it can be turned off just for you (probably not, because hosting is usually shared) (or if you're self-hosting with WAMP, modify the error_reporting parameter in apache's php.ini file).

You should still be able to check your error log regardless (google or ask your hosting provider how to find it).
Hard to believe any framework can't stops syntax errors from displaying.

I guess this means no more typing of 100+lines of code then checking for errors. =(

Thanks @pachoofoosh.
__________________
Reply With Quote
  #5  
Old 02-17-2016, 09:40 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 86,970
Kyttias is on a distinguished road
Default

Perhaps you might be interested in reading some the responses to the 'white screen of death' on Stackoverflow? It's just a very common PHP thing, but a syntax error handler could be hacked in... I'd sooner just copy and paste my file into a syntax checker.
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.
Reply With Quote
  #6  
Old 02-22-2016, 08:38 PM
Kesstryl's Avatar
Kesstryl Kesstryl is offline
Member
 
Join Date: Feb 2012
Posts: 125
Gender: Female
Credits: 17,012
Kesstryl is on a distinguished road
Default

It's always a good idea to learn how to use a development environment on your own private machine before deploying out there to the public web. You can use XAMP, LAMP, or WAMP depending on which you prefer. I personally like WAMP because it has a little control panel on your task bar you can pull up which makes getting to things easier. Then you can fix errors on your development copy, and use Filezilla to upload changes to your live webhost.
Reply With Quote
Reply

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 01:41 PM.

Currently Active Users: 433 (0 members and 433 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636