# MySQL Configuration for Non-Ubuntu (CentOS/RHEL):
# Step 1: Open MySQL configuration file:
sudo nano /etc/my.cnf
# Step 2: Inside the [mysqld] section, add the following line:
[mysqld]
sql_mode = NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, NO_ENGINE_SUBSTITUTION
# Step 3: Save and close the file
# Step 4: Restart MySQL service:
sudo systemctl restart mysqld
# Apache Configuration for Non-Ubuntu (CentOS/RHEL):
# Step 1: Open Apache configuration file:
sudo nano /etc/httpd/conf.d/custom.conf
# Step 2: Add the following section inside the file:
<Directory "/">
AllowOverride All
Options +FollowSymLinks MultiViews -Indexes SymLinksIfOwnerMatch ExecCGI IncludesNOEXEC Includes
</Directory>
# Step 3: Save and close the file
# Step 4: Set proper permissions and restart Apache:
sudo chmod 644 /etc/httpd/conf.d/custom.conf
sudo systemctl restart httpd
Configuration for Ubuntu
# MySQL Configuration for Ubuntu:
# Step 1: Open or create MySQL configuration file:
sudo nano /etc/mysql/conf.d/custom.cnf
# Step 2: Add the following lines inside the file:
[mysqld]
sql_mode = "NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, NO_ENGINE_SUBSTITUTION"
# Step 3: Save and close the file
# Step 4: Restart MySQL service:
sudo systemctl restart mysql
# Apache Configuration for Ubuntu:
# Step 1: Open or create Apache configuration file:
sudo nano /etc/apache2/conf.d/custom.conf
# Step 2: Add the following section inside the file:
<Directory "/">
AllowOverride All
Options +FollowSymLinks MultiViews -Indexes SymLinksIfOwnerMatch ExecCGI IncludesNOEXEC Includes
</Directory>
# Step 3: Save and close the file
# Step 4: Set proper permissions and restart Apache:
sudo chmod 644 /etc/apache2/conf.d/custom.conf
sudo systemctl restart apache2