Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-06

HREF and CGI not works to open files

11 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

silvioprog

Hi.

If I open the file (in attached) "test.html" and I click in "this file...", works OK. But, if I click e "this file..." from a "http://localhost/cgi-bin/test.exe" not works. :(

All files to reproduce problem in attached.

Steps to reproduce the error:

1. Open the file "test.html" and click in "this file..."; (works)
2. Compile "test.lpi" and copy the EXE to your cgi-bin folder, open the link "http://localhost/cgi-bin/test.exe" and click in "this file..."; (not works)

Thx.

Silvio Cl?cio =============================================== Blog - <silvioprog.com.br> Twitter - <twitter.com/silvioprog> LazSolutions - <code.google.com/p/lazsolutions> Lazarus-BR - <groups.google.com.br/group/lazarus-br?hl=pt-BR> =============================================== ? ?* Conhe?a nosso canal IRC sobre Lazarus: #lazarus-br * =============================================== -------------- next part -------------- A non-text attachment was scrubbed... Name: How.zip Type: application/zip Size: 2626 bytes Desc: not available URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110616/a3761a50/attachment.zip>

Reply by email

Unknown author
to silvioprog
silvioprog wrote 14 lines
Hi. If I open the file (in attached) "test.html" and I click in "this file...", works OK. But, if I click e "this file..." from a "http://localhost/cgi-bin/test.exe" not works. :( All files to reproduce problem in attached. Steps to reproduce the error: 1. Open the file "test.html" and click in "this file..."; (works) 2. Compile "test.lpi" and copy the EXE to your cgi-bin folder, open the link "http://localhost/cgi-bin/test.exe" and click in "this file..."; (not works)

Try changing the extension to .cgi (in the HREF and the actual filename)

Michael.

Show quoted text 14 lines
Thx. -- Silvio Cl?cio =============================================== Blog - <silvioprog.com.br> Twitter - <twitter.com/silvioprog> LazSolutions - <code.google.com/p/lazsolutions> Lazarus-BR - <groups.google.com.br/group/lazarus-br?hl=pt-BR> =============================================== ? ?* Conhe?a nosso canal IRC sobre Lazarus: #lazarus-br * ===============================================

Reply by email

silvioprog
to Rafael Tuim Elias

2011/6/16 Rafael Tuim Elias :

Dear Michael I changed the extension to cgi, but dont work.

Me too. :(

Att Rafael
Silvio Cl?cio =============================================== Blog - <silvioprog.com.br> Twitter - <twitter.com/silvioprog> LazSolutions - <code.google.com/p/lazsolutions> Lazarus-BR - <groups.google.com.br/group/lazarus-br?hl=pt-BR> =============================================== ? ?* Conhe?a nosso canal IRC sobre Lazarus: #lazarus-br * ===============================================

Reply by email

silvioprog
to Unknown author: What do the log files of your webserver say ? Michael.

2011/6/16 :

Show quoted text 6 lines
On Thu, 16 Jun 2011, Rafael Tuim Elias wrote: > Dear Michael > > I changed the extension to cgi, but dont work. What do the log files of your webserver say ?

My logs in attached.

Michael.
Silvio Cl?cio =============================================== Blog - <silvioprog.com.br> Twitter - <twitter.com/silvioprog> LazSolutions - <code.google.com/p/lazsolutions> Lazarus-BR - <groups.google.com.br/group/lazarus-br?hl=pt-BR> =============================================== ? ?* Conhe?a nosso canal IRC sobre Lazarus: #lazarus-br * =============================================== -------------- next part -------------- A non-text attachment was scrubbed... Name: error.log Type: application/octet-stream Size: 1222 bytes Desc: not available URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110616/811cee8c/attachment-0002.obj> -------------- next part -------------- A non-text attachment was scrubbed... Name: access.log Type: application/octet-stream Size: 165 bytes Desc: not available URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110616/811cee8c/attachment-0003.obj>

Reply by email

Ludo Brands
to silvioprog: Hi. If I open the file (in attached) "test.html" and I click in "this file...", works OK.…

This has nothing to do with the server. The browser is blocking access to local files from remote pages. Place test.html on your server and you won't be able to access the local file neither.

If you are using firefox more info here:
http://kb.mozillazine.org/Links_to_local_pages_don%27t_work

Ludo

Show quoted text 36 lines
-----Message d'origine----- De : silvioprog [mailto:] Envoy? : jeudi 16 juin 2011 12:49 ? : Lazarus mailing list Objet : [Lazarus] HREF and CGI not works to open files Hi. If I open the file (in attached) "test.html" and I click in "this file...", works OK. But, if I click e "this file..." from a "http://localhost/cgi-bin/test.exe" not works. :( All files to reproduce problem in attached. Steps to reproduce the error: 1. Open the file "test.html" and click in "this file..."; (works) 2. Compile "test.lpi" and copy the EXE to your cgi-bin folder, open the link "http://localhost/cgi-bin/test.exe" and click in "this file..."; (not works) Thx. -- Silvio Cl?cio =============================================== Blog - <silvioprog.com.br> Twitter - <twitter.com/silvioprog> LazSolutions - <code.google.com/p/lazsolutions> Lazarus-BR - <groups.google.com.br/group/lazarus-br?hl=pt-BR> =============================================== ? ?* Conhe?a nosso canal IRC sobre Lazarus: #lazarus-br * ===============================================

Reply by email

Unknown author
to silvioprog: 2011/6/16 : My logs in attached. Silvio Cl?cio…
silvioprog wrote 9 lines
2011/6/16 : > On Thu, 16 Jun 2011, Rafael Tuim Elias wrote: >> Dear Michael >> >> I changed the extension to cgi, but dont work. > > What do the log files of your webserver say ? My logs in attached.

According to the log files, all went well when accessing your CGI:

127.0.0.1 - - [16/Jun/2011:09:47:35 -0300] "GET /cgi-bin/test.cgi HTTP/1.1" 200 254 "-"

The code 200 on this line means that all is OK.

Is the initial report correct ?
It states that all goes well locally, and fails if you go through the server.

I would expect that through the server all goes well, and locally it fails.

(it must fail locally, the browser should not allow it)

Michael.

Reply by email

silvioprog
to Ludo Brands: This has nothing to do with the server. The browser is blocking access to local files…

2011/6/16 Ludo Brands :

Show quoted text 8 lines
This has nothing to do with the server. The browser is blocking access to local files from remote pages. Place test.html on your server and you won't be able to access the local file neither. If you are using firefox more info here: http://kb.mozillazine.org/Links_to_local_pages_don%27t_work Ludo

LOL

OK, I'll put my files in htdocs, after I'll open with http://localhost/HEAPTRACE.TXT.

Thx Ludo. :^)

Silvio Cl?cio =============================================== Blog - <silvioprog.com.br> Twitter - <twitter.com/silvioprog> LazSolutions - <code.google.com/p/lazsolutions> Lazarus-BR - <groups.google.com.br/group/lazarus-br?hl=pt-BR> =============================================== ? ?* Conhe?a nosso canal IRC sobre Lazarus: #lazarus-br * ===============================================

Reply by email

silvioprog
to Unknown author: According to the log files, all went well when accessing your CGI: 127.0.0.1 - -…

2011/6/16 :

Show quoted text 30 lines
On Thu, 16 Jun 2011, silvioprog wrote: > 2011/6/16 ?: >> >> On Thu, 16 Jun 2011, Rafael Tuim Elias wrote: >>> >>> Dear Michael >>> >>> I changed the extension to cgi, but dont work. >> >> What do the log files of your webserver say ? > > My logs in attached. According to the log files, all went well when accessing your CGI: 127.0.0.1 - - [16/Jun/2011:09:47:35 -0300] "GET /cgi-bin/test.cgi HTTP/1.1" 200 254 "-" The code 200 on this line means that all is OK. Is the initial report correct ? It states that all goes well locally, and fails if you go through the server. I would expect that through the server all goes well, and locally it fails. (it must fail locally, the browser should not allow it) Michael.

I solved my problem with "<a
href="http://localhost/LWSHEAPTRACE.TXT">this file...</a>" in my CGI. Now I'll generate the LWSHEAPTRACE.TXT file in htdocs.

Thxs to all. :)

Silvio Cl?cio =============================================== Blog - <silvioprog.com.br> Twitter - <twitter.com/silvioprog> LazSolutions - <code.google.com/p/lazsolutions> Lazarus-BR - <groups.google.com.br/group/lazarus-br?hl=pt-BR> =============================================== ? ?* Conhe?a nosso canal IRC sobre Lazarus: #lazarus-br * ===============================================

Reply by email