Jump to content

cant upload large imgage


PeggyBuckham

Recommended Posts

I want to allow for a user to upload any photo that they might have taken from their camera. I can't get photo's with large file sizes to upload. I have changed the setting in the php5.ini and set the settings extremely high. This has always worked for me before. I also have changed the code on the form.

 

<input  type="hidden" name="MAX_FILE_SIZE" value="99000000" />

 

here is the code for the php5.ini

 

register_globals = on

allow_url_fopen = on

expose_php = Off

max_input_time = 500

variables_order = "EGPCS"

extension_dir = ./

upload_tmp_dir = /tmp

precision = 12

SMTP = relay-hosting.secureserver.net

url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="

[Zend]

zend_extension=/usr/local/zo/ZendExtensionManager.so

zend_extension=/usr/local/zo/4_3/ZendOptimizer.so

register_long_arrays = on

max_file_uploads = 8M

post_max_size = 8M

 

 

Maybe the problem is not in the php5.ini ?  :shrug:

Link to comment
https://forums.phpfreaks.com/topic/220281-cant-upload-large-imgage/
Share on other sites

Create a little .php file with

<?php phpinfo(); ?>

Run it, and look for what it says the values of max_file_uploads and post_max_size are.

 

I think requinix is right - there are two values you need to change in php.ini: upload_max_filesize and post_max_size

It is probably Apache, which I don't know how to modify, so I would suggest using FTP like I posted above, which will get past the Apache thing.

 

<?php
$file = 'somefile.txt';
$remote_file = 'readme.txt';

// set up basic connection
$conn_id = ftp_connect($ftp_server);

// login with username and password
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);

// upload a file
if (ftp_put($conn_id, $remote_file, $file, FTP_BINARY)) {
echo "successfully uploaded $file\n";
} else {
echo "There was a problem while uploading $file\n";
}

// close the connection
ftp_close($conn_id);
?> 

In answer to jdavidbakr

The upload breaks at 2MB. 1.9MB works and 2.1MB does not. I'm pretty sure that that is the default right? So I think I will call the tec people at GoDaddy becousse that is where it is hosted. My guess is that it is not reading the php5.ini right even though the information generated from the phpinfo(); said differently.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.