1

I have a simple PHP script. Its used to upload users into the joomla tables. Basically it uploads users into joomla three main tables.

The PHP uploader sript works fine when the CSV is about 80MB to 100 MB.

It does not work or just nothing happens when the file size is 500MB or above.

How do i make the PHP script work to upload the CSV files of over 500 MB?

Do i actually change something in my PHP.ini settings or is there something else i could add in the script itself.

Thanks in Advance.

3 Answers 3

3

in the .htcaccess file add the following:

php_value upload_max_filesize 500M
php_value post_max_size 500M

in php.ini add:

upload_max_filesize = 500M
post_max_size = 500M
Sign up to request clarification or add additional context in comments.

12 Comments

Are we fans of plagiarism or just forgetting to link to the source at drupal.org?
For two lines in .htaccess and two lines in php.ini? Are you kidding me?
@Gershon Herczeg : let me try
How would that be plagiarism these are facts not creative work
@Matt using your logic anyone who come to the this site and uses code from it is guilty of plagiarism, lol. So i got it from a source which i had bookmarked big deal..!
|
1

You have to change the upload_max_filesize in php.ini

2 Comments

i already tried ini_set()..let me check also the htaccess file as per Gershon Herczeg
Can't change uploads limits via ini_set(). The script is executedly only AFTER the upload is completed - if the limit is too low, the upload is killed before the ini_set() is ever seen. This has to be done at the php.ini/.htaccess level
1

I had the same issue long time ago with rails and mysql,

You have to consider 3 things when you want to upload a file:

  • Max upload file in PHP
  • Be sure that MySQL will save a big file.
  • Your browser will lost connection after a while uploading a file to your database if it don't receive any answer from the server.

I think that You handled the first 2, but to handle the 3rd probably you will need a upload progress bar to keep the session active. Actually you need some AJAX to keep the server and the client "talking" meanwhile the file still uploading.

1 Comment

yeah..let me see if can become a AJAX developer in a day :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.