简体   繁体   中英

PHP site running fine on localhost but not working on a live server

My PHP site not working on an apache server.It is working fine on localhost but after uploading on the server it showing me the blank pages.Here is my error log file

[28-Feb-2018 04:43:16 America/New_York] PHP Fatal error:  Uncaught exception 'mysqli_sql_exception' with message 'Table 'combejcj_waqar-accounts.addsupplier' doesn't exist' in /home/combejcj/waqar.combitpos.com/waqar/public/home.php:24
Stack trace:
#0 /home/combejcj/waqar.combitpos.com/waqar/public/home.php(24): mysqli_query(Object(mysqli), 'SELECT fullname...')
#1 {main}
  thrown in /home/combejcj/waqar.combitpos.com/waqar/public/home.php on line 24

Considering the error message it says that there is no table with the name combejcj_waqar-accounts.addsupplier

So, there can be 2 problems:

1) You forgot to upload your DB table

2) You are on a Linux environment which means that you are in a Case sensitive enviroment and in your code you are doing eg an insert on combejcj_waqar-accounts.addsupplier but the table name is with Capital First letters for example combejcj_waqar-Accounts.Addsupplier

So, make sure that the table name on the server is exactly the same with the one you are using into your code.

The error is telling you what the problem is. It's saying that your MySQL table combejcj_waqar-accounts.addsupplier doesn't exist. Did you migrate the MySQL database when you changed over to the server?

Table does not exist in the database.
You have 2 possible solutions
- Export the local database and import it on the live server.
- Create the table on the live server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM