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.
Have you tried adding the XAMP PHP version to your path (i.e. in your .bash_profile
or equivalent)?
export PATH=/opt/lampp/bin:$PATH
PS : don't forget to reload your shell afterwards