Welcome Guest, Not a member yet? Register   Sign In
shared server php.ini
#1

[eluser]bobbob[/eluser]
Where do i put the php.ini to get it to affect the whole site?
#2

[eluser]TheFuzzy0ne[/eluser]
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.
#3

[eluser]bobbob[/eluser]
This is all I need done:


Code:
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
#4

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

Code:
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
#5

[eluser]bobbob[/eluser]
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
#6

[eluser]TheFuzzy0ne[/eluser]
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.
#7

[eluser]cahva[/eluser]
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".




Theme © iAndrew 2016 - Forum software by © MyBB