Jump to content

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/117142-webfusion-phpini-problem/
Share on other sites

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

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.)

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

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.