cakephp - Cake PHP shows Internal Server Error 500 -


following cakephp code in index.php file. when runs on server, shows

internal server error 500

if (!defined('ds')) {     define('ds', directory_separator); }   if (!defined('root')) {     define('root', dirname(dirname(dirname(__file__)))); }  if (!defined('app_dir')) {     define('app_dir', basename(dirname(dirname(__file__)))); }  $vendorpath = root . ds . app_dir . ds . 'vendor' . ds . 'cakephp' . ds . 'cakephp' . ds . 'lib'; $dispatcher = 'cake' . ds . 'console' . ds . 'shelldispatcher.php'; if (!defined('cake_core_include_path') && file_exists($vendorpath . ds . $dispatcher)) {     define('cake_core_include_path', $vendorpath); }  if (!defined('webroot_dir')) {     define('webroot_dir', basename(dirname(__file__))); } if (!defined('www_root')) {     define('www_root', dirname(__file__) . ds); }  if (php_sapi_name() === 'cli-server') {     if ($_server['request_uri'] !== '/' && file_exists(www_root . $_server['php_self'])) {         return false;     }     $_server['php_self'] = '/' . basename(__file__); }  if (!defined('cake_core_include_path')) {     if (function_exists('ini_set')) {         ini_set('include_path', root . ds . 'lib' . path_separator . ini_get('include_path'));     }     if (!include 'cake' . ds . 'bootstrap.php') {         $failed = true;     } } else {     if (!include cake_core_include_path . ds . 'cake' . ds . 'bootstrap.php') {         $failed = true;     } } if (!empty($failed)) {     trigger_error("cakephp core not found. check value of cake_core_include_path in app/webroot/index.php. should point directory containing " . ds . "cake core directory , " . ds . "vendors root directory.", e_user_error); }  app::uses('dispatcher', 'routing');  $dispatcher = new dispatcher(); $dispatcher->dispatch(     new cakerequest(),     new cakeresponse() ); 

go app/config/core.php , change configure::write('debug',0); configure::write('debug',2);

visit same page detail error


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -