dqxafj6830
2016-09-10 19:08
浏览 44
已采纳

无法在localhost上启动Symfony 2.7

I have a symfony frame work(v 2.7) on my Ubuntu 16.04, that i want to start on the XAMP local server by running this command in the framework's directory :

php app/console server:run

But when i run this in terminal, i get the following errors:

Warning: require_once(/opt/lampp/htdocs/WorkSpace/my-project/frameWork/app/bootstrap.php.cache): failed to open stream: No such file or directory in /opt/lampp/htdocs/WorkSpace/my-project/frameWork/app/console on line 10
PHP Fatal error:  require_once(): Failed opening required '/opt/lampp/htdocs/WorkSpace/my-project/frameWork/app/bootstrap.php.cache' (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/WorkSpace/my-project/frameWork/app/console on line 10

Fatal error: require_once(): Failed opening required '/opt/lampp/htdocs/WorkSpace/my-project/frameWork/app/bootstrap.php.cache' (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/WorkSpace/my-project/frameWork/app/console on line 10

After some research i thought that i should run composer update or/and composer install commands to generate the bootstrap cache file and fix the issues.

But once i installed composer globally and ran composer update in framework's directory, it seems that composer is using a php that is not in XAMP's folder(Although I have set my $PATH to /opt/lampp/bin).

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/curl.so' - /usr/lib/php/20151012/curl.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/mcrypt.so' - /usr/lib/php/20151012/mcrypt.so: cannot open shared object file: No such file or directory in Unknown on line 0
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for ahmedsamy/hype-mailchimp-bundle dev-master -> satisfiable by ahmedsamy/hype-mailchimp-bundle[dev-master].
    - ahmedsamy/hype-mailchimp-bundle dev-master requires ext-curl * -> the requested PHP extension curl is missing from your system.
  Problem 2
    - aws/aws-sdk-php 2.5.0 requires guzzle/guzzle >=3.7.0,<3.9.0 -> satisfiable by guzzle/guzzle[v3.7.0, v3.7.1, v3.7.2, v3.7.3, v3.7.4, v3.8.0, v3.8.1].
    - aws/aws-sdk-php 2.5.1 requires guzzle/guzzle >=3.7.0,<....

It says Unable to load dynamic library '/usr/lib/php ,whereas the php i want it to use is in lamps folder /opt/lampp/bin .

When i run which php it shows the correct php which XAMP is using.

So now i dont know how to tell composer to use the php in the lamp's folder and is the composer update is the fix for this issue in the first place.

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

相关推荐 更多相似问题