By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,614 Members | 1,674 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,614 IT Pros & Developers. It's quick & easy.

Add handler ? #!/usr/local/bin/php

P: n/a
I have a web page like this
#!/usr/local/bin/php
<?
echo "hello";
?>
It always shows the first line as text output. Does anyone know how to
let web server or intepreter ignor this line.

I try to add the following line in the httpd.conf
AddHandler cgi-script .php

And make the file executable. It shows " internal server error".
Since this package has around 40 or 50 pages. I do not want to get
into each file and comment it out. Any idea about this?

Thanks.
Jul 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
grant wrote:

It always shows the first line as text output. Does anyone know how to
let web server or intepreter ignor this line.

I try to add the following line in the httpd.conf
AddHandler cgi-script .php

And make the file executable. It shows " internal server error".
Since this package has around 40 or 50 pages. I do not want to get
into each file and comment it out. Any idea about this?


You could try

Options +ExecCGI

in your .htaccess, but it may be that your server config doesn't allow cgi
scripts in that directory
Jul 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.