• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
shared server php.ini

Where do i put the php.ini to get it to affect the whole site?

That's a tough question. It all depends on your server setup, and whether or not the php.ini is intended to be overridden by the user.

What is it you need to do exactly? In most cases, it can be done through an htaccess file.

This is all I need done:

disable_functions = exec,shell_exec,passthrough,eval,phpinfo

error_reporting = E_ALL & ~E_NOTICE
display_errors = Off
log_errors = On
ignore_repeated_errors = On
html_errors = Off
session.cookie_httponly = 1

If you know how to do that with .htaccess that would help a lot

I don't understand. Most of that can be configured through CodeIgniter, although this "might" work in your htaccess file.

php_value disable_functions       exec,shell_exec,passthrough,eval,phpinfo
php_value error_reporting         E_ALL & ~E_NOTICE
php_value display_errors          Off
php_value log_errors              On
php_value ignore_repeated_errors  On
php_value html_errors             Off
php_value session.cookie_httponly 1

Putting that in the .htaccess caused a server error.
I know it depends on the server set up.
I also thought codeigniter was doing things like setting the eror reporting etc
I am guessing it is our server configuration

My guess is it's the first two lines causing the problem. The second line isn't a problem as it can be set from within the index.php. Not too sure about the first, though.

You can see the scope of the directives here. If it says php.ini only then you cannot define that in htaccess. If you are running in cgi mode, you probably have your own php.ini (which aint configurable by you if its a shared server) and your host can change those directives with no problems.

If its mod_php then its probably impossible to set some of the options(ie. disable_functions) because the php.ini is global for all sites and only those options can be changed within directory/vhost that are not "php.ini only".

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.