MR1 Posted March 16, 2010 Share Posted March 16, 2010 Hello Guys, here is my .htaccess file php_flag display_errors Off php_flag display_startup_errors Off php_flag log_errors On php_flag magic_quotes_sybase Off php_flag magic_quotes_gpc On php_flag register_globals Off php_value error_log /home/sites/mine.co.uk/public_html/errors/php.txt php_value error_reporting 2147483647 Options All -Indexes php_value disable_functions phpinfo AuthUserFile "/home/mine/.htpasswds/public_html/mine.co.uk/adindex/passwd" AuthType Basic AuthName "[email protected]" require valid-user why is the above a problem, i mean can i not use php.ini file and put all this in that and get that to work? Which is better. Thank you for you help. Link to comment Share on other sites More sharing options...
spooks Posted March 16, 2010 Share Posted March 16, 2010 what is allowed in your htaccess is dependent upon your server config. You would be best speaking to your host on this issue. Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
MrPhil Posted March 16, 2010 Share Posted March 16, 2010 Yes, most modern server installations prefer that you put all the PHP settings into php.ini. The format will be a bit different that what you have in your .htaccess file. Depending on your server setup (e.g., running suPHP) you may need to put an entry in .htaccess pointing to the php.ini file. For all these things, your host can tell you exactly what's needed. Learn to run the "phpinfo" script to see what your current settings are -- you may not need some of your settings. It also will tell you if your .htaccess or php.ini settings are being accepted. <?php phpinfo(); ?> Do not leave this lying around (at least not with an obvious name) for hackers to use and see the details of your installation. P.S. Having PHP settings (phpvalue, phpflag) in .htaccess is often banned, and if used, causes 500 error. Link to comment Share on other sites More sharing options...
MR1 Posted March 17, 2010 Author Share Posted March 17, 2010 Hello, Thank you for your help, it seems that i am getting the error due to this code, can i not replace this some other way? Options All -Indexes Thank you Link to comment Share on other sites More sharing options...
♥mdtaylorlrim Posted March 17, 2010 Share Posted March 17, 2010 Hello, Thank you for your help, it seems that i am getting the error due to this code, can i not replace this some other way? Options All -Indexes Thank you I would leave off the 'ALL', and it will only work if your host has 'Options AllowOverride' enabled. Community Bootstrap Edition, Edge Avoid the most asked question. See How to Secure My Site and How do I...? Link to comment Share on other sites More sharing options...
MR1 Posted March 20, 2010 Author Share Posted March 20, 2010 Hello, Thank you for the reply and help. It seems that when i remove these from the list it all works fine. php_flag display_errors Off php_flag display_startup_errors Off php_flag log_errors On php_flag magic_quotes_sybase Off php_flag magic_quotes_gpc On php_flag register_globals Off php_value error_log /home/sites/domainetc/php.txt php_value error_reporting 2147483647 php_value disable_functions phpinfo Options All -Indexes anything from here i should have or a work around? Thank you Link to comment Share on other sites More sharing options...
MrPhil Posted March 20, 2010 Share Posted March 20, 2010 In your .htaccess file: Options -Indexes It may need a line pointing to your php.ini file -- ask your host. In your php.ini file: display_errors=Off display_startup_errors=Off log_errors=On magic_quotes_sybase=Off magic_quotes_gpc=On register_globals=Off error_log='/home/sites/domainetc/php.txt' error_reporting=2147483647 disable_functions='phpinfo' I'm not sure about some of the values needed, or their exact format. Most of those should be set anyway in your default PHP configuration. Run phpinfo() to see what's already set for you, and add anything that you need that isn't already set. It will also tell you the exact format needed for each item's value. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.