Jun
24
SugarSync Client update
Hi all,
Good News - my SugarSync client is now in alpha - with the ability to download and upload files and folders based on last modified times.
I will provide some initial source code once I have tidied it up a bit and done some more extensive testing.

posted by
Mark Willis
Mar
10
URGENT – C/apache module developer needed
Good Evening,
I know it's been a while. Got alot on at the moment (moving,work,family,etc)
I am currently re-desiging the crawler catcher which includes an apache module for detecting ip's
But i'm only a novice/intermediate level C coder, what I really need is someone to give me a hand with hash tables and apache api.
Please send me an email if you can help. shouldn't take too long.
Mark

posted by
Mark Willis
Sep
21
Symfony Components – Usable Independantly

One feature I like about symfony is the ability to use each component independantly of the entire framework, It's just a case of downloading the library and using straight away.
I have been looking at PHPUnit and symfony's own "lime" unit tester and although PHPUnit is good, I'm prefering the lime as it is easier to read (and even better with the lime extra plugin).
With the component base of symfony you can also use lime in non-symfony based projects. So I can use the same unit testing framework for all my projects.
This is another plus for symfony. Some components are available at symfony components.

posted by
Mark Willis
Sep
16
Sort Multidimensional array by order of an array
Although the title of this post may sound confusing - what I achieved was an extremely useful function. Whilst building a website using SphinxSearch for some search resultsĀ - after using MySQL to get the data I needed:
PHP retrieves a set of id's from sphinx (4,5,2,34,1,453,3)
SELECT id,name,url FROM table WHERE id IN (4,5,2,34,1,453,3);
Read the rest of this entry »

posted by
Mark Willis
Sep
14
eAccelerator review
eAccelerator seems to be compared to APC for it's caching + accelerator performance. But eAccelerator has one major advantage to APC and that is file caching. If your server runs low on RAM or your eAccelerator config hits it's own memory limit then the cache can start to store on the disk as well (or choose to store all the cache on disk and leave RAM for other processes).
This is excellent for shared hosting servers / or dedicated servers used for multiple services.
eAccelerator contains a PHP encoder and loader (although the current RC doesn't). You can encode PHP scripts using encoder.php in order to distribute them without sources. Encoded files can then be run on any site which runs PHP with eAccelerator. The sources of encoded scripts can't be restored because they are stored in a compiled form and the encoded version doesn't contain the source. Of course, some internals of the scripts can be restored with different reverse engineering tools (disassemblers, debuggers, etc), but it is not trivial.
eAccelerator stores compiled PHP scripts in shared memory and executes code directly from it, this is a great speed increase as the PHP engine does not have to pre-compile a script before executing
eAccelerator is compatible with Zend Optimizer's loader. Zend Optimizer must be installed after eAccelerator in php.ini. If you don't use scripts encoded with Zend Encoder then we do not recommend you install Zend Optimizer with eAccelerator.

posted by
Mark Willis
Sep
09
Symfony or Zend Framework
My initial plan for this review was to install both frameworks and test both against each other. But after spending a few hours trying to get zend framework to install correctly, I gave up with it...
A PHP based framework should install fairly easy - I will give it another try when I get some spare time (it is a bit sparse at the moment with new baby liam)
Symfony however I have fallen for, every part of the setup is brilliant: from url routing to unit testing.
Initially I had a few problems following there tutorial (it defaults to use Propel ORM when Doctrine seems much better)
I'm still working out how to use most of the features, but that is mainly because there is so much of it.
I am using Crawler Catcher as my main project with symfony (as it needs a rewrite already). With the symfony framework and unit testing which is built in. All the old bugs have already been fixed.
More to come in the near future

posted by
Mark Willis
Sep
06
Add symfony code insight to NuSphere PhpED
This is one problem I faced with symfony. Although it's very easy to add "some" code insight to your project:

Just go to project properties - then add your project root (or PEAR install off symfony) and code insight will be added. Thanks to phpleo

posted by
Mark Willis
Sep
01
Symfony MVC outlook
I have been playing with the Zend framework for the past week or so, There will be a post in the next few days reviewing it. I am also looking at the Symfony framework this week and will post a comparison on both frameworks within the next week or two.
Symfony provides an architecture, components and tools for developers to build complex web applications faster. Choosing symfony allows you to release your applications earlier, host and scale them without problem.

posted by
Mark Willis
Aug
25
Remote development – Happier staff
If you had the choice would you commute to your works office everyday (maybe 1-2 hours each way) to do web development or would you prefer to stay at home spend an extra few hours with your family? Would you turn down / negotiate terms on a job proposal if you always work from home but a prospective employer doesn't agree with remote employees?
Read the rest of this entry »

posted by
Mark Willis
Aug
16
ip2long vs INET_ATON
Whilst I was making the IP range function for my crawler catcher, I stumbled upon the problem of signed and unsigned integers for ip address (ip2long, INET_ATON) and back again (long2ip, INET_NTOA) using PHP and MySQL respectively. This caused me a problem when I used ip2long to sort ip addresses by order, and received negative numbers (-16843010) this gave me some funny results when using php's sort() function. I was getting 1 IP out of a range appearing 3/4 numbers out of place.
Upon futher inspection I found out that php uses signed integers (positive and negative numbers). This messes with the array sort functon. After I changed to unsigned integers, my ip ranges worked perfectly.
MySQL also won't produce an IP from a negative integer, and just returns false:
I've provided some demonstrations, and a php function to produce an unsigned long from an IP address.
Read the rest of this entry »

posted by
Mark Willis