Reputation: 7599
for my local machine i'm using the following setting in my php.ini
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED
it allows omitting single quotes for fetching data from a recordset like $rs[url]
.
i've also used this setting on my webserver, but it simply ignores the syntax above and won't fetch any data. what could be wrong?
Upvotes: 6
Views: 17557
Reputation: 2476
I am using Xdebug & Zend Framework 2
In my development environment I have mine set to:
error_reporting = E_ALL & ~E_USER_DEPRECATED & ~E_STRICT
I have found this to be my favoured setting when using ZF2.
If you're using PHP-FPM
& NGINX The php.ini
file is normally in found /etc/php5/fpm/
.
Alternatively if you're using Apache with the PHP module, your php.ini
file is normally in /etc/php5/
That error reporting level works for me as it I have found Zend Framework can throw some notices that are not relevant.
Upvotes: 1
Reputation: 39889
Are you sure you modified the right php.ini?
I ask that because sometimes, php.ini is located on various path, one for the php cli, the other for apache (and probably the case for other web server).
You should add more details about what server do you use (windows, linux), and which webserver are you using (apache, nginx, etc).
You should also be searching "php.ini" in your file system, maybe there is more than one file and you modified the wrong one, resulting in the problem you have.
Finally, and as mentionned in the comments, you shouldn't remove the deprecated errors and the notice in development environment, and have a "no error" code because an update is quite easy to make, and any deprecated function now, could result in a non working code after a quick apt-get update
(for debian users).
Of course in production, you should hide all errors, but show a nice 404 or 500 page to your users and log the error for later investigation. :)
Upvotes: 1