Upload problem Upload problem
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Upload problem

Started by DeadKenny, March 20, 2006, 02:01:03 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

DeadKenny

Same problem as in this thread which is solved but the poster didn't say how he solved it...

http://forum.coppermine-gallery.net/index.php?topic=29103.0

possibly same as this one too, as my main issue is I can't batch add files...

http://forum.coppermine-gallery.net/index.php?topic=28983.0

I've gone through the steps in the upload trouble document (http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#upload_trouble) carefully and done a single file upload to reproduce the problem with more detail and I've got an error in db_input.php

I've checked my permissions (i've tried chmod 777 and 755 on the album and album files, and even 655 for the files, all with the same result). The owner and group of all the files is apache and that's the user that apache runs under.

Note that the permissions are the same as they always have been and it's been working fine under 1.3.x, both with single file upload and batch add files. PHP and Apache settings haven't been changed since my 1.3.x install either.

The error I get is...

--------------
The file 'albums/userpics/10009/20060130-101538.jpg' can't be inserted in the album

Unable to create thumbnail or reduced size image.

File: /var/www/tjmoore.co.uk/gallery/db_input.php - Line: 391
--------------

For info I'm running Fedora Core 2 with php 4.3.11 (1.fc2.4.legacy), Apache 2.0.51 (2.9.5.legacy), MySQL 3.23.58 (16.FC2.4.legacy) and ImageMagick 6.2.0.7 (2.fc2.4.legacy).


If you want to test it to see the error and debug output, you can log in as 'test', pw: test  and upload to the 'mytest' album under Personal Albums.

URL: http://www.sirjohn.co.uk/gallery


Oh, and I've tried the imagejpeg issue patch too.

Thanks,

Tim.

Joachim Müller

re-read the upload trouble shooting section of the docs, you missed the important bit.

DeadKenny

    * Go to your coppermine page and log in as admin
check
    * Go to the config screen
check
    * Scroll to the bottom of the page
check
    * Expand the "Maintenance settings" section by clicking on it
check
    * Enable debug mode for everyone
check
    * Leave display of notices switched off
check
    * Save the new settings by clicking on "Save new configuration"
check
    * Go to the "groups" panel
check
    * Set the upload form configuration for all groups to "Single file uploads only" (set File upload boxes to "1", URI upload boxes to "0" and No. of boxes to "fixed")
check
    * Save your new settings
check

Then try to upload (using http uploads, even if you experienced troubles using another upload method) - you should get a more detailed error message that tells you what exactly goes wrong with your uploads.
check
If the error message doesn't mean anything to you, search the support board for the error message you get.
check - led me to this thread and then this and as I've said I've tried the fix in there. Doesn't work, plus I don't have PHP 4.4.1 anyway

When asking for support on the coppermine forum, post a link to your site and a test user account (the test user mustn't be in the admin group!) with upload privileges, with the above mentioned settings in place - this way, supporters can see the error messages as well. Do not post debug_output unless requested.
I believe I've done all this


So what have I missed? ??? Sorry if I'm being dumb, I'm just at a loss.

Joachim Müller

oops, sorry - I missed the test user account given in your previous posting. I apologize - you actually have done as suggested, but I failed to read your posting carefully enough.
OK, I tried uploading and I can confirm your error message. Please try the following:
Apply CHMOD settings (don't just check them). Try 777, then test. If this fails, try 755. Make sure the CHMODing propagates to the sub-folders, especially the edit folder.
Try changing your image resizing method from GD to IM or vice versa.
Make sure that your server isn't running with suEXEC.

DeadKenny

I've done a chmod -R 777 (and also tried 755) in the albums folder and it's set the permissions for everything there. I've doubled checked ownership with a chown -R apache:apache.

None of that makes a difference.

Tried changing to both GD 1.x and GD 2.x and the file gets uploaded okay but no resizing occurs and nothing goes into the database so nothing appears in Coppermine, and I get the input_db.php URL back with a blank page.

As far as I know the server isn't suEXEC. It's the standard Fedora Core Apache package. I've not specifically configured it to run with suEXEC. As I understand it, that allows running of CGI/etc under a different user from the web server. The server is just running under the account 'apache' as does everything it runs from what I can see.

Nibbler

SELinux has been known to cause similar issues, check that.

DeadKenny

#6
I don't have SELinux enabled in FC. Again, as I say, it's been working fine with pre 1.4.x releases and also previous versions of FC which didn't have SELinux (I've just been upgrading the system since Red Hat days).

Just for sanity I tried using IE to upload as I normally use Firefox, but no difference.

Edit: I've got another Coppermine gallery which I've upgraded at different times. Just upgraded from 1.3.2 to 1.4.4 and that too now has the same problem.

DeadKenny

Got a reply from the original poster of the thread mentioned in my first post basically saying how he fixed it...

"well somewhere else i found that some lines are wrong in this file. so i rewrite them to new version that i found on the internet and than was everything ok"

That's refering to db_input.php

I've checked in the stable cvs and other than my file version being 1.4.4 and the CVS says 1.4.5, the files are identical. I don't know where the development tree branches so I don't know what to compare there. It's obviously changed a lot in the latest version.

DeadKenny

I managed to get a link off that other poster to the file he says fixes it but it's the same version as I've got.

I ran the Version Check too and I've pulled a couple of out of date files from the stable CVS (picmgmt.inc.php which includes the php imagejpeg fix, and I was missing the 'no_FTP-uploads_into_this_folder!' files), and everything is up to date. Doubled and tripple checked the permissions and ownership on the files. Still no luck.

I'm at a loss I'm afraid.

Is there a way I can roll back to a 1.3.x version without having to re-create my database as I have many references to the absolute links in Coppermine and wouldn't want to break those? I know 1.3.x works, as has versions before that, but 1.4.x seems to be no go :(

Joachim Müller

Quote from: DeadKenny on March 23, 2006, 02:25:50 PM
Is there a way I can roll back to a 1.3.x version without having to re-create my database as I have many references to the absolute links in Coppermine and wouldn't want to break those? I know 1.3.x works, as has versions before that, but 1.4.x seems to be no go :(
http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#downgrading

DeadKenny

Just an update. I've recently upgraded to Fedora Core 5, which has PHP 5.1.2, MySql 5.0.18 and Apache 2.2.0. However this doesn't make a difference.

I'm giving up on it for my main site now and moving to Exhibit Engine instead which installed and works fine. I'll keep Coppermine running a little while for my old photos and my other site which just has "fun" photos but I won't be able to add any new photos to them.

Thanks anyway.