2

1 and I've uploaded all the files onto the file server that I am using 000webhost.com however Im having a few problems with the modrewrite I keep getting re-directed to http://error404.000webhost.com/? Does anyone know how to setup cakephp 2.1 on a shared area??

Im getting this error now: Fatal error: Call to undefined function pluginsplit() in /home/a4300629/public_html/lib/Cake/Cache/Cache.php on line 151 not really sure how this error has come about, any ideas?

Thanks in advance.

Francisco Presencia
  • 8,732
  • 6
  • 46
  • 90
user0129e021939232
  • 6,205
  • 24
  • 87
  • 140
  • Need more specifics on how you've tried setting it up. There are a lot of tutorials online (and some on StackOverflow) that show how to set it up on shared hosting - so we need more info to figure out where YOUR problem is. – Dave Jun 28 '12 at 15:22
  • @Dave right initially i thought it was a modrewrite error but now im not too sure as i found that a lot of files were missing from my directory and Ive got all the files in there now but Im getting this error now... `Fatal error: Call to undefined function pluginsplit() in /home/a4300629/public_html/lib/Cake/Cache/Cache.php on line 151` not really sure how this error has come about...any ideas? – user0129e021939232 Jun 28 '12 at 15:54
  • you're not going to make me repeat the exact same comment I already made, are you? – Dave Jun 28 '12 at 15:55
  • That is literally all I've done, I changed the mod rewrites to this http://stackoverflow.com/questions/1334746/htaccess-for-cakephp and then I got thrown an inflector class missing error which led to find out some files were missing then I uploaded the missing files and now Im getting this `error: Call to undefined function pluginsplit() in /home/a4300629/public_html/lib/Cake/Cache/Cache.php on line 151` dont really know what specific details you require thats all i can say as thats all ive done :S – user0129e021939232 Jun 28 '12 at 16:12
  • I've set up Cake (1.3 - 2.2) on 4 different shared hosts, and have never had to modify modrewrite. Not saying your host isn't different, but - I'd try without modifying first. – Dave Jun 28 '12 at 16:18

2 Answers2

2

Right I've figured it out, I followed the .htaccess instructions on this site. http://www.000webhost.com/forum/web-programming/29628-help-cake-php-install.html But firstly I deleted all the files and re-uploaded and this still didn't work until I used this .htaccess method.

Hope this helps anyone else who has this problem.

user0129e021939232
  • 6,205
  • 24
  • 87
  • 140
1

After research on cakephp tutorial, which come to setting cakephp on shared hosting and it will work :)

  • move app, cake, plugins, vendors folder into your hosting root folder. It is user root folder on your hosting
  • delete .htaccess and index.php on cakephp root folder
  • move /app/webroot/. to /public_html folder
  • delete empty /app/webroot folder
  • edit /public_html/index.php to point to the ‘cake’ and ‘app’ directories. For example my public_html path for my domain is /home/username/public_html, so i point
  • ROOT to look at /home/username
  • APP_DIR to look at /home/username/app
  • CAKE_CORE_INCLUDE_PATH to look at /home/username/cake
  • edit this line on /public_html/index.php with your appropriate path

/** * The actual directory name for the "app". * Edited By Siraj */ if (!defined('APP_DIR')) { define('APP_DIR', basename(dirname(dirname(FILE))) . DS .'public_html' . DS .'app');

}

/// START --- Edited By Siraj

if (!defined('CAKE_CORE_INCLUDE_PATH')) { if (function_exists('ini_set')) { ini_set('include_path', '/home' . DS . 'username' . DS . 'public_html' . DS . 'lib' . PATH_SEPARATOR . ini_get('include_path')); //define('CAKE_CORE_INCLUDE_PATH', 'home' . DS . 'username' . DS . 'public_html' . DS . 'lib'); } if (!include ('/home' . DS . 'username' . DS . 'public_html' . DS . 'lib' . DS .'Cake' . DS . 'bootstrap.php')) { $failed = true; } } else { if (!include ('/home' . DS . 'username' . DS . 'public_html' . DS . 'lib' . DS . 'Cake' . DS . 'bootstrap.php')) { $failed = true; } }

//// END

  • The only .htaccess i have on /home/username/public_html, the setting for .htaccess look like this

RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]

Siraj Khan
  • 2,328
  • 17
  • 18