Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to change php.ini on webhost?

Status
Not open for further replies.

pugs421

Technical User
Joined
Nov 25, 2002
Messages
114
Location
US
My webhost company is using php 4.3 yet they have register_globals set to on. Also the upload_tmp_dir is set to null. can someone give me an idea on how make the changes to the ini file on the server? Do I have to contact them or is there a way to do it remotely?
 
Also, Is it a problem having upload_tmp_dir set to null for file uploads? I'm having a problem with file uploads and wanted to assign my own temp directory. Is it OK that it's set to null for file uploads.
 
Unless you have permissions to do so, you cannot change php.ini. That is between you and your service provider.

Some PHP configuration settings can be overridden in code. Unfortunately, upload_tmp_dir is not one of them -- PHP needs to be able to receive the data and write it to a file before your script ever runs.

If upload_tmp_dir is blank, PHP will use the system default. I don't know what that setting would be for your service provider's systems.

I strongly recommend that you contact your service provider.

Want the best answers? Ask the best questions: TANSTAAFL!
 
If you have access, you can also override php.ini settings in .htaccess.

I am Comptia A+ Certified
 
True. I didn't think about that. I should have mentioned that in my post. Too bad there isn't an edit button ... :D I was thinking of giving an alternative to changing other settings via scripts which would be .htaccess. :)

I am Comptia A+ Certified
 
They wont make any changes for me. They keep register_globals on. I'm not too concerned because im only making a small members site, but I was surprised. I did read somewhere that you can put a php.ini file in the root folder and it would go by that one first, but I dont have a php.ini file and probably wouldnt know how to set it up. (NEWB)
 
The shouldn't be keeping register_globals on, that's a security risk ... Do they not give you access to .htaccess? If they do, I can tell you what you need to do. :)

I am Comptia A+ Certified
 
pugs421:
Some, but not all, PHP runtime configuration directives can be overridden. The PHP online manual will tell you if and how a directive and be overridden locally.

Configuration settings are given at least one of four "changeability" attibutes which are described here: . Look in the introduction of each manual section to see which configuration directive apply, and what their "chageability" attributes are.

register_globals is a configuration setting which can be changed in php.ini, httpd.conf, or a .htaccess file.

Want the best answers? Ask the best questions: TANSTAAFL!
 
I do have access to edit .htaccess. I you would like to help me, please be descriptive so I dont mess anything up. They give a big warning not to make changes if you dont know what your doing(which applies to me)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top