Jquery & Php Post Error 500 (server Internal Error)
I am stuck with an error in a webapp that I am developing, I am sure that it is quite basic error. Whenever I run this code in the web the chromium debbuger return me this error:
Solution 1:
To show errors on page:
<?php
ini_set('display_errors', '1');
ini_set('error_reporting', E_ALL);
?>
First will enable error display on the page itself instead of generating 500 error.
Second will make sure all errors are reported. This includes Notices.
Advice: Write code that does not even fire one notice.
To find the PHP error log file:
grep error_log /etc/php.ini
grep ^error_log /etc/php.ini
To install MySQL on RedHat family servers:
yum install mysql.x86_64
yum install mysql mysql-server
chkconfig --level 2345 mysqld on
service mysqld start
mysqladmin -u root password somepassword
I recommend you use the following repos if you want to have access to the latest PHP version.
wget http://mirrors.coreix.net/fedora-epel/6/x86_64/epel-release-6-7.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
To install:
rpm -Uvh remi-release-*.rpm epel-release-*.rpm
/bin/rm epel-release-*.noarch.rpm remi-release-*.rpm
perl -pi -e 's/enabled=0/enabled=1/g'/etc/yum.repos.d/remi.repo
yum update (optional -not recommended unless you know what you are doing)
yum install yum-plugin-priorities
Make sure after you install the repos you edit them and set enabled to 0 that way you can use them selectively only as you should.
yum --enablerepo=remi,epel install whatever
Solution 2:
It looks like the mysqli extension is not installed or enabled. Check your php.ini for the line extension=mysqli.so
, otherwise enable it or install it with sudo apt-get install php5-mysql
Post a Comment for "Jquery & Php Post Error 500 (server Internal Error)"