Welcome to Webune -

Webune offers PHP web hosting. If you are not satisfied with your current web hosting provider. make the switch to Webune today.

Webune offers many tools for you. including this free support.

Ok, if you are reading this post it because you want to know what you can do to show the errors on your php scripts.

there are two ways

As Webune offers Dedicated Servers and Shared Hosting we will show you both ways. if you have another provider with a dedicated linux server or shared hosting, the same would apply.

OPTION 1 - DEDICATED SERVER OPTION


to change the option for the whole server, you will need to edit the php.ini file. so login as superuser and send this command:

SHELL COMMAND:
nano /etc/php.ini


look and edit the following line:
display_errors = Off

change it to:
display_errors = On

save the changes, now restart your server:
SHELL COMMAND:
/etc/init.d/httpd restart


DONE

OPTION 2 - SHARED HOSTING


if you have shared hosting, then you will not be able to change server files, so what you will need to do is put this code at the beginning of your script:
PHP CODE:
ini_set('display_errors', 1);




[ SECURITY ]
Print out errors (as a part of the output). For production web sites,
you're strongly encouraged to turn this feature off, and use error logging
instead (see below). Keeping display_errors enabled on a production web site
may reveal security information to end users, such as file paths on your Web
server, your database schema or other information.
display_errors = Off