Guys iam sticking into a problem.
i have a domain xyz.com in cpanel with version php 7.3 inherited.
i have two folders in that xyz.com.
that is xyz.com/hotel -> this is for my hotel project and xyz.com/school ->school project.
in this
xyz.com/hotel -> Laravel Framework 5.4.36 version
xyz.com/school ->Laravel Framework 5.8.33 version
everything is fine. 2 days back i faced a problem. that images cant be uploaded in school project that is xyz.com/school in this. when i checked i saw the below error
Refer : https://imgur.com/im4ct1h
PHP Fileinfo extension must be installed/enabled to use Intervention Image
i refereed in google and i got the answer that to enable the fileinfo in cpanel. i dont have that updation in my cpanel. so chatted with my cpanel support and said them to enable the fileinfo. they made some changes in php.ini file and then informed me. now the site worked fine. images uploaded correctly.
but i faced another problem in my xyz.com/hotel project, because they changed the php version of that xyz.com to 7.3 version not inherited.
the problem i faced in xyz.com/hotel is
Refer: https://imgur.com/4uUHiY4
compact(): Undefined variable: operator
iam facing this problem when taking reports in the hotel project. but all other modules works fine. when i didnt use any comapct() variable or term related to compact in my report controller.
whats the problem????
when i googled it i found the solution that need to update laravel version more than 5.4. but how can i update my laravel version of my hotel project which is in live??
what should i do.?
when i asked my support the gave an explanation that
Now your application (xyz.com) works on 7.3 inherit
Now what inherit does is it takes default server values
Php 7.3 inherit takes the default settings of the server
And PHP 7.3 allows you to edit the values
So when you use 7.3 it takes the value I set in php.ini
Now if it takes the value from php.ini then your extension Fileinfo gets active
But your other website needs default configuration
So it starts to throw error
Now what you can do is.
When ever you want to upload the file
to your application.
Just temporarily change the PHP version
Upload the files
And then revert it back
the above is the explanation given by my support. i cant understand anything.
now what i thought is may be the hotel project is in lower version 5.4 so if we update that the compact error my vanish. is this right??
Kidny some one suggest an idea please.