Archive for November, 2006
php easter eggs
By Justin Silverton
The following are some easter eggs found in various version of php. To see these easter eggs, find any webserver installed with the respective version of php installed on it & append this to any url that ends with a php script.
php 4.x
php image (depending on the version, either a dog or a rabbit):
?=PHPE9568F36-D428-11d2-A769-00AA001ACF42
Note: The dog was a part of the php community. More information can be found here
The php logo:
?=PHPE9568F34-D428-11d2-A769-00AA001ACF42
Powered by zend logo:
?=PHPE9568F35-D428-11d2-A769-00AA001ACF42
credits (shows all authors and contributors):
?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000
If you have a website running php and you would like to disable these, you can by changing the variable: “expose_php” to off in php.ini.
Zend Studio Client (ZDE)
Red Hat Rejecting Microsoft’s offer
By Justin Silverton
“Thursday, Microsoft’s Ballmer said that the Redmond, Wash. developer was ready to cut a deal with Red Hat similar to the one it struck with Linux seller Novell last week. “We are willing to do the same deal with Red Hat Linux and other Linux distributors,” Ballmer was quoted by the Seattle Post-Intellengencer during a Q&A at an sql database conference.”
The Microsoft/Novell Deal includes patent protections, support cooperation, and co-development agreements.
In a recent turn of events, Red Hat has reject Microsoft’s offer:
“We do not believe there is a need for or basis for the type of relationship defined in the Microsoft-Novell announcement,” said Mark Webbink, Red Hat’s deputy general counsel, in an e-mail. “[But] Red Hat has and will continue to work with Microsoft on true interoperability and open standards in the way we did in advising them in the development of their Open Specification Promise.”
What will this mean for RedHat? Are they going to be sued for patent violations or will the prevail as Microsoft’s competitor?
No commentswhy do open source projects have so many bugs?
By Justin Silverton
In a recent article:
“In his first “meet the press” session as ICT Minister, Professor Sitthichai Pokai-udom put forth his radical vision for 3G in Thailand, condemned open source for turning out buggy, useless software and promised to make the civil servants in the ICT Ministry proud of their organisation once again.
Speaking at the IT Press Club, Minister Sitthichai said that he was looking for an investment of around 20 billion baht for Thai Mobile and between 10 and 18 billion for CAT in order to complete the roll-out of next generation communication networks for the two former state enterprises.
Sitthichai said on detailed questioning that Thai Mobile would upgrade its network and operate a WCDMA 3G network while CAT Telecom would roll out a CDMA2000 EV-DO network.
He said that rather than using public money to compete with the private sector, he expected today’s private mobile operators to gladly become partners to CAT and TOT and effectively lease their networks and focus on the marketing aspect. He reasoned that none of the incumbents would want to invest in a 3G network as 4G would come along in five years and render today’s investments obsolete.”
While I don’t completely agree with the stance that all open source applications are bug-ridden and useless, he does make a good point. I have used many open source applications over the years and many were either bug-ridden, barely functional, or they lacked basic functionali.
Open source sounds like a great concept. The idea is that since the code is open, there is a possibility for more programmers to see the code and create new functionality or fix bugs. This does happen to some degree, but because of the overwhelming number of contributers, many of the projects are subjected to in-fighting, politics, and eventual destruction.
While this is a part of any project, there needs to be more organization for a project to be successful. This involves assigning leaders and only accepting code into the main codebase that meets a certain standard. Many of the larger and more popular projects are using this method and have less bugs as a result (and are around much longer).
If more open source projects followed better project management practices, We would see much better projects an it would benefit both the users and the programming comunity.
2 commentsHow to write PHP extensions
By Justin Silverton
What is a php extension?
A PHP extension is a way to write extensions for the php language that would otherwise not be practical in the php language itself. The main benefit is speed of execution. An extension can be created in a compiled language such as c/c++ (if you look in your php.ini file, you can see examples of many extensions you most likely have already used) and loaded through a .dll (in windows) or a .so (in *nix) environment.
Types of extensions
Zend extensions
- pros: very fast and built into the core zend engine, which is what php runs on. This type of extension would be an actual change to the php interpreter/language (objects, expressions, etc).
- cons: if written improperly, can cause instability. These extensions are not recommended in most situations.
External extensions
- pros: Loaded at run-time (only the extension needs to be re-compiled when you make a change). Functionality is available to the script that loads it and memory is freed when the script ends.
- cons: Loading and unloading of extension may take up more processing power depending on how often the script loading it is accessed.
Built-in extensions
- pros: compiled with php and loaded with the php processes.
- cons: any changes to the extension require a complete re-compilation of php.
Example Code
An example extension project can be downloaded here
This example is for the *nix platform.
How to build:
$ phpize
$ ./configure –enable-hello
$ make
After running the above commands, you should have a hello.so file in ext/hello/modules/ . Now, you can copy this to your extensions directory (/usr/local/lib/php/extensions/ is the default, check your php.ini to be sure) and add the line extension=hello.so to your php.ini to trigger it to load on startup.
More in-depth information can be found here
No commentsSun releasing Java under the GNU
By Justin Silverton
In a suprising (yet not so surprising) announcement:
“Sun will release the first pieces of source code for Sun’s implementation of JSE (Java Platform Standard Edition) and a buildable implementation of JME (Java Platform Micro Edition).
Sun will also be making JEE (Java Platform Enterprise Edition) available under the GNU GPL v2 (General Public License version two).”
This sudden interest in open sourcing java has not always been the case.
“By open-sourcing Sun’s implementation of Java technology, we will inspire a new phase of developer collaboration and innovation using the NetBeans IDE [Integrated Development Environment] and expect the Java platform to be the foundation infrastructure for next generation Internet, desktop, mobile and enterprise applications,” said Rich Green, Sun’s executive VP of Software, in a statement.”
With the JDK [Java Development Kit] released as free software under the GPL, Sun will be working closely with distributors of the GNU/Linux operating system, who will soon be able to include the JDK as part of the open-source repositories that are commonly included with GNU/Linux distributions. Sun is releasing these technologies as open source in order to accelerate Java’s development and evolution. In addition, Sun said it hopes that it will reduce fragmentation and drive down development costs throughout the Java ME ecosystem. In addition, this move will provide easy access to the latest versions of Java ME platform technologies and, for the first time, enable the whole Java ME community to follow the activities of and participate in the development of these technologies.
This is a step in the right direction for Sun. With the power of the open source community, Java will now have more of a future as a development platform.
No comments




