We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Is there a way to batch add photos? | Forum

Topic location: Forum home » Support » General Questions
Kurt
Kurt Oct 28 '14
I know I can add multiple photos but I frequently get a timeout error. I was hoping there was a way to dump a bunch of photos in a directory using FTP. Then have the pictures appear in the photo plugin.
ross Team
ross Oct 28 '14
This is not possible, because every photo you upload via website breaks down into 4 categories: small, avatar, preview, normal sizes also a lot of records about uploaded photos is stored in the database, like album name, description of photos etc. 
Michael
Michael Oct 29 '14
You might also want to play with the settings in your php.ini file and increase the maximum execution time, this should help your issue.

Don't increase them so there really high as you could potentially slow your site down depending on how many users are uploading photos at the same time etc. You have to play around until you find a balance between user activity and server resources.

Maybe if its a one time thing your doing you can increase the execution time and then decrease it once your done. (We do this when we pump out 50k+ emails using mass mail)

Here is a snippet of our php.ini file which might help.

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 60     ; Maximum execution time of each script, in seconds
max_input_time = 60    ; Maximum amount of time each script may spend parsing request data
memory_limit = 256M      ; Maximum amount of memory a script may consume (32MB)
Kurt
Kurt Oct 29 '14

Michael, your suggestion may help but my hosting provider doesn't give me access to the php.ini.


Is it possible to create a php.ini file within the root directory of my oxwall site?

Michael
Michael Oct 29 '14
Kurt, yes thats possible.

You need to create a php.ini file in the level before the root, in my opinion the root folder is the folder where you place your index file, you need to place this before that level, if that makes sense.

Then you need to edit your htaccess file with this code, changing sitename to your sitename

<IfModule mod_suphp.c>
  suPHP_ConfigPath /home/sitename
  <Files php.ini>
    order allow,deny
    deny from all
  </Files>
</IfModule>
ross Team
ross Oct 30 '14
Kurt by the way what is your software and photo plugin version?
Kurt
Kurt Oct 30 '14

Ross, I'm using Oxwall version 1.7.1 (build 8274)

The photo plugin was included in the install. I don't know what version it is.

Kurt
Kurt Oct 30 '14

Michael, I wanted to thank you for your suggestion and let you know that it didn't work for me.

I found that the timeout occurs at exactly 60 seconds regardless of what I did to the php.ini.


I did find that others are having similar problems. http://www.oxwall.org/forum/topic/22808

It seems like they were attempting to adjust the php.ini file without success as well.

The Forum post is edited by Kurt Oct 30 '14
Kurt
Kurt Oct 31 '14

You wrote:

php besides "post_max_size" settings (which we used) for defining max upload size, has "upload_max_filesize"setting. Now we use them both and this fixed the timeout error,


Ross, thanks for your continued help, I had read that part but I didn't understand.

The file sizes I am getting a timeout error on are only 6000 - 7000 Kb 

Do you have a recommended setting for post_max_size and upload_max_filesize?

ross Team
ross Nov 10 '14
Kurt, this is very unique bug, we have reported it to our developers again. The problem keeps showing up on different server settings and on some it does not. Nevertheless, we reopened the issue. Our developers will try to fix it asap. 


As to the values, if you allow your users to upload such big photos, then your need to have these values as big as possible, therefore bigger than 7Mb