Jump to content

[SOLVED] php.ini


ted_chou12

Recommended Posts

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

Link to comment
Share on other sites

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'

 

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.