V8-archive: Error after fresh install

Created on 25 Sep 2019  Â·  5Comments  Â·  Source: directus/v8-archive

Bug Report

Steps to Reproduce

  1. git pull the API onto an Apache2 Server
  2. Follow manual/default installation Steps (making an api.php and boilerplating the DB)
  3. See error

Parse error: syntax error, unexpected 'ARRAY' (T_ARRAY) in /var/www/heimatvoll-api/api/src/core/Directus/Config/Schema/Schema.php on line 80

I tried it with a fresh boilerplate afterwards too but the error stays the same.
I also first had manually edited the api.php, and got the error, i deleted it, and tried it via commands. Same result.

Expected Behavior

Seeing something along these lines:
{"error":{"code":3,"message":"Unauthorized request"}}

Actual Behavior

Seeing this error when calling the API /
Parse error: syntax error, unexpected 'ARRAY' (T_ARRAY) in /var/www/heimatvoll-api/api/src/core/Directus/Config/Schema/Schema.php on line 80

Other Context & Screenshots

        Machine ID: 0f271d0350d94e188a7571ecd598cf54
           Boot ID: 81789752772840dba45e624f4da5a675
    Virtualization: kvm
  Operating System: Ubuntu 18.04.1 LTS
            Kernel: Linux 4.15.0-43-generic
      Architecture: x86-64

Technical Details

  • OS: see above
  • Web Server: Apache 2.4
  • PHP Version: PHP 7.3.0-2+ubuntu18.04.1+deb.sury.org+1
  • Database: mysql Ver 14.14 Distrib 5.7.24, for Linux (x86_64) using EditLine wrapper
  • Install Method: git clone -b build https://github.com/directus/api.git
bug

Most helpful comment

Yeah okay you are probably right, i just saw that there is an fpm on the server im sshing into; its using Version 5.6 of PHP instead of the CLI 7.3.

My bad guys, i will try to fix this. Sorry for making an Issue on this :')

At least i now know about what error i need to expect if php is too old :'D

All 5 comments

@edenprojectde - May I know the version of API which you have been used?
It seems like you are using v2.5.0. Kindly upgrade your API version with v2.6.0. It will not reproduce over there :)

I've seen this a few times, commonly the answer is "Oh it says it's 7.2+ but it was actually still 5.6... my bad". Please ensure this is actually correct. :eyes: Ensure you're checking the apache version and not CLI version or something.

Agree — maybe this will help: https://github.com/directus/api/issues/1315

Yeah okay you are probably right, i just saw that there is an fpm on the server im sshing into; its using Version 5.6 of PHP instead of the CLI 7.3.

My bad guys, i will try to fix this. Sorry for making an Issue on this :')

At least i now know about what error i need to expect if php is too old :'D

No problem! Thanks for following up. 😊

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andgar2010 picture andgar2010  Â·  3Comments

gitlabisbetterthangithub picture gitlabisbetterthangithub  Â·  3Comments

magikstm picture magikstm  Â·  3Comments

jwkellyiii picture jwkellyiii  Â·  3Comments

cdwmhcc picture cdwmhcc  Â·  3Comments