yum install php-zip
service php-fpm restart
Category Archives: CentOS
rh-php73 – enable imagick extension module
Let’s search for imagick.so
find / -name 'imagick.so'
/usr/lib64/php/modules/imagick.so
/opt/rh/rh-php73/root/usr/lib64/php/modules/imagick.so
Let’s enable imagick extension module
nano /etc/opt/rh/rh-php73/php.d/20-imagemagick.ini
; Enable imagick extension module
extension=/opt/rh/rh-php73/root/usr/lib64/php/modules/imagick.so
Restart PHP 7.3 FPM
service rh-php73-php-fpm
Uncaught Error: Class ‘SoapClient’ not found in
PHP Fatal error: Uncaught Error: Class ‘SoapClient’ not found in
CentOS
yum install php-soap
service httpd restart
nginx – failed (13: Permission denied)
In a fresh CENTOS, while installing & testing nginx i’v faced the following error..
2019/10/10 17:54:11 [crit] 18960#0: *1 stat() "/home/www/html/index.php"
failed (13: Permission denied)
, client: 94.61.69.69, server: 51.158.69.69, request: "GET /index.php HTTP/1.1", host: "51.158.69.69"
This is how I’v solved.
chcon -R -t httpd_sys_content_t /home/www/html/
log-rotation
VirtualBox – Share internet to (linux) VM – MACOSX!
On your CentOS edit /etc/sysconfig/network-scripts/ifcfg-enp0s3 and set ONBOOT to yes and add the DNSs… in this case I’m using Google DNS ips.
ONBOOT=yes DNS1=8.8.8.8 DNS2=8.8.4.4
Should work! 😉
NOTICE Jail started without ‘journalmatch’ set. Jail regexs will be checked against all journal entries
So!, my apache-auth (and others) weren’t showing up the File list.
2018-11-07 20:02:28,651 fail2ban.filtersystemd [23523]: NOTICE Jail started without ‘journalmatch’ set. Jail regexs will be checked against all journal entries, which is not advised for performance reasons.
Lets edit /etc/fail2ban/jail.d/00-systemd.conf and set backend to auto.
Refused to display ‘https://www.domain.com/admin/top.php’ in a frame because it set ‘X-Frame-Options’ to ‘deny’.
Refused to display ‘https://www.domain.com/admin/top.php’ in a frame because it set ‘X-Frame-Options’ to ‘deny’.
Setting this up, on your .htaccess might solve the problem
Header set X-Frame-Options SAMEORIGIN
But, I have multiple frames…
Refused to display ‘https://www.domain.com/admin/top.php’ in a frame because it set multiple ‘X-Frame-Options’ headers with conflicting values (‘DENY, SAMEORIGIN’). Falling back to ‘deny’.
This worked out!
Header always unset X-Frame-Options
As seen on https://stackoverflow.com/questions/17092154/x-frame-options-on-apache
live MySQL queries
On your mysql console…
mysql> SHOW VARIABLES LIKE "general_log%";
+------------------+----------------------------+
| Variable_name | Value |
+------------------+----------------------------+
| general_log | OFF |
| general_log_file | /var/run/mysqld/mysqld.log |
+------------------+----------------------------+
mysql> SET GLOBAL general_log = 'ON';
Then!
tail -f -n200 /var/run/mysqld/mysqld.log
After debugging… don’t forget to turn it OFF!
mysql> SET GLOBAL general_log = 'OFF';
Premature end of script headers: test.cgi
Premature end of script headers: in.cgi
Apache/2.2.15 (Unix) DAV/2
PHP/5.2.17 configured
suEXEC
mod_perl installed?