How to diagnose example pages database connection?
How to diagnose example pages database connection?
I've followed instructions to install and evaluate the examples for Editor. It does't work. I don't see any data. I don't see any data errors. I can't fine any logs. I can't find any trouble shooting guides for the database connection. I don't see any errors on the console about the connection or it's status. It talks about removing the error_reporting lines, but why? Nothing is being reported. Why not have an example RIGHT AT THE TOP for testing your database connection? Editor is base on DataTables, and they are heavily base on databases. WHY NOT MAKE CONNECTING AND DIAGNOSING those problems something to figure out? Why not have a forum search instead of site wide search?
Answers
After it is able to find its own resources, I DID get an alert box mentioning the lack of db connection.
Hi,
Thanks for the feedback. There are some things that we do track and report such as an SQL error (user name / password incorrect, or a table / column name not available) and they are given as explicit
alert()
messages. But there are so many things that could go wrong with the database connection that is outside of our control it isn't possible for us to show error messages for them all (even if we could detected them!). For example, what is the ssl socket for your database isn't at the path that PHP was told where it would be. That's nothing to do with Editor, but its still going to cause an issue - and not be reportable to the client-side (indeed, some you really don't want to be reportable to the client-side. I leaked a damn database password doing that once...).They are enabled by default in the config file. However (this is the killer!) it is still possible for PHP configurations to not output errors. It really depends on the PHP configuration and how locked down it is.
They are all relative - e.g. from a demo package I've just downloaded:
Indeed I do all of my testing in a (fairly) deeply nested folder.
Could you tell me what file you loaded which uses absolute paths please? That's a bug.
Nope - if there is something stopping it being placed anywhere, then its a bug, but I've not been able to recreate that issue I'm afraid, so I'd need some feedback on where you found that issue so I can fix it.
Allan
If you start a server in the main directory of your project/download, examples do not load, "The requested resource /simple/simple.html was not found on this server." Looks like they are relative to the example dir. So as long as the example dir is the root, it will work. EXAMPLE MUST BE ROOT
Hi @BradleyB ,
You can have the distribution in a sub-directory, but yep, you can't have the server root within the directory structure! Installation details for PHP are here.
Cheers,
Colin
I don't quite understand this point. If you were using NodeJS, then yes you might start the server there, but using PHP you would install the files into your web directory (unless you are symlinking it or adding a new virtual server specifically for that path?).
Allan
I
I am using php artisan serve. If you start that in the example directory, it won't work. You have to start it so example is IN/OFF root directory.