Jump to content

Error: 2006 - MySQL server has gone away


Recommended Posts

​If i remember well, if you install php-devel you will get phpize.

Run this:

yum --enablerepo=remi,remi-php53 install php-devel

 

​Installed phpize using this command:

yum install php-devel

Then followed your post above to install Zend Opcache and added the php.ini lines then restarted httpd now the domain won't load. >_<

Link to comment
Share on other sites

I get this error when trying to restart it again after removing the lines in php.ini:

 

Stopping httpd:                                            [FAILED]
Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:7080
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:7080
no listening sockets available, shutting down
Unable to open logs
                                                           [FAILED]

 

Link to comment
Share on other sites

Copy the first lines of php.ini here.

[PHP]

;;;;;;;;;;;;;;;;;;;
; About php.ini   ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.

; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
; 1. SAPI module specific location.
; 2. The PHPRC environment variable. (As of PHP 5.2.0)
; 3. A number of predefined registry keys on Windows (As of PHP 5.2.0)
; 4. Current working directory (except CLI)
; 5. The web server's directory (for SAPI modules), or directory of PHP
; (otherwise in Windows)
; 6. The directory from the --with-config-file-path compile time option, or the
; Windows directory (C:\windows or C:\winnt)
; See the PHP docs for more specific information.
; http://www.php.net/manual/en/configuration.file.php

I did some research on the web and ran

killall -9 httpd

then

/etc/init.d/httpd start

And now it's working. :)

 

Not sure if I should try to install Zend Opcache again though. :P

Link to comment
Share on other sites

Its not easy to make thinks working by only telling it on a board. Its much easier when we are in ssh and just do the things ;)

Im almost certain that the problem is in the path of the opcache.so i gave you. 

Run:

locate opcache.so

It will tell where the file is.

Yeah, I understand. I can give you SSH access if you want? You seem like a nice person. :)

​Path shows that it's located here

/usr/lib64/php/modules/sw-engine/opcache.so

I'll edit the php.ini once more and restart httpd.

I edited php.ini like this:

[PHP]
zend_extension=/usr/lib64/php/modules/sw-engine/opcache.so

opcache.enable=1

opcache.memory_consumption=128

opcache.interned_strings_buffer=8

opcache.max_accelerated_files=4000
;;;;;;;;;;;;;;;;;;;
; About php.ini   ;
;;;;;;;;;;;;;;;;;;;

Entered 

service httpd restart

in terminal and the domain and everything seems fine but I don't notice anything new. There's no Zend Opcache in Diagnostics tab. :unsure:

Link to comment
Share on other sites

I had another php.ini file per user account & I added the lines to that also and restarted httpd but still nothing. :unsure:

​In the PHP-Info, you have there the information "Configuration File" with the path its using for the php.ini. This way you know which php.ini file its loading.

Or you can run:

php -i |grep "php.ini"

 

Link to comment
Share on other sites

​In the PHP-Info, you have there the information "Configuration File" with the path its using for the php.ini. This way you know which php.ini file its loading.

​Yes! That's where I noticed that it was reading from the php.ini located on the user account so I edited both php.ini's and added those lines and restarted httpd but still, nothing related to Opcache appears.

Also tried the php file you gave me. Still blank page. :)

Link to comment
Share on other sites

The php file doesn't work as you may have wrong permissions for the uploaded file :)

Change them to the ones that you have for the rest files there and it will load :)

But i think you need more than what you try to get from a single post here for your server....

 

You must add those lines at the bottom and not at the top of php.ini:

zend_extension=/usr/lib64/php/modules/sw-engine/opcache.so
opcache.enable=1
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
Link to comment
Share on other sites

@ASTRAPI in my server i have the opcache configuration at the top of the php.ini and its works fine with the configurations i choose.

So it does not need to be at the bottom and its easier to check it if its at the top.

 

I also already told him in PM that the best for is server is to do a good clean install and configuration of Centos.

Link to comment
Share on other sites

On a few customers i had some issues with zend opcache code on top of php.ini that's why i recommend him to add it at the bottom but if it works then no problem :)

I also already told him in PM that the best for is server is to do a good clean install and configuration of Centos.

This is the best solution :) I agree 100%

The way that every software is installed is very important !

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...