Magic Quotes GPC Off
"How to change the value of a PHP setting?
Almost all PHP settings can be changed with a local php.ini file.
For example, you need register_globals set to On in a directory. For this purpose log in your Cpanel and go to the File Manager. There navigate to the directory where you'd like this setting applied. In this directory create a file php.ini containing:
As per the above listed instructions; I tried created a php.ini with the following text in every directory I could imagine needed this setting. Unfortunately, my program installer continues to yield an error message indicating that Magic Quotes is still on. Does anyone know how to turn Magic Quotes off without a trouble ticket?
; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = On
There is one peculiarity when using local php.ini to overwrite the global PHP settings. It is that the php.ini is working only for the folder that it is created into. It does not work recursive.
Let's assume that we have the following hierarchy under your public_html:
The particular php.ini file, with your custom settings will affect only the files, which are located in this folder (i.e. file1.php and file2.php). It won't affect the files under folder1, folder2, folder3, folder4.
The solution in your case is to have the php.ini uploaded in every particular folder you would like to apply the settings to.
Is there a way to do this using .htaccess for a directory and thereby every folder in that directory?
No, I am afraid this is not possible. You can change PHP variables only via custom php.ini files on our servers.
OK thanks, but once enabled it is possible isnt it to turn off and on using .htaccess just like register_globals?
Can't turn off Magic Quotes, tried php.ini
I'm trying to install RoundCube, which requires magic_quotes_gpc to be off. Following the advice in this forum, I created php.ini files containing only one line:
magic_quotes_gpc = Off
Since the php.ini values only apply within a directory, I populated ALL /mail subdirectories with php.ini files, just to be on the safe side. However, the error persists and magic-quotes_gpc is still "on." How can I turn it off?
If the option remains unchanged I assume you are using PHP 5.1 for your account. You can resolve the issue by changing the PHP version. Here you can find detailed instructions how to do so:
You will not experience any troubles using PHP 5.0 or 5.2.
I am having a similar problem with not being able to re-assign certain php variables via a php.ini file.
I am using php 5.25.
I have a php.ini and a info.php in my root directory.
My php.ini files looks like the following:
register_globals = On
post_max_size = 100M
upload_max_filesize = 22M
max_execution_time = 1000
Non of the variables above will change, however i can change other variables via this php.ini file. I can set safe_mode, I can change the smtp_port. It seems like everything i try to change, I am successful, except for the 3 above that I need.
after further testing i found that the changes will apply to "upload_max_filesize" if I revert to php5.0
but 5.1, or 5.2.5 seem to ignore it.
What gives. I'd switch to 5.0 to solve this, however i use 5.1 (and above) functions.
Hi, I have the same problem here...
Originally Posted by mandalay
Please, how can I turn this off?
the strange thing here, is that my phpinfo file give me this:
magic_quotes_gpc Local Value:Off Master Value:Off
but the roundcube installer is not working!!
There should be a different reason of the roundcube installer not working. Is there any error message and if so, what does it state?
at the header there are the following:
Originally Posted by Val
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/humed1/public_html/roundcubemail-0.1.1/installer/index.php:8) in /home/humed1/public_html/roundcubemail-0.1.1/installer/index.php on line 29
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/humed1/public_html/roundcubemail-0.1.1/installer/index.php:8) in /home/humed1/public_html/roundcubemail-0.1.1/installer/index.php on line 29
but I think the main problem here is the Magic Quotes GPC..
Magic Quotes, generally speaking, is the process of escaping special characters with a '\' to allow a string to be entered into a database. This is considered 'magic' because PHP can do this automatically for you if you have magic_quotes_gpc turned on.
In your case however the issue is caused due to the fact that data has been sent to the browser before the session_start() was called. This is quite a .. developer mistake in my opinion, but hey I'm no developer so I can't really say it.
To correct this small issue I've added the following line at the start of the installer:
and at the end of the file, I have therefore added:
which buffers the output and send it at once instead of sending each data unbuffered. Now it seems that the installer works fine.
Does this fix it?
It seems like you got the installer to work by adding this
Which file excatly did you edit? And at what file lines did you insert these.
Originally Posted by Val
Honestly ... I do not remember already but looking into the error code you were receiving above, that would be;
Copyright © 2012 SiteGround.com Inc