Monday, April 14, 2014

Apache - Browser throwing sql query and php code

Apache - Browser showing mysql queries and php code

Open php.ini file
Find "short_open_tag = Off" and make it enabled
short_open_tag = On
Restart Apache. If you are using xampp, restart lampp after making changes in php.ini


If you are using xampp and you are still facing this problem.
Uncomment following line in the file /opt/lampp/etc/httpd.conf
Include etc/extra/httpd-xampp.conf
This line should not be commented.

If you are using centos / RHEL / fedora and you are still facing the problem
Run following command in the terminal.
# yum install php php-mysql -y

ubuntu - could not perform immediate configuration on 'python-minimal'

If you are facing this error, Run the following command in the terminal
# sudo apt-get -f install -o APT::Immediate-Configure=false

CentOS / RHEL / fedora - Apache error - include() unable to allocate memory for pool

Add line in httpd.conf
php_flag apc.cache_by_default Off

Add line in php.ini
apc.enabled = 0

Restart httpd

# service httpd restart