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

This is a discussion on Add handler ? #!/usr/local/bin/php within the PHP Language forums, part of the PHP Programming Forums category; I have a web page like this #!/usr/local/bin/php <? echo "hello"; ?> It always shows ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-07-2003
grant
 
Posts: n/a
Default Add handler ? #!/usr/local/bin/php

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.
Reply With Quote
  #2 (permalink)  
Old 08-07-2003
matty
 
Posts: n/a
Default Re: Add handler ? #!/usr/local/bin/php

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
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:35 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0