JSON Error installing for the first time.

Version
3.13.3
Website URL
https://www.jeffrose.ca/photos
PHP version
7.0.33
Database driver
MySQL
Database version
5.7.26
Web browser
Chrome

jeffrose

Core license
License owner
Joined
Jan 6, 2018
Messages
13
Points
53
Location
Vancouver, Canada
Website
microsclae.pics
ğŸŽ¯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]
 

jeffrose

Core license
License owner
Joined
Jan 6, 2018
Messages
13
Points
53
Location
Vancouver, Canada
Website
microsclae.pics
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

  • Like
Reactions: Rodolfo

Rodolfo

Chevereto Developer
Chevereto Staff
Joined
Oct 7, 2008
Messages
15,519
Points
237
Location
Chevereto HQ
Website
rodolfoberrios.com
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
Joined
Jan 6, 2018
Messages
13
Points
53
Location
Vancouver, Canada
Website
microsclae.pics
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
Joined
Oct 7, 2008
Messages
15,519
Points
237
Location
Chevereto HQ
Website
rodolfoberrios.com
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