BASEPATH and $system_path |
I am now trying to debug my app on the remote Server. The last line of index.php is
require_once BASEPATH.'core/CodeIgniter.php'; With debugger I found out that BASEPATH is c:\xampp\htdocs\sub_crud\system (my local machine). I would not expect this since I am running the app on a remote server. Looking at APPPATH it is also pointing at my c:\drive. A few lines down in CodeIgniter.php I see * ------------------------------------------------------ * Load the global functions * ------------------------------------------------------ */ require_once(BASEPATH.'core/Common.php'); So by having BASEPATH and APPPath contain c:\xampp\htdocs\sub_crud\ etc instead of /opt/bitnami/apache2/htdocs/sub_crud, I am not loading the correct files from the server. Is this due to me running the debugger on my local PC? Or is it something more sinister? I have been trying to figure out why I am getting Severity: Warning Message: mysqli::real_connect(): (HY000/1045): Access denied for user 'root'@localhost (using password: YES) Filename: mysqli/mysqli_driver.php Line Number: 201 Backtrace: File: C:\xampp\htdocs\sub_crud\application\core\MY_Loader.php Line: 277 Function: database File: C:\xampp\htdocs\sub_crud\application\controllers\Configure.php Line: 23 Function: __construct File: C:\xampp\htdocs\sub_crud\index.php Line: 316 Function: require_once I have changed config/database.php. Where lese do I need to change CI to point at the server's CI system directories?
proof that an old dog can learn new tricks
Unless you changed your index.php file, these should automatically set to where files are hosted by index.php file.
if index.php loads on the local machine then that's where it will get the files from.
you would need to run the index.php on the remote server for it to work right. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Thanks. In my config.php on the server I have
$config['base_url']='http://localhost//'; should this be $config['base_url']='http://34.229.225.21//sub_crud' ?? Also I have $config['composer_autoload'] = TRUE; does this mean I should load Composer onto the server too?
proof that an old dog can learn new tricks
If it's your live server then it should be the http:// or https://
Local should be http://localhost/ If your going to use Composer yes then you should load it on to your server. I would check with them first because they may have already placed it there. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(09-05-2018, 03:11 AM)InsiteFX Wrote: if index.php loads on the local machine then that's where it will get the files from. My config.php contains */ $config['index_page'] = 'index.php'; Where do I tell it to use the index.php on the remote server?
proof that an old dog can learn new tricks
I went back to basics; making sure php is running on my server and also xdebug. when I type php -v in the Putty ssh window, I get:
Last login: Fri Sep 7 08:16:47 2018 from 69.124.178.164 bitnami@ip-172-26-10-99:~$ php -v Failed loading C:\xampp\php\ext/xdebug.so: C:\xampp\php\ext/xdebug.so: cannot open shared object file: No such file or directory PHP 5.6.36 (cli) (built: Apr 27 2018 22:46:36) Copyright © 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright © 1998-2016 Zend Technologies bitnami@ip-172-26-10-99:~$ But in my php.ini file I am pointing at a zend_debug [Xdebug] ;zend_extension = C:\xampp\php\ext\php_xdebug-2.5.4-5.6-vc11.dll zend_extension = xdebug.so xdebug.remote_enable=1 xdebug.remote_host=localhost xdebug.remote_port=9000 xdebug.remote_autostart=1 debug.remote_log="xdebug_log.txt" xdebug.idekey=XDEBUG_PHPSTORM ;xdebug.scream=1 ;xdebug.show_error_trace=1 ;xdebug.idekey="PHPSTORM" I can't understand why it is looking at c:\ at all?
proof that an old dog can learn new tricks
(09-05-2018, 03:11 AM)InsiteFX Wrote: if index.php loads on the local machine then that's where it will get the files from. Where do I specify the location of the index.php to use?
proof that an old dog can learn new tricks
You need to run the index.php from your server otherwise it will run the one on your local machine.
With phpStorm I can edit files etc; on my server. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(09-10-2018, 03:53 AM)InsiteFX Wrote: You need to run the index.php from your server otherwise it will run the one on your local machine.Are you saying that in phpStorm I need to specify Project files on the server? How do I do that? Although I have a SSH tunnel to the server, in my phpStorm project window it shows directory sub_crud C:\Xampp\htdocs\sub_crud .
proof that an old dog can learn new tricks
|
Welcome Guest, Not a member yet? Register Sign In |