Comments (5)
Hi @astorm,
Well done on the diagnostic !
A properly configured production server will not expose such a configuration, but it's a valid use case for a dev environment
Unfortunately, checking for the CLI PHP version is not a good idea, as it still not deterministic enough.
I can have several PHP installed on my dev environment with the same version (or compatible version) but with different configuration or even compile time options.
So I may suppose that my PHP 5.4.4 with my needed extension is used (because that's what I use for my web server), but instead the first PHP compatible version will be used (which could be the PHP 5.5 I'm using to test new stuff), and it will fail as well.
So your best solution is to set the PHP_PATH environment variable in your virtualhost to your PHP CLI path in order for the PhpExecutableFinder to use it.
I think some lines about that in the README.md will be welcomed ;)
I agree that "shelling out" (even if does not involve any shell) is almost always a bad idea, but there's some case on the plateform where it's useful, like in the BatchBundle, as we need to launch background processes for heavy import and export.
In the case of the installer, I'm not quite sure it's needed, as a Symfony2 Command can be executed from the webserver without launching an external process, as it's done at several locations in the platform.
from platform.
I agree something should go in the README about PHP_PATH
, but disagree the installer checks aren't needed.
If the system uses a particular command-line binary, it needs to check that the command line binary is compatible with what it wants to do.
In my particular case the lack of these installer checks led to an installation that seemed to install correctly, but led to a broken OroCRM installation. If I had been a regular user (and not already invested in the platform) I would have looked at that and said "guess this thing isn't fully baked yet" and not adopted the platform.
Just because a fully deterministic method of identifying which PHP needs to run doesn't mean additional heuristic wouldn't be useful.
from platform.
I didn't say that installer checks on proc aren't needed, I said there were not enough to have a valid PHP version.
Two things here:
- the installer should not execute external process and should use the Command object directly in the webserver process
- there's some valid case where external processes need to be spawn. In these cases, we need to be sure to execute the right PHP installation. And checking version is not enough, as it could break stuff as explained before
In fact, there's no way to automatically detect the right version of PHP CLI that needs to be used. So the installer should provide a configuration for the PHP CLI for the user to specify it.
It could pre-set the with the value found by the PhpExecutableFinder or from the PHP_PATH, and of course checked for version too.
from platform.
And a supplementary detail: it's totally possible to have a system with mod-php and without PHP CLI. In this case, the installer should warn the user.
Having a mandatory parameter with the PHP CLI path (and checks on existence and version) will solve this case as well.
from platform.
Hi, @astorm!
I've added two improvements related to this issue.
First one is environment variable to configure custom php path for console commands and second one is requirements check for console command. So when your cli version differs from web servers one we will check all requirements.
We will include both improvements in one of our nearest releases. Thanks!
from platform.
Related Issues (20)
- Symfony\Component\Process expects an array not a string. HOT 4
- DateTime filter does not show section for time on mobile HOT 1
- Missing and wrong regions for Italy country
- Package guzzlehttp/guzzle 7.4.4 suffers vulnerabilities CVE-2022-31090 and CVE-2022-31091. HOT 2
- Commmand oro:cron:integration:cleanup should exclude each connector per channel
- wrong render of item in CollectionType
- update Symfony Latest stable version: 6.1.4. HOT 1
- Wrong pagination when you move back or reload page DataGridBundle
- Command oro:maintenance:unlock send error when maintenance is already off HOT 1
- oro/platform-serialised-fields 5.0.2 should require oro/platform 5.0.8+
- OroEmailBundle can't send email with Amazon SES HOT 1
- oro/platform 5.0.9 vulnerable to CVE-2022-24894 and CVE-2022-24894. HOT 2
- Support https proxy
- [v5.1][EntityExtend] How to add interfaces, traits to ORO entities
- Cannot serialize Symfony\Component\Cache\Adapter\FilesystemAdapter HOT 1
- Cron Command is not registering if it has $defaultDescription field HOT 2
- oro/platform vulnerable to CVE-2023-46733 and CVE-2023-46734
- Sending email with EmailModelSender throws an error after the update to 5.1.3
- Install PHPCSFixer in Oro 6.0
- [ActivityListBundle] DataFixture Migration fails on platform update
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from platform.