Page 1 of 1

File upload

PostPosted: 26.01.2008, 22:59
by litbea
Hi all,
when I try to upload a file to a project, system crashes with this info:
Warning: move_uploaded_file(e:/temps/!/server2go/htdocs/collabtive/managefile.phpfiles/1/pendiente_instalaci__n_de_servidor_836609.txt) [function.move-uploaded-file]: failed to open stream: No such file or directory in E:\temps\!\server2go\htdocs\collabtive\include\class.datei.php on line 158

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'D:\DOCUME~1\fufi1\CONFIG~1\Temp\php78.tmp' to 'e:/temps/!/server2go/htdocs/collabtive/managefile.phpfiles/1/pendiente_instalaci__n_de_servidor_836609.txt' in E:\temps\!\server2go\htdocs\collabtive\include\class.datei.php on line 158

┬┐Any suggestion?

Additionally, what utility "count" field has?

Thanks!

Windows server ?

PostPosted: 27.01.2008, 03:21
by Philipp
What is your server setup ?
The paths look a bit like you are using windows ?

Collabtive was so far only tested to run on the LAMP Stack.
That is: Linux, Apache , MySQL , PHP

You'll need Apache (2) , MySQL 4 and PHP 5.1 (or higher) in order to run Collabtive properly.

Re: File upload

PostPosted: 27.01.2008, 12:54
by litbea
You're right, I'm testing it on a WAMP environment. I should realize when viewing the chmod line at class.datei.php. I'll move to a LAMP.

Thanks!

Re: File upload

PostPosted: 30.01.2008, 22:45
by ebarcena
I'm getting the same error:

Code: Select all
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to access files/1/TestPicture.jpg in /misc/28/308/697/725/1/user/web/projects.mysite.com/include/class.datei.php on line 158


I'm hosting with Bravenet: http://www.bravenet.com/global/hosting_matrix.php. How can get this to work?

Re: File upload

PostPosted: 31.01.2008, 01:40
by Philipp
ebarcena wrote:I
I'm hosting with Bravenet: http://www.bravenet.com/global/hosting_matrix.php. How can get this to work?


This is not quite the same error, than the threadstarter got.
The threadstarter got a "no such file or directory" and "unable to move file" error, whilst you are getting a "file not accessible" error.
This points to a file / directory access permissions problem.

Is PHP "Safe mode" enabled on your server?

Re: File upload

PostPosted: 31.01.2008, 23:59
by ebarcena
Philipp wrote:This points to a file / directory access permissions problem.

Is PHP "Safe mode" enabled on your server?


Thanks for you help Philip

Yes, PHP safe mode was enabled. I tried disabling it and it gave me this error:

Code: Select all
Warning: move_uploaded_file(files/1/TestPic.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in /misc/28/308/697/725/1/user/web/TestSite.com/include/class.datei.php on line 158

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/misc/28/308/697/725/1/system/php/TestSite.com/tmp/phpS9k6dC' to 'files/1/TestPic.jpg' in /misc/28/308/697/725/1/user/web/TestSite.com/include/class.datei.php on line 158


I also noticed that when trying to upload avatars it doesn't work. In fact, it doesn't even give me an error massage. It just wont do anything. Is this the same problem?

One more question.. whats the correct CHMOD command I should be using? Is it 666 or 777?

Thanks again and hope we can get this working. Its awesome! Everything else seems to be working right including the chat.

Re: File upload

PostPosted: 01.02.2008, 00:07
by Philipp
Well... have you checked if the folder "/files/1/" actually exists ?

The problem now might be this:
Collabtive creates a subfolder for each project in /files/ upon creation of a project in the admin area.
Maybe the enabled safe mode prevented Collabtive from creating the /files/1/ directory when you added the project , in the first place.

This would then lead to the failure that the file can't be uploaded, cause the needed subfolder in files doesn't exist.

Same applies for user avatars. The install.php script tries to create a folder /files/avatar/. Maybe safe mode prevented this, too.
So avatar uploads won't work, too.

So you need to check inside the /files/ folder if the subfolders /1/ and /avatar/ actually exist.
If they don't exist , just create them manually using your FTP client.

Additionally, the chmod for /files/ and all of it's subfolders must be set to 777.

Re: File upload

PostPosted: 01.02.2008, 01:53
by ebarcena
Thanks for your help m8!

Everything seems to be working right. The only problem is that I will have to manually create a sub-directory on the 'files' directory every time a open a new project. Is there any way to fix that?

Thanks

Re: File upload

PostPosted: 01.02.2008, 01:57
by Philipp
This shouldn't be necessary. Collabtive should create the needed folders in /files/ when you add a project.
For this to work, the /files/ directory needs to be chmod'ed to 777.

Other than that, i don't really know what could prevent Collabtive from adding the needed folders, once you add a project.
Would need further investigation.

Re: File upload

PostPosted: 01.02.2008, 02:10
by ebarcena
Your right. Its working perfectly now. I was still testing on a project i had created before disabling PHP safe mode. I deleted that project and created it again and everything its working fine.

Thanks for all your help m8! ;)