Wednesday, February 3, 2016

Tutorial: How to configure Xampp / Apache to serve Ring language files

Ring Language is a new programming language that bring good new features to the table.
Simple, Very easy to read, Object Oriented, Smart garbage collector that puts the memory under the programmer control.
you can use it for mobile or web or software development...
See "Hello, World!" 

know more about ring from here -> Why Ring?

Now lets go back to our tutorial.....

How to configure  Xampp / Apache to serve Ring language files


-Download Ring from here : Ring 1.0 for Windows
-Download Ring's Web Liberary form here : WebLib 1.0 (CGI Library)
-Download Xampp from here: Xampp

-After installing, go to the installation directory then open this folder> xampp\apache\conf\
-Open this file with your favorite editor "httpd.conf"


-Search for the lines: (CTRL+F)

  <Directory />       
    AllowOverride none  
    Require all denied 
  </Directory>  
Change it to this :

<Directory />
    Options FollowSymLinks
    Options +ExecCGI
    AllowOverride none
    Require all denied
</Directory>

-Make sue that this line in the configuration file and not commented with "#"

 LoadModule cgi_module modules/mod_cgi.so  


-Search for this line 
    AddHandler cgi-script .cgi .pl .asp 


add this to the line ".ring" to be like :
 AddHandler cgi-script .cgi .pl .asp  .ring

and now press start


Congratulations :)


put your site in htdocs folder xampp\htdocs\[your website folder]
and put the weblib.ring & datalib.ring inside your website folder
and in side the .ring file put in the first line

#![the path to ring directory]\bin\ring.exe -cgi