Page 1 of 1

XAMPP through PortableApps.com or Server2Go

PostPosted: Thu Feb 29, 2024 7:20 am
by Otto
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

Re: XAMPP through PortableApps.com or Server2Go

PostPosted: Thu Feb 29, 2024 7:33 am
by Antonio Linares
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 :-)

Re: XAMPP through PortableApps.com or Server2Go

PostPosted: Thu Feb 29, 2024 10:04 am
by Otto
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

Re: XAMPP through PortableApps.com or Server2Go

PostPosted: Thu Feb 29, 2024 10:09 am
by Otto
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

Re: XAMPP through PortableApps.com or Server2Go

PostPosted: Thu Feb 29, 2024 2:17 pm
by ssbbs
I'm use UwAmp to test my mod_harbour App.

https://www.uwamp.com/en/

Re: XAMPP through PortableApps.com or Server2Go

PostPosted: Thu Feb 29, 2024 3:06 pm
by Carles
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.

Re: XAMPP through PortableApps.com or Server2Go

PostPosted: Thu Feb 29, 2024 7:27 pm
by Otto
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



 

Re: XAMPP through PortableApps.com or Server2Go

PostPosted: Fri Mar 01, 2024 6:50 am
by Carles
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.

Re: XAMPP through PortableApps.com or Server2Go

PostPosted: Fri Mar 01, 2024 8:38 am
by Otto
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

Re: XAMPP through PortableApps.com or Server2Go

PostPosted: Fri Mar 01, 2024 11:42 pm
by Otto
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

Re: XAMPP through PortableApps.com or Server2Go

PostPosted: Sat Mar 02, 2024 10:00 am
by Carles
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.

Re: XAMPP through PortableApps.com or Server2Go

PostPosted: Sat Mar 02, 2024 6:58 pm
by Otto
Charly, thank you.
Yes this way it is working fine.
Best regards,
Otto