-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in Codeigniter #58
Comments
What is the error message? |
im so gratefull for your response... i had no Error message now... really failed to run try { } and its go to catch ... |
You can output the exception for more details. It sounds like there is an input rule in the filters that prevents API connectons. By default, MikroTik devices have a rule blocking all incoming connections from the internet. Maybe it's that. |
i work it from my PC windows 10 with XAMPP v3.2.4... Userman server @ VPS with Static IP Public... i think, my problem in this area... default structure codeigniter new library class must be load from 'autoload.php' file : /public_html/application/libraries/PEAR2 but, Error : Unable to load the requested class: PEAR2\Autoload and once again, its work in localhost but failed at website host.... i was try to change / slash or \ backslash, or uppercase and lowercase... all cant work |
Check APPPATH and what the full path ends up as. I suspect it might not end with a slash on your VPS, but end with a slash locally. If you add a slash before "libraries", it should work regardless of whether there's a slash. |
File position : if i write : require_once(APPPATH.'application/libraries/PEAR2/Autoload.php'); it will be failed even in the localhost |
I meant you should check the APPPATH in the VPS, since that's where the problem is. The full path that ends up in the require_once may be wrong there, but correct on localhost. The class names begin the same way (with "PEAR2") no matter the files' location. |
Succed at Localhost... but Failed to Connect at real Host... Userman use VPS...
Controller :
`function __construct(){
parent::__construct();
require_once(APPPATH.'libraries/PEAR2/Autoload.php');
}
function pelanggan_edit(){
try {
$util = new PEAR2\Net\RouterOS\Util($client = new PEAR2\Net\RouterOS\Client('103.xxx.xxx.xxx', 'user', 'password'));
} catch (Exception $e) {
// mengalihkan halaman ke halaman data pelanggan
redirect(base_url().'admin/pelanggan/data?alert=gagal_konek_userman');
}
}`
The text was updated successfully, but these errors were encountered: