• Resolved colevalleygirl

    (@colevalleygirl)


    Installer.php is failing to run on my new (empty) site.

    2 error message.

    One is about an unterminated comment at the end of the file (easy to fix and already reported here by somebody else).

    The other says:

    PHP Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in /home/xxx/xxx/installer.php on line 12

    Update:

    I’ve tried deleting the initial comment as suggested here Comment at start of installer resulting in 500 error | www.remarpro.com, and as long as I delete all the associated white space it work.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support mohammedeisa

    (@mohammedeisa)

    Hi @colevalleygirl ,

    Thanks for reaching out to us.

    About the below error:
    Namespace declaration statement has to be the very first statement or after any declare call in the script in /home/xxx/xxx/installer.php on line 12


    I believe that the below FAQ will help you to fix your issue

    Could you please let me know what is the encoding of the installer.php?

    I’m looking forward to your reply.

    Thanks!

    Thread Starter colevalleygirl

    (@colevalleygirl)

    The installer.php encoding is UTF-8

    It begins:

    
    
    <?php
    /* ------------------------------ NOTICE ----------------------------------
    
    If you're seeing this text when browsing to the installer, it means your
    web server is not set up properly.
    
    Please contact your host and ask them to enable "PHP" processing on your
    account.
    ----------------------------- NOTICE --------------------------------- */
    namespace {
    use Duplicator\Libs\DupArchive\DupArchiveExpandBasicEngine;
    $disabled_dirs = array(
    'backups-dup-lite',
    'wp-snapshots'
    );
    if (in_array(basename(dirname(FILE)), $disabled_dirs)) {
    die;
    }

    The white space at the top, plus the entire NOTICE comment must be removed to make the installer work.

    It ends:

    /* DUPLICATOR_INSTALLER_EO

    This comment needs to be terminated properly to make the installer work.

    Plugin Support mohammedeisa

    (@mohammedeisa)

    Hi @colevalleygirl ,

    Please try to change the installer.php encoding to ANSI.

    To do that, open the installer.php in notepad++ , click encoding, and select ANSI

    Please let me know if this works.

    Thanks!

    Thread Starter colevalleygirl

    (@colevalleygirl)

    How is changing the encoding going to fix these error which are identical to what I experienced:

    Comment at start of installer resulting in 500 error | www.remarpro.com

    Bad Comment at end of installer.php | www.remarpro.com

    As that first problem report is 6 months old, I’m somewhat surprised it hasn’t been fixed already.

    Plugin Support mohammedeisa

    (@mohammedeisa)

    Hi?@colevalleygirl?,

    This issue has been fixed already. Are you using the latest Duplicator version?

    If you are using the latest Duplicator Lite version, please contact Duplicator Pro support to investigate this issue:
    https://duplicator.com/contact/?form=1

    Thanks!

    Thread Starter colevalleygirl

    (@colevalleygirl)

    I’m using Duplicator Light 1.5.3.1. I will contact Developer Pro support.

    Plugin Support mohammedeisa

    (@mohammedeisa)

    Hi @colevalleygirl ,

    I’m closing here since you are already in contact with Duplicator Pro support.

    Please don’t hesitate to open a new ticket in you need help.

    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Installer.php fails with PHP error’ is closed to new replies.