CodeIgniter Forums
Installation on Godaddy VPS Server Linux Cpanel - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9)
+--- Thread: Installation on Godaddy VPS Server Linux Cpanel (/showthread.php?tid=76240)



Installation on Godaddy VPS Server Linux Cpanel - paritoshbag - 04-24-2020

Hi,

we have tried to use CI 4.0.2 on Godaddy VPS Server, Linux, CentOS, Apache, Cpanel
We have tried using subdomain :

hope.techimpace.com
subdomain target : public_html/hope/public
project installed on : public_html/hope

Its working fine, but Controllers on subdirectory is not working, but we have tested the same on local xampp platform, its working fine. For subdirectory we have used subdirectory based namespace;

Example : 
Directory: Controllers/cloud/Test.php
used namespace : namespace App\Controllers\cloud;

Its giving a 404 error
Controller or its method is not found: \App\Controllers\Cloud::test

What is the solution?


RE: Installation on Godaddy VPS Server Linux Cpanel - jreklund - 04-24-2020

You can find instruction on how to install it on shared hosting with Cpanel here:
https://forum.codeigniter.com/thread-75958-post-373901.html#pid373901

You should not place it inside a subfolder to public_html.

Change this:
Directory: Controllers/cloud/Test.php
used namespace : namespace App\Controllers\cloud;

To this:
Directory: Controllers/Cloud/Test.php
used namespace : namespace App\Controllers\Cloud;

All folder and files need to be capitalized.

You are trying example.com/cloud when you should be using example.com/cloud/test as you placed in a subfolder.
\App\Controllers\Cloud::test