Cakephp project not loading

turn on xammp
sudo /opt/lampp/lampp start

cd to htdocs folder

composer create-project --prefer-dist cakephp/app donalds

navigating to 127.0.0.1/donalds
Fatal error: Uncaught Error: Class ‘Cake\Http\Server’ not found in /opt/lampp/htdocs/donalds/webroot/index.php:37 Stack trace: #0 {main} thrown in /opt/lampp/htdocs/donalds/webroot/index.php on line 37

I think you missed composer install after the create-project?

Hello,

I went into the htdocs folder and tried the new code as follows:

composer create-project composer install --prefer-dist cakephp/app testo

and i get this error

[Symfony\Component\Console\Exception\RuntimeException]
Too many arguments, expected arguments “command” “package” “directory” “ve
rsion”.

I guess I wasn’t clear.

composer create-project --prefer-dist cakephp/app donalds
cd donalds
composer install

But it seems that the install process is run by create-project, so never mind. :slight_smile:

Is there a .htaccess file and has modrewrite been installed in php?

I do not believe so. Would that be something i have to create manually?

Hi Gordon

I am no expert at this but have had a few trial installs that had problems. On install composer would normally create a .htaccess file so check that there is one in the webroot. This URL: https://docs.bolt.cm/3.6/howto/making-sure-htaccess-works will explain better than me :slight_smile:

I will give it a try thank you