ted_chou12 Posted February 5, 2007 Share Posted February 5, 2007 who has a standard php.ini file that I can have a look at, (and maybe use it for my website). Can anyone please also guide me as to where i should place it? (under which directory). Please? btw, i am specifically looking for ones that turns error reporting on and off. Thanks Ted Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted February 5, 2007 Share Posted February 5, 2007 you can set that in you php script. use ini_set('error_reporting', #VALUE); Where value is corresponds to the setting you want from this table http://uk2.php.net/manual/en/ref.errorfunc.php#errorfunc.constants REMEMBER to take note of version notes in teh NOTE coulmn - particularly on 'E_ALL' Quote Link to comment Share on other sites More sharing options...
ted_chou12 Posted February 5, 2007 Author Share Posted February 5, 2007 Isnt there a way to set it permanently off, since i dont want my visitors to see my errors? Quote Link to comment Share on other sites More sharing options...
ted_chou12 Posted February 7, 2007 Author Share Posted February 7, 2007 $bump$, i want to set it completely off, i dont want just temporary settings, is that possible? Ted Quote Link to comment Share on other sites More sharing options...
trq Posted February 7, 2007 Share Posted February 7, 2007 The php.ini file is a global configuration file so unless you have root access to the server, ini_set or .htaccess are your best options. Some hosts have there installs setup differently and may let you have your own custom php.ini within a local dir, you'll need to look at your hosts docs. Quote Link to comment Share on other sites More sharing options...
ted_chou12 Posted February 7, 2007 Author Share Posted February 7, 2007 i think i do have a root access of my server, i kind of searched it on google, the php.ini file is located in a folder called etc, which, is in my control. however, it doesnt have a php.ini file, i uploaded my own, but the configuration doesnt seem to effect my server in anyway. Thanks Ted Quote Link to comment Share on other sites More sharing options...
trq Posted February 7, 2007 Share Posted February 7, 2007 Your php.ini could be anywhere, mine is in /etc/php/php.ini, your best to check by running.... <?php phpinfo(); ?> This will show you where your php.ini is. Remember, if you make any changes, you need to restar the server for them to take effect. Quote Link to comment Share on other sites More sharing options...
ted_chou12 Posted February 7, 2007 Author Share Posted February 7, 2007 i see Quote Link to comment Share on other sites More sharing options...
SharkBait Posted February 7, 2007 Share Posted February 7, 2007 if you have root access you can also run 'locate php.ini' if locate is set up. But yes depending on your server it could be in multple places. I've seen it in /etc/php.ini /etc/php5/php.ini /etc/httpd/php/php.ini and others Quote Link to comment Share on other sites More sharing options...
ted_chou12 Posted February 7, 2007 Author Share Posted February 7, 2007 mine looks something like usr/local/lib/php.ini file, thanks for both of your helps. but this seems quite different from expected, so i emailed my host. Thanks anyways Ted Quote Link to comment 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.