Custom public folder - php

php

#1

Hi,
To run my php project type I need the accessability current folder is /public, how do I configure this?

Error :
Not Found
The requested resource / was not found on this server.

My Project :
http://dev.floppy.cat/temp/Model%20View%20Controller.zip

if I take me to the /public I have the following error: :

Warning: require(/home/ubuntu/workspace/core/Database/Database.php): failed to open stream: No such file or directory in /home/ubuntu/workspace/core/Autoloader.php on line 24 Call Stack: 1.6362 229656 1. {main}() /home/ubuntu/workspace/public/index.php:0 1.6876 251448 2. App\Controller\PostsController->__construct() /home/ubuntu/workspace/public/index.php:20 1.6876 251688 3. App\Controller\AppController->loadModel(???) /home/ubuntu/workspace/app/Controller/PostsController.php:11 1.6877 251888 4. App->getTable(???) /home/ubuntu/workspace/app/Controller/AppController.php:17 1.6899 262280 5. App->getDb() /home/ubuntu/workspace/app/App.php:29 1.6921 266608 6. spl_autoload_call(???) /home/ubuntu/workspace/app/App.php:35 1.6921 266656 7. Core\Autoloader::autoload(???) /home/ubuntu/workspace/app/App.php:35 1.6957 271168 8. require('/home/ubuntu/workspace/core/Database/MysqlDatabase.php') /home/ubuntu/workspace/core/Autoloader.php:24 1.6957 271424 9. spl_autoload_call(???) /home/ubuntu/workspace/core/Autoloader.php:6 1.6958 271464 10. Core\Autoloader::autoload(???) /home/ubuntu/workspace/core/Autoloader.php:6 Fatal error: require(): Failed opening required '/home/ubuntu/workspace/core/Database/Database.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/ubuntu/workspace/core/Autoloader.php on line 24 Call Stack: 1.6362 229656 1. {main}() /home/ubuntu/workspace/public/index.php:0 1.6876 251448 2. App\Controller\PostsController->__construct() /home/ubuntu/workspace/public/index.php:20 1.6876 251688 3. App\Controller\AppController->loadModel(???) /home/ubuntu/workspace/app/Controller/PostsController.php:11 1.6877 251888 4. App->getTable(???) /home/ubuntu/workspace/app/Controller/AppController.php:17 1.6899 262280 5. App->getDb() /home/ubuntu/workspace/app/App.php:29 1.6921 266608 6. spl_autoload_call(???) /home/ubuntu/workspace/app/App.php:35 1.6921 266656 7. Core\Autoloader::autoload(???) /home/ubuntu/workspace/app/App.php:35 1.6957 271168 8. require('/home/ubuntu/workspace/core/Database/MysqlDatabase.php') /home/ubuntu/workspace/core/Autoloader.php:24 1.6957 271424 9. spl_autoload_call(???) /home/ubuntu/workspace/core/Autoloader.php:6 1.6958 271464 10. Core\Autoloader::autoload(???) /home/ubuntu/workspace/core/Autoloader.php:6

Thank you


#2

Hi there, could it be that the following file is missing?


#3

Hi,
thanks, i did not seen.
How do I start the project “/public” and not “/workspace”


#4

This depends on your configuration. To Cloud9 it doesn’t matter if your project is in ~/workspace or something else as long as your service listens on the correct port.