• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Domain with set to PHP v7.3.* in some cases using vendor PHP 7.0 from OS? [Ubuntu 16.04]

errorss

New Pleskian
Server operating system version
Ubuntu 16.04 LTS
Plesk version and microupdate number
18.0.32
I'm trying update my old application
(upgrade framework version from Laravel v5.4 to v8.* [Laravel v.8 require PHP 7.3])

So far domain was set to php v7.2.34,
after upgrade and upload code, I change domain php version to 7.3.27 in Plesk.
Application works.. alomost, because
sometimes I'm getting errors looks like it's using in some cases old(uncompatibile) version.

Is it even possible?
Maybe is this missconfiguration/overconfiguration?
 
It sounds very strange that the application mostly runs on the domain's PHP handler, but sometimes complains about an outdated PHP version. This should not be the case. It would be interesting to see the results of the troubleshooting, the error messages, etc. If this is difficult for you, contact Plesk technical support. They will investigate the problem directly on your server.
 
Strange, that's why I decided to ask.

Mostly this error made me think this way:
laravel.ERROR: syntax error, unexpected ')'
{
"exception":"[object] (ParseError(code: 0):
syntax error, unexpected ')' at /var/www/vhosts/domaiiin.com/httpdocs/vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php:740)

in that file we have trailing comma in function call (after parameters), it's look exactly:
public function pipeThrough($pipes)
{
return static::make($pipes)->reduce(
function ($carry, $pipe) {
return $pipe($carry);
},
$this, // <-here, comma after '$this'
);
}

this verification:
php Trailing comma test
says syntax is valid from php v7.3.

Is it change settings in Plesk web panel, applying it is enough to change php version? (it's seems to be)

Can I try/check/do something more before contacting with Plesk technical support?

Maybe:
-verify config for domain through ssh?
-update vendor php version?
-restart service?
-update Plesk? (it's now v.18.0.32 but it won't upgrade, 'some packages are installed but unconfigured' [linux-headers and similar three])
this unconfigured packages should not matter in this situation(my problems with php)?
 
Frist thing that comes to mind is to double check if are actually running PHP 7.3 for the domain. Just to be sure check both PHP version in PHP settings of domain and with script with for example phpversion().
 
phpversion() shows 7.3
Everything is OK right now.
I had to run composer dump-autoload to generate optimized autoload files on production environment.

A little strange because i think my dev machine overwrite some 'incomplette' of this files when I ran 1st request in Laravel
(fix/autogenerate/add missing paths to classes in 'bootstrap/cache/*' files)...

OK.. without getting into details:
it work's, if I will have a moment of time I will trace this action again, just to know HOW it happended and why errors looks like it was using PHP lower than 7.3

Thank you for your help!
 
Back
Top