Visualizza post

Questa sezione ti permette di visualizzare tutti i post inviati da questo utente. N.B: puoi vedere solo i post relativi alle aree dove hai l'accesso.


Post - ujlain

Pagine: [1]
1
Domande tecniche / Re:Avvio programma Web
« il: 23 Febbraio 2021, 16:51:45 »
Not certain if this old tread was completely resolved or not
Kindly follow the following steps to run your compiled Gambas web application under Apache2 Web server

Install Apache2
1.   Check Apache is installed   
$ apache2 -v
2.   Else install acahe2
$ sudo apt-get install apache2
3.   $ sudo mkdir /var/www/gbCGI
4.   $ sudo xed /etc/apache2/apache2.conf

Add following into above file
# --------- added by UZI -------------------------
ServerName localhost
ScriptAlias /gbCGI/ /var/www/gbCGI/
Options +ExecCGI
AddHandler cgi-script .cgi .pl .py .gambas

        <Directory "/var/www/gbCGI">
            AllowOverride None
      Options +Indexes
            Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
            Require all granted
        </Directory>
# ------------------------------------------------


Gambas Test Project
    • Create a sample test Gambas Web project .. it could something as simple as print "Hi there"
    • Check its functioning within local webserver by compiling and running it
    • Copy the myGbWebApp.gambas file into /gbGI directoiry (as above at step 3 )
    • Give it execute permissions chmod +x myGbWebApp.gambas
    • It should show now in broswer http://localhost/gbCGI/myGbWebApp.gambas
    • Even if myGbWebApp.gambas is renamed to a.cgi – it works !! works even without any extension .. perhaps the #! is embedded within Gambas executable file

5.  Try checking the hosted files in browser, it may spit out text as it is i.e the CGI module did not have a symbolic link there: The CGI module was not enabled by default.
6.  $ cd /etc/apache2/mods-enabled
7.  $ sudo ln -s ../mods-available/cgi.load
8.  Reload Apache configuration  $ sudo service apache2 reload

Now you are ready to host big web applications too !!

2
Programmazione / How to create a multiple process listener ?
« il: 08 Febbraio 2021, 12:42:03 »
    What I am doing :-
    • I fire multiple instances of an identical command (to convert large MP4 into smaller sized MP4) These processes take different time to execute & terminate.
    • During execution , each process , during its run time outputs multiple progress statements to terminal
    Problem Statement :-
    • Right now , all process render output to single terminal screen
    • I want to capture output of each process and instead show progress process wise on grid layout
    • How do I listen to output of each process ? or how do I create an event based listener for each process ? within this listener , I can write regex code to decipher process and show on grid layout
    Sample skeleton project attached[/list]

    Pagine: [1]