Error: Internal Server Error (500) How to resolve this issue? - wordpress-theming

I will install theme and plugins successfully. When i will click on import demo data button after activate plugins, i get an error. Error: Internal Server Error (500) How to resolve this issue?
Note: I have LAMP Centos 7 Linux Server with 1GB RAM, 25GB Storage

Follow these steps to help in troubleshooting Internal Server Error (500) error:
First of all, Go FTP into your website
Open the file named wp-config.php on the root.
Find the line where you see define('WP_DEBUG', false);
Change false to true and save the file
And now you refresh the page you were getting an error on you should now see more descriptive error messages which will help in troubleshooting.

Create a new file in your /wp-admin/ folder and name it php.ini
Add these to the file :
memory_limit = 256M
always_populate_raw_post_data = -1
max_execution_time = 180
upload_max_filesize = 32M
post_max_size = 32M
Save it. This worked for me :)

Related

MySQL not writing to error log + wrong owner of file

I have a problem running MySQL 8 where the error logs are not being written. The contents of /etc/mysql/my.cnf includes:
[mysqld]
log_error_verbosity=2
log_error=/var/log/mysql/error.log
slow_query_log_file=/var/log/mysql/slow.log
long_query_time=5
slow_query_log=1
general_log_file=/var/log/mysql/general.log
general_log=1
With this configuration, both the slow.log and the general.log files are written correctly. The owner of these files is mysql:adm.
However, none of the error logs are written. The only thing that gets written to this file is the system messages when mysql is restarted.
The one thing I see different with error.log is that the owner of this file is mysql:mysql. I tried changing the owner of this file to mysql:adm, but still, no error logs are being written.
Any ideas would be greatly appreciated!

Word press Not Displaying Theme

Internal Server Error
The server encountered an internal error or mis configuration and was unable to complete your request.
Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
You can increase memory limit in 3 ways,
Edit your wp-config.php file
define('WP_MEMORY_LIMIT', '256M'); // if this is not in your wp-config file.
Edit your PHP.ini file
If you have access to your PHP.ini file, change the line in PHP.ini
memory_limit = 256M ; Maximum amount of memory a script may consume (64MB) //If your line shows 64M try 256M:
Edit your .htaccess file
If you don’t have access to PHP.ini try adding this to an .htaccess file:
php_value memory_limit 256M
Hope this will help you.

PID file /run/zabbix/zabbix_server.pid not readable (yet?) after start

when i try to start the zabbix-server i am getting and run/zabbix/zabbix_server.pid not readable (yet?) error,
ls -al
-rw-rw-r--. 1 zabbix zabbix 5 May 1 15:15 zabbix_server.pid
my zabbix-server config file
#This is a configuration file for Zabbix Server process
# To get more information about Zabbix,
# visit http://www.zabbix.com
############ GENERAL PARAMETERS #################
LogFile=/var/log/zabbix/zabbix_server.log
LogFileSize=0
PidFile=/var/run/zabbix/zabbix_server.pid
#PidFile=/tmp/zabbix_server.pid
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
DBSocket=/var/lib/mysql/mysql.sock
Please help. suggest me a solution
I've had this issue when building a zabbix 4.0 server. To fix the issue I made sure that the path to the PID file was correct on '/etc/zabbix/zabbix_server.conf' and '/lib/systemd/system/zabbix-server.service'.
Interestingly restarting the service alone did not get rid of the error. I needed to reboot the server and this fixed the problem.
close the selinux on centos7
It works for me.
just close selinux for this time
setenforce 0
Close selinux forever
vi /etc/selinux/config
SELINUX=disabled
That message only indicates that the server failed to start. Check the server log (/var/log/zabbix/zabbix_server.log according to your config file), it will contain a more meaningful error message.
In my case, it was a issue connecting with the database.
Remove current pid file + be sure that no zabbix_server process is running on your machine.
Zabbix server does not accept special chars like: !##$%^&*()_+,./;'[]}{|":?>< in DBPassword variable.

Getting error when importing sql file

when i m trying to load the .sql file into wamp using phpmyadmin
i m getting the fatal error as below
Fatal error: Maximum execution time of 300 seconds exceeded in C:\wamp\apps\phpmyadmin4.5.1\libraries\plugins\import\ImportSql.class.php on line 220
Location: C:\xampp\phpmyadmin\config.inc.php
$cfg['ExecTimeLimit'] = 600;
In C:\xampp\php\php.ini
Look for and Change max_execution_time
you already have execution 300 seconds, so go to that file and increase max_execution_time to to what ever you want of seconds.
Add this line
$cfg['ExecTimeLimit'] = 6000;
to phpmyadmin/config.inc.php
And Change php.ini and my.ini
post_max_size = 750M
upload_max_filesize = 750M
max_execution_time = 5000
max_input_time = 5000
memory_limit = 1000M
max_allowed_packet = 200M (in my.ini)
OR
You may also go to xampp\phpMyAdmin\libraries\config.default.php,
and change this line to fix that error.
$cfg['ExecTimeLimit'] = 600;
You are uploading huge sql file. So php cannot executed all queries within a default time limit. You need to change the php execution time limit.
Your Answer is solved in Fatal Error while trying to export a result of a query in mysql
Hope this would help you please refer: http://www.nginxtips.com/configure-max_execution_time-in-php-fpm-using-nginx/

Getting MySQL to work on CentOs 5

I've bee tearing my hair out trying to get MySQL 5 running on CentOS 5 but I've had hardly any luck.
If I leave everything as default, and launch the initial install it works a charm, but if I tell the my.cnf to use a different drive to store the data, I continuously get the "Timeout error occurred trying to start MySQL Daemon." error.
My.cnf is as follows:
[mysqld]
datadir=/database/mysql
socket=/database/mysql/mysql.sock
user=mysql
old_passwords=1
log-error=/database/log/mysqld.log
long_query_time = 10
log_slow_queries = /database/log/mysql-slow.log
query-cache-type = 1
query-cache-size = 8M
innodb_file_per_table
skip-bdb
set-variable = local-infile=0
[mysqld_safe]
pid-file=/var/run/mysqld/mysqld.pid
The folders all have the right privileges and the mysqld.log doesn't have any error messages in there, according to it, MySQL launced successfuly.
Oh, and /database is a mounted drive, but even if I trial it on a local directory, I get the same error.
Any ideas what could be going wrong? i've seriously waisted more than 5 hours on this now :(
CHEERS
Shouldn't the datadir be set to the other drive and everything else (socket) point to the standard install locations?
Did you check selinux settings? Make sure it is disabled (setenforce disabled), or spent some time learn about it (chcon command) To disable on boot look into /etc/sysconfig
Run the command : getenforce, if it says "Enforced", SE-Linux is On