8000 Add check on 'exec' function in SymfonyRequirements · Issue #6357 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Add check on 'exec' function in SymfonyRequirements #6357

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rvanlaak opened this issue Dec 14, 2012 · 3 comments
Closed

Add check on 'exec' function in SymfonyRequirements #6357

rvanlaak opened this issue Dec 14, 2012 · 3 comments

Comments

@rvanlaak
Copy link
Contributor

Since version 2.2.0 the Finder component makes use of the php exec() function. This function often is disabled by providers (especially shared hosting providers). For me, this resulted in:

    ErrorException: Warning: exec() has been disabled for security reasons in 
    /public_html/dev/vendor/symfony/symfony/src/Symfony/Component/Finder/Shell/Shell.php line 61

The Shell.php file does have a TODO:

    // todo: find a better way (command could not be available)
    exec('command -v '.$command, $output, $code);

It would be usefull if the environment checking gets extended in order to make Symfony adoptable more easy. At my shared hosting the following features are disabled:

    system,exec,shell_exec,passthru,proc_open,proc_get_status,proc_nice,proc_terminate,dl,popen,pcntl_exec
@stloyd
Copy link
Contributor
stloyd commented Jan 4, 2013

This issue should be reported in proper project too.

@fabpot
Copy link
Member
fabpot commented Jan 25, 2013

I've just submitted a PR to workaround the issue for the Finder component as this is a BC break (see #6882), but frankly, just change to another hosting company ;)

@rvanlaak
Copy link
Contributor Author

but frankly, just change to another hosting company ;)

I agree with that, but in my opinion Symfony is a great and fast framework for people with shared hosting. If functions like exec() aren't required (as in guaranteed on the long term ;) ), this makes Symfony better adoptable by, for example in my case, a start-up company.

fabpot added a commit that referenced this issue Feb 4, 2013
fabpot added a commit that referenced this issue Feb 4, 2013
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #6882).

Commits
-------

b8ef96e [Finder] fixed regression in the Finder component (it was possible to use it without using exec before, closes #6357)

Discussion
----------

[Finder] fixed regression in the Finder component (it was possible to use it without using exec before, closes #6357)

| Q             | A
| ------------- | ---
| Bug fix?      | yes (fixed a BC break)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6357
| License       | MIT
| Doc PR        | n/a
@fabpot fabpot closed this as completed Feb 4, 2013
fabpot added a commit that referenced this issue Feb 4, 2013
* 2.2:
  fixed regression in the Finder component (it was possible to use it without using exec before, closes #6357)
  fixed a circular call (closes #6864)
  typo
  [Security] [Tests] added unit tests for the UserPasswordValidator class and made the validator service for the UserPassword constraint configurable.
  fixed wrong indentation
  tweaked previous commit
  [HttpKernel] Fix the URI signer (closes #6801)
  Add Arabic translations.
  [HttpKernel] fixed regression when rendering an inline controller and passing some objects  (closes #6822)
  [FrameworkBundle] fixed typo
  renamed some classes and Twig functions to more descriptive names (refs #6871)
  Classcollectionloader: fix traits + enhancements
  Fix a deprecated method call in the tests
  Update `composer.json` files: - to allow versions ~2.2 (>=2.2,<3.0) of Doctrine DBAL, ORM & Common - fixed Propel1 versions difference between main and bridge files - fixed Twig versions difference between main and bridge files - to allow versions ~1.11 (>=1.11,<2.0) of Twig - fixed Locale ext-intl version to accept all, not non-existing version
  Correct comment in NativeSessionStorage regarding session.save_handler
  [Security] Add PHPDoc to AuthenticationEvents
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
0