kwandoa Posted April 11, 2013 Share Posted April 11, 2013 Hi My registration site works fine on my local server BUT as soon as I go onto a live server http://www.biz.nf/ things start getting interesting. I cannot quite figure out how to get the url right that defines my MYSQL constant. my local sever settings looks like this define ('MYSQL', 'C:\EasyPHP\www\\mysqli_connect.php'); on the live server at http://www/kwandoa.co.nf , I define it like this define ('MYSQL', 'http:\www\kwandoa.co.nf\\mysqli_connect.php'); and it does not recognize it. Could anybody point me in the right direction please Regards Link to comment Share on other sites More sharing options...
HartleySan Posted April 11, 2013 Share Posted April 11, 2013 If it's outside the web root (which is advisable), then you have to specify the constant based on your server configuration. In other words, you should be able to get the info from your web hosting company, if you can't get it yourself. If your web hosting company provides you with a cPanel, then the path to your folder on the server should be listed under "Home Directory" in the sidebar on the left on the cPanel. Link to comment Share on other sites More sharing options...
kwandoa Posted April 12, 2013 Author Share Posted April 12, 2013 so...if they gave you a path of say DB Host: fds2.biz.nf would I define something like this define ('MYSQL', 'http:\www\fds2.biz.nf\kwandoa.co.nf\\mysqli_connect.php'); Link to comment Share on other sites More sharing options...
HartleySan Posted April 12, 2013 Share Posted April 12, 2013 Not quite. The local path should look like (most likely) a UNIX/Linux path (i.e., one without http or www, etc.). For example, if your domain is www.fds2.biz.nf, then your local path might be something like: /home/fds2/ And the path to your web root might be something like the following: /home/fds2/public_html/ The actual path depends on a lot of things and ultimately how your web hosting company has set things up, but you'll need that path to place files outside the web root. Link to comment Share on other sites More sharing options...
kwandoa Posted April 12, 2013 Author Share Posted April 12, 2013 Thank you San but i am not getting it right so I just moved it to another folder within my site and it works ok now (it's only to showcase anyway)...except for 1 thing BUT I will start another thread for that. Link to comment Share on other sites More sharing options...
HartleySan Posted April 12, 2013 Share Posted April 12, 2013 For testing purposes, I suppose it's okay, but you really should move the DB script out of the web root ASAP. Link to comment Share on other sites More sharing options...
Recommended Posts