docker run --name mysql -d -e MYSQL_ROOT_PASSWORD=PASSWORD -e MYSQL_ROOT_HOST=% -p 3306:3306 mysql/mysql-server:latest
docker run --name phpmyadmin -d --link mysql:db -p 8080:80 phpmyadmin/phpmyadmin:latest
docker run --name php -d --link mysql:db -p 80:80 php:apache
docker exec php bash -c "echo \"<?php phpinfo();\" >> /var/www/html/index.php"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This PHP script creates CSV snapshots of all tables in a specified MySQL database. | |
* Useful for database analysis and backup purposes. The script connects to the MySQL | |
* database using PDO, retrieves the list of all tables (excluding specified ones), | |
* and then exports each table's contents to a CSV file. The CSV files are saved in a | |
* directory named 'snapshots' inside the script's directory, with each run generating | |
* a new timestamped subdirectory for organization. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* MySQL Table Change Logging Trigger Generator Script | |
* | |
* This script generates triggers for all tables in the $dbname database, | |
* which log INSERT, UPDATE, and DELETE operations. | |
* The triggers record modifications in the 'change_log' table, | |
* storing the name of the affected table, the type of change (INSERT, UPDATE, DELETE), | |
* the timestamp of the change, and the old and new data of the affected rows in JSON format. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; PHP 7 | |
extension = gd2 | |
;https://windows.php.net/downloads/pecl/releases/trader/ | |
;extension = php_trader.dll | |
; Xdebug 2 | |
zend_extension = php_xdebug.dll | |
xdebug.remote_port = 9000 | |
xdebug.remote_enable = On | |
xdebug.remote_autostart = On |
find . -type f -name '*_response.xml' | xargs grep -H -c -i 'success' | grep 0$ | cut -d':' -f1
find . -type f -name '*.xml' -newermt "2020-07-03" ! -newermt "2020-07-04"
diff --brief --recursive /path/to/dir1 /path/to/dir2
# yum remove php* -y
yum clean all
yum makecache
yum update -y
yum install dnf -y
dnf upgrade --refresh
yum-config-manager --disable remi-php74
yum-config-manager --enable remi-php81
dnf install php php-cli php-common php-pdo php-xml php-mbstring php-zip php-devel php-curl php-pear php-json php-xdebug -y
NewerOlder