I got these php.ini settings in a web application folder.
magic_quotes_gpc = Off;
register_globals = Off;
default_charset = "UTF-8";
memory_limit = 64M;
max_execution_time = 3600;
upload_max_filesize = 10M;
sql.safe_mode = Off;
mysql.connect_timeout = 20;
allow_url_fopen = Off;
session.auto_start = Off;
session.use_only_cookies = On;
session.use_cookies = On;
session.use_trans_sid = Off;
session.cookie_httponly = On;
session.gc_maxlifetime = 3600;
session.cookie_secure =On;
session.entropy_file = "/dev/urandom";
To check if these parameters are met, I saved these codes in the checksettings.php file
<?php
if(get_magic_quotes_gpc())
echo "Magic quotes are enabled";
else
echo "Magic quotes are disabled";
echo '<br>';
echo 'Register Globals = ' . ini_get('register_globals');
echo '<br>';
echo 'Default Charset = ' . ini_get('default_charset');
echo '<br>';
echo 'Memory Limt = ' . ini_get('memory_limit');
echo '<br>';
echo 'Max Execution Time = ' . ini_get('max_execution_time');
echo '<br>';
echo 'Upload Max File Size = ' . ini_get('upload_max_filesize');
echo '<br>';
echo 'Sql Safe Mode = ' . ini_get('sql.safe_mode');
echo '<br>';
echo 'MySQL connect Timeout = ' . ini_get('mysql.connect_timeout');
echo '<br>';
echo 'Allow url fOpen = ' . ini_get('allow_url_fopen');
echo '<br>';
When loading checksettings.php in my web browser, I get this weekend
Magic quotes are disabled
Magic Quotes =
Register Globals =
Default Charset = UTF-8
Memory Limt = 128M
Max Execution Time = 30
Upload Max File Size = 2M
Sql Safe Mode =
MySQL connect Timeout =
Allow url fOpen = 1
Now, as I understand it, spaces (Register Globals =, Sql Safe Mode =, etc.) are caused (I think) by a syntax error (which I will study), but several values are not the way I set them to be.
The memory limit set to 64M is 128M, the maximum runtime set to 3600 is 30 seconds, the maximum upload file size that is set to 10M is 2M and enable the url fopen function that was set to 0 or off. 1/,
What am I doing wrong?