Pencarian

Rss Posts

 

 

 

Berita pada bulan May, 2010

Management and economics issues of hosting virtual private email servers

May 29, 2010

pAfter I published Wanted: Virtual Personal Email Servers (VPES) I got lots of feedback. Among others, John made very interesting comments, for example:/pbr/br/… The most user friendly free email management interface is from Zimbra, but the setup is a bear and the system requirements are huge for what it providesbr/…I (John) spent 20 min earlier today considering whether I could make any profit creating an easy VPES setup script with a fairly low monthly price point.br/… BTW, the laws for emRead More…

Bending Gnome Keyring with Python ? Part 3

May 28, 2010

pIn the last post I’ve shown how to create keyrings using python and mentioned a slightly difference from the seahorse password storing process. Well, it happens that, when we start to dig this difference isn’t so small. Using seahorse every keyring item is created with the Update if Exists flag as False, so you can create identical keyring items. This is not a safe approach and can result in an inconsistent keyring. But as we use the Update if Exists flag set as True, something uRead More…

Ruby annotations

May 28, 2010

a href=”http://www.diegocarrion.com/2010/05/27/ruby-annotations/”Learn/a how to create Ruby annotations like this:
brclass User
br??admin_only
br??def update;
br??…
br??end
brenddiv class=”feedflare”
a href=”http://feeds.feedburner.com/~ff/Rubyflow?a=Z8NsviJusyk:lPQhEIRhYxY:3H-1DwQop_U”img src=”http://feeds.feedburner.com/~ff/Rubyflow?i=Z8NsviJusyk:lPQhEIRhYxY:3H-1DwQop_U” border=”0″/img/a
/divimg src=”http://feeds.feedburner.com/~r/Rubyflow/~4/Z8NsviJusyk” height=”1″ width=”1″/

PHP 5.3 on Snow Leopard – Sean Coates

May 24, 2010

My old post on
compiling PHP for Mac OS 10.5 (Leopard) continues to top my most-viewed page
statistics. Sadly, that article is old and doesn’t apply very well to Snow
Leopard (10.6).

I’ve been meaning to post instructions on how to compile PHP for Snow
Leopard since last summer when I picked up the DVD, but hadn’t found the
time or opportunity to build PHP from a completely fresh start, until a few
weeks ago.

This time, I took notes on how to reliably compile PHP and Apache from
scratch on this system.

  1. Download and install href="http://developer.apple.com/technologies/xcode.html">Xcode.
    You’re on your own for the details of this one, but frankly, if you can’t
    figure it out, you’ll find the next steps too difficult. Think of it as
    a prerequisite.

  2. Create a working directory. I use ~/src,
    but you can use whatever you like.

    
    $ mkdir ~/src
    $ cd ~/src
      

  3. Install href="http://github.com/mxcl/homebrew">Homebrew. Homebrew is
    a truly great software packager for OS X. Think Macports, but not as ugly;
    Fink, but not as broken (and not as binary). Designed for Mac. It’s Ruby,
    but we don’t have to hold that against them. (-:

    
    $ curl http://gist.github.com/raw/323731/572b315c4f7ee78244de70e7ad703c8ae324da7a/install_homebrew.rb > install_homebrew.rb
    $ ruby install_homebrew.rb
       

  4. Install your own iconv. I don’t know what Apple did to
    theirs, but it’s a huge headache. You’re best installing your own, in my
    experience.

    
    $ curl http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz | tar -zx -
    $ cd libiconv-1.13.1
    $ ./configure --prefix=/opt && make && make install
    $ cd ..
      

  5. Install Apache-HTTPD from source. This isn’t
    absolutely necessary, but Apple seems to have done some weird stuff with
    their Apache, and in my experience, it’s best to build your own. If you
    skip over this step, you’ll need to change the apxs in the
    PHP configure command, below.

    First, find your
    closest mirror.

    
    $ curl http://apache.mirror.iweb.ca/httpd/httpd-2.2.15.tar.bz2 | tar -jxf -
    $ cd httpd-2.2.15/
    $ ./configure --enable-rewrite --enable-ssl && make && make install
    $ cd ..
       

  6. Install PHP dependencies using Homebrew. Easy, huh?

    
    $ echo "gd jpeg libpng libxml2 libzzip mcrypt mysql" | xargs brew install
    $ echo "libpng libxml2 readline" | xargs brew link
      

  7. Install PHP from source by first selecting a href="http://php.net/get/php-5.3.2.tar.bz2/from/a/mirror">mirror.

    Note: you will need to use a really nasty patch to get this to
    build properly. See the note on iconv above. Even Apple’s own href="http://opensource.apple.com/source/apache_mod_php/apache_mod_php-53/patches/iconv.patch">iconv patch for PHP
    doesn’t work (at least not for me).

    
    $ curl -L http://ca2.php.net/get/php-5.3.2.tar.bz2/from/this/mirror | tar -jxf -
    $ cd php-5.3.2
    $ curl http://www.php.net/~scoates/patches/php-5.3.1-Makefile.global-iconv.patch | patch -p0
    $ ./configure --prefix=/usr/local --with-xsl --with-gd --with-zlib-dir \
      --enable-sockets --enable-exif --with-mcrypt --enable-soap \
      --enable-embedded-mysqli --with-mysql --with-pdo-mysql --with-curl \
      --with-libedit --with-apxs2=/usr/local/apache2/bin/apxs --enable-mbstring \
      --with-openssl --with-iconv=/opt && make && make install
    $ cd ..
      

  8. Configure Apache. If you’ve done this on other
    platforms, this step should look familiar.

    1. In /usr/local/apache2/conf/httpd.conf, in the
      <IfModule mime_module> block, add the following:

      
      AddType application/x-httpd-php .php
      AddType application/x-httpd-php-source .phps
          
    2. Optionally, add PHP to DirectoryIndex by changing
      
      DirectoryIndex index.html
          

      to

      
      DirectoryIndex index.php index.html
          

    You can now test Apache + PHP by creating a phpinfo() page,
    and restarting Apache:

    
    $ echo "<?php phpinfo(); ?>" > /usr/local/apache/htdocs/info.php
    $ ln -s /usr/local/apache2/bin/apachectl /usr/local/bin/apachectl
    $ sudo /usr/local/bin/apachectl restart
      

    Now, visit localhost/info.php,
    and you should have an independent, custom-compiled Apache-PHP
    stack.

I hope this has been helpful. If I’ve given bad instructions, or if
something doesn’t work for some reason, please let me know in the
comments.

Revisiting: Why Every Developer Should Write Their Own Framework – Brandon Savage

May 24, 2010

In November of 2009, I wrote about why developers should write their own frameworks. I pointed out at the time that often developing a framework forces developers to make the kinds of architectural choices that frameworks require, which helps them better understand the architectural choices in the most popular frameworks.

I haven?t stopped believing in the [...]

MySQL Cluster Powers Leading Document Management Web Service

May 24, 2010

A new customer case-study is available for download from http://www.mysql.com/why-mysql/case-studies/mysql_cs-cluster_docudesk_WebServices.php
The DocQ web service eliminates the limitations of sharing physical documents by offering a complete paperless business solution; providing a single place where customers can manage, archive, and send their important documents. DocQ supports secure business transactions and the services to store, edit, collaborate, and publish business documents.

The database needed to deliver the high levels of write throughput, low latency responsiveness and continuous availability demanded by the service
A sharded, multi-master MySQL solution with memcached was rejected due to the complexity of integration and management
MySQL Cluster was selected as it met all of the requirements of the service with one, integrated solution out of the box
MySQL Cluster is handling on average 1 million queries per day across both in-memory and disk-based tables, with the database growing at up to 2% daily
MySQL Cluster handles document metadata and text, PHP session state, ACLs, job queues and tracking of document actions for billing

Cara Mudah Mengikuti Perkembangan Keuangan Guyub dengan SVN

May 24, 2010

Sesuai dengan saran dari teman-teman di Mailing List, kode sumber Keuangan Guyub kini sudah ditaruh di repository sumber Google Code yang menggunakan Subversion atau SVN.
SVN sendiri -kalau menurut wikipedia Id- adalah adalah suatu perangkat lunak sumber terbuka pengontrol versi yang dapat mengatur proses pengembangan perangkat lunak yang dilakukan oleh suatu kelompok pemrogram yang terpisah [...]

Using the row buffer in Drizzle (and MySQL)

May 24, 2010

Here#8217;s another bit of the API you may need to use in your storage engine (it also seems to be a rather unknown. I believe the only place where this has really been documented is ha_ndbcluster.cc, so here goes#8230;.
Drizzle (through inheritance from MySQL) has its own (in memory) row format (it could be said that it has several, but we#8217;ll ignore that for the moment for sanity). This is used inside the server for a number of things. When writing a Storage Engine all you really need to know is that you#8217;re expected to write these into your engine and return them from your engine.
The row buffer format itself is kind-of documented (in that it#8217;s mentioned in the MySQL Internals documentation) but everywhere that#8217;s ever pointed to makes the (big) assumption that you#8217;re going to be implementing an engine that just uses a more compact variant of the in-memory row format. The notable exception is the CSV engine, which only ever cares about textual representations of data (calling val_str() on a Field is pretty simple).
The basic layout is a NULL bitmap plus the data for each non-null column:
Except that the NULL bitmap is byte aligned. So in the above diagram, with four nullable columns, it would actually be padded out to 1 byte:

Each column is stored in a type-specific way.
Each Table (an instance of an open table which a Cursor is used to iterate over parts of) has two row buffers in it: record[0] and record[1]. For the most part, the Cursor implementation for your Storage Engine only ever has to deal with record[0]. However, sometimes you may be asked to read a row into record[1], so your engine must deal with that too.
A Row (no, there#8217;s no object for that#8230; you just get a pointer to somewhere in memory) is made up of Fields (as in Field objects). It#8217;s really made up of lots of things, but if you#8217;re dealing with the row format, a row is made up of fields. The Field objects let you get the value out of a row in a number of ways. For an integer column, you can call Field::val_int() to get the value as an integer, or you can call val_str() to get it as a string (this is what the CSV engine does, just calls val_str() on each Field).
The Field objects are not part of a row in any way. They instead have a pointer to record[0] stored in them. This doesn#8217;t help you if you need to access record[1] (because that can be passed into your Cursor methods). Although the buffer passed into various Cursor methods is usually record[0] it is not always record[0]. How do you use the Field objects to access fields in the row buffer then? The answer is the Field::move_field_offset(ptrdiff_t) method. Here is how you can use it in your code:

ptrdiff_t row_offset= buf – table-gt;record[0];
(**field).move_field_offset(row_offset);
(do things with field)
(**field).move_field_offset(-row_offset);

Yes, this API completely sucks and is very easy to misuse and abuse #8211; especially in error handling cases. We#8217;re currently discussing some alternatives for Drizzle.
This blog post (but not the whole blog) is published under the?Creative Commons Attribution-Share Alike License. Attribution is by linking back to this post and mentioning my name (Stewart Smith).

Sosialisasi F/OSS di SMA 9 Palembang

May 18, 2010

Hari ini (Selasa, 18 Mei 2010) Muhammad Subair dan Satrio datang di SMA 9 Palembang, untuk memenuhi permintaan pihak sekolah kepada Guyub untuk membantu mengisi materi sosialisasi Free/Open Source Software (khususnya GNU/Linux) kepada seluruh guru dan pegawai sekolah.

Materi Pengenalan F/OSS

Secara umum acara berlangsung lancar dan ada interaksi berupa pertanyaan dan permintaan demo dari guru-guru. Dari yang kami dapat dari interaksi tadi, di SMA 9 Palembang ini sama dengan tempat-tempat sebelumnya yang kami datangi, dimana kendala utama belum menggunakan F/OSS khususnya GNU/Linux karena memang belum tahu dan masih kurangnya dukungan dari pengambil kebijakan. Hal ini bisa dilihat dengan masih banyaknya kesalahpahaman dasar tentang F/OSS, Linux, HAKI, dll.

Guru-guru SMA 9 Palembang

Mudah-mudahan kedepannya bisa ada kelanjutan dari acara ini, dimana Guyub dan juga komunitas F/OSS di Palembang dan sekolah bisa mengadakan acara teratur, semisal dimulai dengan pembentukan kelompok study Linux untuk siswa, dll. Setidaknya dengan apa yang ada hari ini kita bisa lihat sudah ada kemauan untuk mengenal lebih jauh tentang Free/Open Source Software.

Akhir kata kami mengucapkan terima kasih banyak atas penerimaan dari SMA 9.

Tim Guyub

Brute Force Detection-BFD

May 17, 2010

pBrutal force means attempting to login-in without knowing user-name or password. This kind of attempt can be avoided in Linux-based servers by using BFD-Brute Force Detection.br /br/ In linux, by default there is no brute force detection method for checking log-in or authentication failures. So we must install and configure an application called BFD. BFD is a shell script based application used for checking log-in and authentication failures. Installing and configuring BFD is very easy, becauRead More…