Composer escapeshellarg() has been disabled for security reasons
Asked Answered
P

2

6

Hey I have a server on linode.com (Centos 7). I installed cpanel and composer in my server, when I run this command (via ssh) for creating a blank symfony project,

composer create-project symfony/framework-standard-edition '~2.6'

It outputs this:

Installing symfony/framework-standard-edition (v2.7.4)
  - Installing symfony/framework-standard-edition (v2.7.4)
    Downloading: 100%         



  [ErrorException]                                         
  escapeshellarg() has been disabled for security reasons  

How can i fix this?

I don't have much knowledge on server moreover it's my first server, if it's because of cpanel I think it will do it again and again in future, is cpanel an obstruction for me?

Polypody answered 9/9, 2015 at 10:2 Comment(1)
You might consider posting the solution as an answer and accept it.Andreeandrei
P
6

I fixed it by editing my php.ini file.

You can find your php.ini location with this command:

php -i | grep "Loaded Configuration File"

I searched escapesshellarg, and found it in disable_functions=. I deleted it from disable_functions and that fixed it.

Polypody answered 21/9, 2015 at 18:19 Comment(0)
C
2

You can use php -n, no php.ini file will be used.

Enabling escapeshellarg could be a security problem with mod_php or php-fpm.

Cheongsam answered 21/6, 2016 at 16:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.