XAMPP through PortableApps.com or Server2Go

mod_harbour is an Apache module that allows to run PRGs directly on the web !!!

XAMPP through PortableApps.com or Server2Go

Postby Otto » Thu Feb 29, 2024 7:20 am

Hello friends,
Has anyone experienced using Apache in a portable or standalone mode?

I see there are, for example, XAMPP through PortableApps.com or Server2Go.

Both of these solutions offer a convenient way to create a portable web development environment, allowing you to easily carry and run a web server along with other essential tools directly from portable storage devices. They are particularly useful for developers who need to demonstrate their work in different environments or for testing purposes without the need for a full server installation.

Could the installation include mod_harbour?
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: XAMPP through PortableApps.com or Server2Go

Postby Antonio Linares » Thu Feb 29, 2024 7:33 am

Dear Otto,

Have you tested runner from Carles Aubia ?

https://runnerxbase.app/
https://www.youtube.com/watch?v=y6GH0FDTmEI

Using it you don't need Apache at all, neither mod_harbour :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: XAMPP through PortableApps.com or Server2Go

Postby Otto » Thu Feb 29, 2024 10:04 am

Dear Antonio,

Yes, I have installed it. It looks very professional.
But I haven't dealt with it yet.

How exactly does it work when I pass a mod harbour program to runner rx.
I use mod harbour original. Is this syntax supported by runner rx.

What exactly does runner rc do with the prg code I pass.
From the video, it seems to me that Runner RX switches mod harbour to default to html code and harbour is integrated just like php.

For me, it's practical that I can simply hide the TEMPLATE /ENDTEXT and then edit and test the code with the FIVEWIN development environment (much xbrowse :-) ).

But maybe all this is possible with Runner rx.
I'm sure Charly will post examples.

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: XAMPP through PortableApps.com or Server2Go

Postby Otto » Thu Feb 29, 2024 10:09 am

Dear Antonio,
By the way, I briefly introduced Runner RX on ModHarbourClub on Facebook. The post is among the most read and most liked.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: XAMPP through PortableApps.com or Server2Go

Postby ssbbs » Thu Feb 29, 2024 2:17 pm

I'm use UwAmp to test my mod_harbour App.

https://www.uwamp.com/en/
line ID: ssbbstw
WeChat ID: ssbbstw
User avatar
ssbbs
 
Posts: 104
Joined: Mon Oct 17, 2005 3:03 am
Location: Taiwan

Re: XAMPP through PortableApps.com or Server2Go

Postby Carles » Thu Feb 29, 2024 3:06 pm

Otto,

Otto wrote:For me, it's practical that I can simply hide the TEMPLATE /ENDTEXT and then edit and test the code with the FIVEWIN development environment (much xbrowse :-) ).


If you want to work directly against html it is very easy. You go to RX Menu->Config->enable path \html, save changes and restart server

Case A. In the \html folder create the otto.prg file

Code: Select all  Expand view
function main()

    local cHtml := ''
   
    USE .\data\test SHARED NEW
   
    TEXT cHtml
        <h1>Hello Runner ! (from prg)</h1>
        <hr>
    ENDTEXT
   
    for n := 1 to 5
        cHtml += FIELD->first + ' ' + FIELD->last + '<br>'
       
        DbSkip()
    next
   
    cHtml += '<hr>'
   
retu cHtml


Run from url --> localhost:81/html/otto.prg

Case B. In the \html folder create the file otto.html

Code: Select all  Expand view
<h1>Hello Runner ! (from html)</h1><hr>

<?prg
    local cHtml := ''
   
    USE .\data\test SHARED NEW
   
    for n := 1 to 5
        cHtml += FIELD->first + ' ' + FIELD->last + '<br>'
       
        DbSkip()
    next
   
    retu cHtml
?>

<hr>


Run from url --> localhost:81/html/otto.html

Easy !

C.
Salutacions, saludos, regards

"...programar es fácil, hacer programas es difícil..."

UT Page -> https://carles9000.github.io/
Forum UT -> https://discord.gg/bq8a9yGMWh
Skype -> https://join.skype.com/cnzQg3Kr1dnk
User avatar
Carles
 
Posts: 1136
Joined: Fri Feb 10, 2006 2:34 pm
Location: Barcelona

Re: XAMPP through PortableApps.com or Server2Go

Postby Otto » Thu Feb 29, 2024 7:27 pm

Hello Charly,
thank you. Your code is working fine.

Image

But if I use mod harbour code I get:

Error COMPILER/(1001) 30
Description Syntax error "syntax error at 'PARAMS'"
Operation Line: 8


Best regards,
Otto

Code: Select all  Expand view


    function main()

        local cHtml := ''
       
        USE  .\data\test.dbf SHARED NEW
       
        TEMPLATE PARAMS cHtml
//   TEXT cHtml
            <h1>Hello Runner ! (from prg)</h1>
            <hr>
        ENDTEXT
       
        for n := 1 to 5
            cHtml += FIELD->first + ' ' + FIELD->last + '<br>'
           
            DbSkip()
        next
       
        cHtml += '<hr>'
    ? cHtml
    retu cHtml



 
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: XAMPP through PortableApps.com or Server2Go

Postby Carles » Fri Mar 01, 2024 6:50 am

Otto,

RX no usa los mismos comandos de mod . Si quieres hacer lo que quieres puedes intentar poner esto

Code: Select all  Expand view

#xcommand TEMPLATE <var> [ PARAMS [<v1>] [,<vn>] ] ;
=> ;
    #pragma __cstream |<var> += UInlinePrg( UReplaceBlocks( %s, '<$', "$>" [,<(v1)>][+","+<(vn)>] [, @<v1>][, @<vn>] ) )
 


No lo he probado

Saludos.
C.
Salutacions, saludos, regards

"...programar es fácil, hacer programas es difícil..."

UT Page -> https://carles9000.github.io/
Forum UT -> https://discord.gg/bq8a9yGMWh
Skype -> https://join.skype.com/cnzQg3Kr1dnk
User avatar
Carles
 
Posts: 1136
Joined: Fri Feb 10, 2006 2:34 pm
Location: Barcelona

Re: XAMPP through PortableApps.com or Server2Go

Postby Otto » Fri Mar 01, 2024 8:38 am

Hello Charly,

Thank you. I have the Runner RX environment on my PC at home. I will try it in the evening.

RX does not use the same mod commands. If you want to do what you're looking to do, you can try entering this.


Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: XAMPP through PortableApps.com or Server2Go

Postby Otto » Fri Mar 01, 2024 11:42 pm

Charly,
can you tell me what to use with the build in mod harbour version for

TEMPLATE PARAMS
ENDTEXT

xCommand is not working for me.

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: XAMPP through PortableApps.com or Server2Go

Postby Carles » Sat Mar 02, 2024 10:00 am

Otto,

This code works perfectly

Code: Select all  Expand view
#xcommand TEMPLATE <var> [ PARAMS [<v1>] [,<vn>] ] ;
=> ;
    #pragma __cstream |<var> += UInlinePrg( UReplaceBlocks( %s, '<$', "$>" [,<(v1)>][+","+<(vn)>] [, @<v1>][, @<vn>] ) )

function main()

    local cHtml := ''
    local cNow  := dtoc(date()) + ' at ' + time()
   
    USE .\data\test SHARED NEW
   
    TEXT cHtml
        <h1>Hello Runner ! (from prg)</h1>
        <hr>
    ENDTEXT    
   
    for n := 1 to 5
        cHtml += FIELD->first + ' ' + FIELD->last + '<br>'
       
        DbSkip()
    next
   
    cHtml += '<hr>'
   
    TEMPLATE cHtml PARAMS cNow
        <style>
            .mybox {
                border: 2px solid red;
                box-shadow: 5px 5px 5px;
                padding: 10;
                border-radius: 5px; 
                font-size: 30px;               
            }
        </style>
       
        <div class='mybox'>
            My box at <$ cNow $>
        </div>
    ENDTEXT    
   
retu cHtml
 


Image

C.
Salutacions, saludos, regards

"...programar es fácil, hacer programas es difícil..."

UT Page -> https://carles9000.github.io/
Forum UT -> https://discord.gg/bq8a9yGMWh
Skype -> https://join.skype.com/cnzQg3Kr1dnk
User avatar
Carles
 
Posts: 1136
Joined: Fri Feb 10, 2006 2:34 pm
Location: Barcelona

Re: XAMPP through PortableApps.com or Server2Go

Postby Otto » Sat Mar 02, 2024 6:58 pm

Charly, thank you.
Yes this way it is working fine.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: XAMPP through PortableApps.com or Server2Go

Postby asesormix » Thu May 16, 2024 12:57 am

Saludos Sr Charles.
Soy principiante en este arte de la programacion Web.

Yo habia desarrollado este ejemplo en ModHarbour pero al probarlo en Rx da error.

Code: Select all  Expand view

function Main()
local cHtml := ''
  private cArgs   := AP_Args()
  private raizmix := "d:\c\sistemas\mixnet\"
 *raizmix:="
d:/c/sistemas/mixnet/"

TEXT cHtml
<html>
<head>
<title>JapSystem C.A.</title>
</head>
<body>

<form method="
post" action="Acceso2.prg">
<font size=5>Bienvenido Al Sistema...</font>
<br>
<font size=5>Ingrese la clave:</font>
<input type="
password" name="clave">
<br>
<input type="
hidden" name="raizmix" value="<?prg return raizmix ?>">    
<br>
<input type="
submit" value="confirmar">
</form>

<p><?prg                  

  trama:="
"
  if !empty( cArgs )
   trama:=trama+"
La Clave Ingresada es Incorrecta. Por Favor Intente Nuevamente..."
  endif  

return trama  ?> </p>

</body>
</html>

   ENDTEXT
return cHtml



Descrition: Unknown or unregistered function symbol
Operation: AP_ARGS
Code: BASE/EG_ARG(1) 6101

Que debo corregir para que funcione en Rx?.
Gracias por toda su dedicacion y esmero.
asesormix
 
Posts: 6
Joined: Wed Feb 12, 2020 4:55 pm

Re: XAMPP through PortableApps.com or Server2Go

Postby Carles » Sat May 18, 2024 8:37 am

Hola,

Te aconsejo que te leas el manual, que se encuentra abajo del menu. En poco rato entenderas bien el uso del RX :D

Saludos.
C.
Salutacions, saludos, regards

"...programar es fácil, hacer programas es difícil..."

UT Page -> https://carles9000.github.io/
Forum UT -> https://discord.gg/bq8a9yGMWh
Skype -> https://join.skype.com/cnzQg3Kr1dnk
User avatar
Carles
 
Posts: 1136
Joined: Fri Feb 10, 2006 2:34 pm
Location: Barcelona


Return to mod_harbour

Who is online

Users browsing this forum: No registered users and 7 guests