PHP - Upload_max_filesize Solutions
im trying to make an art gallery site for my sister with free hosting, i need upload_max_filesize to be at least 3m
ive tried many free hosting services and they are all 1.5m ive tried what these guys say http://www.openg.info/entry/php-cpanel-change-upload-max-filesize-cpanel-access-php-ini which is put this in htdocs: .htaccess Code: [Select] #Enables mod_rewrite, otherwise all Rewrite directives below will not work RewriteEngine on #Activates php.ini config located in main folder to work also recursively for all subfolders, obviously replace your_cpanel_user with your full path, you find it in cPanel home page on the left it's called 'Home Directory' suPHP_ConfigPath /home/vol2/20x.cc/20x_6657899/public_html php.ini Code: [Select] upload_max_filesize = 3M post_max_size 8M memory_limit 128M max_input_time -1 which just gives me a 404 and ive tried running this, and it gives me the same old 1.5m every time index.php Code: [Select] <?php phpinfo(); ini_set("upload_max_filesize", "3M"); // Think that's right... phpinfo(); ?> Similar Tutorialsim trying to make an art gallery site for my sister with free hosting, i need upload_max_filesize to be at least 3mb ive tried many free hosting services and they are all 1.5mb ive tried changing it with .htaccess files and php.ini files, seems the free hosts are cracking down on that stuff does anyone know of a free hosting service that has at least 3mb upload_max_filesize? or perhaps someone knows of a service where it can be changed with php.ini files or .htaccess files This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=344070.0 Do any of you know how to override the php.ini file on a webhost to allow uploads using php to be set for 2gig mx file size? .htaccess is not working and my host says it supports changing the php.ini but nothing seems to be working. I recently created an application and tested on my local production environment. the problem I'm having is a cookie gets set with an a session variable. It works on my dev environment and I am able to view it's contents. When I uploaded the files to Network Solutions I receive get this error: Warning: Invalid argument supplied for foreach() in /data/18/1/27/121/1842447/user/1999590/htdocs/includes/session.php on line 55 and when I dump the variable it is empty. The version of php I am using is 5.3 and the version php Network Solutions is using is 5.1. Do you think it could be something with the two different versions of php or could it be a setting on their end. I am a novice php developer and I would appreciate any input thanks. As we know , A post_max_size used to limit the size of posted data via POST method while the upload_max_filesize used to limit the size of file to be uploaded
I assume. post_max_size = 8m upload_max_filesize = 2m
When i limit the user to only upload 100kb file, i say <pre>
if (!empty($_FILES["myfile"]["tmp_name"]) && ($_FILES["myfile"]["size"] > 100000)) { </pre>
This message occur even when the file is greater than 8 m
The problem come when the file is greater than 10m the warning message for post content is on the page is
Warning: POST Content-Length of 9767236 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
What i want? I want to create my own warning as an error
ie <pre>
if (post_max_size > 18388608)) { </pre>
NB: some developers says we have to adjust the post_max_size i.e 200M what if user upload the file with 210M, the warning message will come back again
Warning: POST Content-Length of 9767236 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
In short i want to give a normal user a meaningful warning
My sad and dreadful story: A company hired me to do web design for them. I made the mistake of fixing a .php error on their site a month back, and I've somehow ended up replacing their "real" programmers. They're paying me to much money for me to tell them "no", but they keep asking me for more and more complex code, and I'm nearing the end of my ability to fake my way through it. Every time I tell them "I can't do this", they smile and say "Sure you can". Then I have to run off and find a way to do it. Today they want me to hook a merchant account up to a sales page. I have literally never done this before. They literally said "Here's our eNom account. Make the page happen." Does anyone know of any "off the shelf" solutions for hooking my .php order page up to a merchant account? I'm not looking for "free", BTW. I'm willing and able to buy a good solution. |