Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I tried to start php on my snow leopard server.

The file is

<?php phpinfo() ?>

I turned on php and put the file in /Library/WebServer

I get the following two errors in the log:

(8)Exec format error: exec of '/Library/WebServer/test/index.php' failed
Premature end of script headers: index.php

What can I do to fix this?

share|improve this question
up vote 1 down vote accepted

I believe you need a ; after phpinfo(), and to actually echo (display) the information:

<?php echo phpinfo(); ?>
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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