General Upload Troubleshooting General Upload Troubleshooting
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

General Upload Troubleshooting

Started by hyperion, April 30, 2004, 03:15:15 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hyperion

When troubleshooting uploads in CPG 1.3, you are advised to change the upload settings in the Groups console to 'Single uploads only' and to activate 'Debug mode' in the Config console.  Changing this setting negates some of the error masking done in the multiple upload setting.  This will allow you to access more detailed error messages.

FIRST AND FOREMOST: CHECK YOUR PERMISSIONS ON THE /ALBUMS, /ALBUMS/USERPICS, AND /ALBUMS/EDIT DIRECTORIES.  ALL SHOULD BE 777 OR 755. 

If you don't know what we mean when we write 777 or 755,  you need to do a Google search on UNIX file permissions.  Windows has a similar set of file permissions. You can usually set these permissions using your FTP client.     

For those of you who skim over statements written in large letters, I will repeat to try to get your attention:

YES, WE ARE WRITING ABOUT SOMETHING THAT COULD APPLY TO YOU.   

WE REPEAT -- CHECK YOUR PERMISSIONS ON THE /ALBUMS, /ALBUMS/USERPICS, AND /ALBUMS/EDIT DIRECTORIES.  ALL SHOULD BE 777 OR 755.

YES, WE WANT YOU TO CHECK THE PERMISSIONS OF EACH FOLDER EVEN IF YOU THINK YOU HAVE ALREADY DONE THIS. YES, WE MEAN IT.
 

Please keep in mind that HTTP uploads are limited by the restrictions placed upon them in PHP's configuration.

Things to check:

1. max_input_time- 60 seconds is the default time limit for uploading files.

This time limit includes the time it takes for the files to upload, so if you exceed this limit, the file will not even parse, and the browser will not get a response. You can workaround this by trying to upload smaller or fewer files, or you can try uploading over broadband. The best solution, of course, is to increase the time limit to something more in line with your needs.

2. upload_max_filesize - 2MB is the default limit for individual files.

3. post_max_size - 8MB is the default limit for post requests.

4. memory_limit - 8MB is the default size.

5. PHP's LimitRequestBody - 512KB default limit. (mainly an issue on Redhat/Apache systems.  Found in /etc/http/conf.d)

In general, upload_max_filesize < post_max_size < memory_limit in order for uploads to function properly. Coppermine may warn you if a file exceeds upload_max_filesize, but it cannot warn you if the total size of all the files exceeds the post limit or the memory limit.

6. file_uploads - This determines whether or not PHP will allow file uploads. It must be set to 'On'.

7. upload_tmp_dir - This specifies the temporary directory where PHP stores uploaded files.

The most common issue caused by this setting is an open_basedir warning.  In this situation, your server administrator has restricted the files that PHP can work with to a certain directory.  If he does not create and specify a temporary directory within the open_basedir restriction, PHP will attempt to use the OS temporary directory, and it will be rebuffed by the open_basedir restriction.

8. allow_fopen_url - This controls PHP's ability to read files using URL/URIs.  If it is disabled, Coppermine will not be able to upload from URLs.

Some notes about the different types of upload mechanisms available in CPG 1.3:

Multiple HTTP uploads are designed to handle a small number of files, and have been capped at 10.  Therefore, they are not really suited for large numbers of files unless you have control over your php.ini configuration. 

If you are looking to upload in excess of 15 or 20 files at a time, you should consider the batch add process or the XP_Publisher utility.  Each has its own drawbacks and advantages. 

The batch add process is fast, but it puts quite a load on the server and may experience timeouts.  The XP Publisher utility is slower, but it limits the load on the server.  Also, it avoids many of the pitfalls caused by the php.ini configuration by uploading each file in the set as an individual post request.
&quot;Then, Fletch,&quot; that bright creature said to him, and the voice was very kind, &quot;let&#039;s begin with level flight . . . .&quot;

-Richard Bach, Jonathan Livingston Seagull

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

Godflesh777

#1
to what specific php file are you referring in this thread?

I'm having many php upload errors posted in another thread from multiple php documents, and I'm certain that I ran CHMOD on all those directories/subdirectories to the value of 777

the php coding you just mentioned could be the problem, but my installation was done via fantastico, so it's hard to think that it would skip such a crucial step in the installation

-GF
-from hell

Joachim Müller

Quote from: Godflesh777 on December 19, 2004, 07:38:28 PM
to what specific php file are you referring in this thread?

Quote from: hyperion on April 30, 2004, 03:15:15 AM
FIRST AND FOREMOST: CHECK YOUR PERMISSIONS ON THE /ALBUMS, /ALBUMS/USERPICS, AND /ALBUMS/EDIT DIRECTORIES.  ALL SHOULD BE 777 OR 755. 
Did you try 755 then?

Joachim

azone

Ive put all the corect folders to 777 and try 755 and still when I click on upload I see a message tell me Error ,  Sorry there is no album where you are allowed to upload files
What's wrong???

kegobeer

Have you used the album manager to create an album that you can upload into?  Reading the documentation will also help.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

kawool

#5
nervermind

Buddha2004

where is this php.ini file located, in order to do those changes ?

Joachim Müller

You can only access php.ini if the server is yours to configure - if you're webhosted, you will have to ask your host to do this for you. If it is actually yours, you could do a search on the file system. On Windoze boxes, it's usually under c:\Windows\system32\ or c:\Windows\ (although you shouldn't run your own server if you have no idea where your php.ini file is located in the first place).

Joachim

ossy

i've ben using cpg for three month now and it worked perfectly until a few days ago i can't upload pictures anymore.the following error mssage is always showing up:


Warning: is_dir(): Stat failed for ./albums/edit/. (errno=13 - Permission denied) in /disque2/home/scarletbar/www/cpg132/upload.php on line 432

Warning: filemtime(): Stat failed for ./albums/edit/. (errno=13 - Permission denied) in /disque2/home/scarletbar/www/cpg132/upload.php on line 440

Warning: unlink(./albums/edit/.): Permission denied in /disque2/home/scarletbar/www/cpg132/upload.php on line 453

Warning: is_dir(): Stat failed for ./albums/edit/.. (errno=13 - Permission denied) in /disque2/home/scarletbar/www/cpg132/upload.php on line 432

Warning: filemtime(): Stat failed for ./albums/edit/.. (errno=13 - Permission denied) in /disque2/home/scarletbar/www/cpg132/upload.php on line 440

Warning: unlink(./albums/edit/..): Permission denied in /disque2/home/scarletbar/www/cpg132/upload.php on line 453

kegobeer

Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Aditya Mooley

@ossy
You have already posted this query. Never duplicate your posts. Be patient for getting the solution.
--- "Its Nice 2 BE Important but its more Important 2 Be NICE" ---
Follow Coppermine on Twitter

ossy

sorry for duplicating it's the first time i actually use the forum

ok i've found album/edit but i can't CHMOD777 the process is denid what should i do?

Aditya Mooley

You should contact your server admin if you are denied CHMOD to your own folder.
--- "Its Nice 2 BE Important but its more Important 2 Be NICE" ---
Follow Coppermine on Twitter

Janine

Wait, i have a question, where are we looking for these things to check?  I use my CP, I don't use FTP.  Do we need to use FTP?

Joachim Müller

depends on your server setup. Usually, if a webhost gives you access to some control panel that let's you set permissions, setting permissions over FTP is disabled. There's no way we can find this out for you, you have to contact your webhost for support if you're stuck. Please do not spread your support requests all over the board on different threads!

Joachim

Joachim Müller

split unrelated posting into separate thread and named the thread accordingly: http://forum.coppermine-gallery.net/index.php?topic=16100.0
To avoid further unrelated stuff being posted into this sticky thread I'm locking it (so nobody can reply to it anymore).

Joachim

Joachim Müller

bumping this thread for those on notify: there's a tutorial available that will explain how to set up coppermine to give you detailed error messages when you experience issues while uploading: please read Trouble-Shooting the upload process