• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

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