Wes James | 1 Mar 01:12 2012
Picon

Re: yaws_api:delete_cookie_session not working?

On Tue, Feb 28, 2012 at 5:00 PM, Wes James <comptekki@...> wrote:
> With the code below, if I set the case as "case 2 of" the cookie is
> set, but if I then set it to 1 and refresh the page Cookie is still
> the same after executing delete_cookie_session.
>

I ended up just using basic cookies  api and I get that to work.

-wes

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
Seb Seb | 5 Mar 14:50 2012
Picon

Scripting language ports

Hello,

I am searching informations about scripting language like Tcl, lua perl... wich when used as ports can decode erlang terms. Does anyone know a programming language with a good support for this?

Regards

Sebovick

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@...
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Steve Vinoski | 5 Mar 17:07 2012
Picon

Re: Scripting language ports

On Mon, Mar 5, 2012 at 8:50 AM, Seb Seb <sebovick@...> wrote:
> Hello,
>
> I am searching informations about scripting language like Tcl, lua perl...
> wich when used as ports can decode erlang terms. Does anyone know a
> programming language with a good support for this?

For python:

http://pypi.python.org/pypi/erlport

For perl:

http://search.cpan.org/~hio/Erlang-Port-0.04/lib/Erlang/Port.pm

I've never used either of them so I have no idea whether they work,
whether they're under active development, etc.

I don't think it would be too hard to write one for other languages,
since you could look at the original C code in the encode and decode
directories found via the link below and translate:

https://github.com/erlang/otp/tree/master/lib/erl_interface/src

Another alternative is to use JSON to let Erlang communicate with the
scripting language, since JSON libs are available for pretty much
every language.

--steve

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
Claes Wikstrom | 5 Mar 17:12 2012

Re: Scripting language ports

On 3/5/12 8:07 AM, Steve Vinoski wrote:

> Another alternative is to use JSON to let Erlang communicate with the
> scripting language, since JSON libs are available for pretty much
> every language.
>

+1

/klacke

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
Steve Vinoski | 5 Mar 17:21 2012
Picon

Re: Difficulties for setup yapp

This is now fixed in github master, thanks to Mikael. And thanks
Sergei for pointing out the source of the problem.

--steve

On Tue, Feb 21, 2012 at 3:35 PM, Mikael Karlsson
<karlsson.rm@...> wrote:
> Ahh,
> I actually have the latest git version, but I didn't run ./configure
> for a long time meaning I still have the old version of include.mk
> since it is generated from include.mk.in.
> I guess I have to keep track of what the guys on the top floor are
> doing, will try to fix asap.
> Thanks,
> Mikael
>
>
>
>
> 2012/2/21 Sergei Golovan <sgolovan@...>:
>> On Tue, Feb 21, 2012 at 10:33 PM, Mikael Karlsson
<karlsson.rm@...> wrote:
>>>
>>> The %VSN% and %MODULES% are filled in by the make of src/yapp.app.src.
>>> You will find in the src/Makefile that it includes ../vsn.mk and also
>>> include.mk in the yaws root. There you will find the script
>>> substituting the %VSN% and %MODULES% and the make rules for .app
>>> files.
>>
>> In fact, if you take a look into include.mk you'll find the perl
>> script which is supposed to substitute version and modules list:
>>
>> APPSCRIPT = '$$vsn=shift; $$mods=""; while( <at> ARGV){ $$_=shift;
>> s/^([A-Z].*)$$/\'\''$$1\'\''/; $$mods.=", " if $$mods; $$mods .= $$_;
>> } while(<>) { s/\{vsn, \{cmd, .*\}\}/\{vsn, "$$vsn"\}/;
>> s/\{modules,\[\]\}/\{modules,\[$$mods\]\}/; print; }'
>>
>> (it's in a makefile, hence the double dollars).
>>
>> It works fine for yaws.app.src because it contains
>>
>>  {vsn, {cmd, "sed -ne '1,/^YAWS_VSN=/s/^YAWS_VSN=//p' vsn.mk 2>/dev/null"}},
>>  {modules,[]},
>>
>> but it doesn't work for yapp.app.src as it contains
>>
>>  {vsn,"%VSN%"},
>>  {modules,[%MODULES%]},
>>
>> So, it's a bug (the current git master still affected by it).
>>
>> Seems like the yapp.app.src was forgotten in the following commit:
>> https://github.com/klacke/yaws/commit/bedbc05b597a9c0ed2a74c8cb763e776161ccb5a
>>
>> Cheers!
>> --
>> Sergei Golovan
>
> ------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
> _______________________________________________
> Erlyaws-list mailing list
> Erlyaws-list@...
> https://lists.sourceforge.net/lists/listinfo/erlyaws-list

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
Patrick Moy | 5 Mar 17:40 2012
Picon

Virtual hosting multiple web servers on same IP address in embedded mode.

Yaws allows me to set 3 different docroot directories as shown below.  But according to YAWS documentation, all 4 versions of yaws_api:embedded_start_conf require docroot as the first parameter.  Regardless of what I set in SconfList, the passed in docroot is used.  So in example below, YAWS uses Docroot2 for all 3 port numbers.

Is it possible to set up several virtual servers on same IP address in embedded mode, and have the servers reference different docroot directories?




Id = "embedded",
Docroot1 = "webResources/www1",
Docroot2 = "webResources/www2",
Docroot3 = "webResources/www3",
GconfList = [{id, Id}],   
SconfList = [[{port, 8001}, {listen, {192,168,37,25}}, {docroot, Docroot1}],
[{port, 8002}, {listen, {192,168,37,25}}, {docroot, Docroot2}],
[{port, 8003}, {listen, {192,168,37,25}}, {docroot, Docroot3}]],

{ok, SCList, GC, ChildSpecs} = yaws_api:embedded_start_conf(Docroot2, SconfList, GconfList, Id),



------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@...
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Sébastien Serre | 6 Mar 01:10 2012
Picon

Re: Scripting language ports

On 05/03/2012 17:12, Claes Wikstrom wrote:
> On 3/5/12 8:07 AM, Steve Vinoski wrote:
>
>> Another alternative is to use JSON to let Erlang communicate with the
>> scripting language, since JSON libs are available for pretty much
>> every language.
>>
> +1
>
>
> /klacke
>
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> _______________________________________________
> Erlyaws-list mailing list
> Erlyaws-list@...
> https://lists.sourceforge.net/lists/listinfo/erlyaws-list
I have not thinked to JSON. I will try with it.

Thanks

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
rene | 7 Mar 00:27 2012

Adding a yapp not working

Hi,

I'm quite new to erlang and yaws. As I like to use yaws in yapp mode I started
with the example coming with yapp (yapp_ex_1). I configured yaws according to
the documentaton:

...
ebin_dir = /opt/local/lib/yapp/ebin
ebin_dir = /Users/rene/GitWare/yaws-1.92/applications/yapp/ \
            examples/yapp_ex_1/ebin
...
runmod = yapp
...
<server myexternalserver>
        port = 8000
        listen = 0.0.0.0
        docroot = /Users/rene/GitWare/yaws-1.92/applications/yapp/examples
/yapp_ex_1/priv/docroot/
        arg_rewrite_mod = yapp
        <opaque>
           yapp_server_id = external
        </opaque>
</server>

<server myinternalserver>
        port = 8001
        listen = 0.0.0.0
        docroot = /opt/local/lib/yapp/priv/docroot/
        arg_rewrite_mod = yapp
        <opaque>
           yapp_server_id = internal
           bootstrap_yapps = yapp
        </opaque>
</server>

When I start yaws it successful loads yapp. In the browser I get the yapp page
with localhost:8001 and not with localhost:8001/yapp. However, when I try to add
the example application yapp_ex_1 the browser gives me the message that the
connection was reset and stays with the URL http://localhost:8001/add_post.yaws.

The output from the debugger is the following:

(foo <at> butterfly)1> {'EXIT',
    {noproc,
        {gen_server,call,
            [yapp_handler,
             {yapp_handler,add,{"internal","/yapp_ex_1",yapp_ex_1}}]}}}
=ERROR REPORT==== 6-Mar-2012::18:24:12 ===
Yaws process died: {function_clause,
                       [{yaws_server,binary_size,
                            [848,ok],
                            [{file,"yaws_server.erl"},{line,2973}]},
                        {yaws_server,binary_size,2,
                            [{file,"yaws_server.erl"},{line,2976}]},
                        {yaws_server,binary_size,2,
                            [{file,"yaws_server.erl"},{line,2976}]},
                        {yaws_server,deliver_accumulated,5,
                            [{file,"yaws_server.erl"},{line,3567}]},
                        {yaws_server,finish_up_dyn_file,2,
                            [{file,"yaws_server.erl"},{line,2703}]},
                        {yaws_server,aloop,3,
                            [{file,"yaws_server.erl"},{line,1167}]},
                        {yaws_server,acceptor0,2,
                            [{file,"yaws_server.erl"},{line,1025}]},
                        {proc_lib,init_p_do_apply,3,
                            [{file,"proc_lib.erl"},{line,227}]}]}

What am I doing wrong.

Thank you,

Rene

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
Wes James | 7 Mar 06:00 2012
Picon

using secure websocket not working

When using ws:// in my websocket app it is working fine.  I'm using
the test certs that are created when yaws (1.92) was installed and
http/https work fine in general for the web site.  But when I try to
use wss:// I get an error:

=ERROR REPORT==== 6-Mar-2012::21:50:40 ===
Error in process <0.99.0> on node 'node <at> ip_address' with exit value:
{function_clause,[{gen_tcp,se\n"]],[{file,"ge... ccept:
","cb4kxGXm1RVHV7mHHLhaMtzmTX4=","tocols

Has anyone tried and gotten wss:// to work with yaws websockets?

thanks,

-wes

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
Mikael Karlsson | 7 Mar 09:05 2012
Picon

Re: Adding a yapp not working

Hi Rene,

first of all I hope you have the latest fixes from yaws github repos,
otherwise ebin/yapp.app will not build properly. Otherwise do a update
and run ./configure; make; make install again. You can check that if
yapp/ebin/yapp.app contains real version and modules and not %VSN% and
%MODULES% strings, then it is OK.

You shall keep the original Yaws docroots as they were - no need to
change them as the yapp handler will fix the docroots for it's own
applications. Actually this is the idea, you fix yaws.conf once to get
yapp starting and then it will fix the rest when you add new
applications through the web interface - no need to update yaws.conf
for every new application you wan't to throw in.

I would replace "server myinternalserver" with "server localhost" in
your case, though I do not think this is the problem.

You also need to add a trailing slash to the yapp url:
http://localhost:8001/yapp -> http://localhost:8001/yapp/
in order to see anything; sorry no fancy redirects here :-)

Good luck!

Mikael

2012/3/7 rene <bentobox@...>:
> Hi,
>
> I'm quite new to erlang and yaws. As I like to use yaws in yapp mode I started
> with the example coming with yapp (yapp_ex_1). I configured yaws according to
> the documentaton:
>
> ...
> ebin_dir = /opt/local/lib/yapp/ebin
> ebin_dir = /Users/rene/GitWare/yaws-1.92/applications/yapp/ \
>            examples/yapp_ex_1/ebin
> ...
> runmod = yapp
> ...
> <server myexternalserver>
>        port = 8000
>        listen = 0.0.0.0
>        docroot = /Users/rene/GitWare/yaws-1.92/applications/yapp/examples
> /yapp_ex_1/priv/docroot/
>        arg_rewrite_mod = yapp
>        <opaque>
>           yapp_server_id = external
>        </opaque>
> </server>
>
> <server myinternalserver>
>        port = 8001
>        listen = 0.0.0.0
>        docroot = /opt/local/lib/yapp/priv/docroot/
>        arg_rewrite_mod = yapp
>        <opaque>
>           yapp_server_id = internal
>           bootstrap_yapps = yapp
>        </opaque>
> </server>
>
> When I start yaws it successful loads yapp. In the browser I get the yapp page
> with localhost:8001 and not with localhost:8001/yapp. However, when I try to add
> the example application yapp_ex_1 the browser gives me the message that the
> connection was reset and stays with the URL http://localhost:8001/add_post.yaws.
>
> The output from the debugger is the following:
>
> (foo <at> butterfly)1> {'EXIT',
>    {noproc,
>        {gen_server,call,
>            [yapp_handler,
>             {yapp_handler,add,{"internal","/yapp_ex_1",yapp_ex_1}}]}}}
> =ERROR REPORT==== 6-Mar-2012::18:24:12 ===
> Yaws process died: {function_clause,
>                       [{yaws_server,binary_size,
>                            [848,ok],
>                            [{file,"yaws_server.erl"},{line,2973}]},
>                        {yaws_server,binary_size,2,
>                            [{file,"yaws_server.erl"},{line,2976}]},
>                        {yaws_server,binary_size,2,
>                            [{file,"yaws_server.erl"},{line,2976}]},
>                        {yaws_server,deliver_accumulated,5,
>                            [{file,"yaws_server.erl"},{line,3567}]},
>                        {yaws_server,finish_up_dyn_file,2,
>                            [{file,"yaws_server.erl"},{line,2703}]},
>                        {yaws_server,aloop,3,
>                            [{file,"yaws_server.erl"},{line,1167}]},
>                        {yaws_server,acceptor0,2,
>                            [{file,"yaws_server.erl"},{line,1025}]},
>                        {proc_lib,init_p_do_apply,3,
>                            [{file,"proc_lib.erl"},{line,227}]}]}
>
> What am I doing wrong.
>
> Thank you,
>
> Rene
>
>
>
>
> ------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
> _______________________________________________
> Erlyaws-list mailing list
> Erlyaws-list@...
> https://lists.sourceforge.net/lists/listinfo/erlyaws-list

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/

Gmane