Setup Laravel Project
I'm trying to set up a laravel project as a subdomain on cpanel but I'm getting parsing issues, and an error.
These are the steps I've done so far
And when I go to the subdomain encuestas.un.ac.cr this is the error I get
I'm not sure if this is relevant but I suspect the php versions are the problem, in cpanel I have set the php version of this domain to PHP 7.1 (ea-php71) and these errors still persist, however the PHP System Default is set as 5.6 (I don't know how to change it). This was the solution I found online for the parsing errors but this hasn't worked. I'm completely lost as to what could be happening or how to fix it? EDIT: when doing composer update this is the result
- zip the project and upload it to this directory public_html/encuestas
- unzip and move contents to the directory above
- get ssh access with PuTTY and cd into the directory
- do this command in PuTTY composer install --ignore-platform-reqs
vc@un.net [~/public_html/encuestas]# composer install --ignore-platform-reqs
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
Parse error: syntax error, unexpected '?' in /home/vc/public_html/encuestas/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php on line 500
And when I go to the subdomain encuestas.un.ac.cr this is the error I get
Declaration of Symfony\Component\Translation\TranslatorInterface::setLocale($locale) must be compatible with Symfony\Contracts\Translation\LocaleAwareInterface::setLocale(string $locale)
I'm not sure if this is relevant but I suspect the php versions are the problem, in cpanel I have set the php version of this domain to PHP 7.1 (ea-php71) and these errors still persist, however the PHP System Default is set as 5.6 (I don't know how to change it). This was the solution I found online for the parsing errors but this hasn't worked. I'm completely lost as to what could be happening or how to fix it? EDIT: when doing composer update this is the result
vc@un.net [~/public_html/encuestas]# composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- This package requires php ^7.1.3 but your PHP version (5.6.40) does not satisfy that requirement.
Problem 2
- barryvdh/laravel-dompdf v0.8.5 requires php >=7 -> your PHP version (5.6.40) does not satisfy that requirement.
- barryvdh/laravel-dompdf 0.8.x-dev requires php >=7 -> your PHP version (5.6.40) does not satisfy that requirement.
- barryvdh/laravel-dompdf v0.8.5 requires php >=7 -> your PHP version (5.6.40) does not satisfy that requirement.
- Installation request for barryvdh/laravel-dompdf ^0.8.5 -> satisfiable by barryvdh/laravel-dompdf[0.8.x-dev, v0.8.5].-
If you go to WHM>>Software>>MultiPHP Manager you can set the system default for PHP there. The documentation here: How to Set Up PHP Composer | cPanel & WHM Documentation may be helpful in diagnosing common issues but really what I see the issue being is composer is seeing the system default ini file rather than the correct one which can be fixed by updating the path I'd assume 0 -
you should update your php version, after that run "composer clearcache" and "composer update" 0
Please sign in to leave a comment.
Comments
2 comments