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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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. |
|
|||
|
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 |