Title: Nextgen public uploader problem
Last modified: August 22, 2016

---

# Nextgen public uploader problem

 *  [diegos79](https://wordpress.org/support/users/diegos79/)
 * (@diegos79)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/nextgen-public-uploader-problem-1/)
 * Hi, i Have this problem after upgrade nextgen gallery.
 * Fatal error: Call to undefined method UploaderNggAdmin::chmod() in //wp-content/
   plugins/nextgen-public-uploader/inc/class.npu_uploader.php on line 81
 * Please can anyone help me?
 * [https://wordpress.org/plugins/nextgen-gallery/](https://wordpress.org/plugins/nextgen-gallery/)

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/nextgen-public-uploader-problem-1/#post-5810730)
 * [@diegos79](https://wordpress.org/support/users/diegos79/) – The NextGEN Public
   Uploader plugin is not a Photocrati product. It would likely be best for you 
   to contact its authors.
 * Thanks!
 * – Cais.
 *  [sajjad_fx](https://wordpress.org/support/users/sajjad_fx/)
 * (@sajjad_fx)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/nextgen-public-uploader-problem-1/#post-5811008)
 * Hello i have this problem too after the update
    may i ask you that help us how
   can we fix this issue? we have postet at uploader support forum but the last 
   activity at this forum is 1 month ago!
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/nextgen-public-uploader-problem-1/#post-5811019)
 * [@sajjad_fx](https://wordpress.org/support/users/sajjad_fx/) – We are not the
   author of that plugin and unfortunately we do not offer support for third-party
   extensions at this time.
 * – Cais.
 *  [CCC](https://wordpress.org/support/users/chanecullens/)
 * (@chanecullens)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/nextgen-public-uploader-problem-1/#post-5811039)
 * Hi Cais
 * Many of us have been through a year of updates to create nice websites with you
   new products. And I’m sure many, like me, have purchased the advanced pro versions.
 * I realize you, and all companies, should have a policy not to support third-party
   extensions. I’m asking for the NextGen community – can you suggest a a workaround
   that gets the uploader functioning and lets us use your new features.
 * thanks,
    Chane
 *  [CCC](https://wordpress.org/support/users/chanecullens/)
 * (@chanecullens)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/nextgen-public-uploader-problem-1/#post-5811040)
 * This fix worked for me, I’ll continue to look for the right fix.
 * Line 81 of class.npu_uploader.php from folder: wp-content/plugins/nextgen-public-
   uploader/inc
 * Simply comment out these 4 lines of code, use // at the start of each line to
   comment out a line
 *     ```
       //if ( ! $this->chmod( $dest_file ) ) {
       //	self::show_error( __( 'Error, the file permissions could not set.', 'nextgen-public-uploader' ) );
       //	continue;
       //}
       ```
   
 * Note: this has been tested on exactly 1 website, mine, and it works for me. Use
   at your own risk.
 *  [CCC](https://wordpress.org/support/users/chanecullens/)
 * (@chanecullens)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/nextgen-public-uploader-problem-1/#post-5811041)
 * OK, here is the change I found that breaks Nextgen public uploader.
    The blog
   post mentions:
 * > Changed: Removed unused code from **ngglegacy** module. Created wrappers for
   > commonly-used functions
 * It just happened that Nextgen public uploader used on of the legacy functions.
 * From the file:
    …\wp-content\plugins\nextgen-gallery\products\photocrati_nextgen\
   modules\ngglegacy\admin\functions.php
 * Line: 1047 (or so) the legacy function chmod was removed in the latest version:
 *     ```
       /**
       	 * Set correct file permissions (taken from wp core)
       	 *
       	 * @class nggAdmin
       	 * @param string $filename
       	 * @return bool $result
       	 */
       	function chmod($filename = '') {
   
       		$stat = @ stat( dirname($filename) );
       		$perms = $stat['mode'] & 0000666; // Remove execute bits for files
       		if ( @chmod($filename, $perms) )
       			return true;
   
       		return false;
       	}
       ```
   
 *  [CCC](https://wordpress.org/support/users/chanecullens/)
 * (@chanecullens)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/nextgen-public-uploader-problem-1/#post-5811042)
 * Hi Cais
 * Does photocratic have plans to add chmod() back, or should extensions to your
   gallery work around the change?
 * thanks
    Chane
 *  [CCC](https://wordpress.org/support/users/chanecullens/)
 * (@chanecullens)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/nextgen-public-uploader-problem-1/#post-5811043)
 * The final workaround I’m using until photocratic or public uploader make a change.
 * In file: class.npu_uploader.php from folder: wp-content/plugins/nextgen-public-
   uploader/inc
 * A inserted the deleted chmod function from functions.php (see above for code 
   and file location.
 * I inserted it at line 23.
    Since I’ve never crafted a wordpress plugin – I’ll
   leave it to experts to decide if this is a good workaround or not.
 * Chane
 *  [CCC](https://wordpress.org/support/users/chanecullens/)
 * (@chanecullens)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/nextgen-public-uploader-problem-1/#post-5811044)
 * I see NG 2.0.74 just arrived and installed. chmod() still missing. And my work
   around above is still working 🙂
 *  [sajjad_fx](https://wordpress.org/support/users/sajjad_fx/)
 * (@sajjad_fx)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/nextgen-public-uploader-problem-1/#post-5811046)
 * Hello chane
    Thanks for your sharing 🙂 we are awaiting for the authors to solve
   our problem… Best Regards.
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/nextgen-public-uploader-problem-1/#post-5811110)
 * [@chanecullens](https://wordpress.org/support/users/chanecullens/) – Thanks for
   sharing your work-around and ideas, have you shared them with the NextGEN Public
   Uploader authors?
 * – Cais.
 *  [CCC](https://wordpress.org/support/users/chanecullens/)
 * (@chanecullens)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/nextgen-public-uploader-problem-1/#post-5811118)
 * No I have not shared with the uploader team. Please do it for me if you are not
   re-adding chmod()
 *  [edanzer](https://wordpress.org/support/users/edanzer/)
 * (@edanzer)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/nextgen-public-uploader-problem-1/#post-5811121)
 * Hi all – we’ve just released a beta for NextGEN that has a fix for the NextGEN
   public uploader. If you’re up for giving it a try, we’d love to get confirmation
   the fix works for you.
 * [http://www.nextgen-gallery.com/nextgen-gallery-latest-beta/](http://www.nextgen-gallery.com/nextgen-gallery-latest-beta/)
 * Thanks! (Erick)

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Nextgen public uploader problem’ is closed to new replies.

 * ![](https://ps.w.org/nextgen-gallery/assets/icon-256x256.png?rev=2083961)
 * [Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery](https://wordpress.org/plugins/nextgen-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextgen-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextgen-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/nextgen-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextgen-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextgen-gallery/reviews/)

## Tags

 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)
 * [NGG](https://wordpress.org/support/topic-tag/ngg/)
 * [upload](https://wordpress.org/support/topic-tag/upload/)

 * 13 replies
 * 5 participants
 * Last reply from: [edanzer](https://wordpress.org/support/users/edanzer/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/nextgen-public-uploader-problem-1/#post-5811121)
 * Status: not a support question