• Resolved dgraszka

    (@dgraszka)


    Dear colleagues, after the last update of the plugin, our website crashed. The PHP version is 5.6. We urgently ask for help ??

    Parse error: syntax error, unexpected ‘(‘ in?/home/virtualki/104326/cms/wp-content/plugins/nextgen-gallery/vendor/composer/autoload_real.php?on line?45

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Benjamin

    (@benjaminowens)

    Hi @dgraszka!

    That sounds like there was an error during the update that corrupted that one file. Could you please delete your nextgen-gallery directory from wp-content/plugins/ and reinstall it? That should fix your issue.

    Thread Starter dgraszka

    (@dgraszka)

    Won’t this cause me to lose my settings and uploaded galleries to the website?

    • This reply was modified 1 year, 9 months ago by dgraszka.
    Thread Starter dgraszka

    (@dgraszka)

    Unfortunately, reinstalling the plugin generates the same error on the page…

    I’m currently renaming the folder so the website can function normally. I will be grateful for sending the repaired file ??

    • This reply was modified 1 year, 9 months ago by dgraszka.
    Benjamin

    (@benjaminowens)

    You won’t lose any settings or uploaded galleries, those are not stored in the plugin directory.

    Did you download a new zip file of the plugin? It’s possible the zip file previously downloaded is what was corrupted.

    Thread Starter dgraszka

    (@dgraszka)

    Unfortunately, that doesn’t help. I downloaded the latest version of the plugin “nextgen-gallery.3.34” and the problem persists. The last update of your gallery module breaks something in our website, which unfortunately runs on the old PHP 5.6 protocol (we are unable to change this at the moment).

    Hi, I vote for this and have the same issue. It is not installation problem. Composer changed the file where the problem is.

    Here is a diff of older and newer version:

    • This reply was modified 1 year, 9 months ago by Artholl.

    Workaround: Change the file to previous version with respecting new random number and it seems to work.

    So this content of the file works for me:

    <?php
    
    // autoload_real.php @generated by Composer
    
    class ComposerAutoloaderInit004157cb5085dc071ae6f8aa09fb1dbe
    {
        private static $loader;
    
        public static function loadClassLoader($class)
        {
            if ('Composer\Autoload\ClassLoader' === $class) {
                require __DIR__ . '/ClassLoader.php';
            }
        }
    
        /**
         * @return \Composer\Autoload\ClassLoader
         */
        public static function getLoader()
        {
            if (null !== self::$loader) {
                return self::$loader;
            }
    
            require __DIR__ . '/platform_check.php';
    
            spl_autoload_register(array('ComposerAutoloaderInit004157cb5085dc071ae6f8aa09fb1dbe', 'loadClassLoader'), true, true);
            self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
            spl_autoload_unregister(array('ComposerAutoloaderInit004157cb5085dc071ae6f8aa09fb1dbe', 'loadClassLoader'));
    
            require __DIR__ . '/autoload_static.php';
            call_user_func(\Composer\Autoload\ComposerStaticInit004157cb5085dc071ae6f8aa09fb1dbe::getInitializer($loader));
    
            $loader->register(true);
    
            $includeFiles = \Composer\Autoload\ComposerStaticInit004157cb5085dc071ae6f8aa09fb1dbe::$files;
            foreach ($includeFiles as $fileIdentifier => $file) {
                composerRequire004157cb5085dc071ae6f8aa09fb1dbe($fileIdentifier, $file);
            }
    
            return $loader;
        }
    }
    
    /**
     * @param string $fileIdentifier
     * @param string $file
     * @return void
     */
    function composerRequire004157cb5085dc071ae6f8aa09fb1dbe($fileIdentifier, $file)
    {
        if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
            $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
    
            require $file;
        }
    }
    • This reply was modified 1 year, 9 months ago by Artholl.

    I have this error as well. Parse error: syntax error, unexpected ‘(‘ in /home/XXXXX/public_html/wp-content/plugins/nextgen-gallery/vendor/composer/autoload_real.php on line 45

    It takes the entire site down until NextGEN Gallery is deactivated via WP recovery mode.

    Is there any way to revert to previous version?

    Benjamin

    (@benjaminowens)

    Sorry about that, the latest version of Composer generates an autoload file that is incompatible with PHP 5.6

    The latest version of NextGEN released today (3.35) fixes the issue.

    Thanks! ver 3.35 seems to have fixed the issue for me.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Parse error: syntax error autoload_real.php on line 45’ is closed to new replies.