ricardo
ricardo

Reputation: 215

Increasing the Upload Limit of my PHP script

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.

Upvotes: 1

Views: 2408

Answers (3)

jcho360
jcho360

Reputation: 3759

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.

Upvotes: 1

Matt
Matt

Reputation: 7040

You have to change the upload_max_filesize in php.ini

Upvotes: 1

Gershon Herczeg
Gershon Herczeg

Reputation: 3054

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

Upvotes: 3

Related Questions