I'm trying to install the Magento 2 (2.1.5) on web server with CLI. but its is giving error
[Exception]
Warning: Error while sending QUERY packet. PID=34 in
/home/cocaine/public_html/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php
on line 228
I searched for the solution and all the solution is that increase the
max_allowed_packet
First max_allowed_packet was 33MB but now i increased it to 512MB. But it's still giving me same error with different PID.
CLI commands used to install Magento is
magento setup:install --base-url=http://www.example.com \
--db-host=localhost --db-name=db_name --db-user=db_admin --db-password=db_admin_password \
--admin-firstname=User --admin-lastname=Magento --admin-email=admin#demo.com \
--admin-user=admin_site --admin-password=admin_password --language=en_US \
--currency=INR --timezone=Asia/Kolkata --cleanup-database \
--session-save=db --use-rewrites=1
You need to increase wait_timeout and max_allowed_packet value from your database configuration.
increase wait_timeout = XX to wait_timeout=180
Also, Change at least max_allowed_packet = 512M
Related
I am getting the following error upon running bin/magento catalog:images:resize
300/973 [========>-------------------] 30% 7 mins 100.0 MiB | /1/2/12033_1.jpg
Warning: Error while sending QUERY packet. PID=17518 in ./vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php on line 228
I am currently running Magento 2.3.0 on PHP 7.1
Does anybody have an advice?
you need to increase the max allow packet in /etc/my.cnf add:
max_allowed_packet=32M
you can further increase it.
I am trying to run a product export with Magento's dataflow using the CLI script found here: https://www.kerstner.at/2015/07/run-magento-data-flow-profile-from-shell/
The issue I am facing is the script always stops with the following error:
Fatal error: Allowed memory size of 536870912 bytes exhausted
I have attempted to change the memory_limit for PHP in multiple places:
Changed all php.ini files
Added "ini_set("memory_limit","1024M");" to the code.
Input "php -d memory_limit=1024M" at the command line.
Checked the setting using the CLI command "php -i | grep
memory_limit"
Checked the memory_limit using phpinfo()
...and yet I cannot get the script to execute beyond 536870912 bytes.
Is there something built into Magneto that would stop this? I am running out of ideas.
My Environment:
OS: Ubuntu Server 16.04
Total/Free Memory: 8GB/6.9GB
PHP 7.0
PHP Settings:
/etc/php/7.0/apache2/php.ini : memory_limit = 1024M
/etc/php/7.0/cli/php.ini : memory_limit = 1024M
spent a few hours racking my brains, trying to fix this but I fear I'm not getting anywhere.
I set up localhost as a lamp environment yesterday on Ubuntu 15.10, everything was running fine and I made some good progress. Now I restart this morning and my project which I know I left working is now giving me
Fatal error: Call to undefined function mysqli_connect() in /var/www/html/includes/mysql.php on line 6
Now I know that there isn't a mistake in the code and mysql and apache is definately running.
elliot#elliotsLaptop:~$ mysqladmin -u root -p status
Enter password:
Uptime: 3588 Threads: 1 Questions: 19 Slow queries: 0 Opens: 69
Flush tables: 1 Open tables: 62 Queries per second avg: 0.005.
elliot#elliotsLaptop:~$ service apache2 status
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2)
Active: active (running) since Wed 2016-04-20 09:02:18 BST; 1h 1min ago
Also I made no changed to the PHP.ini file when I originally set it up, but now both mysqli_connect and mysql_connect are both undefined functions and mysqli is an undefined class.
Fatal error: Class 'mysqli' not found in /var/www/html/includes/mysql.php on line 6
So it seems to be some kind of setting has change inside my php setup but I can't for the life of me figure out what it is.
This is PHP Version 5.6.11. Anyone have any experience with this kind of problem? I'm close to reinstalling PHP but I'd rather understand what is going on or what I may be doing wrong.
Any advice would be severly appreciated.
Try Below Command:
Latest phpMyAdmin versions require mysqli extension and will no longer work with mysql.
sudo apt-get install php5-mysql
Please add below line php.ini
extension=mysqli.so
Please restart server hope this works
For some reason, taking the mysql connection out of an include and putting it directly onto the page that was using it seems to have fixed the problem. I have no real idea why this would be the case but everything now seems to be working as expected.
Thanks a lot to everyone who tried to help me with this.
apache,php 5.5.27,laravel 4.2 ,ubuntu15.04
My code works well on windows. But it failed on linux.
error code:
Symfony \ Component \ Debug \ Exception \ FatalErrorException (E_UNKNOWN)
HELP
Maximum execution time of 1000 seconds exceeded
in /home/project/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php line 55
$iv = mcrypt_create_iv($this->getIvSize(), $this->getRandomizer());
I have changed the max_execution_time to 1000 but it still does not work.
Can anyone help?
Evening, I am try to run a script that need a lot of memory from the command line.
System is Linux LinuxMint 3.2.0-23-generic w/ PHP Version => 5.3.10-1ubuntu3.6
I have memory_limit -1 in php.ini for CLI and am also setting ini_set( 'memory_limit', '-1' );
but if I run phpinfo() via the command line it says:
memory_limit => 300M => -1
Does anyone have any idea why this is?
I've also tried setting the memory limit via the command on the CLI. No difference.
Thanks for the info, Sammitch, but when I am running scripts I get:
PHP Fatal error: Allowed memory size of 314572800 bytes exhausted (300MB)
It appears this is a system, issue, but I cannot fix it.
EDIT: after searching, I found I had set a memory limit of 300MB in my global config.php file. Be diligent!
You're not understanding the format.
variable_name => default_value => current_value