Hi Nicole! Thanks for your reply!
I'm a little confused: Do I need to compile the php as cgi? I thought it was when you wanted to run php from commanline: as ./pruebacgi.php (Servers-CGI/Commandline) But in my case I want to call a php like that: http://xx.yy.zz/cgi-bin/pruebacgi.php and this php has this line #!/usr/local/bin/php Do I have to compile a php as a cgi, or do I need to do something on the apache server? Please could you clarify my doubts. For example this is a sample of the code: <?php header("Content-Type: text/vnd.wap.wml"); $log=2; $fp1 = fopen("logs/$HTTP_X_UP_SUBNO.get_location", "a"); $separador="-x-x-x-x-x-x-x-x- ".date("l dS of F Y h:i:s A")." -x-x-x-x-x-x-x-x-"; $qerror="0"; ?> <?echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\r\n";?> <!DOCTYPE wml PUBLIC "-//PHONE.COM//DTD WML 1.1//EN" "http://www.phone.com/dtd/wml11.dtd"> <wml> <card title="teste"> <p align="center"> <br/>Test<br/> </p> </card> </wml> I really appreciate your help. Kisses, Ivone --- Nicole Lallande <[EMAIL PROTECTED]> wrote: > Ivone -- > > You are using a PERL invocation for php. PHP > scripts begin with > <?php > > the # sign is a comment in PERL - not in PHP. > > To run php as cgi you need to install the php cgi > version (as opposed to > the apache modular installation.) That will allow > you to run cgi > scripts on the command line. > > http://www.php.net/manual/en/install.commandline.php > > Best regards, > > Nicole > > Ivone Uribe wrote: > > >Hello all! > > > >I have this problem: > > > >I need to run a php > >(http://xx.yy.zz/cgi-bin/pruebacgi.php) that > contains > >that line > > > >#!/usr/local/bin/php -q > >I get it an error from my apache log: > >malformed header from script. Bad header= php > >[options] -r <cod > >e>: /www/cgi-bin/pruebacgi.php > >I hope someone can help me! I don't know what can I > >do. > > > >In fact if I run any php that have this line > >#!/usr/local/bin/php > >I get an error like that > >Premature end of script headers: > >/www/cgi-bin/pruebacgi.php > > > > > > > >I have installed the php4.3.3 and apache 1.3.28. > > > >I configured the php with this line > >./configure --with-mysql > >--with-apache=../apache_1.3.28 --enable-track-vars > > > >Do I need to configure some else in my apache or > php > >configuration file. Whan can I do to solve this > >problem? > > > > > >Thanks in advance!!!!!!!! > >KISSES > >Ivone > > > > > > > > > > > >__________________________________ > >Do you Yahoo!? > >Free Pop-Up Blocker - Get it now > >http://companion.yahoo.com/ > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > __________________________________ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php