2012-09-18 29 views
5

我試圖建立樣本Symfony2的項目如下所示 http://symfony.com/doc/current/quick_tour/the_big_picture.htmlSymfony2的設立

和訪問config.php文件後,我有這樣的:

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

我加了這一點:

suhosin.executor.include.whitelist="phar" 

進入php.ini,但config.php仍顯示相同的消息。

+0

您重新啓動服務器? – KingCrunch

+0

@KingCrunch確保 – Herokiller

回答

6

1)檢查你是否編輯了正確的php.ini,通常PHP安裝有幾個php.ini(一個用於CGI,一個用於CLI,一個用於APACHE2)。例如,看看/etc/php5

2)檢查phpinfo()是否考慮參數。

3)請參閱本博客文章: [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*.

該文中建議,確保了Suhosin安裝有

sudo apt-get install php5-suhosin 
+0

嘗試了這一切,它並沒有幫助 – Herokiller

+0

是什麼的phpinfo()說,大約了Suhosin包括白名單中? – Bgi

+0

它沒有說什麼 – Herokiller

0

我有這個問題,不得不重新啓動以下:

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

讓ini行變化可見

0

安裝了Suhosin包爲PHP後,

sudo apt-get install php5-suhosin 

在CLI,加入suhosin.ini和不php.ini中,在Debian中,下:/etc/php5/cli/conf.d/ suhosin.ini

suhosin.executor.include.whitelist="phar" 
1

我有同樣的問題。

你的所作所爲是正確的,因爲skonsoft說,你應該檢查是否已經安裝了Suhosin,然後在php.ini或conf.d添加「藥業」/suhosin.ini

我這樣做太和問題依然存在

我找到了解決辦法here,這是我的libxml2的問題

我現在已經解決了這個。

將其跟蹤到libxml2不兼容性。

似乎 /vendor/symfony/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php 不喜歡libxml2-2.6.22。升級到2.8.0已經修復了它 - 用 所需的PHP重新編譯來獲取新的libxml2。

希望這可以幫助別人!

我使用Debian 6

0

我曾在一個服務器的cPanel面臨這個問題。我做的是:

  • 重新安裝suhosin使用cPanel腳本/腳本/ phpextensionmgr卸載PHPSuHosin; /腳本/ phpextensionmgr安裝PHPSuHosin

  • 如果安裝正確,那麼你將得到類似

 
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 
  • 然後加入
     suhosin.executor.include.whitelist="phar"
    到/usr/local/lib/php.ini文件
  • 重新啓動Apache

它應該被修復.. !!!