Sunday, January 25, 2026

how to block xmlrpc.php Apache server (ubuntu)

 Oper this file : 

vi /etc/apache2/conf-available/disable-xmlrpc.conf

and paste the below content:


<Files "xmlrpc.php">
    Require all denied
</Files>

save and exit

then run these commands, 


sudo a2enconf disable-xmlrpc

and
sudo systemctl reload apache2

Try accessing:
https://yourdomain.com/xmlrpc.php

You should see:
403 Forbidden 

 

like : 

root@akwal:~# vi /etc/apache2/conf-available/disable-xmlrpc.conf

 <Files "xmlrpc.php">
    Require all denied
</Files>

root@akwal:~#sudo a2enconf disable-xmlrpc
root@akwal:~#sudo systemctl reload apache2
 

Thursday, February 6, 2025

change / replace text in linux without open the file

 sed -i 's/short_open_tag = Off/short_open_tag = On/g' /etc/php/5.6/cli/php.ini

 

 

in this command, am changing just Off to On in php.ini file.

 

its works fine in ubuntu.

 

Cheers....!!!

 

#sed -i 's/original/new/g' file.txt

Explanation:

    sed = Stream Editor
    -i = in-place (i.e. save back to the original file)

    The command string:
        s = the substitute command
        original = a regular expression describing the word to replace (or just the word itself)
        new = the text to replace it with
        g = global (i.e. replace all and not just the first occurrence)

    file.txt = the file name

Monday, October 28, 2024

Default my.cnf content of maria-db

 



 # The MariaDB configuration file
#
# The MariaDB/MySQL tools read configuration files in the following order:
# 0. "/etc/mysql/my.cnf" symlinks to this file, reason why all the rest is read.
# 1. "/etc/mysql/mariadb.cnf" (this file) to set global defaults,
# 2. "/etc/mysql/conf.d/*.cnf" to set global options.
# 3. "/etc/mysql/mariadb.conf.d/*.cnf" to set MariaDB-only options.
# 4. "~/.my.cnf" to set user-specific options.
#
# If the same option is defined multiple times, the last one will apply.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# If you are new to MariaDB, check out https://mariadb.com/kb/en/basic-mariadb-articles/

#
# This group is read both by the client and the server
# use it for options that affect everything
#
[client-server]
# Port or socket location where to connect
# port = 3306
socket = /run/mysqld/mysqld.sock

# Import all .cnf files from configuration directory
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mariadb.conf.d/

Where is the mysql root password located in ubuntu after ispconfig installation

 

 

Please find the password in this file.

 

root@akwal:~# cat  /usr/local/ispconfig/server/lib/mysql_clientdb.conf


it will be like this:

 

 

Cheers....!!!

Friday, May 31, 2024

ERROR 1118 (42000) at line 33: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.

ERROR 1118 (42000) at line 33: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.

 

 

This generally happens, when innodb_strict_mode is active, 

make it off / deactivate using this command in sql prompt,

 

MariaDB [(none)]> SET GLOBAL innodb_strict_mode = 0;
Query OK, 0 rows affected (0.000 sec)

then it will works,

That's it.

Cheers...!

Saturday, May 25, 2024

ISPConfig fail to create MySQL database

 

It is because ISPConfig can’t connect to MySQL server for creating new MySQL database.

To fix, edit file /usr/local/ispconfig/server/lib/mysql_clientdb.conf 

e.g:

root@akwal:~# vi /usr/local/ispconfig/server/lib/mysql_clientdb.conf

and update the new root password.


<?php

$clientdb_host                  = 'localhost';
$clientdb_user                  = 'root';
$clientdb_password          = 'YourDbPasswd';

?>


update this password, whenever you change the db root password.

that's it.


cheers...!!!

Wednesday, February 28, 2024

How to Fix SQL CRC Error?

 

 


Can be check through the following basic commands:

Step 1: The root cause of the CRC error is an I/O subsystem issue, it is necessory to fix the storage issues by run the CHKDSK command to fix the cyclic redundancy check error in SQL.

Run the CHKDSK utility on the disk where database stored with the /F parameter. Below is a screenshot of the command to check and fix the F: drive:


chkdsk d: /f


Step 2: A complete disk de-fragmentation is recommended after the “chkdsk” is completed with a successful repair of any errors.


defrag d: /u

These are the basic disk repair commands,

hope your issue will be resolved.


Cheer...!!!