FreeBSD/Apach 1.3.33 (PHP upload_max_filesize via .htaccess)

  • PolishHurricane
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1585

Post 3+ Months Ago

I'm currently working on a PHP file uploading project for a website temporarily on a shared host. Problem is the "upload_max_filesize" that is normally configured in the PHP ini file is too small for my needs and I'm expecting decently large files over most likely HTTP posts. Anyway, I can't get access to the ini file, but I read on php.net's manual and other places that it is possible to configure this via .htaccess. So I tried doing this outside and inside of the 'www' in an .htaccess file like this...

php_value upload_max_filesize 30971520

It throws an internal server error and crashed. The value I entered isn't over the post max upload size or anything. I'm a nub @ this kind of stuff so, help would be much appreciated. The reason I wanted to do this over HTTP is so I could control uploads to the website, such as their names and information about them through a database and so users wouldn't need an FTP. If anybody has some better ideas those would be accepted also. Thx.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

most likely, you won't be able to change that on a shared host. If you can, what you're looking for is either
Code: [ Select ]
ini_set('upload_max_filesize','30971520');

from within your php script or
Code: [ Select ]
php_flag upload_max_filesize 30971520

from within .htaccess
  • PolishHurricane
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1585

Post 3+ Months Ago

Well thanks anyway, none whatsoever work. I figured that .htaccess was the only possible thing that would work right off the bat, because you cannot set it with ini_set(). That is one of the ini settings you can only change with Htaccess or the PHP ini file. php_flag and php_value both throw 500 errors.

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 34 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.