I've deployed ZF2 application in bluemix system. After deployment I reach
Not Found
The requested URL / was not found on this server. error.
After I've added .htaccess file:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^APP_HOST$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www.APP_HOST$
RewriteCond %{REQUEST_URI} !public/
RewriteRule (.*) /public/$1 [L]
And getting error:
Fatal error: Uncaught exception 'RuntimeException' with message 'Unable to load ZF2. Run php composer.phar install or define a ZF2_PATH environment variable.' in /home/vcap/app/htdocs/init_autoloader.php:53 Stack trace: #0 /home/vcap/app/htdocs/public/index.php(15): require() #1 {main} thrown in /home/vcap/app/htdocs/init_autoloader.php on line 53
I found A CloudFoundry Build Pack for PHP.. I also tried how there described, but no result.
I found the way to deploy any PHP Framework to Bluemix system. I've tested ZF2 and Yii2 frameworks. Add in
Create a htdocs folder. Move all generated project files into this newly created htdocs folder with the exception of these four files:
Create a new folder in the root of our application named .bp-config. Change directories into this folder and create a new filed named options.json. Within this file, include the following json snippet:
Please use zend framework buildpack instead:
https://github.com/zendtech/zend-server-php-buildpack-bluemix