Uploading existing code into website

  • (2 Pages)
  • +
  • 1
  • 2

27 Replies - 3097 Views - Last Post: 28 July 2017 - 07:27 PM

#1 Artpop12   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 29
  • Joined: 25-September 15

Uploading existing code into website

Posted 28 July 2017 - 09:11 AM

Hello,

I want to upload my previous website code + database to my new website.

I don't know what I should do other than simply upload through FileZilla.
Is there anything else i need to do in order for the website to run properly?
Is This A Good Question/Topic? 0
  • +

Replies To: Uploading existing code into website

#2 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14691
  • View blog
  • Posts: 58,704
  • Joined: 12-June 08

Re: Uploading existing code into website

Posted 28 July 2017 - 09:13 AM

Is it not working properly? If so copy/paste the errors here.

Is it a connection issue? Make sure your connection string is correct for your website's DB setting.
Was This Post Helpful? 0
  • +
  • -

#3 Artpop12   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 29
  • Joined: 25-September 15

Re: Uploading existing code into website

Posted 28 July 2017 - 09:15 AM

View Postmodi123_1, on 28 July 2017 - 09:13 AM, said:

Is it not working properly? If so copy/paste the errors here.

Is it a connection issue? Make sure your connection string is correct for your website's DB setting.


I'm totally new to coding so I'm not sure if what I am doing is right.

I've uploaded the entire code + Database (SQL file) to the public html folder of my website.

Now it's writing this:

A PHP Error was encountered

Severity: Warning

Message: mysqli::real_connect(): (HY000/2002): No such file or directory

Filename: mysqli/mysqli_driver.php

Line Number: 202

Backtrace:

File: /home/vol14_5/byethost9.com/b9_20450502/htdocs/application/controllers/VideoController.php
Line: 8
Function: __construct

File: /home/vol14_5/byethost9.com/b9_20450502/htdocs/index.php
Line: 315
Function: require_once

A Database Error Occurred

Unable to connect to your database server using the provided settings.

Filename: controllers/VideoController.php

Line Number: 8

Was This Post Helpful? 0
  • +
  • -

#4 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14691
  • View blog
  • Posts: 58,704
  • Joined: 12-June 08

Re: Uploading existing code into website

Posted 28 July 2017 - 09:17 AM

Does your hosting provide mysql? Most do. You would not use your local file but would create the db in the mysql tables.. connecting to that.
Was This Post Helpful? 0
  • +
  • -

#5 Artpop12   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 29
  • Joined: 25-September 15

Re: Uploading existing code into website

Posted 28 July 2017 - 09:26 AM

View Postmodi123_1, on 28 July 2017 - 09:17 AM, said:

Does your hosting provide mysql? Most do. You would not use your local file but would create the db in the mysql tables.. connecting to that.



Yes I also opened a mysql.
See pic: http://i.imgur.com/QgYMODi.png

And then imported the sql file.

Not sure if it's the right thing to do but yes.
Was This Post Helpful? 0
  • +
  • -

#6 no2pencil   User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6726
  • View blog
  • Posts: 31,134
  • Joined: 10-May 07

Re: Uploading existing code into website

Posted 28 July 2017 - 09:40 AM

View PostArtpop12, on 28 July 2017 - 12:11 PM, said:

I want to upload my previous website code + database to my new website.



View PostArtpop12, on 28 July 2017 - 12:15 PM, said:

I'm totally new to coding so I'm not sure if what I am doing is right.


If you are new to this, then how did you determine this is what you need to do? Why are you uploading previous website code & database?

Also, as modi123_1 pointed out, does your existing host allow this? You may want to run by them what you are trying to accomplish before doing something irreversible.
Was This Post Helpful? 0
  • +
  • -

#7 Artpop12   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 29
  • Joined: 25-September 15

Re: Uploading existing code into website

Posted 28 July 2017 - 09:43 AM

Quote

If you are new to this, then how did you determine this is what you need to do? Why are you uploading previous website code & database?

Also, as modi123_1 pointed out, does your existing host allow this? You may want to run by them what you are trying to accomplish before doing something irreversible.


Well logically, it makes sense to upload all the previous website code + database so I did that.

The problem is the error it's writing. I unfortunately don't understand it and need help or some guidance.
My host allows this,yes.
Was This Post Helpful? 0
  • +
  • -

#8 no2pencil   User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6726
  • View blog
  • Posts: 31,134
  • Joined: 10-May 07

Re: Uploading existing code into website

Posted 28 July 2017 - 10:01 AM

View PostArtpop12, on 28 July 2017 - 12:43 PM, said:

Quote

If you are new to this, then how did you determine this is what you need to do? Why are you uploading previous website code & database?

Also, as modi123_1 pointed out, does your existing host allow this? You may want to run by them what you are trying to accomplish before doing something irreversible.


Well logically, it makes sense to upload all the previous website code + database so I did that.

oh of course. Why didn't I see that?
Was This Post Helpful? 0
  • +
  • -

#9 Artpop12   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 29
  • Joined: 25-September 15

Re: Uploading existing code into website

Posted 28 July 2017 - 10:06 AM

Quote

oh of course. Why didn't I see that?



Are you willing to help?
Was This Post Helpful? 0
  • +
  • -

#10 no2pencil   User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6726
  • View blog
  • Posts: 31,134
  • Joined: 10-May 07

Re: Uploading existing code into website

Posted 28 July 2017 - 10:17 AM

More than willing. But when I asked for details I got told it's logical.

If it's a paid service, & they support what you are trying to do, I'd be on the phone with them.
Was This Post Helpful? 0
  • +
  • -

#11 CTphpnwb   User is offline

  • D.I.C Lover
  • member icon

Reputation: 3810
  • View blog
  • Posts: 13,833
  • Joined: 08-August 08

Re: Uploading existing code into website

Posted 28 July 2017 - 10:19 AM

Many sites will have hidden files like .env for environment variables such as MySQL user name, database name, port, and password, etc., and .htaccess for server configuration. Be sure you've got those set correctly and that they're in the correct directories.
Was This Post Helpful? 0
  • +
  • -

#12 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14691
  • View blog
  • Posts: 58,704
  • Joined: 12-June 08

Re: Uploading existing code into website

Posted 28 July 2017 - 11:04 AM

Hidden? Hells bells my hosting is all sorts of up front and "here is your connection string for your freshly minted DB" because I think they are tried of the support calls covering the same ground.
Was This Post Helpful? 0
  • +
  • -

#13 CTphpnwb   User is offline

  • D.I.C Lover
  • member icon

Reputation: 3810
  • View blog
  • Posts: 13,833
  • Joined: 08-August 08

Re: Uploading existing code into website

Posted 28 July 2017 - 11:30 AM

I think it's fairly common to have them. I know that aws has a hidden directory for config files, and the .htaccess is used by apache web server, so that should be common. The Laravel framework expects at least the .env file.

It's possible that a control panel may be manipulating these files, so you might not need to alter them. It's good to know about them so that you can make adjustments if you need to.
Was This Post Helpful? 0
  • +
  • -

#14 Artpop12   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 29
  • Joined: 25-September 15

Re: Uploading existing code into website

Posted 28 July 2017 - 12:51 PM

View Postno2pencil, on 28 July 2017 - 10:17 AM, said:

More than willing. But when I asked for details I got told it's logical.

If it's a paid service, & they support what you are trying to do, I'd be on the phone with them.



I have website files and and old database (sql file). What to do with them? I don't know.
I just know that all files must be uploaded through FileZilla and that's what I did.

Is there certain stuff I need to change in the sql file? I don't know coding at all actually so this is why I'm asking for help.

The error is this:

A PHP Error was encountered

Severity: Warning

Message: mysqli::real_connect(): (HY000/2002): No such file or directory

Filename: mysqli/mysqli_driver.php

Line Number: 202

Backtrace:

File: /home/vol14_5/byethost9.com/b9_20450502/htdocs/application/controllers/VideoController.php
Line: 8
Function: __construct

File: /home/vol14_5/byethost9.com/b9_20450502/htdocs/index.php
Line: 315
Function: require_once

A Database Error Occurred

Unable to connect to your database server using the provided settings.

Filename: controllers/VideoController.php

Line Number: 8

Was This Post Helpful? 0
  • +
  • -

#15 CTphpnwb   User is offline

  • D.I.C Lover
  • member icon

Reputation: 3810
  • View blog
  • Posts: 13,833
  • Joined: 08-August 08

Re: Uploading existing code into website

Posted 28 July 2017 - 01:13 PM

Does your host have a cpanel? If so, look for phpMyAdmin and a MySQLAdmin (not sure that's the right name). The MySQLAdmin will let you create the database and phpMyAdmin will let you import your .sql file. You'll need to make sure your php code is set to use the correct database, username and password. That may (or may not) be stored in the .env file.
Was This Post Helpful? 1
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2