Jump to content


Photo

Docman Plugin for Joomla


  • Please log in to reply
6 replies to this topic

#1 DannyH

DannyH

    Beta Team Member

  • Beta Tester
  • PipPip
  • 57 posts
  • Location:East Sussex
  • Interests:IT Stuff, Open Source, Website Design, Mail Servers
  • Main OS: Windows XP

Posted 28 August 2008 - 07:46 AM

Dear All,

I hope I donít waffle here!!

I Have Uniform Server 3.3, I have just recently installed Joomla 1.5.6 and all is running fine but I seem to be having a bit of trouble using Docman Plugin, everything is working fine with Docman but the upload is not.

When I upload a file it does not go to stage 3 just stays on stage 2 screen

Now I have installed this on a Ubuntu Server and Docman runs fine

I have increased the php upload in the php.ini and also set the configuration settings correctly in Docman settings,

I have also tried installing this on Uniform Server (Apollo 3.5) But canít even get Joomla 1.5.6 setup as its saying nothing is writable! Mmm :)

Anyway I was just wondering if someone might be able to point me in the right direction to this problem, could this be something to do with the apache2, httpd.CONF File?

Many Thanks :)

Danny
Personal website

Uniform Server - hMail Server - Joomla

#2 DannyH

DannyH

    Beta Team Member

  • Beta Tester
  • PipPip
  • 57 posts
  • Location:East Sussex
  • Interests:IT Stuff, Open Source, Website Design, Mail Servers
  • Main OS: Windows XP

Posted 28 August 2008 - 03:56 PM

If anyone esle is having this problem here is Martijn's fix: :)


alter line 177 in administrator/components/com_docman/includes/files.php
from:

$file_upload = mosGetParam(DOCMAN_Utils::stripslashes($_FILES), 'upload');

to:

if (stristr(php_uname(), 'windows')) {
   $file_upload = mosGetParam($_FILES, 'upload');
} else {					 
   $file_upload = mosGetParam(DOCMAN_Utils::stripslashes($_FILES), 'upload');
}

Now, let's FIX THE FRONTEND:

$upload = new DOCMAN_FileUpload();
$file = $upload->uploadHTTP($file, $path, $validate);

to:


$upload = new DOCMAN_FileUpload();
	  
if (stristr(php_uname(), 'windows')) {
   $file = mosGetParam($_FILES, 'upload');
} else {					 
   $file = mosGetParam(DOCMAN_Utils::stripslashes($_FILES), 'upload');
}

$file = $upload->uploadHTTP($file, $path, $validate);



Bingo :)


Danny
Personal website

Uniform Server - hMail Server - Joomla

#3 Ric

Ric

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 1,420 posts
  • Gender:Male
  • Location:Cambridge,UK
  • Interests:Electronics
    Internet in general
    Open source projects
  • SourceForge IDmpgcan
  • Wiki ID: Ric
  • Main OS: Windows XP

Posted 28 August 2008 - 04:20 PM

Hi Danny
See you have a solution, will post this anyway:

Joomla Version 1.5.6
Docman com_docman_1.4.0rc3.zip

I had no problem installing Joomla on 3.5, Docman also installed with no problems.

Interestingly like you I could not up-load any files, it requires nothing special that Uniform Server does not already have set. No indication in the log files of a problem.

After a little bit of Googling I found the cause check this:

http://forum.joomlat....php?f=14&t=935

Solution:
In "com_docman/includes/files.php", line 177
remove DOCMAN_Utils::stripslashes() function:
- incorrect: $file_upload = mosGetParam(DOCMAN_Utils::stripslashes($_FILES), 'upload');
- correct: $file_upload = mosGetParam($_FILES, 'upload');

In "com_docman/includes_frontend/upload.http.php", line 38
remove DOCMAN_Utils::stripslashes() function:
- incorrect: $file = mosGetParam(DOCMAN_Utils::stripslashes($_FILES), 'upload');
- correct: $file = mosGetParam($_FILES, 'upload');

And instead: In "com_docman/classes/DOCMAN_file.class.php", line 352
add DOCMAN_Utils::stripslashes() function:
- incorrect: $name = $file['name'];
- correct: $name = DOCMAN_Utils::stripslashes($file['name']);

The above works fine.

Note:
1) Extract files from com_docman_1.4.0rc3.zip
2) Apply the above
3) Copy all the files in folder com_docman_1.4.0rc3 to \udrive\www\joomla\tmp

Follow this:

Installation in Joomla! 1.5.x
-----------------------------
DOCman only works with Joomla! v1.5RC3 or later.
1. Turn on legacy mode. [Extensions -> Plugin Manager, publish the item 'System - Legacy']
1. Check your writing permissions. [Help -> System Info -> Directory Permissions]
2. Install DOCman using Joomla's installer. [Extensions -> Install/Uninstall]
3. If you're new to DOCman, we highly recommend you click the 'Add sample data'-button.
4. Review the configuration settings and save.
5. To use the integrated search, install the optional search mambot and publish it.

Note: At step 2 install from folder tmp.

All the best
Ric :)

#4 DannyH

DannyH

    Beta Team Member

  • Beta Tester
  • PipPip
  • 57 posts
  • Location:East Sussex
  • Interests:IT Stuff, Open Source, Website Design, Mail Servers
  • Main OS: Windows XP

Posted 05 September 2008 - 05:26 AM

Just found a little problem with this,

Not sure if you have the same problem Ric, ;) but only an administrator can upload files front end, if you give any other user rights to upload a file it does not go to stage 3 just stays on stage 2 screen

I will do some Googling on this.... :blink:

Danny
Personal website

Uniform Server - hMail Server - Joomla

#5 Ric

Ric

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 1,420 posts
  • Gender:Male
  • Location:Cambridge,UK
  • Interests:Electronics
    Internet in general
    Open source projects
  • SourceForge IDmpgcan
  • Wiki ID: Ric
  • Main OS: Windows XP

Posted 05 September 2008 - 09:12 AM

I found this:

Upload - Who can upload, you should always set this with caution there are always people out there whom are more than willing to upload naughty files to make you look a twit so be careful!

You can allow all registeard users to upload, you can remove access so nobody (via frontend) can upload, you can allow authors and above, publishers and above, editors and above or a specific DOCman group


Check out : http://x-ceptions.bl...figuration.html

Could be what you are looking for!

All the best
Ric :blink:

#6 DannyH

DannyH

    Beta Team Member

  • Beta Tester
  • PipPip
  • 57 posts
  • Location:East Sussex
  • Interests:IT Stuff, Open Source, Website Design, Mail Servers
  • Main OS: Windows XP

Posted 05 September 2008 - 10:09 AM

Thanks Ric,

But I have tried those combinations 100 different ways with no luck, the only user that can is the Admin account,

I have posted on http://forum.joomlat...php?f=14&t=1627 to see if anyone there is having the same problem, will update this post if I here anything

Danny :blink:
Personal website

Uniform Server - hMail Server - Joomla

#7 DannyH

DannyH

    Beta Team Member

  • Beta Tester
  • PipPip
  • 57 posts
  • Location:East Sussex
  • Interests:IT Stuff, Open Source, Website Design, Mail Servers
  • Main OS: Windows XP

Posted 07 September 2008 - 03:59 AM

Ok this little problem was easy, ;)

Just figured this out but if anyone else is having the same problem this is why.

An administrator can upload any file that he or she chooses even if the extension is not in the list, if a user or publisher wants to upload a file the exact file extension must be in the list.

Never even thought about this at first as I have been using the admin account for testing so didnít even need to test a user until now.

Running this on a Linux server will return you an error but a windows Server will not, it will just hang a default you back to Step 2

Anyway problem solved just add ďdocĒ for word documents :blink:


Many Thanks :D

Danny
Personal website

Uniform Server - hMail Server - Joomla




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users