I use a Vue component that gets data from the database (with Axios) and although it works well on the local machine, doesn't work on the server. also, all components which don't need to database, work correctly.
Uncaught (in promise) Error: Request failed with status code 404
Even I test my route path to load some data for the blade from the database and also they don't work,
I exported the database in http://localhost/phpmyadmin and imported it in MySQL on server
then update .env file on a server based on MySQL info on the server
and eventually
php artisan config:clear
php artisan cache:clear
php artisan view:cache
I just tested the imported database, mysql> USE imported_db; SHOW TABLES; and I can see all tables
and my .env file is updated as well
Related
I deployed my code to server and migrated the database with command bellow:
php artisan migrate
And everything works fine.
But when I want to access to my url it throws the following exception:
could not find driver (SQL: select * from `...`)
If it cannot find the driver then how it created the tables? Am I missing something.
Also my database works fine when I run
php artisan serve
on my server and access that locally.
I've got everything to work with WP-CLI on Windows running XAMPP. Or so I thought. When I try to execute the following command:
wp rewrite structure '/%postname%/'
I get the following error:
Error: Error establishing a database connection. This either means that the username and password information in your wp-config.php file is incorrect or we canÔÇÖt contact the database server at localhost. This could mean your hostÔÇÖs database server is down.
I've read that the PHP used needs to be correct (a usual explanation for this problem). Running wp --info yields the following results.
$ wp --info
PHP binary: C:\xampp\xampp-5.6.24\php\php.exe
PHP version: 5.6.24
php.ini used: C:\xampp\xampp-5.6.24\php\php.ini
WP-CLI root dir: C:\lib\wp-cli
WP-CLI packages dir:
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 1.0.0
I think that this looks correct. I can access the db from a browser, use WP normally, and even perform database commands using wp-cli. But for some reason, the rewrite command gives an error (as stated above). The fun thing is that it actually changes the permalink option, but I'm afraid that since it gives an error some other action is not performed correctly.
Changing the credentials in wp-config.php makes me unable to run db commands, so clearly it works at some level.
What might be wrong? I'm pretty clueless here!
The database is set up by using wp-cli and is accessed using the root account.
It turned out to be a bug in wp-cli, which the author is now working on.
Running a Symfony 2 project, I have recently made a change in my MYSQL database, and I would like to update my schema and model structure inside my symfony project so I can use the new items that are in it.
This is what I try to do from a running instance in production:
php app/console doctrine:mapping:import --force CoreBundle yml
Here is the error I get:
[PDOException] SQLSTATE[HY000] [2002] Connection timed out
Core/Bundle exists and was already mapped this way by the past
Also note that the server is up and running, doing exchanges with the database
I cannot find a place where to see a more detailed log. Tried to configure the config.yml to add logging for doctrine but it doesn't give me more infos
Thanks in advance
Since I didn't found the source of the problem, I just deployed a new symfony app, connected it to the database and then just generated orm + entities by following the same commands. After that I just copied the /Entity folder and /orm folder and replaced it on my production env. A bit messy but it worked
I have a cake installation on a webserver and a database on a separate server.
I am able to connect to the database remotely via shell, but my cake gives
Error: Mysql requires a database connection
Error: Confirm you have created the file : app/Config/database.php.
Notice: If you want to customize this error message, create app/View/Errors/missing_connection.ctp.
I checked and PDO is setup, mod_rewrite is enabled and I have a similar setup on development server running properly. I checked core.php and it echoes proper base site url, and database.php echoes proper database selection.
Any ideas what may be causing it?
Trying to cover all of the possibilities...
With regard to the database.php file, make sure that the database credentials are being set to the $default variable and not $test, unless of course you're trying to run database unit tests of course.
The file that handles all of the initializing is the webroot's index.php file. You'll want to verify that all paths within that file are using the proper paths. If all you did was extract the CakePHP framework without any folder rearrangements, it should be all correct.
You mention that you checked mod_rewrite is enabled - did you do this with a phpinfo() call to a file located on the same (sub)domain just to verify the settings in the same location?
Although not related to the errors you're experiencing, you'll also want to verify that the external DB allows connection from your webserver's IP.
I have a LOAD DATA command that works fine in the MySQL terminal. It works fine in a test PHP file served from my local server. It works fine in phpMyAdmin on the same server. It inexplicably breaks down when run from Magento, also on the same server.
I have confirmed all methods are using the same login credentials. If I copy the failed command (including all previous queries from connection onwards) from the query log and paste into any other method it mysteriously works again. The query itself cannot be at fault.
Therefore I deduce the problem must be a permissions one. File privilege is set and works for other implementations on the same account. Magento is using pdo_mysql as it's connection. If I duplicate that in a test file it works. Magento must be setting some parameter that is interfering.
The error I get is SQLSTATE[42000]: Syntax error or access violation: 1148 The used command is not allowed with this MySQL version. I must use the "LOCAL" modifier keyword because I cannot guarantee the database server will be accessible.
The nearest previous question here on SO concerns drupal, the error is different but I recall drupal also uses pdo_mysql to connect, perhaps it is related. The only other mention of this error on Magento is this thread which also fails on a LOAD DATA LOCAL INFILE command.
Per #DeveloperChris' suggestion, you can enable SQL logging in Magento in the Varien_Db_Adapter_Pdo_Mysql class (in the lib\Varien path). Change the $_debug and $_logAllQueries class variables to true. You can also change the file path where the queries are logged in $_debugFile.
Don't forget to turn it off before production!
HTH,
JD