尝试在Symfony 2中生成捆绑时终端中的错误消息

时间:2014-09-06 09:35:21

标签: php symfony

我正在学习Symfony 2,并且公平地说,这个问题可能看起来非常基础。我刚开始时遇到麻烦 - 我怀疑我的Symfony项目或我在PHP中的配置存在配置问题。当我输入php app / console时,这是我得到的错误。我似乎无法做任何事情,例如生成包。如果有人能够至少给我一些指导,从哪里开始这个错误,我将不胜感激。我是菜鸟。

    unknown-ec:35:86:4d:41:5e:symfonyTest simonalice$ php app/console
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-     non-zts-20090626/php_mysql.dll' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-  20090626/php_mysql.dll, 9): image not found in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug- non-zts-20090626/php_mysqli.dll' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20090626/php_mysqli.dll, 9): image not found in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20090626/php_pdo_mysql.dll' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20090626/php_pdo_mysql.dll, 9): image not found in Unknown on line 0



    [Symfony\Component\Debug\Exception\ContextErrorException]                    
    Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or  
   the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/London' for 'BST/1.0/DST' instead in /Applications/MAMP/htdocs/symfonyTest/vendor/monolog/monolog/src/Monolog/Logger.php line 233    

查看我的phpini()文件....

;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
;
; If you wish to have an extension loaded automatically, use the following
; syntax:
;
;   extension=modulename.extension
;
; For example, on Windows:
;
;   extension=msql.dll
;
; ... or under UNIX:
;
;   extension=msql.so
;
; Note that it should be the name of the module only; no directory information 
; needs to go here.  Specify the location of the extension with the
; extension_dir directive above.


; Extensions

extension=apcu.so
extension=imap.so
extension=gettext.so
extension=mcrypt.so
extension=yaz.so
extension=pgsql.so
extension=pdo_pgsql.so
extension=pdo_mysql.so

;extension=imagick.so
;extension=tidy.so

然而,通过这个设置,当我输入php app / console

时,我仍然收到错误消息

此时让我疯了......

1 个答案:

答案 0 :(得分:3)

你应该检查你的php.ini文件中是否有任何未注释的行,例如在动态扩展部分下的extension =。 extension=php_mysql.dll 活动扩展名不应以';'

开头

尝试添加这些行

extension=php_pdo_mysql.dll
extension=php_mysql.dll
extension=php_mysqli.dll

PS:我不是Mac用户,但这可以帮助你forum.mamp.info/viewtopic.php?t=4886