5

I'm trying to set up sample Symfony2 project as shown here http://symfony.com/doc/current/quick_tour/the_big_picture.html

and after accessing config.php I have this:

Major problems have been detected and must be fixed before continuing:
Add "phar" to suhosin.executor.include.whitelist in php.ini*.

I added this:

suhosin.executor.include.whitelist="phar"

into php.ini, but config.php still show the same message.

lonesomeday
  • 233,373
  • 50
  • 316
  • 318
Herokiller
  • 2,891
  • 5
  • 32
  • 50

5 Answers5

6

1) Check that you edited the correct php.ini, usually a PHP installation has several php.ini (one for CGI, one for CLI, one for APACHE2). Have a look in /etc/php5 for instance.

2) Check in phpinfo() that the parameter is taken in account.

3) Refer to this blog post: [Solved] symfony 2 Major problems Major problems have been detected and must be fixed before continuing: Add “phar” to suhosin.executor.include.whitelist in php.ini*.

The post suggests ensuring suhosin is installed with

sudo apt-get install php5-suhosin
Paul Dixon
  • 295,876
  • 54
  • 310
  • 348
Bgi
  • 2,513
  • 13
  • 12
  • What does phpinfo() says about suhosin include whitelist ? – Bgi Sep 19 '12 at 09:20
  • it's standart php.ini, I didn't change anything – Herokiller Sep 19 '12 at 10:31
  • Where did you add `suhosin.executor.include.whitelist="phar"` then ? – Bgi Sep 19 '12 at 10:32
  • I mean this is the only thing I've added there – Herokiller Sep 19 '12 at 10:34
  • Then your php.ini is probably not correctly configured................ And it's not - anymore - the standard php.ini. – Bgi Sep 19 '12 at 10:37
  • Check the `suhosin.executor.include.whitelist` is not there twice in the php.ini – Bgi Sep 19 '12 at 10:37
  • And check in phpinfo() that you're editing the correct php.ini file. – Bgi Sep 19 '12 at 10:38
  • php.ini is correct, and suhosin.executor.include.whitelist is not twice there. – Herokiller Sep 19 '12 at 10:40
  • Check suhosin is installed, like he does here : http://www.nitesh.com.np/php/solved-symfony-2-major-problems-major-problems-have-been-detected-and-must-be-fixed-before-continuing-add-phar-to-suhosin-executor-include-whitelist-in-php-ini/ – Bgi Sep 19 '12 at 10:41
  • thank you, that helped. Why did symphony ask for whitelist, when suhosin is not even installed? – Herokiller Sep 19 '12 at 10:53
  • Maybe this is a Symfony dependency or something like that depending on the OS of the server. I don't know for sure. – Bgi Sep 19 '12 at 12:33
  • 1
    +1 to you - sudo apt-get install php5-suhosin did it for me. Have amended the answer to make this clear. – Paul Dixon Mar 14 '13 at 11:45
1

I had the same problem.

What you did is right, as skonsoft says you should check if you have installed suhosin and then add "phar" in your php.ini OR conf.d/suhosin.ini

I did this too and the problem persisted

I found the solution here, it was a problem with my libxml2 library

I have now solved this.

Tracked it down to a libxml2 incompatibility.

Seems that /vendor/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php doesn't like libxml2-2.6.22. An upgrade to 2.8.0 has fixed it - with the required PHP recompile to pick up the new libxml2.

Hope this helps someone!

I'm using Debian 6

Ulises
  • 61
  • 1
  • 2
0

I had this problem and had to restart following:

/etc/init.d/php-fcgi-vhost-name restart

to get ini line change visible

pedja
  • 121
  • 1
  • 2
0

After installing suhosin package for php,

sudo apt-get install php5-suhosin

For cli, add in suhosin.ini and not php.ini, in debian, under: /etc/php5/cli/conf.d/suhosin.ini

suhosin.executor.include.whitelist="phar"
skonsoft
  • 1,786
  • 5
  • 22
  • 43
0

I had faced this problem in a cPanel server. What i did is:

  • reinstalled suhosin using cPanel script /scripts/phpextensionmgr uninstall PHPSuHosin; /scripts/phpextensionmgr install PHPSuHosin

  • If the installation was correct then you will get something like

find . -name \*.gcno -o -name \*.gcda | xargs rm -f
find . -name \*.lo -o -name \*.o | xargs rm -f
find . -name \*.la -o -name \*.a | xargs rm -f 
find . -name \*.so | xargs rm -f
find . -name .libs -a -type d|xargs rm -rf
find . -name \*.1 | xargs rm -f
rm -f libphp.la   modules/* libs/*
SuHosin extension, version suhosin-0.9.36, activated for php version 5.4
  • Then add
     suhosin.executor.include.whitelist="phar"
    into /usr/local/lib/php.ini file
  • Restart Apache

It should be fixed..!!!

Sudheesh
  • 16
  • 2