Jump to content
Larry Ullman's Book Forums

Ch 18 Going From Local To Live


Recommended Posts

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

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

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

 Share

×
×
  • Create New...