CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Gallery application error

Print topic Send  topic

Author Message
Jon Stanton
Posted: 09/19/2002, 5:13 AM

Hi there

I've downloaded and been working with the gallery application. Everything works fine with the exception of uploading a file (the most important bit!). Whenever I log in as Admin and add a record, the record updates correctly and I get to the page where I upload the file. After clicking the upload button I get this error:

Warning: rename() failed (Cross-device link) in /home/public_html/gallery/UploadResult.php on line 49

Can anyone shed some light on this for me? I've set the permissions on all the directories and files to 777 or 666 so don't think this is the problem.

Many thanks in anticipation.
Jon Stanton
Posted: 09/19/2002, 5:33 AM

One other point, it appears the directory is created correctly (although CHMOD to 755 and NOT 777) but the file is not actually uploaded. The directory remains empty. I think the error occurs because it's trying to rename a file that doesn't exist!

I'm starting to pull my hair out now!
Nicole
Posted: 09/20/2002, 2:22 AM

Make sure that the UploadResult.php file has enough permissions to write files to the disk. The permissions for this file should be set to chmod 777.

Also go to UploadResult page/Open event and change the function rename() to copy(). They have the same parameters, so you should get:

if (!file_exists($tmpfile)) {
copy($myfile,$tmpfile);
} else {
unlink($tmpfile);
copy($myfile,$tmpfile);
}
LaQuixa
Posted: 09/20/2002, 7:22 AM

Where did you find the gallery application?
Jon Stanton
Posted: 09/20/2002, 3:16 PM

Thanks Nicole. Changing rename to copy did the trick.

The Gallery application can be found in the tips/articles page at this site.

<a href="http://www.gotocode.com/art.asp?art_id=85&">Click Here</a>
Andrew Carnell
Posted: 01/14/2003, 10:12 AM

I have the same problem

MySQL PHP - latest version

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.