Forum

Posted by
Matthew Hardy  -  February 2010
This is what I have to do to get some handy features going.

1. for those people who want -DPROFILE on startup. This will show you some feedback on requests in debug information tab under Global.

/usr/local/roxen/server5.0.x/protocols/http.pike

#ifdef PROFILE
-  int elapsed = HRTIME()-req_time;
+ int elapsed = gethrtime() - hrtime;


2. for people who run php using cgi and redirect as per other posts in this forum. To get php apps nice URL's
/usr/local/roxen/server5.0.x/scripting/cgi.pike

Credit: Eiichiro ITANI
----8<-----8<----

environment |= Roxen.build_roxen_env_vars(id);
      if(id->misc->ssi_env)
        environment |= id->misc->ssi_env;
 -    if(id->misc->is_redirected)
 +    if(id->misc->is_redirected) {
 +      environment["REDIRECT_URL"] =
id->scan_for_query(id->misc->redirected_raw_url);
        environment["REDIRECT_STATUS"] = "1";
 +    }
      if(id->rawauth && query("rawauth"))
        environment["HTTP_AUTHORIZATION"] = (string)id->rawauth;
      else

----8<-----8<----

3. Mysql client with password() & Unicode support on OS X.

If you try with off the shelf you may see these error in the debug log.

Unicode decode mode not supported - compiled with MySQL client library < 4.1.0.
or
Mysql.mysql(): Couldn't connect to SQL-server: Client does not support authentication protocol requested by server; consider upgrading MySQL client

You may want to compile Pike on machine with the libraries available on apple v.4.5

You need these libraries on OS X so Pike can compile with the right mysql library.
http://support.apple.com/kb/HT3370
Install.

Get the latest snapshot of Pike, version 7.8.408 and 409 are known to run on OS X.

Compile pike.
make
make install_interactive

it will like to be in /usr/local/pike/

Shutdown Roxen.

Go into Roxen5.x
sudo mv pike pike-archive
sudo ln -s /usr/local/pike/7.8.x/ pike
cd bin
sudo mv roxen roxen-archive
sudo ln -s ../pike/bin/pike roxen

cd ../
sudo ./start -DPROFILE

Now you should have all the handy features I mentioned...

This is a reasonably custom setup and the Roxen packaged download will still work wonders for 99% of users.

Happy Hacking.



 
Posted by
Matthew Hardy  -  October 2010

Happy Hacking.

Pike 7.9.1 seems to be working too...
 
1
Search this thread: