Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've set up a centOS server with apache, php and mysql installed. I've uploaded my db and php pages, but whenever I view the php files from a browser I get the phpinfo() page displaying, followed by the php page below. Any suggestions??

share|improve this question

closed as too localized by womble, Scott Pack, Magellan, John Gardeniers, dunxd Nov 2 '12 at 11:09

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Check your php.ini for auto_prepend_file configuration option .. or the same via .htaccess/Apache config file if it is allowing to setting up php config variable in such way. –  LazyOne Aug 26 '11 at 22:13
    
The auto_prepend_file config is blank –  Ben C Aug 26 '11 at 22:15

1 Answer 1

You can run grep -lr phpinfo /var/www/ to find the file. I think it is in one include file that is included()/required() in all pages.

share|improve this answer
    
After running that command is displays: /var/www/html/myphpfile.php /var/www/html/myphpfile.php~ Any idea why one of my files is being shown as phpinfo? –  Ben C Aug 26 '11 at 22:17
1  
@Ben: No, but if you grep again through /var/www and your Apache config for that filename I'll bet you'll find an indication. –  womble Aug 26 '11 at 22:29

Not the answer you're looking for? Browse other questions tagged or ask your own question.