Erlang/OTP Forums

Author Message

<  Erlyweb mailing list  ~  Newbie question about erlyweblog

Guest
Posted: Fri Jan 25, 2008 4:44 pm Reply with quote
Guest
Hello,
I'm trying to setup yaws+erlywebblog and get the following error
accessing http://localhost:31337/blog/ :

ERROR erlang code crashed:
File: appmod:0
Reason: {noproc,{gen_server,call,
[mysql_dispatcher,
{fetch,erlydb_mysql,
[[[[<<"SELECT ">>,<<"*">>],
<<" FROM ">>,
<<"entry">>],
[]],
[<<" ORDER BY ">>,
[[<<"id">>,32,<<"DESC">>]]]]}]}}
Req: {http_request,'GET',{abs_path,"/blog/"},{1,1}}

Here is Yaws config:
<server
localhost>
port =
31337
listen =
0.0.0.0
docroot = /var/www/blog/
www
appmods = <"/blog",
erlyweb>

<opaque>
appname =
blog
</
opaque>
dir_listings =
true
</server>

Steps i did:
- downloaded erlyweblog from SVN to /var/www/blog/
- cd there
- $ mysql -uroot -p blog < blog.sql
- erl

Eshell V5.5.5 (abort with ^G)
1> erlydb:start(mysql, [{hostname, "localhost"}, {username, "root"},
{password, "pass"}, {database, "blog"}]).
.....

{ok,<0.39.0>}
2> erlyweb:compile("/var/www/blog", [{erlydb_driver, mysql}]).
....
{ok,{{2008,1,25},{19,5,25}}}

I don't understand what is 32 in <<"id">>,32,<<"DESC">> and what I'm
doing wrong.
Thank You!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Post recived from mailinglist
Guest
Posted: Fri Jan 25, 2008 6:36 pm Reply with quote
Guest
Try with appmods = <"/", erlyweb> in your yaws.conf and point your
browser to http://localhost:31337/.

Note that the blog application isn
Guest
Posted: Fri Jan 25, 2008 11:43 pm Reply with quote
Guest
realloc@gmail.com wrote:

>
> Eshell V5.5.5 (abort with ^G)
> 1> erlydb:start(mysql, [{hostname, "localhost"}, {username, "root"},
> {password, "pass"}, {database, "blog"}]).
> .....

This would have been my first guess that you forgot this step. Was there
any more info displayed in the erl shell? Try

whereis(mysql_dispatcher). at the erl prompt you should get the pid
back fror the mysql_dispatcher process. eg,

509> whereis(mysql_dispatcher).
<0.93.0>

if not what did the erlydb:start(mysql, ...) result in?

In answer to
> I don't understand what is 32 in <<"id">>,32,<<"DESC">> and what I'm
doing wrong.

<<"SELECT ">>,<<"*">>], <<" FROM ">>, <<"entry">>], []],
[<<" ORDER BY ">>, [[<<"id">>,32,<<"DESC">>]

translates to "SELECT * FROM entry ORDER BY id DESC" by the time it
reaches the database server.

32 decimal is the integer value of space. Do a "man ascii" on most unix
boxes will give you a table of ascii values in octal, hexidecmal, and
decimal.

hope that helps. How familar are you with erlang and unix? what platform
is this on? etc.

On another note, we need a fancy acronym like LAMP: Linux, Yaws, Mysql,
Erlyweb. LEMY? LYME (pronounced lime)? That's not bad. LYME - the new
flavour of web development.

Jeff.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Post recived from mailinglist
Guest
Posted: Sat Jan 26, 2008 5:48 am Reply with quote
Guest
On Jan 25, 2008 3:44 PM, jm <jeffm@ghostgun.com> wrote:
>
> realloc@gmail.com wrote:
>
> >
> > Eshell V5.5.5 (abort with ^G)
> > 1> erlydb:start(mysql, [{hostname, "localhost"}, {username, "root"},
> > {password, "pass"}, {database, "blog"}]).
> > .....
>
> This would have been my first guess that you forgot this step. Was there
> any more info displayed in the erl shell? Try
>
> whereis(mysql_dispatcher). at the erl prompt you should get the pid
> back fror the mysql_dispatcher process. eg,
>
> 509> whereis(mysql_dispatcher).
> <0.93.0>
>
> if not what did the erlydb:start(mysql, ...) result in?
>
> In answer to
> > I don't understand what is 32 in <<"id">>,32,<<"DESC">> and what I'm
> doing wrong.
>
> <<"SELECT ">>,<<"*">>], <<" FROM ">>, <<"entry">>], []],
> [<<" ORDER BY ">>, [[<<"id">>,32,<<"DESC">>]
>
> translates to "SELECT * FROM entry ORDER BY id DESC" by the time it
> reaches the database server.
>
> 32 decimal is the integer value of space. Do a "man ascii" on most unix
> boxes will give you a table of ascii values in octal, hexidecmal, and
> decimal.
>
> hope that helps. How familar are you with erlang and unix? what platform
> is this on? etc.
>
> On another note, we need a fancy acronym like LAMP: Linux, Yaws, Mysql,
> Erlyweb. LEMY? LYME (pronounced lime)? That's not bad. LYME - the new
> flavour of web development.

LYME has a nice ring to it Smile

Yariv

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Post recived from mailinglist
Guest
Posted: Mon Jan 28, 2008 10:31 am Reply with quote
Guest
Hello,

Setting appmods = <"/", erlyweb> didn't help.
Think I will continue playing with 'music' for a while =)

On 25 янв, 21:34, maddiin <madd...@googlemail.com> wrote:
> Try with appmods = <"/", erlyweb> in your yaws.conf and point your
> browser tohttp://localhost:31337/.
>
> Note that the blog application isn´t finished and I am not sure about
> best practices, so I won´t recommend learning from it right now.
>
> The 32 is a whitespace.
>
> 1> [32].
> " "
>
> On 25 Jan., 17:43, "real...@gmail.com" <real...@gmail.com> wrote:
>
> > Hello,
> > I'm trying to setup yaws+erlywebblog and get the following error
> > accessinghttp://localhost:31337/blog/:
>
> > ERROR erlang code crashed:
> > File: appmod:0
> > Reason: {noproc,{gen_server,call,
> > [mysql_dispatcher,
> > {fetch,erlydb_mysql,
> > [[[[<<"SELECT ">>,<<"*">>],
> > <<" FROM ">>,
> > <<"entry">>],
> > []],
> > [<<" ORDER BY ">>,
> > [[<<"id">>,32,<<"DESC">>]]]]}]}}
> > Req: {http_request,'GET',{abs_path,"/blog/"},{1,1}}
>
> > Here is Yaws config:
> > <server
> > localhost>
> > port =
> > 31337
> > listen =
> > 0.0.0.0
> > docroot = /var/www/blog/
> > www
> > appmods = <"/blog",
> > erlyweb>
>
> > <opaque>
> > appname =
> > blog
> > </
> > opaque>
> > dir_listings =
> > true
> > </server>
>
> > Steps i did:
> > - downloaded erlyweblog from SVN to /var/www/blog/
> > - cd there
> > - $ mysql -uroot -p blog < blog.sql
> > - erl
>
> > Eshell V5.5.5 (abort with ^G)
> > 1> erlydb:start(mysql, [{hostname, "localhost"}, {username, "root"},
> > {password, "pass"}, {database, "blog"}]).
> > .....
>
> > {ok,<0.39.0>}
> > 2> erlyweb:compile("/var/www/blog", [{erlydb_driver, mysql}]).
> > ....
> > {ok,{{2008,1,25},{19,5,25}}}
>
> > I don't understand what is 32 in <<"id">>,32,<<"DESC">> and what I'm
> > doing wrong.
> > Thank You!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Post recived from mailinglist

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum