3

I am a beginner to CakePHP, I just got a code of the project to make some minor changes into the project, but as I copy and paste the project files into my wamp server and changed my database constants according to my localhost, I got error and website site is not even loading properly no css no js.

I am using 2.5 CakePHP Version and 5.6 PHP version

The complete error message is

( ! ) Notice: Constant CAKE_CORE_INCLUDE_PATH already defined in C:\wamp64\www\cakephp2.5\app\webroot\index.php on line 64
Call Stack
#   Time    Memory  Function    Location
1   0.0007  242672  {main}( )   ...\index.php:0
2   0.0015  265256  require( 'C:\wamp64\www\cakephp2.5\app\webroot\index.php' ) ...\index.php:41
3   0.0015  265488  define ( )  ...\index.php:64

Thanks

Aram Grigoryan
  • 740
  • 1
  • 6
  • 24
Umair Mehmood
  • 514
  • 1
  • 11
  • 24

2 Answers2

0

You need to fix your .htaccess file on root .Check if exits

<IfModule mod_rewrite.c>
  RewriteEngine on
    RewriteBase /your folder path /
   RewriteRule   vendors/^$ vendors/        [L]
   RewriteRule   vendors/(.*) vendors/$1    [L]
   RewriteRule   ^$ app/webroot/            [L]
   RewriteRule   (.*) app/webroot/$1        [L]

</IfModule>
Azeem
  • 1
  • 1
0

I was receiving this error also, but it seems that it was a result of me not having the rewrite module enabled.

To enable this, issue the following command.

sudo a2enmod rewrite

then re-starting apache (sudo service apache2 restart)

This fixed it for me.

Rich S
  • 3,248
  • 3
  • 28
  • 49