Anchors
Character Classes
POSIX
Assertions
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Quantifiers
Add a ? to a quantifier to make it ungreedy. Escape Sequences
“Escaping” is a way of treating characters which have a special meaning in regular expressions literally, rather than as special characters. Common Metacharacters
The escape character is usually \ Special Characters
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Groups and Ranges
Ranges are inclusive. Pattern Modifiers
* PCRE modifier String Replacement
Some regex implementations use \ instead of $. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PHP error
- There has been a critical error on this website.
- There has been a critical error on this website. Please check your site admin email inbox for instructions.
- Service Unavailable. The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
- Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
- Learn more about troubleshooting WordPress.
Solutions
- Update wordpress
- Check PHP version and validate with installed wordpress
- Re-build PHP
Disk Usage Quota
https://help.directadmin.com/item.php?id=42
Cannot open quotafile /home1/aquota.user: No such file or directory
repquota: Not all specified mountpoints are using quota.
https://forums.centos.org/viewtopic.php?t=50869
touch /home1/aquota.user
touch /home1/aquota.group
mount -vo remount /home1
quotacheck -vgum /home1
apache_public_html=0
home_override_list=/home:/home2:/home3
/etc/default/useradd
HOME=/home
Unable to open ./data/users/new/du_breakdown.list for reading. No such file or directory
To check whether quota package is installed or not
rpm –qa quota
or
yum list quota
Disk quota configuration in four steps
Enable quota
Remount file system
Create quota files
Configure quota policy
Enabling quota
To mount all partitions in file system at boot time, linux uses /etc/fstab file. This file contains six necessary information about the partition.
- What to mount: /dev/sda1 or UUID or device label
- Where to mount: / or /boot or /home or swap
- File system: xfs or swap or ext4
- Options: defaults, usrquota, grpquota
- Dump support: 0 or 1
- Automatic check:
vi /etc/fstab
Add defaults,usrquota,grpquota in option four. Save and restart system.
Remounting file system
mount –o remount /home
cat /etc/fstab
df -h
mount
/usr/local/directadmin/directadmin c | grep quota_partition
/usr/local/directadmin/directadmin c | grep use_xfs_quota
repquota `/usr/local/directadmin/directadmin c | grep quota_partition= | cut -d= -f2`
ls -lad /home/tmp
ls -la /home/tmp
Unable to read the User data files for username
- Could not execute your request
- Domain does not exist on the system. Unable to find domaincom in /etc/virtual/domainowners, and domain is not set as hostname (servername) in DirectAdmin configuration. Exiting…
no valid domain found – exiting - Unable to read the User data files for username
This would mean that the account likely already exists on the system in /etc/passwd, and the the data in /usr/local/directadmin/data/users/username does not exist.
- If there is not yet any data for the User on the system, then remove the account from the system, and try the restore again.
userdel -r username
- If there is data setup everywhere that you do not want to delete, then try repairing the DA account with:
cd /usr/local/directadmin/scripts ./fix_da_user.sh username user domain.com
How To convert all MySQL tables from MyISAM into InnoDB Storage engine
Purpose:
To solve the error “General error: 1005 Can’t create table ` `.`review_round_files` (errno: 150 “Foreign key constraint is incorrectly formed”)”
We will convert MySQL tables from MyISAM into InnoDB in two different ways.
- PhpMyAdmin (suitable for shared hosting)
- SSH Methed (suitable for vps, vds, dedicated server owner)
PhpMyAdmin
- Login to PhpMyAdmin
- run the query below (Replace DBNAME to your database name)
SELECT CONCAT('ALTER TABLE ', TABLE_SCHEMA, '.', TABLE_NAME,' ENGINE=InnoDB;') FROM Information_schema.TABLES WHERE TABLE_SCHEMA = 'DBNAME' AND ENGINE = 'MyISAM' AND TABLE_TYPE = 'BASE TABLE' - You will get result like below
ALTER TABLE DBNAME.access_keys ENGINE=InnoDB; ALTER TABLE DBNAME.announcement_settings ENGINE=InnoDB; ALTER TABLE DBNAME.announcement_type_settings ENGINE=InnoDB; ALTER TABLE DBNAME.announcement_types ENGINE=InnoDB; ALTER TABLE DBNAME.announcements ENGINE=InnoDB; ALTER TABLE DBNAME.article_event_log ENGINE=InnoDB; ALTER TABLE DBNAME.auth_sources ENGINE=InnoDB;
- If you don’t see full line text like above, you have to activate the “Full Text” option just above the result.
- Now copy the result and paste it in PhpMyAdmin query again and wait for the conversion.
- You will get success message.
- That’s all.
SSH Method
- Login to MySQL/MariaDB
mysql -u root -p
- Then run below command to get conversion commands.
SELECT CONCAT('ALTER TABLE ',TABLE_NAME,' ENGINE=InnoDB;')
FROM INFORMATION_SCHEMA.TABLES
WHERE ENGINE='MyISAM'
AND table_schema = 'yourdb';
Replace yourdb to your database name. And the conversion commands will be used later.
- Now switch to the database
use yourdb
- Then copy each line of conversion commands and paste it. For example
ALTER TABLE pln_deposit_objects ENGINE=InnoDB; ALTER TABLE issues ENGINE=InnoDB; ALTER TABLE custom_section_orders ENGINE=InnoDB; ALTER TABLE access_keys ENGINE=InnoDB; ALTER TABLE journals ENGINE=InnoDB; ALTER TABLE notification_subscription_settings ENGINE=InnoDB; ALTER TABLE notifications ENGINE=InnoDB; ALTER TABLE review_object_types ENGINE=InnoDB; ALTER TABLE filter_settings ENGINE=InnoDB; ALTER TABLE users ENGINE=InnoDB;
That’s all.
Related scripts you may need.
Convert all DBNAME’s InnoDB Tables to MyISAM
SELECT CONCAT('ALTER TABLE ', TABLE_SCHEMA, '.', TABLE_NAME,' ENGINE=MyISAM;')
FROM Information_schema.TABLES WHERE TABLE_SCHEMA = 'DBNAME' AND ENGINE = 'InnoDB' AND TABLE_TYPE = 'BASE TABLE'
Convert all DBNAME’s MyISAM Tables to InnoDB
SELECT CONCAT('ALTER TABLE ', TABLE_SCHEMA, '.', TABLE_NAME,' ENGINE=InnoDB;')
FROM Information_schema.TABLES WHERE TABLE_SCHEMA = 'DBNAME' AND ENGINE = 'MyISAM' AND TABLE_TYPE = 'BASE TABLE'
Convert all InnoDB Tables to MyISAM (all databases)
SELECT CONCAT('ALTER TABLE ', TABLE_SCHEMA, '.', TABLE_NAME, ' engine=MyISAM;')
FROM information_schema.TABLES WHERE ENGINE = 'InnoDB';
Convert all MyISAM Tables to InnoDB (all databases)
SELECT CONCAT('ALTER TABLE ', TABLE_SCHEMA, '.', TABLE_NAME, ' engine=InnoDB;')
FROM information_schema.TABLES WHERE ENGINE = 'MyISAM';
- « Previous Page
- 1
- …
- 43
- 44
- 45
- 46
- 47
- …
- 92
- Next Page »