Change php.ini @ 1and1.com

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ast3r3x
Forum Commoner
Posts: 95
Joined: Thu Aug 19, 2004 8:36 pm

Change php.ini @ 1and1.com

Post by ast3r3x »

Does anyone use 1and1.com for hosting and know how to change some of the settings?

I need to change post_max_size, upload_max_filesize, and the memory_limit. Does anyone know if this is possible? I don't have access to the php.ini, and ini_set doesn't seem to work. I tried making a .htaccess file, but it just throws up an error for me when I try to load any page. I don't really get .htaccess so maybe I did it incorrectly.

I just put a .htaccess file in the root of my space with:

Code: Select all

;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;
file_uploads = On ; Whether to allow HTTP file uploads
;upload_tmp_dir = ; temporary directory for HTTP uploaded files (will use system default if not specified)
upload_max_filesize = 10M ; Maximum allowed size for uploaded files
User avatar
evilmonkey
Forum Regular
Posts: 823
Joined: Sun Oct 06, 2002 1:24 pm
Location: Toronto, Canada

Post by evilmonkey »

In terms of htaccess, that's wrong.

Code: Select all

;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;
php_value upload_max_filesize &quote;10M&quote; ; Maximum allowed size for uploaded files
I think this is how you do it. Look for how to specify ini directives in htaccess. Keep in mind, you need special permissions to do so, and any sensible free host would not allow you to do this.

Good luck!
ast3r3x
Forum Commoner
Posts: 95
Joined: Thu Aug 19, 2004 8:36 pm

Post by ast3r3x »

1and1.com isn't free, but I doubt they will let me do it because...well I guess security concerns.

I need a real server place, would be nice to be able to host my own so I could have complete control.

Edit: Oh yeah, thanks, I'll try that.

It would seem I can't have anything in .htaccess or else it throws a 500 error at me. Oh well, guess I won't be implementing that uploading thing like I wanted.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Dedicated hosting allows pretty much total control over your server. So does user-mode *nix, but I don't know of any hosts that have that quite yet.
rsmarsha
Forum Contributor
Posts: 242
Joined: Tue Feb 08, 2005 4:06 am
Location: Leeds, England

Post by rsmarsha »

User avatar
evilmonkey
Forum Regular
Posts: 823
Joined: Sun Oct 06, 2002 1:24 pm
Location: Toronto, Canada

Post by evilmonkey »

evilmonkey wrote:In terms of htaccess, that's wrong.

Code: Select all

;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;
php_value upload_max_filesize &quote;10M&quote; ; Maximum allowed size for uploaded files
I think this is how you do it. Look for how to specify ini directives in htaccess. Keep in mind, you need special permissions to do so, and any sensible free host would not allow you to do this.

Good luck!
Hi, sorry I made a small boo-boo. I just looked at my .htaccess file off my server, the line actually like this:

Code: Select all

php_value upload_max_filesize 50M
No quotes. Could explain the 500.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

some companies offering user-mode linux: http://www.usermodelinux.org/modules.ph ... x&catid=12
Post Reply