php - phpinfo() is not working -
i have php installed on centos server. however, when running phpinfo() inside script test it, receive html, not interpreted information. can see folders php. can see php.ini in etc folder. php not seem working. mean test.php file looks this:
<?php phpinfo(); ?>
and response looks this:
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "dtd/xhtml1-transitional.dtd"> <html><head> <style type="text/css"> body {background-color: #ffffff; color: #000000;} body, td, th, h1, h2 {font-family: sans-serif;} pre {margin: 0px; font-family: monospace;} a:link {color: #000099; text-decoration: none; background-color: #ffffff;} ...
and on.
what seems problem , how solve it? if copy html returned, paste html file, , run there, can see formatted result, not running test.php. assume php not loaded somehow... if in interpreted html can see :
**server api apache 2.0 handler virtual directory support disabled configuration file (php.ini) path /etc/php.ini scan dir additional .ini files /etc/php.d additional .ini files parsed /etc/php.d/dbase.ini, /etc/php.d/json.ini, /etc/php.d/mysql.ini, /etc/php.d/mysqli.ini, /etc/php.d/pdo.ini, /etc/php.d/pdo_mysql.ini, /etc/php.d/pdo_sqlite.ini php api 20041225 php extension 20050922 zend extension 220051025 debug build no thread safety disabled zend memory manager enabled ipv6 support enabled registered php streams php, file, http, ftp, compress.bzip2, compress.zlib, https, ftps**
and on...
on system, there 3 websites hosted. have problem?
you need update apache configuration make sure it's outputting php type text/html, below code should work configs different.
addhandler php5-script .php addtype text/html .php
Comments
Post a Comment