phpzend-frameworkskeleton-code

Blank pages when running the ZendFramework 2 skeleton application


I am trying to run the ZendFramework 2 skeleton application locally. I am new to this framework.

After creating a PHP5 application on Openshift using instructions available here, I cloned it locally and unzipped the Zend Skeleton application into it. I had Composer install dependencies via Netbeans.

As mentioned in the Zend instructions, I went to my public directory and started the built-in server:

cd public
php -S localhost:8888

When I open http://localhost:8888/ or http://localhost:8888/public, I get a blank page. When I open http://localhost:8888/public/index.php, I get a nice page with an error message:

The requested resource /public/index.php was not found on this server.

It is surely some configuration issue, but I don't know which. Anyone knows what is happening?


Solution

  • Only guessing, but it would appear you are running the server from within the public directory. I'm assuming that you don't have a public/public directory and so http://localhost:8888/public won't exist. http://localhost:8888 will be the index page from the public folder. As for the blank page, check your error logs. You likely have display_errors turned off and so it throws a 500 error instead of displaying the error.