i test with this t1.prg

FUNCTION Main()
   s_cNewLine := HB_OSNewLine()
//   s_cNewLine := chr(10)
      cContent :=
               ;
      "Content-type: text/html"                                + s_cNewLine
+ s_cNewLine + ;
      "<b> Hello </b> world <br>" +                               ;
      "I am <b>Harbour</b>"
      outstd(cContent)
return

# compile hbmk2 t1.prg -lgtcgi -rebuild

then mv the compiled file to my /home/ubuntu/sit/cgi-bin/ dir
dressing owner and permissions

the output from apache cgi is;
<b> Hello </b> world <br>I am <b>Harbour</b>


my conf of apache is:

<VirtualHost *> ServerAdmin webmas...@localhost AddType
application/x-bittorrent .torrent AddHandler cgi-script .cgi .pl .hrb #
DocumentRoot /var/www/ DocumentRoot /home/ubuntu/sit/ <Directory /> Options
Indexes FollowSymLinks AllowOverride None </Directory> <Directory
/home/ubuntu/sit/> Options Indexes FollowSymLinks MultiViews AllowOverride
None Order allow,deny allow from all </Directory> # ScriptAlias /cgi-bin/
/usr/lib/cgi-bin/ # <Directory "/usr/lib/cgi-bin"> ScriptAlias /cgi-bin/
/home/ubuntu/sit/cgi-bin/ <Directory "/home/ubuntu/sit/cgi-bin">
AllowOverride None # Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Options +ExecCGI SetHandler cgi-script Order allow,deny Allow from all
</Directory> ErrorLog /var/log/apache2/error.log # Possible values include:
debug, info, notice, warn, error, crit, # alert, emerg. #LogLevel warn
LogLevel debug CustomLog /var/log/apache2/access.log combined
ServerSignature On Alias /doc/ "/usr/share/doc/" <Directory
"/usr/share/doc/"> Options Indexes MultiViews FollowSymLinks AllowOverride
None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory> </VirtualHost>

Still in problem to correct parse the resulting html form apache2

Hth
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to