Erlang/OTP Forums

Author Message

<  Advanced Erlang/OTP  ~  Zend Framework on Yaws

calder
Posted: Mon Jul 14, 2008 11:54 am Reply with quote
Joined: 09 Jul 2008 Posts: 1 Location: Poland
Hi,
I have managed to run Zend Framework on Yaws using arg_mod_rewrite. In case someone is interested, I am providing a short instruction and the source code of rewriter module I created, partially based on RewriteModule available at http://yaws.hyber.org/wiki/showPage.yaws?node=RewriteModule. You can use it freely as long as you don't forget to credit me Wink

First you need to configure your MVC enviornment. I suggest following a manual at http://akrabat.com/zend-framework-tutorial/ to create the basic directory structure. Suppose your yaws document directory is /opt/yaws, you'll have to create folders /opt/yaws/application, /opt/yaws/library and /opt/yaws/public. Also create /opt/yaws/log folder for web server logs. Then create /opt/yaws/ebin and put there rewriter.erl (look at the attachment for the source code). Compile the rewriter module from the command line with
Code:
erlc rewriter.erl

Create yaws configuration file yaws.conf and inform the web server to use php scripts and the rewrite module
Code:

php_exe_path = /usr/bin/php-cgi
ebin_dir = /opt/yaws/ebin
logdir = /opt/yaws/log

<server localhost>
    port = 8080
    listen = 0.0.0.0
    docroot = /opt/yaws/public
    allowed_scripts = yaws php
    arg_rewrite_mod = rewriter
</server>

Finally, run your web server
Code:
yaws --conf yaws.conf

From now on, all client requests to localhost will be redirected through a bootstrap file /opt/yaws/public/index.php. Make sure all paths in your PHP scripts lead to correct locations.
Tested on Erlang R11B with yaws 1.68 on Linux Mint 4.0 32-bit and yaws 1.73 on Ubuntu Server 8.04 64-bit with Zend Framework 1.5.
Good luck!
View user's profile Send private message MSN Messenger
kkovacs
Posted: Fri Feb 18, 2011 4:39 pm Reply with quote
Joined: 18 Feb 2011 Posts: 2 Location: Budapest, Europe
Just run into the same problem myself today, although, I wanted a solution that didn't depend on file extensions.

So I wrote an other little yaws appmod that achieves similar -- but works by checking if the URL points to a file or is a "virtual" URL.

Here's my solution:

http://kkovacs.eu/running-yaws-with-drupal-wordpress-zend-framework

Best,

Kristof

_________________
Kristof Kovacs, software architect, consultant - http://kkovacs.eu/kristof-kovacs-software-architect-resume
View user's profile Send private message
Oktya09
Posted: Fri Feb 03, 2012 5:12 am Reply with quote
Joined: 02 Feb 2012 Posts: 1
Hi

I am trying to use the consumer key that I have been allocated for the application that I am trying to build. The application is for yaws.

The error i get is "consumer_key_unknown". I presume it could be due to the Configuration of Consumer Key for specific access. I assumed that therefore i need to change the settings to private data. When I try to save the changed settings I get the error (repetitively) as "We could not save your changes at this time. Please try again".

Am I missing something ?


Last edited by Oktya09 on Thu Feb 23, 2012 9:12 am; edited 1 time in total
View user's profile Send private message
kkovacs
Posted: Fri Feb 03, 2012 9:36 am Reply with quote
Joined: 18 Feb 2011 Posts: 2 Location: Budapest, Europe
Oktya09 wrote:
I am trying to use the consumer key that I have been allocated for the application that I am trying to build. The application is for yaws.

The error i get is "consumer_key_unknown". I presume it could be due to the Configuration of Consumer Key for specific access. I assumed that therefore i need to change the settings to private data. When I try to save the changed settings I get the error (repetitively) as "We could not save your changes at this time. Please try again".


Hi Oktya,

Yaws by itself doesn't require a consumer key -- are you developing an OAuth protocol implementation, or similar? Where are you exactly trying to save your changes?

Kristof

_________________
Kristof Kovacs, software architect, consultant - http://kkovacs.eu/kristof-kovacs-software-architect-resume
View user's profile Send private message
brandzclothes
Posted: Mon Jun 25, 2012 4:09 pm Reply with quote
Joined: 15 May 2012 Posts: 7 Location: hiphopguccishoes.com
hi,
Great post! It is really helpful guide.
gucci shoes for men
coogi jeans for women
Louis Vuitton Shoes for men

Cheap Louis Vuitton clothing
Cheap coogi clothing online
Cheap paul smith t-shirts online
china Gucci Shoes online
china nike air max shoes online
china Gucci *beep*
wholesale nike air max shoes

wholesale gucci clothing for men
wholesale armani clothing for women
china louis

vuitton shoes

urban gucci shoes online
urban coogi clothing online
cheap dolce gabbana shoes online

_________________
cheap gucci shoes
online ysl t-shirts
cheap coogi t-shirts
View user's profile Send private message Visit poster's website

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