TagCakePHP

CakePHP 3 – Remove subfolder from URLs

With CakePHP, the primary and easiest way is to install it via composer. As specified in the CakePHP installation instructions.

If you follow those instructions, you’ll end up with a subfolder in your public HTTP folder of your hosting. And even if you try to create the project directly in your main, public HTTP folder of your hosting, composer won’t do it because the folder may not be empty.

Continue reading

Install WHMCS in CakePHP (Invalid Token)

Installing WHMCS into CakePHP┬ámay give you an “Invalid Token” error as you try to perform tasks in the admin dashboard.

You may search online and find several discussions regarding PHP sessions which is true but not entirely. Some suggest changing the session’s name with PHP session_name('WHMCS'); in the configuration.php file. The real problem is with the rewrite base caused by CakePHP’s parent .htaccess file in the root.

Continue reading

CakePHP: Create Custom Component

CakePHP includes some components which you can use to do specific tasks within your controllers but it may not be sufficient and you may want to create your own component.

Creating your own CakePHP component is quick and easy. I’ll use a currency conversion component here as an example.

Continue reading

© 2017 Contrid

Theme by Anders NorénUp ↑

Pin It on Pinterest