Unable to add files with 'Upload file' function. Unable to add files with 'Upload file' function.
 

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

Unable to add files with 'Upload file' function.

Started by Ken., June 04, 2007, 04:35:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ken.

Coppermine 1.4.10; with no plug-ins, bridged to SMF.
SMF 1.1.2

Test account:
user = testacc
Password = cpgtest

When trying to use the 'Upload file' function the following error is displayed;
QuoteFailed to create directory ../albums/../userpics/10064 !

File: /var/www/vhosts/mykimbrell.com/httpdocs/cpg1410/db_input.php - Line: 318
Note: A little over one week ago I made a fresh install of cpg by completely removing the old cpg 1.4.10, making a new MySQL db, installing a fresh copy of cpg 1.4.10 and then importing the saved copy of my database files. It all went along with no problems and no apparent issues except for this one error. (this file upload issue was not present in the install that was removed)
Also please note that in the old install there were two plug-ins, if that makes any difference. (They have not been reinstalled)
JUploads... http://forum.coppermine-gallery.net/index.php?topic=43432.0
Backup & Restore... http://forum.coppermine-gallery.net/index.php?topic=40439.0
CpmFetch was also being used, but it has not been reinstalled yet.



This error happens for any user account tested so far (6) including the two 'admin' user accounts.
The 'Batch add files' function is working when logged into either of the two admin accounts.

Knowing that this issue has been raised many times here in the Coppermine forum I have been reading numerous threads on the subject and tried to follow the trouble-shooting thread and have gone through the process 4 times in the past week.

Tried so far:
1/ File permissions have been reset and tried on both 0777 & 0755;
I've tried the permissions reset with FileZilla, the Plesk control panel for my site admin and also contacted my host and he reset the files for me just in case it was not working correctly from my end... the same error occurs at any setting.

2/ In the cpg configuration panel it shows the files default as 0644, that was changed to 0777 as part of the testing process, but to no effect.

3/ Directory's set to:
'../albums/' & 'albums/'
'../userpics/' & 'userpics/'
... In one of the threads I had seen the '../' removed from the path so I tried it but it no apparent effect.

4/ Insert the 'Silly_Safe_Mode' code snippet into /include/config.inc.php as defined in the trouble-shooting thread.
5/ In the groups console and in the config console the settings have been adjusted as directed in the trouble-shooting thread.
6/ Tried the uploads in three different browsers and two different computers trying to make sure that it is not a browser issue; IE7 gives a slightly different error message from what is seen in FF & K-Mellon:
QuoteDestination directory ../albums/../userpics/ is not writable by the script !
File: /var/www/vhosts/mykimbrell.com/httpdocs/cpg1410/db_input.php - Line: 331

Sorry for being so long winded, but I tried to cover all of the steps outlined in the trouble-shooting thread. http://forum.coppermine-gallery.net/index.php?topic=24088.0

Thanks for any assistance... Ken.


Nibbler

What are you trying to do with the albums and userpics paths? Set them to the default - albums/ and userpics/

Ken.

Thanks for the reply Nibbler,
The paths were set as '../albums/' & '../userpics/ by the cpg install process and I made no changes until this trouble-shooting process was started, that's when I tried the settings without the '../' as part of the path.
I've just now reset those to 'albums/' & 'userpics' and those settings still give the same error when trying to Upload files, plus it breaks the paths to the picture files that are already in the gallery causing them to show just a file name but no picture.

If the path to existing files must be broken to achieve the fix for this upload problem it will not be a disaster because there are less than 500 files total and they are in a folder on the server, so I can just batch load them back into the albums.
Hopefully it will not come to that, but it can be done that way if need be.

Thanks... Ken.

Nibbler

Quote from: Ken. on June 04, 2007, 05:44:53 PM
The paths were set as '../albums/' & '../userpics/ by the cpg install process

No they weren't - not by our installer at least.

Please post a link to your gallery.

Ken.


Nibbler


Ken.

It is now.
I had set it to 0777, but in response to your question I just checked and it was not. I'm not sure why that it did that because the settings were not changed away from 0777 on my end, I will question my host to see if something was changed on their end.

Thanks... Ken.

Ken.

Just tried to upload a file after changing the userpics to writable and still got errors, so I then made a new album called 'test album'.
When trying to upload a file to the 'test album' the error below shows:
QuoteThe selected album/file does not exist !

File: /var/www/vhosts/mykimbrell.com/httpdocs/cpg1410/include/functions.inc.php - Line: 1315

However... when you look at the album the file actually DID upload and is showing in the test album. (2 pics at this time)


Ken.

Thanks Nibbler, the change to 'cpg1.4.x/db_input.php' seems to have resolved that issue!  ;D

I'll go with it like this for a while to make sure everything is working, but at this point it looks OK.
On the broken path for the files that were already in the albums, can we address that issue here or should I start a new thread?
I'll start looking for threads that speak to that problem, but if you have a link or two handy it would be great.

Thanks for your help Nibbler... Ken.

Nibbler

Just moving them from where they are to where Coppermine expects them to be should work out fine. If it doesn't then please start a new thread.

Ken.

Quote from: Nibbler on June 04, 2007, 09:07:40 PM
Just moving them from where they are to where Coppermine expects them to be should work out fine. If it doesn't then please start a new thread.

Thats going to work out great!  ;D
Tried moving two of the album folders & contents from their current location on the server into cpg1410/albums folder and it works as expected. 

Thanks for all your help Nibbler... Ken.