i'm trying put app production server using ibm bluemix. i'm on free tier , testing bluemix out. app built on laravel 4.2.
i created cleardb mysql database , edited database.php this
first added following lines top
<?php $services = json_decode(getenv('vcap_services'), true); $sqlcreds = $services['cleardb'][0]['credentials']; return array(...
then adjusted mysql configurations
'mysql' => array( 'driver' => 'mysql', 'host' => $sqlcreds['hostname'], 'database' => $sqlcreds['name'], 'username' => $sqlcreds['username'], 'password' => $sqlcreds['password'], 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', ),
i edited composer.json file migrate database while pushing project.
"scripts": { "post-install-cmd": [ "php htdocs/artisan clear-compiled", "php htdocs/artisan optimize", "php htdocs/artisan migrate --force" ], "post-update-cmd": [ "php htdocs/artisan clear-compiled", "php htdocs/artisan optimize" ], "post-create-project-cmd": [ "php htdocs/artisan key:generate" ] },
however when push project, following error;
[pdoexception] not find driver migrate [--bench[="..."]] [--database[="..."]] [--force] [--path[="..."]] [--package[="..."]] [--pretend] [--seed] script php htdocs/artisan migrate --force handling post-install-cmd event returned error [runtimeexception] error output: [pdoexception] not find driver migrate [--bench[="..."]] [--database[="..."]] [--force] [--path[="..."]] [--package[="..."]] [--pretend] [--seed] install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [--ignore-platform-reqs] [packages1] ... [packagesn] -----> composer command failed traceback (most recent call last): file "/tmp/buildpacks/php-buildpack/scripts/compile.py", line 51, in <module> .from_build_pack('lib/additional_commands') file "/tmp/buildpacks/php-buildpack/lib/build_pack_utils/builder.py", line 189, in extensions process_extension(path, ctx, 'compile', process, args=[self]) file "/tmp/buildpacks/php-buildpack/lib/build_pack_utils/utils.py", line 69, in process_extension success(getattr(extn, to_call)(*args)) file "/tmp/buildpacks/php-buildpack/extensions/composer/extension.py", line 420, in compile return composer.compile(install) file "/tmp/buildpacks/php-buildpack/lib/extension_helpers.py", line 154, in compile self._compile(install) file "/tmp/buildpacks/php-buildpack/extensions/composer/extension.py", line 173, in _compile self.run() file "/tmp/buildpacks/php-buildpack/extensions/composer/extension.py", line 305, in run *self._ctx['composer_install_options']) file "/tmp/buildpacks/php-buildpack/extensions/composer/extension.py", line 350, in run shell=true) file "/tmp/buildpacks/php-buildpack/lib/build_pack_utils/runner.py", line 109, in stream_output raise calledprocesserror(retcode, cmd) build_pack_utils.runner.calledprocesserror: command '<open file '<fdopen>', mode 'w' @ 0x7f738ce24810>' returned non-zero exit status 1 staging failed: buildpack compilation step failed failed buildpackcompilefailed
i'm pretty new bluemix , couldn't figure out problem yet. belive in stackoverflow community. appreciated :)
the error indicates pdo driver missing. may need enable php extension creating file .bp-config/options.json
in root of app , including extension in options.json file (and others required app):
{ "php_extensions": ["pdo", "pdo_mysql"] }
cf doc: http://docs.cloudfoundry.org/buildpacks/php/gsg-php-config.html#php-extensions
Comments
Post a Comment