unxposed Posted July 29, 2008 Share Posted July 29, 2008 Hi, I'm trying to upload a site to a shared server linux based websfusion starter package. They told me I would be able to change php settings using the php.ini file. I have uploaded the file to the directory they told me /public_html/ but it seems to be having no effect. Contents: display_errors = off display_startup_errors = off register_globals = on I am getting errors here http://www.alexminors.co.uk/new/movies/case_studies.php And the text size switcher is not working properly and this needs register_globals = on, so I assume the php.ini file is not being read. Php info is here http://www.alexminors.co.uk/test.php Any ideas on what the problem could be? I assumed it would be as easy as uploading the php.ini file as it is when I'm using other hosts. Thanks in advance. Col Quote Link to comment https://forums.phpfreaks.com/topic/117142-webfusion-phpini-problem/ Share on other sites More sharing options...
toivo Posted July 29, 2008 Share Posted July 29, 2008 In your environment the php.ini file is shared. What you were told actually meant that you can have an.htaccess file in your folder where you can put the directives you need. More info at http://php.net/manual/en/ini.php Regard, toivo Quote Link to comment https://forums.phpfreaks.com/topic/117142-webfusion-phpini-problem/#findComment-602493 Share on other sites More sharing options...
unxposed Posted July 29, 2008 Author Share Posted July 29, 2008 Thanks for your help. I have added a .htaccess file with the following code to my public_html directory but am now getting a 500 internal server error when trying to access any page on the site! php_flag display_errors off php_flag display_startup_errors off php_flag register_globals on Am I doing something wrong? Thanks Col Quote Link to comment https://forums.phpfreaks.com/topic/117142-webfusion-phpini-problem/#findComment-602528 Share on other sites More sharing options...
PFMaBiSmAd Posted July 29, 2008 Share Posted July 29, 2008 You can only put php settings in a .htaccess file when php is running as an Apache module. You can put php settings in a local php.ini when php is running as a CGI wrapper, which is probably why the host told the OP the information that they did. Check to make sure the php.ini file is actually present in the correct folder and that it is named php.ini (and not something like php.ini.txt). Check your web server log file as the permissions on the file might not be correct to allow the web server to read it. Also, they might have chosen a different file name than php.ini (double check with your web host.) Your web host can also restrict what values can be changed in a local php.ini and they also might not have correctly set up the server to use a local php.ini (just because they told you that you can do this does not mean that it has been set up to do this.) Quote Link to comment https://forums.phpfreaks.com/topic/117142-webfusion-phpini-problem/#findComment-602601 Share on other sites More sharing options...
DeanWhitehouse Posted July 29, 2008 Share Posted July 29, 2008 Just to but in, but isnt it also advised to turn register globals off Quote Link to comment https://forums.phpfreaks.com/topic/117142-webfusion-phpini-problem/#findComment-602605 Share on other sites More sharing options...
unxposed Posted July 29, 2008 Author Share Posted July 29, 2008 Thanks for the response PFMaBiSmAd... very helpful... I'll get onto webfusion about that, and also check out the permissions. I'm not sure Blade280891, I only know basic php. What are the disadvantages of having register globals on? My text changer won't work without them! Cheers Col Quote Link to comment https://forums.phpfreaks.com/topic/117142-webfusion-phpini-problem/#findComment-602643 Share on other sites More sharing options...
PFMaBiSmAd Posted July 29, 2008 Share Posted July 29, 2008 If you are using a script that still needs register_globals in the year 2008, you need to start looking for a different script or fix the one you are using to work without register_globals. Register_globals were turned off by default in the year 2002 and they have completely been removed in upcoming php6, because they allow a hacker to set session variables just by putting his value on the end of the url when he requests your page. Register_globals were the biggest security blunder that was ever deliberately added to a programming language. Quote Link to comment https://forums.phpfreaks.com/topic/117142-webfusion-phpini-problem/#findComment-602651 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.