_
_ Handy PHP
_
_
Tutorials, Scripts, Information And Other Resources arrow Forum
Tuesday, 07 October 2008
_

Refer A Friend using Revolution Money Exchange
Resource Menu
Handy PHP Store
Free Domain Name
PHP Functions
PHP Downloads
PHP Newsfeeds
PHP Tutorials
Webmaster Tools
User Login
TalkPHP
Get friendly help with your PHP problems for free.
www.talkphp.com
The PHP Resource Index
Handy PHP
Free PHP Help!

FireBoard
Welcome, Guest
Please Login or Register.    Lost Password?
DocMan Repair Module (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: DocMan Repair Module
#131
vujsa (Admin)
Admin
Posts: 139
graph
User Online Now Click here to see the profile of this user
DocMan Repair Module 1 Year, 7 Months ago Karma: 4  
Fatal error: Class 'dmConfig' not found in
administrator/components/com_docman/classes/DOCMAN_config.class.php on line 88

If you have seen that error message before, then this is the module for you.

On two (2) seperate occasions, I have had my DocMan installation corrupted! The first wasn't that big of a deal and I found it before too many downloaders were affected. I only had one file for download then so I didn't give it much though. I did look into the problem fearing that I had been hacked but I found a post that explained what was happening:
For what ever reason, the developer of DocMan requires the configuration file to be updated every time someone downloads a file. If a user's download is interrupted for any reason, the file is left blank and the DocMan installation is left broken!

The second time this problem happened, it was a real problem! It was just a few weeks ago and I have several popular files being downloaded now. I immediately began to think of some sytem to backup the configuration file and restore automatically using a cron job. Then I gat thought to a mambot to do it but the easiest way is to use a module.

Every time this module is loaded, it checks the integrety of the DocMan configuration file. If it is good, and has been a while since a backup has been made, then a new backup is saved! If the file is corrupt, the backup is used to restore the file. If no backup exists and the original file is corrupt, the default installation file is used until the website owner can change the settings.

This will quickly get your DocMan component back in operation if it is currently broken. If your DocMan installation is working properly, this will ensure that it continues to do so.

If you make this module public and place it on ALL of your Joomla pages, then it will be most effective but may slow your page loads down. If you only place it in your DocMan pages, then it will more than likely protect your installation from down time 99% of the time. The rest of the time, the module will simply repair the file when the page is reloaded.

Feel free to request additional features by replying to this topic.

The module may be found here: http://www.handyphp.com/component/option,com_docman/task,cat_view/gid,17/Itemid,25/

Enjoy,
vujsa<br><br>Post edited by: vujsa, at: 2007/03/04 17:12
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#132
Navid (User)
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
Re:DocMan Repair Module 1 Year, 7 Months ago Karma: 0  
Great module, however where do you publish it?
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#133
vujsa (Admin)
Admin
Posts: 139
graph
User Online Now Click here to see the profile of this user
Re:DocMan Repair Module 1 Year, 7 Months ago Karma: 4  
Hey Navid, glad you like the module.

When publishing the module on your pages, it really is up to you.

The module is nearly invisible so placement shouldn't be an issue. I left mine in the &quot;Left&quot; module position at the top. It is publish for the public access group on ALL pages on my site.

This means that the module will check the status of the DocMan configuration file on every page load on the website. This provides the highest possible protection since a problem could be fix before the user even gets to your DocMan pages. But loading the module on every page load could potentially slow your page load times. So maybe only publishing it on your &quot;Home&quot; page and &quot;DocMan&quot; pages would provide enough coverage.

I suggest turning the module title off but if you leave it on for testing, you will begin to understand how often the script is checking your file! Any time that you see that module title, the script just completed an integrety scan! This means that if set for all users on all pages, the script will perform the check even when a user is browsing your news articles or forums. Then when a user clicks on a link to DocMan, the file has already been checked several time by other users.

This also depends on the amount of traffic on your website! The more traffic on your website, the less frequently you have to load the module. This is because at a certain point, the page loads on your website overlap each other. This means that if you have several thousand page loads a day, many of them will load at nearly the same time. Really no reason to load the module much more than once every 1 minute on average since if there is a problem between loads, it will be fixed on the next load which should be less than 60 seconds.
So if you do a few calculations, you can probably determine how ofter you module is loading on average. If that number is less than the amount of time it takes to load a page on your website, then you may want to try and reduce how frequently the module loads by reducing the number of pages it loads on or by restricting the module to registered members only.

This all depends on how often you feel that you need to check the integrety of the configuration file and weigh that against how big of a disruption it would be for the DocMan component to be offline for a period of time. If a 5 minute disruption of DocMan will only affect one user on your website, then maybe you can load the module less frequently.

Just remember, the frequency which the module is load is equal to the frequency which the configuration file is checked. The frequency which the file is checked, the less time that your DocMan installation will be offline if the file is corrupt or missing.

vujsa
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#145
yuliandini (User)
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
Re:DocMan Repair Module 1 Year, 5 Months ago Karma: 0  
Thank you so much for this ... was getting worried abt docman since it broke down after a month of use. Wish you'd let the docman people know abt this module.

Great work and thank you again.

Post edited by: yuliandini, at: 2007/04/19 17:52<br><br>Post edited by: yuliandini, at: 2007/04/19 17:53
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#146
vujsa (Admin)
Admin
Posts: 139
graph
User Online Now Click here to see the profile of this user
Re:DocMan Repair Module 1 Year, 5 Months ago Karma: 4  
Well, the DocMan designers I'm sure are well aware of this issue but the project seems to have nearly died.

The developer or developers don't seem to have any interest in further developement, udates, or support for the component. It is however, an open sourse project and anyone can take over when ever they like.

The problem occurs when a download is interrupted and fails to complete. normally, when the file is delivered to the user, the configuration file is refreshed. I have no idea why the configuration file would need to be refreshed! It doesn't make sense to me. Perhapes an error in the code that is handling the file incorrectly as a result. All I know for sure is that the file gets refreshed upon completion of a download and otherwise, it is lost!

As I understand the process:
- A file download is requested
- The script opens the configuration file
- The script reads the configuration file and uses the data it contains
- The requested file is sent to the user
- The configuration file is restored

The question is, why does the file get written to except when the Admin make a settings change?

I suppose that it could be a poorly located file close function request that is the cause but I still don't se that being the issue.

I may, if I get a chance, look into fixing the component myself and distributing as fixed but I am not interested in taking over the project since I tend to have a hard time with finishing large projects!

vujsa
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#151
Fitz (User)
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
Re:DocMan Repair Module 1 Year, 5 Months ago Karma: 0  
When I try to upload this module to Joomla - I get the following error:
Unrecoverable error &quot;PCLZIP_ERR_BAD_FORMAT (-10)&quot;

Fatal error: Class 'dmConfig' not found in --/gto/administrator/components/com_docman/classes/DOCMAN_config.class.php on line 88

For reference:
Database Version: 5.0.27
PHP Version: 5.2.0
Web Server: Apache/2.2.3 (Unix) DAV/2 mod_ssl/2.2.3 OpenSSL/0.9.8d PHP/5.2.0 mod_apreq2-20051231/2.5.7 mod_perl/2.0.2 Perl/v5.8.7
WebServer to PHP interface: apache2handler
Joomla! Version: Joomla! 1.0.11 Stable hen I try to upload this module to Joomla - I get the following error:
Unrecoverable error &quot;PCLZIP_ERR_BAD_FORMAT (-10)&quot;

Fatal error: Class 'dmConfig' not found in --/gto/administrator/components/com_docman/classes/DOCMAN_config.class.php on line 88

For reference:
Database Version: 5.0.27
PHP Version: 5.2.0
Web Server: Apache/2.2.3 (Unix) DAV/2 mod_ssl/2.2.3 OpenSSL/0.9.8d PHP/5.2.0 mod_apreq2-20051231/2.5.7 mod_perl/2.0.2 Perl/v5.8.7
WebServer to PHP interface: apache2handler
Joomla! Version: Joomla! 1.0.11 Stable [ Sunbow ] 28 August 2006 20:00 UTC
User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3

Any thoughts or optional workarounds?
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

_
 
_
_
© 2008 Handy PHP