wildtypitch's avatar

Sqlite connection errors.

Hi my laravel site is issuing errors on both connection.php and connector.php (see nathanielmcmahon.com)

Original developer gone but new ones are telling me the mysql database needs rebuilding as there are no tables.

This doesn't make sense to me as all backups of the website from functioning times have the same "no table" database. This led me to believe that the database was either contained within file or structured and populated dynamically. I know nothing of how Laravel works, I'm not a developer. I found out about SQlite which none of the laravel developers I'm considering to fix the issue have heard about, but this seems to fit with the events and errors I've got. I'd really appreciate any advice or pointers on the topic. Or just find someone capable of understanding my site.

Thanks

0 likes
8 replies
mcangueiro's avatar

Couple of things for you to check:

  1. Go to your "database" folder and check if there is any file with an sqlite extension.
  2. In your "config/database.php" what do you have in this line?
'default' => env('DB_CONNECTION', 'mysql')

Also, you are actually letting your .env unprotected. If you visit http://nathanielmcmahon.com/.env you can clearly see that. That is a very serious security breach.

wildtypitch's avatar

Hi thanks,

  1. there is no sqlite extension file
  2. have that line and yes the.env in unprotected, it doesn't surprise me.

so no sqlite just can't figure out why database backups contain no tables, backups from when the site was working.

mcangueiro's avatar

Are you sure the database was on your server? Maybe the developer deployed it to a different server?

You could check your database credentials on your working backups and see if they match the mysql credentials from your server.

wildtypitch's avatar

Damn you're right. Thanks. The connection.php is pointing to a Chinese based server. Not mine. Looks like I'm going to have to track the developer down somehow. But he's unresponsive.

Getting another developer to rebuild the database is going to be an almighty job right? It's a basic photo archive with a project data.

Thanks again

mcangueiro's avatar

I don't know the complexity of it so I can't say for sure. If you have the migrations on the backup might be the case of only migrate the database onto your server and your good to go. You can check if you have that on the folder "database/migrations" and look for a migration of the albums or photos table.

Another thing you should look at is securing your laravel installation.

wildtypitch's avatar

Only a couple of tables in the migrations folder. User and password reset tables.

mcangueiro's avatar

Those are the default that come with the laravel installation.

I might be able to give you a hand with the issue if you want to get in touch via my website. ( http://miguelcangueiro.com )

wildtypitch's avatar

Issue solved now, managed to get incontact with developer, thanks for the help, I'll be in touch

Please or to participate in this conversation.