background preloader

Compile php

Facebook Twitter

.:: General Purpose Hash Function Algorithms - By Arash Partow ::. Description Hash functions are by definition and implementation pseudo random number generators (PRNG). From this generalization its generally accepted that the performance of hash functions and also comparisons between hash functions can be achieved by treating hash function as PRNGs. Analysis techniques such a Poisson distribution can be used to analyze the collision rates of different hash functions for different groups of data.

In general there is a theoretical hash function known as the perfect hash function for any group of data. The perfect hash function by definition states that no collisions will occur meaning no repeating hash values will arise from different elements of the group. The problem is that there are so many permutations of types of data, some highly random, others containing high degrees of patterning that its difficult to generalize a hash function for all data types or even for specific data types.

Hashing Methodologies Hash Functions and Prime Numbers Bit Biases. My first patch: AMFEXT. Bcompiler. Apache2, FastCGI & Multiple PHP Versions (Ubuntu/Lucid-10.04) « Yum yum .. Update # Some minor mistakes solved, tnx a lot for the emails # A little guide I’ve made for those who would like to develop with multiple PHP versions on a local server without restarting the Apache server every time you wish to change the PHP version. If you would like to read more about FastCGI, take a look here. I’m still perfecting this guide bit by bit, any suggestions or comments are welcome.

I’m using Lucid 10.04 (2.6.32-21-generic). This guide would surely work on most Debian based systems. If not, for testing purposes, Sun’s Virtualbox is ideal for setting up a testing environment that equals this guide. This guide is terminal-based. Preparation I assume you have Apache2, MySQL-5.0/5.1 and PHP5 already installed and working, if not, go find another guide ;). <? You will use this file over and over again to test if the PHP module is loaded through the FastCGI handler.

First we need to get phpfarm from the repository, you need to use SVN (subversion). Sudo apt-get install subversion . Releases. Pecl - Dev - My first patch: AMFEXT. I know this is hardly much of a fix, but since it compiles on windows and OSX, I am submitting my first patch for AMFEXT. I have successfully compiled it on my Win XP desktop using SDK 6.1 and 32-bit compilers and I have also compiled it successfully on OSX 10.5. It reflects some changes I've made as well as some contributions [which I don't fully understand] from a guy named Mikko on irc:#php.pecl.

I have attached an svn diff patch to this email. The changes include the following 1) Changed references to ZVAL_ADDREF, ZVAL_DELREF, and ZVAL_REFCOUNT to Z_ADDREF, Z_DELREF and Z_REFCOUNT, respectively per Gustavo Lopes' sagacious instruction. I hope this helps and that it might demonstrate my sincere desire to improve amfext. In the meantime, I desperately want to know how I might set up some kind of debugging situation whereby I might be privy to the inner workings of this code as it runs.

Thanks to Gustavo, Michael, and Pierre (and E. Creating a PHP 5 Extension with Visual C++ 2005 » "Hello World" – The SlickEdit Developer Blog. This article describes the steps to create a custom PHP extension DLL for the Windows platform. The Zend API documentation that comes with PHP 5 on Windows (see php_manual_en.chm) does a good job explaining how to write extension methods, parse method parameters, and return values. But there is not currently a good step-by-step tutorial on how to get your first extension project up and running on Windows.

The aim of this article is to fill that gap. Prerequisites Visual Studio 2005 You can alternately use the free Visual C++ Express Edition or the VC++ 8 compiler in the Windows SDK v6.0 if you’re a makefile master. Conventions Italics denote file paths and names. Provide links to images showing how dialogs are configured. Provide links to sample code files. Configuring the Environment I will not discuss installing and running the HTTP web server. If you do not already have PHP 5 installed, download it from php.net. Creating the Project For this example, I named the project CustomExt. Php - How to compile PECL php_intl library. Windows.php.net - /downloads/php-sdk/ Internals:windows:windowssdk. When building on windows - you should NOT use the default SDK included with VC6 or VC9, instead you need to get a newer SDK. If you are using VC6 you will need the Windows Server Feb. 2003 SDK. All official releases or snaps are built using VC6 with SP6 and this SDK.

If you are using VC9 you need to use the Windows SDK for Windows Server 2008 and .NET Framework 3.5 (also known as the SDK 6.1) SDK 6.1 is used for the PHP 5.3 and 6.0 VC9 builds currently available as snapshots and QA release at INSTALL THE FULL SDK IF YOU DO NOT WANT TO RUN IN ALL POSSIBLE ISSUES AFTERWARDS, EVEN IF OTHER DOCS/TUTORIALS/PERSONS RECOMMEND TO ONLY INSTALL PART OF IT. Note If you are creating your setup from scratch, then please read the following notice and blogs from Microsoft regarding an issue of installing the 6.1 SDK on top of VC9 SP1 : Installing the 6.1 SDK before installing VC9SP1 is the recommended route. Windows SDK for Windows Server 2008 and .NET Framework version 3.5. Visual Studio 2008 Service Pack 1 Update (KB974479) - Microsoft Download Center - Confirmation. Extending PHP (Programming PHP) This chapter shows you how to write C language extensions to PHP.

Although most functionality can be written in the PHP language, sometimes you need the extra speed and control you get from the C API. C code runs an order of magnitude faster than most interpreted script code, and it is also the mechanism for creating the thin middle layer between PHP and any third-party C library. For example, to be able to talk to the MySQL database server, PHP needs to implement the MySQL socket protocol. It would be a lot of work to figure out this protocol and talk to MySQL directly using fsockopen( ) and fputs( ) from a PHP script. Before we get into the details of writing extensions, a note of caution. There are two kinds of extensions that you can write: PHP extensions and Zend extensions. Figure 14-1 shows a diagram of a web server with PHP linked in. Figure 14-1. Copyright © 2003 O'Reilly & Associates.