kevingorman1000 / OpenCAD-OLD

OpenCAD. Developed for FiveM Roleplay servers
GNU General Public License v3.0
7 stars 3 forks source link

host/install #2

Closed TanguyOrtegat closed 5 years ago

TanguyOrtegat commented 5 years ago

when i try the install page I got this erro:

`Failed to connect to MySQL: 2002 Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. Warning: mysqli::query(): Couldn't fetch mysqli in C:\xampp\htdocs\OpenCAD\install\db.php on line 54

Fatal error: Uncaught Error: Call to undefined method mysqli::error() in C:\xampp\htdocs\OpenCAD\install\db.php:54 Stack trace: #0 {main} thrown in C:\xampp\htdocs\OpenCAD\install\db.php on line 54`

what i can read i that he doen't find the host but i do have phpmyadmin on that server with wamp. any idea why it's giving me that error?

kevingorman1000 commented 5 years ago

Normally, when you get the error

Fatal error: Uncaught Error: Call to undefined method mysqli::error() in C:\xampp\htdocs\OpenCAD\install\db.php:54 Stack trace: #0 {main} thrown in C:\xampp\htdocs\OpenCAD\install\db.php on line 54`

It is due to the tables already being created within in the Database. Allow me a moment to update the SQL file (Where it says about the vehicles). Would you mind please checking the table and seeing if it's created them ? I'll need to put a check in for those sort of errors. Might be my job I start working on tomorrow.

TanguyOrtegat commented 5 years ago

Normally, when you get the error

Fatal error: Uncaught Error: Call to undefined method mysqli::error() in C:\xampp\htdocs\OpenCAD\install\db.php:54 Stack trace: #0 {main} thrown in C:\xampp\htdocs\OpenCAD\install\db.php on line 54`

It is due to the tables already being created within in the Database. Allow me a moment to update the SQL file (Where it says about the vehicles). Would you mind please checking the table and seeing if it's created them ? I'll need to put a check in for those sort of errors. Might be my job I start working on tomorrow.

there are no tables created on the database called "cad"

kevingorman1000 commented 5 years ago

I've updated the sql file and auto installer I believe is committed them here too. I've not don't a check yet but will do that tomorrow. Have a go at downloading the installer again and attempting to install. I have provided links to instructions in the readme. I'd this fails as well. You're able to go ahead and do a manual install and tomorrow I'll work on fixing any issues but when I tested just before coming to bed, it worked fine.

TanguyOrtegat commented 5 years ago

okay great ! maybe instead of choosing bd name, make yourself a db name, so ppl won't have and error on database name (yes people sometimes don't even know how to do it)

just do it with that command: `DROP DATABASE IF EXISTS yourDBname

CREATE DATABASE yourDBname`

kevingorman1000 commented 5 years ago

Alrighty. Thank you. I've just started to get my teeth into OpenCAD so at the minute the code isn't pretty and isn't it to scratch like it should be but I'm getting it to work then will be going over it again to make it better..

TanguyOrtegat commented 5 years ago

it is already great you share your work, i do appreciate it. I do like when ppl share their work , and we can together see if there is room for some impouvements. EDIT: i did update sql command ^^ was bit too fast in writing

kevingorman1000 commented 5 years ago

Yep. I'm by no means a php developer or anything... too be fair, only reason I started to do this is because OpenCAD development has come to a stand still, the current version on their website is honestly broken to high hell.. mdt is completely broken.. but managed to resolve that error on my version. :) always welcome comments and advice.

I love OpenCAD so want to keep it alive!