vagrant-shopware fails at establishing database connection - php

This error is shown after step 4 of installation "Database import" . I cannot understand why referenced file "sw4_clean.sql" is not in github repo of Shopware-4 at location shown it should show as missing during install?
I tried editing config.php before each attempt to establish database. This was my results
with database details = Internal Sever Error
as shown in config.php.dist = Internal Sever Error
empty = config.php now populate with settings = Internal Sever Error
I am using Vagrant build on windows 8 https://github.com/eriksixt/vagrant-shopware
Can anyone shed some light on to what might be going wrong?
Error
Received an error message.
URL: importDatabase?offset=0&totalCount=0
Message: Internal Server Error
Please try to fix this error and restart the update.
Response
{"code":2,"message":"fopen(\/vagrant\/shopware-
4\/install\/src\/..\/assets\/sql\/sw4_clean.sql)
: failed to open stream: No such file or directory",
"file":"\/vagrant\/shopware-
\/install\/src\/lib\/Shopware_Components_Dump.php",
"line":36,"trace":"#0 [internal function]: Slim\\Slim::handleErrors(2,
'fopen(\/vagrant\/...', '\/vagrant\/shopwa...', 36, Array)
\n#1 \/vagrant\/shopware-4\/install\/src\/lib\/Shopware_Components_Dump.php(36):
fopen('\/vagrant\/shopwa...', 'rb')\n#2 \/vagrant\/shopware-
4\/install\/src\/app.php(318): Shopware_Components_Dump-
>__construct('\/vagrant\/shopwa...')\n#3 [internal function]:
{closure}()\n#4 \/vagrant\/shopware-4\/engine\/Library\/Slim\/
Router.php(172): call_user_func_array(Object(Closure), Array)\n#5
\/vagrant\/shopware-4\/engine\/Library\/Slim\/Slim.php(1225): Slim\\Router-
>dispatch(Object(Slim\\Route))\n#6 \/vagrant\/shopware-
4\/engine\/Library\/Slim\/Middleware\/Flash.php(86): Slim\\Slim->call()\n#7
\/vagrant\/shopware-4\/engine\/Library\/Slim\/Middleware\/MethodOverride.php(94):
Slim\\Middleware\\Flash->call()\n#8 \/vagrant\/shopware-
4\/engine\/Library\/Slim\/Middleware\/PrettyExceptions.php(67):
Slim\\Middleware\\MethodOverride->call()\n#9 \/vagrant\/shopware-
4\/engine\/Library\/Slim\/Slim.php(1176): Slim\\Middleware\\PrettyExceptions-
>call()\n#10 \/vagrant\/shopware-4\/install\/index.php(59): Slim\\Slim->run()\n#11 {main}"}

Did you check the strict mode issue? Shopware does not like strict mode, which is enabled by default in the current mysql version. In my case the following configuration (my.cnf or my.ini dependent on the OS) did help:
[mysqld]
sql_mode="TRADITIONAL,NO_AUTO_CREATE_USER"

It seems like your are trying to use the installer on a git checkout of Shopware. That is not possible. Some files needed for the installer, for example "sw4_clean.sql" are generated in a deploy step when the install package is built.
To install Shopware using a git checkout please see: https://github.com/shopware/shopware#installation-via-git

Related

After updating php version in XAMPP I'm facing Fatal Error in http://localhost/phpmyadmin/

For the New Laravel project, I need to update the PHP version using XAMPP,
After the update, the PHP version and apache folder when I start apache and MySQL from the XAMPP control panel this working but I open localhost/phpmyadmin/ it shows me fatal error and doesn't show the database.
Fatal error: Uncaught mysqli_sql_exception: You are not using binary logging in C:\xampp\phpMyAdmin\libraries\classes\Dbi\DbiMysqli.php:199 Stack trace: #0 C:\xampp\phpMyAdmin\libraries\classes\Dbi\DbiMysqli.php(199): mysqli->query('SHOW MASTER LOG...', 0) #1 C:\xampp\phpMyAdmin\libraries\classes\DatabaseInterface.php(316): PhpMyAdmin\Dbi\DbiMysqli->realQuery('SHOW MASTER LOG...', Object(mysqli), 1) #2 C:\xampp\phpMyAdmin\libraries\classes\DatabaseInterface.php(1869): PhpMyAdmin\DatabaseInterface->tryQuery('SHOW MASTER LOG...', 256, 1, false) #3 C:\xampp\phpMyAdmin\libraries\classes\Menu.php(573): PhpMyAdmin\DatabaseInterface->fetchResult('SHOW MASTER LOG...', 'Log_name', NULL, 256, 1) #4 C:\xampp\phpMyAdmin\libraries\classes\Menu.php(107): PhpMyAdmin\Menu->_getServerTabs() #5 C:\xampp\phpMyAdmin\libraries\classes\Menu.php(70): PhpMyAdmin\Menu->_getMenu() #6 C:\xampp\phpMyAdmin\libraries\classes\Header.php(445): PhpMyAdmin\Menu->getDisplay() #7 C:\xampp\phpMyAdmin\libraries\classes\Response.php(323): PhpMyAdmin\Header->getDisplay() #8 C:\xampp\phpMyAdmin\libraries\classes\Response.php(336): PhpMyAdmin\Response->_getDisplay() #9 C:\xampp\phpMyAdmin\libraries\classes\Response.php(495): PhpMyAdmin\Response->_htmlResponse() #10 [internal function]: PhpMyAdmin\Response->response() #11 {main} thrown in C:\xampp\phpMyAdmin\libraries\classes\Dbi\DbiMysqli.php on line 199
I feel the main issue is that your tried to upgrade only php instead of the whole Xampp Bundle. Either you should install complete xampp again or you should upgrade phpMyAdmin manually too as this will fix the php compatibility issues.
I had this exact same issue and I have spent many hours trying to figure this out, so it is as simple as this.
Once you have upgraded your php. (In my case I upgraded to php 8.1.10)
Make a copy of your phpMyAdmin folder renaming it different than the current value that it has.
Download phpMyAdmin 5.2.0 or higher.
Unzip the file, and then copy it into your xampp folder replacing the old phpMyAdmin folder.
Inside the new folder create the file config.inc.php and paste inside there the data that is in config.inc.php located in your old phpMyAdmin folder.
Thats it!

gRPC and XAMPP not working

For a project I want to test the new database from Firebase, Firestore with PHP. But before i can use it, I need a couple of tools. I am trying for a day now to get it work, but no success.
I'm stuck on gRPC. I installed is, and it's working on my Mac and I can install Firestore with Composer, but I can't get it to work with XAMPP.
When I load a page I get
Fatal error: Uncaught Google\Cloud\Core\Exception\GoogleException: The requested client requires the gRPC extension.
Please see https://cloud.google.com/php/grpc for installation instructions. in /vendor/google/cloud-core/src/ClientTrait.php:75 Stack trace: #0 /vendor/google/cloud-firestore/src/FirestoreClient.php(115): Google\Cloud\Firestore\FirestoreClient->requireGrpc() #1 /app/firebase.php(18): Google\Cloud\Firestore\FirestoreClient->__construct() #2 /app/firebase.php(21): App\initialize() #3 /template.php(688): require_once('/Applications/X...') #4 /template.php(647): load_template('/Applications/X...', true) #5 /App in /vendor/google/cloud-core/src/ClientTrait.php on line 75
I added extension=grpc.so to the php.ini that is loaded by XAMPP.
But no success.
Try to use DLL file, download from here https://pecl.php.net/package/gRPC
Open your php.ini file and uncomment the line extension_dir="ext",
add extension="grpc".
Then go to the environment variables in the properties, choose path in the system variables and add the php path you are using.
I am using C:\xampp\php that's where all the magic will happen it's been a tag of war.

Fail to restore magento on a new domain

I used Ubuntu Desktop to be my server hosting Magento. I have restored the Magento in following way:
Import Magento database to MySQL server
Copy and paste all the files to /var/www/html
Remarks:
Permission: 755
Magento Version: 1.9.2
PHP version: 7.0
Unfortunately, I have got an error related to the code generated by Magento.
Fatal error:
Uncaught Error: Call to a member function extend() on boolean in /var/www/html/lib/Varien/Simplexml/Config.php:600
Stack trace:
#0 /var/www/html/app/code/core/Mage/Core/Model/Config.php(278): Varien_Simplexml_Config->extend(Object(Mage_Core_Model_Config_Base))
#1 /var/www/html/app/code/core/Mage/Core/Model/App.php(391): Mage_Core_Model_Config->loadBase()
#2 /var/www/html/app/code/core/Mage/Core/Model/App.php(304): Mage_Core_Model_App->_initBaseConfig()
#3 /var/www/html/app/code/core/Mage/Core/Model/App.php(348): Mage_Core_Model_App->baseInit(Array)
#4 /var/www/html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#5 /var/www/html/index.php(83): Mage::run('', 'store')
#6 {main} thrown in /var/www/html/lib/Varien/Simplexml/Config.php on line 600
How can I solve this error in order to restore Magento on a new domain?
I have tried to lower the permission to 644 but it failed. Moreover, I have tested that PHP7.0 can also open the installation page of a new Magento.
Although you have tried to set permissions of folders and files but still it seems to be a problem with folder and file permission.
Please try resetting permission using magento-cleanup.php
file.
Please put this file in document root of your magento and run this file from browser.
Please let me know whether it solves your problem or not.
This will help:
Try clearing cache, and check file permissions are correctly set,
Directories : 755
Files : 644
If this still doesn't work then may be your files are corrupt.

Magento 2.0.2 installation on shared server - Stuck at 66%

I've been having a nightmare with Magento 2 installation on shared server. The thing is that I don't have problems with shared server. I can get as much resources and config as Magento needs.
But it gets stuck on 66% and this is Console log:
Module 'Magento_Directory':
Installing data..
[ERROR] exception 'Exception' with message 'Warning: Error while sending QUERY packet. PID=47710 in
/home/gottstor/public_html/store/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php on line 228' in /home/gottstor/public_html/store/vendor/magento/framework/App/ErrorHandler.php:61
Stack trace:
#0 [internal function]: Magento\Framework\App\ErrorHandler->handler(2, 'Error while sen...', '/home/gottstor/...', 228, Array)
#1 /home/gottstor/public_html/store/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#2 /home/gottstor/public_html/store/vendor/magento/framework/DB/Statement/Pdo/Mysql.php(95): Zend_Db_Statement_Pdo->_execute(Array)
#3 /home/gottstor/public_html/store/vendor/magento/zendframework1/library/Zend/Db/Statement.php(303): Magento\Framework\DB\Statement\Pdo\Mysql->_execute(Array)
#4 /home/gottstor/public_html/store/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
I did install it on localhost with no issues. But can't get it work on Shared Hosting.
Max execution time is set to 60, max allowed packet in MySQL set to 268M, max_input_vars 5000, memory_limit 512M.
I have searched the web, posted on Magento forums, with no luck.
Any ideas?
In my case, it is about timeout issue.
remove var/.maintenance.flag
remove app/etc/config.php & env.php
cleanup you DB.
in php.ini, set max_execution_time=500
run yourmagento.com again
Done.
make sure your php memory_limit should be sufficient, like 2028M.
this helps in my case .
Go to your php.ini file in your PHP root. (mine is c:\php\php.ini)
Find max_execution_time and set to 200 or 300. (mine original was 60)
Go to your created database, remove all the tables.
Restart your server. (mine is apache)
Repeat your installation steps.
Good luck.
I faced with the same problem. Magento installation stoped on Installing data..
Run this script sudo php bin/magento setup:static-content:deploy
It helped me and magento site srtarted to work. (I just closed installation page)
max_execution_time 500
Try to increase your ram as well if you are using virtual machine
Restart the installation.
Regards,

MySql driver not installed error for Zend application

I am trying to get my ZEND application up on my apache server running on UNIX. Initially my host didnot give PDO support ,and i got it enabled by requesting them with a mail.But now I am getting an error saying The mysql driver is not currently installed
The stack trace is like:
An error occurred
Application error
Exception information:
Message: The mysql driver is not currently installed
Stack trace:
#0 /home/windchim/worminc/library/Zend/Db/Adapter/Abstract.php(770): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 /home/windchim/worminc/library/Zend/Db/Adapter/Abstract.php(840): Zend_Db_Adapter_Abstract->quote('aaditya258', NULL)
#2 /home/windchim/worminc/library/Zend/Auth/Adapter/DbTable.php(354): Zend_Db_Adapter_Abstract->quoteInto('`password` = MD...', 'aaditya258')
#3 /home/windchim/worminc/library/Zend/Auth/Adapter/DbTable.php(285): Zend_Auth_Adapter_DbTable->_authenticateCreateSelect()
#4 /home/windchim/worminc/library/Zend/Auth.php(117): Zend_Auth_Adapter_DbTable->authenticate()
#5 /home/windchim/worminc/application/controllers/LoginController.php(117): Zend_Auth->authenticate(Object(Zend_Auth_Adapter_DbTable))
#6 /home/windchim/worminc/library/Zend/Controller/Action.php(503): LoginController->processAction()
#7 /home/windchim/worminc/library/Zend/Controller/Dispatcher/Standard.php(285): Zend_Controller_Action->dispatch('processAction')
#8 /home/windchim/worminc/library/Zend/Controller/Front.php(934): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#9 /home/windchim/public_html/worm/index.php(47): Zend_Controller_Front->dispatch()
#10 {main}
How can this be resolved? Please help
PDO, unlike the mysql_* functions, supports a number of database engines.
To do this it needs a driver library for each one.
You have the "core" of PDO installed but not the MySQL driver - just get that installed (called pdo_mysql) and everything will be OK.
Your php.ini should have one of these (windows or linux):
extension=php_pdo_mysql.dll
extension=php_pdo_mysql.so
In php.ini file u just enable following line
extension=php_pdo_mysql.dll (means remove comments in front of it)
then it will be executed Correctly.
As others have mentionned, you need to enable the pdo_mysql extension.
However, running php (5.3) as an apache (2.2) module on my machine (windows 7), it still wouldn't work. I figured out the extension_dir value in php.ini needs to be set using an absolute path (relative just wouldn't work)!
Hope this helps some of you!
mysql extension was deprecated and is totally removed in php7
You should check php-mysql package. If not yet install, let run sudo apt-get install php-mysql
F.i. check spelling of
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
(should be like this at production stage)
If you type
error_reporting (value);
or something like this (usually for testing, "value" might be "0")
you may get this mistake
"The mysql driver is not currently installed"
if you use
So any Syntax Error within the php.ini might generate this mistake.
If you setup your system carefully always you might get confused easily, because you know, there are no mistakes at db installation or settings.
If everthing else is correct, so go for a syntax error in php.ini.

Categories