简体   繁体   中英

errors while laravel 5.6.12 deployment on whm cpanel

I am deploying a laravel 5.5.12 app on WHM cpanel. As per laravel documentation ( https://laravel.com/docs/5.5/installation#server-requirements ) all the server requirements are okay: phpinfo(); results in following:

PHP >= 7.1.3
OpenSSL support enabled
PDO support enabled
Multibyte Support   enabled (mbstring)
Tokenizer Support   enabled
XML Support active
Ctype PHP Extension enabled
JSON PHP Extension  enabled

i have done following steps ( https://crescentke.com/uploading-laravel-5-to-cpanel-server/ )

  1. uploaded laravel folder to /home/mylaravel (except public and node_modules)
  2. uploaded public folder contents to /home/public_html
  3. changed permission of storage, vendor and bootstrap/cache to 777.
  4. changed following lines in /home/public_html/index.php

    require DIR .'/../mylaravel/bootstrap/autoload.php';

    $app = require_once DIR .'/../mylaravel/bootstrap/app.php';

  5. changed following line in /home/mylaravel/server.php

    require_once DIR .'/public_html/index.php';

  6. create a database and added a user to it will full rights, this database, user name are updated in /home/mylaravel/.env file

  7. updated the .env file with live server URL
  8. for storage folder link inside the public_html, created a php file inside pulic_html will following content and accessed it via URL to create the symlink

    symlink('/home/gfree/go4ree/storage/app/public','/home/gfree/public_html/storage');

NOW at last when i visit the webpage it gives http 500 error. in log file following log is created:

[11-Jun-2018 11:37:57 UTC] PHP Parse error:  syntax error, unexpected '?', expecting variable (T_VARIABLE) in /home/gfree/go4ree/vendor/symfony/finder/Comparator/NumberComparator.php on line 42
[11-Jun-2018 11:37:57 UTC] PHP Fatal error:  Exception thrown without a stack frame in Unknown on line 0

whats (on earth) left to do?

The errors appeared because of misunderstanding of laravel version, i have updated the question for any future reference or for some novice like me.

The following artisan command gives you the laravel framework version:

php artisan --version

visit this page to check the server requirements : https://laravel.com/docs/5.6/installation#server-requirements (please note the version)

just make sure the live server met all the prerequisites... rest of the steps of configuration are already stated in question...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM