EasyApache 4 Frozen on Loading profiles - php

Cpanel - Centos 7.8
Update
Running dcrpm provides this error message:
2020-07-08 14:21:51,147 ERROR [rpmutil.kill_spinning_rpm_query_processes]: Found stale rpm process: (7042) /usr/bin/rpm -q --nodigest --nosignature --queryforma
2020-07-08 14:21:51,505 ERROR [dcrpm.run]: DB needs recovery
2020-07-08 14:21:55,982 WARNING [rpmutil.verify_tables]: Skipping table 'Obsolet ename', blacklisted
yum commands dont return anything and rebuilding the RPM database doesn't seem to change anything.
I seem to be having some issues with EasyApache 4 after loading a few PHP extensions on a custom profile. I can no longer load any of the profiles.
I am stuck on an infinite loop of Loading profiles ... & when trying to access PHP versions through MultiPHP manager Gathering PHP-FPM packages information ... again in an infinite loop. Not quite sure how I've screwed up this time.
All I wanted to do was enable Zip Archives. Is there a way to disable what was enabled without going through there? Or is there a way to remove that profile and the associated enabled extensions?
Apologies I am somewhat of a newbie to all of this so I have come to the community that has helped me endlessly as I learn webdesign and basic code
All I can see in the error log is:
*AH01630: client denied by server configuration: /home/X/public_html/php.ini**
More Information
After leaving it load for an hour or so this appeared:
*The YUM cache is incomplete. The system is updating the cache to repair the issue.*
*This operation can take a few minutes to complete (it is very network and disk i/o intensive). EasyApache 4 will be available as soon as possible ...*
The result of which after several hours was:
*YUM encountered errors outside of EasyApache 4. Log into the system via SSH to resolve them, or you can click the ‘Refresh’ button to rebuild the system‘s YUM cache.*
Note: One new plugin was also installed recently (Softaculous) which may have something to do with it as the manage plugin section also doesn't load ._.
Unfortunately it seems now that no yum commands are working. I did try to run the following with no result:
yum clean all
yum update
It appears the proverbial ship is sinking, I can't even access plugins now as i get the follow fatal error:
(XID gvtyx9) The system aborted the subprocess “/bin/rpm” (process ID “23078”) because it reached the timeout of 15 seconds. at /usr/local/cpanel/Cpanel/SafeRun/Object.pm line 546.
Cpanel::SafeRun::Object::die\_if\_error(Cpanel::SafeRun::Object=HASH(0x2a1a970)) called at /usr/local/cpanel/Cpanel/SafeRun/Object.pm line 538
Cpanel::SafeRun::Object::new\_or\_die("Cpanel::SafeRun::Object", "program", "/bin/rpm", "args", ARRAY(0x179bed0), "timeout", 15, "read\_timeout", ...) called at /usr/local/cpanel/Cpanel/GenSysInfo.pm line 264
Cpanel::GenSysInfo::\_run\_with\_timeout("/bin/rpm", "--query", "--nosignature", "--nodigest", "--queryformat", "%{NAME} %{VERSION}\\\\n", "--file", "/etc/redhat-release") called at /usr/local/cpanel/Cpanel/GenSysInfo.pm line 204
Cpanel::GenSysInfo::\_get\_rpm\_distro\_version\_arch() called at /usr/local/cpanel/Cpanel/GenSysInfo.pm line 124
Cpanel::GenSysInfo::\_get\_new\_conf(HASH(0x2148000)) called at /usr/local/cpanel/Cpanel/GenSysInfo.pm line 51
Cpanel::GenSysInfo::run() called at /usr/local/cpanel/Cpanel/GenSysInfo.pm line 71
Cpanel::GenSysInfo::get\_rpm\_distro\_version() called at /usr/local/cpanel/Cpanel/Plugins.pm line 181
Cpanel::Plugins::\_do\_url\_variable\_substitution("[http://httpupdate.cpanel.net/cpanel-plugins-c\\$cp\_centos\_major](http://httpupdate.cpanel.net/cpanel-plugins-c\$cp_centos_major)"...) called at /usr/local/cpanel/Cpanel/Plugins.pm line 158
Cpanel::Plugins::get\_baseurls() called at /usr/local/cpanel/Whostmgr/Addons/RPM/Cache.pm line 170
Whostmgr::Addons::RPM::Cache::\_yum\_modules() called at /usr/local/cpanel/Whostmgr/Addons/RPM/Cache.pm line 102
Whostmgr::Addons::RPM::Cache::\_LOAD\_FRESH("Whostmgr::Addons::RPM::Cache") called at /usr/local/cpanel/Cpanel/CacheFile.pm line 234
Cpanel::CacheFile::load("Whostmgr::Addons::RPM::Cache") called at /usr/local/cpanel/Whostmgr/Addons/RPM/Cache.pm line 91
Whostmgr::Addons::RPM::Cache::load("Whostmgr::Addons::RPM::Cache") called at /usr/local/cpanel/Whostmgr/Addons/RPM.pm line 62
Whostmgr::Addons::RPM::get\_modules() called at whostmgr/bin/whostmgr2.pl line 2531
main::manage\_plugins("manage\_plugins") called at /usr/local/cpanel/Whostmgr/Dispatch.pm line 274
Whostmgr::Dispatch::\_do\_call("manage\_plugins", HASH(0x2145770), HASH(0x214a890)) called at /usr/local/cpanel/Whostmgr/Dispatch.pm line 172
Whostmgr::Dispatch::dispatch("manage\_plugins", 1, ARRAY(0x2147af8), HASH(0x214a890)) called at whostmgr/bin/whostmgr2.pl line 773

Related

yii2 migration command shows "Out of memory" error

When I call yii2 migrate command(from console). I always get "Out of memory" message. In regular case php do not show this error, but when migration command.
# ./yii migrate
Yii Migration Tool (based on Yii v2.0.13-dev)
Out of memory
However PHP through Apache works absolutely fine. It's just on the CLI that I get this error. The machine is running CentOS release 6 and PHP 5.6. System memory is 6GB, that is enough to run command.
total used free shared buffers cached
Mem: 5971 1557 4413 128 119 440
-/+ buffers/cache: 998 4973
Swap: 0 0 0
Add:
I witnessed laravel artisan command also show that error.
I could not know what occurs this error finally. But when I re-installed php library from base, the error disappeared. This may help for you.

PHP can't connect to MYSQL after restart - Ubuntu 15.10

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.

Intermittent "too many open files" when including/requiring PHP scripts

On my development box (thank goodness it's not happening in production—that I know of—yet), as I'm working on a PHP site, I get this occasional error:
Warning:
require_once(filename.php): failed
to open stream: Too many open files in
path/functions.php on line 502
Fatal error: require_once(): Failed opening required 'filename.php'
(include_path='/my/include/path') in
path/functions.php on line 502
Line 502 of functions.php is my "autoload" function which automatically requires PHP files containing classes I use:
function autoload($className)
{
require_once $className . ".php"; // <-- Line 502
}
By an "occasional" error, I mean that it'll work fine for about a day of development, then when I first see this, I can refresh the page and it'll be okay again, then refreshing gives me the same error. This happens just a few times before it starts to show it every time. And sometimes the name of the file it's requiring (I have a script split out into several PHP files) is different... it's not always the first or last or middle files that it bombs on.
Restarting php-fpm seems to solve the symptoms, but not the problem in the long run.
I'm running PHP 5.5.3 on my Mac (OS X 10.8) with nginx 1.4.2 via php-fpm.
Running lsof | grep php-fpm | wc -l tells me that php-fpm has 824 files open. When I examined the actual output, I saw that, along with some .so and .dylib files, the vast majority of lines were like this:
php-fpm 4093 myuser 69u unix 0x45bc1a64810eb32b 0t0 ->(none)
The segment "69u" and the 0x45bc1a6481... number are different on each row. What could this mean? Is this the problem? (ulimit is "unlimited")
Incidentally (though perhaps un-related), there's also one or two of these:
php-fpm 4093 myuser 8u IPv4 0x45bc1a646b0f97b3 0t0 TCP 192.168.1.2:59611->rest.nexmo.com:https (CLOSE_WAIT)
(I have some pages which use HttpRequest (PECL libraries) to call out to the Nexmo API. Are these not being closed properly or something? How can I crack down on those?)
Try to set php-fpm (they're set to infinite by default) to more appropriate values on your needs.
For example:
emergency_restart_threshold = 10
emergency_restart_interval = 1m
process_control_timeout = 10s
Maybe, set this too if your app works with lots of files:
rlimit_files = 1024

Gearman throws GEARMAN_COULD_NOT_CONNECT on php example

I installed gearmand 1.1.5 on my server, and tried the examples provided with the installation after starting the server. They work pretty correctly (the echo example works, the reverse doesn't work as expected, but doesn't gives any error).
Then I installed the php wrapper using pecl. The version is the last stable (1.1.1). Obviously I added the extension to php.ini, and my php --info|grep gearman output is:
gearman
gearman support => enabled
libgearman version => 1.1.5
PWD => /root/gearman-1.1.1/examples
OLDPWD => /root/gearman-1.1.1
_SERVER["PWD"] => /root/gearman-1.1.1/examples
_SERVER["OLDPWD"] => /root/gearman-1.1.1
Then I tried the echo example in the pecl package, the worker starts correctly:
[~/gearman-1.1.1/examples]# php reverse_worker.php
Starting
Waiting for job...
the client, instead, gives me the following error:
[~/gearman-1.1.1/examples]# php reverse_client.php
Starting
Sending job
PHP Warning: GearmanClient::do(): send_packet(GEARMAN_COULD_NOT_CONNECT) Failed to send server-options packet -> libgearman/connection.cc:430 in /root/gearman-1.1.1/examples/reverse_client.php on line 26
PHP Stack trace:
PHP 1. {main}() /root/gearman-1.1.1/examples/reverse_client.php:0
PHP 2. GearmanClient->do() /root/gearman-1.1.1/examples/reverse_client.php:26
Warning: GearmanClient::do(): send_packet(GEARMAN_COULD_NOT_CONNECT) Failed to send server-options packet -> libgearman/connection.cc:430 in /root/gearman-1.1.1/examples/reverse_client.php on line 26
Call Stack:
0.0001 228408 1. {main}() /root/gearman-1.1.1/examples/reverse_client.php:0
0.0003 229552 2. GearmanClient->do() /root/gearman-1.1.1/examples/reverse_client.php:26
RET: 26
In the gearman daemon's log there is no sign of activity for this php tests, while it logged all previous examples I tried.
How can I fix this error? Thanks.
Your should always use addServer("127.0.0.1", 4730), not addServer(), despite what php documentation says.
In case if you have used something like this
$client->addServers('127.0.0.1', 4730);
or
$client->addServers();
and still it didnt work then use something like this
$client->addServers('127.0.0.1:4730');
PS - I have used localhost IP, this can be replaced with actual host IP.

OpenSSL issue on Debian server

I've been battling this annoying issue for quite some time now, and it's bugging me a lot that I can't find any fix for it.
When I use "tail -f" to my error_log file to check for errors on my webserver, one specific error keeps popping up all the time, every visitor and page-refresh generates this issue.
I've been googling and searching here on Stack Overflow for a looong time, but nothing is directly related to the problem.
So the error that is thrown looks like this:
[Fri Aug 17 00:16:23 2012] [error] [client xx.xx.xx.xx]
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/openssl.dll' - /usr/lib/php5/20090626/openssl.dll: cannot open shared object file: No such file or directory in Unknown on line 0, referer: http://mysite.dk/
What could I do?
I have tried to remove OpenSSL, and re-installed it again with no luck. I've tried to upgrade every PHP-related package and still didn't work.
grep -ir ssl /etc/php*
gives:
/etc/php5/cli/conf.d/zend_extensions_psa.ini:extension=openssl.dll
/etc/php5/apache2/conf.d/zend_extensions_psa.ini:extension=openssl.dll
/etc/php5/apache2/php.ini.saved_by_psa.08.03;20:24:;extension=openssl.dll ; moved to conf.d/zend_extensions_psa.ini by Plesk
/etc/php5/apache2/php.ini:;extension=openssl.dll ; moved to conf.d/zend_extensions_psa.ini by Plesk
/etc/php5/conf.d/zend_extensions_psa.ini:extension=openssl.dll
/etc/php5/cgi/conf.d/zend_extensions_psa.ini:extension=openssl.dll
So you've got four copies of zend_extensions_psa.ini and all of them are trying to load this nonexistent file. Edit them all, delete or comment out the lines mentioning openssl.dll, and all should be well.
The Debian package management system treats your modifications to configuration files with great respect. It doesn't undo them when you upgrade or reinstall a package unless you remove the the package with dpkg --purge or install the new one with --force-confnew.
It could be that you have something like this in your PHP configuration (php.ini maybe):
extension_dir=/usr/lib/php5/20090626/
and then
extension=openssl.dll
And it could cause a problem because there is no file like that in a given path. This could be caused by manually copying extensions and/or different extensions installers.

Categories