0

I have a php project which I want to test on localhost. I was suggested to use a no-ip domain name. I've done that and using this tutorial

and now I have a directory with a name same as the domain name on localhost. The project was previously connected a similar no-ip domain name(I wasn't present at that time) but then it expired and I'm setting it up again.

I have replaced every instance of the previous no-ip domain name in the code base with the no-ip domain name that I created and changed the project's Run Configurations in NetBeans but when I navigate to the domain name I don't see the obvious changes I've made in the development code.

When I test the connection it succeeds and when I save changes the Remote Log say that the changes have been saved and that the file has been received. When I navigate to localhost/shhasan.ddns.net I get a database error which points to Loader.php. I've checked Database.php and its the same setup which has worked before as the username, password, hostname is consistent with those on phypmyadmin. I've been stuck at this issue for 2 days now I would really appreciate help.

shhasan
  • 453
  • 2
  • 9
  • 21
  • I couldn't post images due to low reputation so here they are. Database.php: http://imgur.com/sVN6oeB Loader.php: http://imgur.com/Q63s1bO Localhost error: http://imgur.com/0wlkWHt Localhost: http://imgur.com/J7wWFia NetBeans project Run Configurations: http://imgur.com/npEF47c http://imgur.com/YpvrTFo – shhasan Sep 04 '14 at 15:59
  • You can still add the codes to your original question without relying on images. Indenting the codes 4 spaces will auto-format them for easy reading. http://stackoverflow.com/editing-help#code – ivan.sim Sep 04 '14 at 16:44

1 Answers1

0

Your Loader.php is looking for a database/DB.php, but you only have a database.php.

ivan.sim
  • 8,972
  • 8
  • 47
  • 63
  • DB.php is a different file which exists. I took the image of Database.php to know if I'm making an error in that file. I'm certain that there is no error in DB.php because it's working fine in production. – shhasan Sep 04 '14 at 16:44
  • What are the values of `$params` in your `Loader.php`? – ivan.sim Sep 04 '14 at 16:56
  • $params is set to NULL – shhasan Sep 04 '14 at 17:01
  • @shhasan Doesn't your `database()` function depends on that variable for database settings? Where is it supposed to come from? `database.php`? – ivan.sim Sep 04 '14 at 17:05
  • It's solved. The code was working fine. I just had to remove localhost from the project url in NetBeans project Run Configuration. Thank you for your help @isim! – shhasan Sep 04 '14 at 19:33