Jump to content
The Uniform Server Community

Docman Plugin for Joomla


DannyH
 Share

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.joomlatools.org/viewtopic.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 :)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.blogspot.com/2008/07/doc...figuration.html

 

Could be what you are looking for!

 

All the best

Ric :blink:

Link to comment
Share on other sites

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.joomlatools.org/viewtopic.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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...