I'm a new comer to web design and after reading through some reviews on website hosting from hacker news, I made the decision to test nearlyfreespeech (NFS). I've been doing a bit of offline development using PHP/MySQL/Apache on localhost and everything happen to be running well. Now, I'm at where I must port it to some web server.
Following their procedure, I acquired a MySQL process and produced a brand new database utilizing their built-in Phpmyadmin. But, after i upload the whole project folder, I recieve this error:
Code: Database Error A database error happened. Error message: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Products.categoryID' in 'where clause
This informs me the SQL queries aren't able to access the database. I went .sql file in phpmyadmin and so i realize that the database title is correct. I personally use $_SERVER['DOCUMENT_ROOT'] to ensure that the pathways will remain intact.
Code: $doc_root = $_SERVER['DOCUMENT_ROOT']; // Get the application path $uri = $_SERVER['REQUEST_URI']; //echo "URI is $uri"; $dirs = explode('/', $uri); $app_path = '/' . $dirs . '/'; //$app_path = '/' . $dirs . '/' . $dirs . '/'; // $app_path = '/' . $dirs . '/' . $dirs . '/' . $dirs . '/' . $dirs . '/'; //echo "APP_PATH is $app_path"; // Set the include path set_include_path($doc_root . $app_path);
I've got a .php file which connects towards the database and that i have these completed.
Code: $dsn = 'mysql:host=yko.db;dbname=my_guitar_shop2'; $username = 'myphpmyadminusername'; $password = 'myphpmyadminpassword';
yko.db may be the mysql procedure that I made and also the database made using phpmyadmin is my_guitar_shop2. I checked out the phpmyadmin and confirmed the database does exist.
So, I'm stump at this time. Everything appears to become focusing on localhost which is not focusing on the net server.
I personally use netbeans because the IDE and adopted their instructions upload the files that we put in /home/public/projectFolder
Can there be any configurations I have to take a look at or switch to get this work? I retried it using localhost and everything appears to operate. What else within the source can one possibly take a look at to get this work.
PS: Alternatively, I'd have a tutorial which will have a begineer from signing up for any domain, establishing an internet server, database, phpmyadmin, etc after which uploading projects utilizing an IDE (netbeans, eclipse). I do not mind having to pay again for an additional website hosting. Among the finest to have it running and obtain my ft wet.
Are you currently utilizing a Us dot inside your column title (
Products.categoryID would indicate you're)... MySQL support for dots in column names began with version 5.1.6 (Reference: Object Names)
May want to look at your remote version (through phpmyadmin).