CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 File upload component

Print topic Send  topic

Author Message
saseow

Posts: 744
Posted: 08/28/2008, 10:35 AM

This component works perfectly onmy localhost machine but crashes when run from the server. I certainly don't trust the error messages I am getting as I can ftp files to the temp and storage folders no prob. Just wondering if anyone else has had this hassle and can provide a fix. Running on Apache. Here are the errors:

Warning: move_uploaded_file(./uploaded_files/temp/200808281930420.books.csv) [function.move-uploaded-file]: failed to open stream: Permission denied in /usr/www/users/sase/books/Classes.php on line 1766

Hoping to hear from some genius!

Trevor
View profile  Send private message
wkempees


Posts: 1679
Posted: 08/28/2008, 2:44 PM

I suggest you do trust the messages.
You have (I think) an error in the configuration of the uploaf component.

Warning: move_uploaded_file(./uploaded_files/temp/200808281930420.books.csv) [function.move-uploaded-file]: failed to open stream: Permission denied in /usr/www/users/sase/books/Classes.php on line 1766

I guess you want to upload to uploaded_files and not to uploaded_files/temp
I suspect the temp should be the temp directory itself, the PhP set one.
Or uploaded_files/temp has not 777 set to it.

Something like that.
Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message
saseow

Posts: 744
Posted: 08/28/2008, 4:34 PM

Hi Walter,

OK, maybe I am mistaken but I somehow doubt it. I will check both things in the 'morrow and let you know.

Thank you for the reply.

The reason I question the error message is that I can create the same error on my system and all folder privilages are definitely correct. I can re-create the error by putting the temp upload folder as %TEMP which stores to c:\windows\temp and then, when it tries to copy the completed file to the final directory I get the error message.

I will for sure check the two directory setting in CCS tomorrow.

Cheers for now,

Trevor
View profile  Send private message
wkempees


Posts: 1679
Posted: 08/28/2008, 4:41 PM

Might be that you are (what's he word) ......?crosslinking... ?cross traversing, who helps me out here, the temp is WORLD, the upload is LOCAL.
Think this:
Move is a copy, delete
Fileupload is expecting to upload to the %TEMP, then copy to destination and delete in TEMP
Your TEMP is IN target directory.
The WEB user (browser) must have write access, that is why TEMP is used/exists.
The SERVER user (Apache) is doing the copy delete, different rights.

Just suggesting.

Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message
saseow

Posts: 744
Posted: 08/29/2008, 4:19 AM

lol. Thanks Walter.

Trevor
View profile  Send private message
datadoit
Posted: 08/29/2008, 6:28 AM

If you're using %TEMP, that's an environment variable. See your
phpinfo() to see where that's pointing on both your local machine AND
your production machine. You have to have read/write perms to that
location.

If you're on shared hosting that could get tricky. I would suggest
using a temp folder within your own web instead of using the environment
setting. That keeps your web portable across servers and platforms with
minimal configuration headaches.
saseow

Posts: 744
Posted: 08/30/2008, 3:12 AM

Thanks Datadoit,

For some reason, if I use %TEMP on my local macine it bombs as well no matter where I point it to in the INI file. If I put an actual folder in the control for the Teporary Folder it works great.

My server is on a shared invironment. It may be that that is the problem. Evrn if I specify a filder under my site, I still get hassles with permissions.

Thanks for the reply. Any help is greatly appreciated.

Trevor
View profile  Send private message

Add new topic Subscribe to topic   


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.