JSON Error installing for the first time.

jeffrose

Core license
License owner
🎯Description of the issue

During a new install of 3.13.3, the installation fails with an error: Unexpected token < in JSON at position 0, during the Creating app/settings.php file step.

▶🚶‍Reproduction steps
  1. I downloaded installer.php from the site and ran it.
  2. Digital Ocean: PHP 7.0.33-0ubuntu0.16.04.5 with Apache
  3. Apache/2.4.18 (Ubuntu)
😢Unexpected result

2385

📃Error log message

[Provide any relevant error log entry. You may check our documentation for help on this]
 

Rodolfo

Chevereto Developer
Chevereto Staff
Can you paste the contents of the installer error log file? You will find it in the same folder where you placed the installer.
 

jeffrose

Core license
License owner
Thanks for the reply Rodolfo, sorry for the delay in getting back.

There was no log file, so I deleted all the content and reinserted the installer.php and ran it again this morning. Same result, but no log file.

I may go the manual installer route if you don't have any suggestions. Not a big deal.
 

Attachments

Rodolfo

Chevereto Developer
Chevereto Staff
When you run the installer, it attempts to use its own error log file. If it can't do that is because your server isn't allowing to set the error_log file. In that case, check the main error_log file generated by your server.

By the way, I didn't added a error handler for the installer, so anytime PHP fails to do something, the return is not JSON and that's why JS prints that to the screen.

This is how the installer sets how it will handle error reporting:

PHP:
$phpSettings = [
    'error_reporting' => E_ALL ^ E_NOTICE,
    'log_errors' => true,
    'display_errors' => true,
    'error_log' => __DIR__.'/installer.error.log',
    'time_limit' => 0,
    'default_charset' => 'utf-8',
    'LC_ALL' => 'en_US.UTF8',
];
 

jeffrose

Core license
License owner
There's only 1 line added to the error log when it runs:

Code:
/home/jeffrose/public_html/photos/.htaccess: Option FollowSymLinks not allowed here, referer: https://jeffrose.ca/photos/installer.php
There's something on Digital Ocean I read about why the FollowSymLinks isn't allowed or how to allow it, but I can't remember where I saw that. If this is the core of the problem, then I can research it further.
 

Rodolfo

Chevereto Developer
Chevereto Staff
In any case, neither the installer or the manual install will work for you because your vhost settings don't allow FollowSymLinks.

To get it working, you need to to manual install and remove this from .htaccess

Code:
Options +FollowSymLinks
 

jeffrose

Core license
License owner
Thanks. I'll try that. Removing it after the auto-install obviously doesn't work.

I have other servers I can use too, that might be the route I'll take.
 
Top