Archive for the ‘Development’ Category

Running PHP on NFS: version 1.3 of turbo_realpath extension.

Monday, May 13th, 2013

Here’s a new version of the turbo_realpath extension which solves the performance problems with PHP applications and NFS storage. This is mainly a maintenance release that adds support for the latest versions of PHP like 5.4 and 5.5. (more…)

Equivalent of the PHP’s explode() function in Microsoft SQL Server 2000/2005

Wednesday, September 28th, 2011

There are situations, when you need to port a functionality from one programming language to another.

Some time ago I had to create the equivalent of explode() function in Microsoft SQL 2005.

Here is the result of my one-day battle with SQL. (more…)

What’s new in PHP 5.4? A huge list of major changes!

Tuesday, September 27th, 2011

The PHP 5.4 is now available.

As you probably know, the updates that were intended for postponed PHP 6 were added to PHP 5.4.0 instead, so now PHP includes a huge set of new language features and removes several legacy behaviors.

Because of that I created a list of major changes since PHP 5.3 ,along with some examples and brief descriptions of these changes… (more…)

Ani-Shell, just another black-hat shell in PHP

Tuesday, September 27th, 2011

Quoting the project’s home page:

Ani-Shell is a simple PHP shell with some unique features like Mass Mailer , A simple Web-Server Fuzzer , a DDoser etc! This shell has immense capabilities and have been written with some coding standards in mind for better editing and customization

(more…)

Kernel.org hacked – how to get Android repo?

Monday, September 5th, 2011

As you may already know, kernel.org site which hosts the Android git repository has been hacked. Because of this we can’t obtain the Android source code from its servers. All attempts to do so ultimately fail with the similar response:

[root@localhost WORKING_DIRECTORY]# repo sync
android.git.kernel.org[0: 130.239.17.13]: errno=Connection refused
android.git.kernel.org[0: 199.6.1.173]: errno=Connection refused
android.git.kernel.org[0: 2001:6b0:e:4017:1972:112:1:0]: errno=Network is unreachable
android.git.kernel.org[0: 2001:500:60:10:1972:112:1:0]: errno=Network is unreachable
fatal: unable to connect a socket (Network is unreachable)
error: Cannot fetch platform/bionic

or:

[root@localhost ~]# curl https://android.git.kernel.org/repo>  ~/bin/repo
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
curl: (7) couldn't connect to host

I will describe another way to get the Android source codes if you hadn’t already cloned it’s repo before kernel.org servers went down. (more…)

Kernel.org has been hacked… Google requested to take android repo offline.

Thursday, September 1st, 2011

This hack was discovered on August 28th. Currently all kernel.org boxes are offline to do a backup and are in the process of doing complete reinstalls.

How the hackers managed to gain root access is currently unknown and is being investigated. The maintainers of kernel.org are in the process of doing an analysis on the code within git, and the tarballs to confirm that nothing has been modified.

Until then, say goodbye to the Android repository:

[root@localhost WORKING_DIRECTORY]# repo sync
android.git.kernel.org[0: 130.239.17.13]: errno=Connection refused
android.git.kernel.org[0: 199.6.1.173]: errno=Connection refused
android.git.kernel.org[0: 2001:6b0:e:4017:1972:112:1:0]: errno=Network is unreachable
android.git.kernel.org[0: 2001:500:60:10:1972:112:1:0]: errno=Network is unreachable
fatal: unable to connect a socket (Network is unreachable)
error: Cannot fetch platform/bionic

(more…)

How to create PHP extensions – part II: Introduction to PHP variables

Thursday, August 4th, 2011

In one of my previous articles I explained how to build a PHP extension, and how to declare a simple function in C. I demonstrated how to return data from the C function to the script in PHP. But I have not explained how to pass the arguments to the function, nor how to change the values of existing PHP variables.

In order to do so, I have to introduce you the internal ZVAL data structure used by PHP engine to store the PHP variables. (more…)

The Plot to Kill PHP MySQL Extension

Friday, July 15th, 2011

Today I received a mass email from phpclasses.org. This was an information about a new entry on a blog led by Manuel Lemos, the creator of the phpclasses.org site.

In this entry he informs us that the PHP core developers are planning to kill the PHP original MySQL extension. (more…)

Running PHP on NFS: version 1.2 of turbo_realpath extension

Tuesday, July 12th, 2011

I proudly present new version of my PHP extension which solves the performance problems with PHP application and NFS storage. This version adds support for safe_mode = on setting. (more…)

How to create PHP extensions – part I: simple functions

Thursday, July 7th, 2011

There are some situations when every developer encounters limitations in PHP. For some, the problem is performance, for others the lack of specific, low-level functionality.

In that cases, the only solution is to write your own PHP extension that adds the missing features to the language.

Unfortunately, although the documentation of the PHP language itself is excellent, the information on the programming of the PHP engine are rudimentary.

In this series of articles I will try to show you, how to write the PHP extensions and describe some of the Zend engine features. (more…)

How to compile PHP scripts?

Wednesday, July 6th, 2011

In an earlier article I described how to install HipHop for PHP translator that allows compilation of the PHP scripts.

This time, I will describe different types of compilations, so that it is possible to build both simple scripts and large systems written in PHP. (more…)

Running PHP on NFS: new version of turbo_realpath extension

Friday, July 1st, 2011

More than a month has passed since I published my PHP extension fixing the performance issues with NFS and PHP. Since then, turbo_realpath has become quite popular among Web administrators. Unfortunately, despite my warnings, many of them don’t disable the PHP functions responsible for creating links and symlinks, or do it wrong way.

For this reason I decided to publish a new version of the turbo_realpath extension, which adds the ability to automatically disable dangerous functions in PHP. (more…)

Drupal HH7 project: HipHop for PHP and Drupal 7.4 compatibility patch

Thursday, June 30th, 2011

Another month, another Drupal 7 version. Drupal 7.4 was released some days ago so it’s my turn to announce the next version of Drupal 7.x patch adding support for HipHop for PHP source code transformer.

Drupal HH7 Version: 1.2
Release date: 30-06-2011
Compatible with: Drupal 7.4
Not compatible with: HipHop branches 36a16fb and 6044908 and Drupal 7.0-7.2
Tested on HipHop branch: 806ee06 and earlier

Modules compatibility list can be found at the end of this article. Please report any patch issues in the comments to this annoucement. (more…)