Not My Idea — Snippets

Some code snippets about Linux / Php and Python

Category: php

Install PHP 5.3 + Apache on ubuntu 9.10 using dotdeb repositories, via apt-get

PHP 5.3 isn’t proposed by default within the default ubuntu 9.10 repositories.
Here are the steps needed to quickly install Apache + PHP 5.3 in an ubuntu linux environment.
All in two command lines
Just copy the two line above to get php 5.3 working
sudo su
cd /tmp && mkdir php53 && cd php53 && [...]

What do I read ? (RSS Feeds)

<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
    <head>
        <title>Alexis Metaireau subscriptions in Google Reader</title>
    </head>
    <body>
        <outline text="Clément Delafargue // Divarvel"
           title="Clément Delafargue // Divarvel" type="rss"
           xmlUrl="http://www.divarvel.fr/rss/" htmlUrl="http://www.divarvel.fr"/>
        <outline text="DLFP – Dépêches de page principale"
  [...]

Using Scribe log server with PHP.

In a previous post, I was talking about howto install Scribe on a debian system.
Now, let’s talk about howto launch the server properly, and how to use it’s functionalities with PHP:
Starting Scribe
I’ve created the /usr/local/scribe/scribe.conf file, with this default content (it will configure scribe to listen port 1463 and write logs to /tmp/scribetest
port=1463
max_msg_per_second=2000000
check_interval=3

# DEFAULT
<store>
category=default
type=buffer

target_write_size=20480
max_write_interval=1
buffer_send_rate=2
retry_interval=30
retry_interval_range=10

<primary>
type=file
fs_type=std
file_path=/tmp/scribetest
base_filename=thisisoverwritten
max_size=1000000
add_newlines=1
</primary>

<secondary>
type=file
fs_type=std
file_path=/tmp
base_filename=thisisoverwritten
max_size=3000000
</secondary>
</store>
Now, start [...]

Howto install « Scribe » (The Facebook log system) on Debian

Here is a simple HOWTO for installing Scribe Server
The quick way
You can install Scribe with all its dependencies by simply copy/paste this line on your terminal.
sudo apt-get install libboost-dev=1.38.1 flex bison libtool automake autoconf pkg-config && wget -O thrift.tgz "http://gitweb.thrift-rpc.org/?p=thrift.git;a=snapshot;h=HEAD;sf=tgz" && tar -xzf thrift.tgz && cd thrift &&./bootstrap.sh && ./configure && make && sudo make [...]