CPG1.3.2 - The previous file could not be placed. CPG1.3.2 - The previous file could not be placed.
 

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

CPG1.3.2 - The previous file could not be placed.

Started by simpan, August 30, 2004, 09:26:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

simpan

Have a RH9.0 server running php scripts and MySql databases succesfully (e.g. horde). Installed coppermine 1.3.2 a week ago and have not been able to get it up and running in terms of uploading pictures. I believe I have read most of the support database, FAQ and documentation. Still have not found a solution.

I am running
- CPG 1.3.2
- RH 9
- php 4.2.2
- ImageMagick 5.4.7

I have tried
- different file formats: jpeg, gif
- different file sizes: small sized pictures around 4 kb in size and larger
- differenet users and groups
...still no luck

Question 1
As previously stated in a few other topics it is possible to upload a file to the server as it reaches the albums/userpics/NNNNN directory. The uploaded pictures have permission 0644 apache:apache. Is this OK for the PHP script trying to create thumbnails and upload the pictures to the MySql database? Folder permissions are 0777 according to FAQ.

Problem seems to occur when CPG is trying to create thumbnails and/or move the pictures into the mysql database.
With the statement "The previous file could not be placed." In debug mode I do not seem to get any real errors

Question 2.
If looking at the phpinfo file it states that php, MySQL is up and running OK but mysql.so module not loaded even though the php.ini script refers to the proper directory /usr/lib/php4 and the /etc/php.d holds the appropriate mysql.ini file. Is this normal?

Question 3.
Is there any documentation on what the MySql tables should look like and what the user permissions should be set to have a working cpg sql database? One strange thing is, comparing to other php applications like horde, is that user permissions for the sql database and table are not automatically set when installing cpg using the script. Is this correct?

Some suggestions in the right direction is appreciated...

/Simpan


Joachim Müller

We have a "one question per thread" policy for valid reasons. In the future, please do as suggested and post only one question.

Quote from: simpan on August 30, 2004, 09:26:26 PM
Question 1
As previously stated in a few other topics it is possible to upload a file to the server as it reaches the albums/userpics/NNNNN directory. The uploaded pictures have permission 0644 apache:apache. Is this OK for the PHP script trying to create thumbnails and upload the pictures to the MySql database? Folder permissions are 0777 according to FAQ.

Problem seems to occur when CPG is trying to create thumbnails and/or move the pictures into the mysql database.
With the statement "The previous file could not be placed." In debug mode I do not seem to get any real errors

The script/webserver user (in your case "apache") needs "write" permissions as well as "read" and "execute". Some basic stuff on CHMOD: this is binary arithmetics, "4" equals "read", "2" equals "write", "1" equals "execute". As the pics in the albums folder will have to be displayed as well as being executed and written, the user needs 4+2+1 = 7. This is why we recommend 755

Quote from: simpan on August 30, 2004, 09:26:26 PM
Question 2.
If looking at the phpinfo file it states that php, MySQL is up and running OK but mysql.so module not loaded even though the php.ini script refers to the proper directory /usr/lib/php4 and the /etc/php.d holds the appropriate mysql.ini file. Is this normal?
No, it isn't. But in your case you won't have to bother, as you stated you were using ImageMagick. Coppermine can only work with either GD or ImageMagick, not both of them at the same time. Please understand that we can not give advice here on proper (web)server setup, this board deals with Coppermine, not server administration in general.

Quote from: simpan on August 30, 2004, 09:26:26 PM
Question 3.
Is there any documentation on what the MySql tables should look like and what the user permissions should be set to have a working cpg sql database? One strange thing is, comparing to other php applications like horde, is that user permissions for the sql database and table are not automatically set when installing cpg using the script. Is this correct?
If the coppermine install script were to set mySQL permissions, it would need to have root privileges on your mySQL database, which is not a very brilliant idea. That's why it doesn't (and can't) set mySQL permissions. Coppermine assumes that the mySQL user has been configured properly in advance (as most coppermine users are webhosted and wouldn't be able to change permissions anyway). The mySQL user needs to have these mySQL permissions: CREATE, ALTER, INSERT, UPDATE, DELETE, SELECT. There's no explicit documentation, but you can find out indirectly by looking into the files inside coppermine's sql subdir - this is where the coppermine tables are created, filled and updated. All other coppermine code files use SELECT and DELETE (as most php scripts). Usually (at least when webhosted), you give users permissions to DROP tables as well, but as a security measure, you might want to deny this permission (at least coppermine doesn't use it).

Joachim

simpan

Have tried to use some of the answers to my previous questions but I have still not been able to upload files. I'll continue to play around with coppermine parameters and analyse any error logs in more detail to find the source of the problems I am experiencing. It is probably something fairly simple but apparently not that obvious.

/Simpan

simpan

Problem with php rpms for linux RH9...

Se other topic with a more detailed description.


/Simpan

Joachim Müller