News Feed
Jobs Feed
Sections



Recent Jobs

News Archive
feed this:

Sankuru Blog:
Adding support for if/while/do while, to a simple compiler & virtual machine in PHP
January 04, 2012 @ 11:40:22

Improving on his last post about creating a bytecode compiler in PHP, the Sankuru blog has a new post in the series looking at extending the basic compiler to add support for if/while and do while logic.

In order to obtain a turing-complete programming language, that is, a language in which we can implement and execute any arbitrary algorithm, that is, that other turing-complete machines can execute too, we now need to add a way of (conditionally) branching, that is, the IF statement, and at least one way of repeating statements, that is the WHILE or the DO WHILE statements.

He includes a simple TL-based script as an end goal for the compiler to be able to execute and shows how to add rules for it to the lexer/parser. Rules for the "if" are relatively simple, but there's a hitch in dealing with embedded "while" statements he had to work around. The post ends with the bytecode results for the sample program and the resulting output from the compiled versions execution.

0 comments voice your opinion now!
bytecode compiler virtual machine while if whiledo logic



Sankuru Blog:
A simple bytecode compiler with virtual machine, written in Php, for the EL language
December 30, 2011 @ 11:06:36

On the Sankuru blog there's a recent post looking at the construction of a simple bytecode compiler with a virtual machine as written in PHP (for Expression Language).

In my previous blog posts, I demonstrated how we can use the builtin PCRE library, to create a lexer in Php. I also showed how to use Bison-generated LALR1 parser tables in Php. In this blog post, I will re-use these lexing and parsing facilities to compile EL programs from within Php.

He uses his lexer/parser (available for download) in an example program that outputs some values and does some simple mathematical operations. There's sections detailing the Bison grammar used, execution stacks, callbacks and the bytecode it produces.

0 comments voice your opinion now!
bytecode compiler virtual machine expression language


DZone.com:
Using a virtual machine to play with multiple versions of PHP
November 04, 2011 @ 10:15:04

On DZone.com Giorgio Sironi has a new post talking about a development practice that's becoming more and more popular (rather than the old standby of one development platform for all developers) - using virtual machines as reusable, easily renewable platforms. He talks about the process he went through to set up PHP, including the commands used during the process.

This is an occasion to learn about a virtualization tool which I'm not familiar with, VirtualBox. The goal is to install PHP 5.4, which is not yet a stable release, to play around with new features such as traits without ruining the setup on my primary machine (which runs the super-stable PHP 5.3). Although it may be possible to run them together (I'm not a sysadmin), it's really simpler to install one of them in a virtual machine that can be thrown away if something goes wrong.

Using VirtualBox he describes the process of getting a Ubuntu system up and running including a custom compile of PHP with things like curl, bz2, mbstring and openssl support. With that installed and the Apache packages all set up, it should just be a matter of hitting your localhost's web server. If you're looking for older (or just other) versions of PHP to compile, check out the Historical Releases page on the PHP.net site.

0 comments voice your opinion now!
virtualbox virtual machine development platform compile


PHPMaster.com:
From Zero to Cloud Setting up an EC2 Sandbox, Part 3
September 22, 2011 @ 08:42:22

SitePoint's PHPMaster has a new post today, the third part of a series helping you get your application from "zero to cloud" on an Amazon EC2 setup. In this latest post they wrap things up by showing how to set up the full lamp stack on the remote server. Here's part one and two that lead up to this latest part.

This is the final article in a three part series focused on setting up EC2 as a sandbox for application developers. I assume you have an AWS account with Amazon; if you don't, please read Part 1 to learn how easy it is to sign up. I also assume you have configured your development environment and installed an AMI; if you haven't, please read Part 2. In this installment, we'll learn how to install Apache, MySQL and PHP in our running AMI, and then clone the AMI to make our own.

Included in the post are all the commands you'll need to get the packages installed for PHP, MySQL, Apache 2, PEAR and the PHP command line binary. With all of that installed, they show you how to create an AMI (Amazon Machine Image) to make it easier to scale in the future.

0 comments voice your opinion now!
tutorial amazon aws image machine scale ec2 instance


Zend Developer Zone:
PHP - Faster And Cheaper. Scale Vertically with IBM Power Systems
September 03, 2009 @ 08:02:36

On the Zend Developer Zone today Sam Hennessy has posted some information about how the IBM Power Systems can help you and your PHP application both perform better and do it for less.

If you're from the LAMP world, the concept of vertically scaling with a system like the i5 (IBM Power Systems) will be a complete revelation. If you follow the vertical scaling methodology, when it comes time to design how your application will scale, there is nothing for you to do.

With the i5 series all of the software runs locally and can be optimized for the best performance ("reduced complexity"). Virtual machines on the same physical machine make it quick and easy to create separate environments (like QA or staging). The system does a lot of the common maintenance tasks itself and could require less attention from the IT admins. You can find out more information about these machines from the IBM website.

0 comments voice your opinion now!
ibm powersystems scale machine i5


Alex Netkachov's Blog:
Installing Debian Web-server with Apache, PHP, and MySQL on virtual machine
March 17, 2009 @ 11:13:52

Alex Netkachov has posted a new tutorial to his blog today about installing a custom LAMP setup (Linux - Debian, to be exact, Apache, MySQL and PHP) inside of a virtual machine.

Installing Linux is not a complex task, you only need to follow some instructions and have basic understanding of how computer software and hardware work. Also you should be ready that documentation will be different from what you already might have seen. It means that it may be less colorful, more technical, and have different terminology. That's Ok. What you need is only to follow the doc and try to understand it - like thousands of people.

Most of the post is taken up with installing the Debian instance inside of a virtual instance (he mentions three, they're all about the same - VirtualBox, VMWare Server and VirtualPC) and includes a slideshow of images to help you through the install process. Once its installed, its just a simple matter of a few apt-get commands and you'll have MySQL and PHP setup to work with the already-installed Apache instance.

0 comments voice your opinion now!
debian apache mysql php5 virtual machine virtualbox virtualpc vmware


Edin Kadribasic's Blog:
New Windows Snaps/Release Builder
March 20, 2007 @ 08:18:00

Edin Kadribasic shares some great news on his blog this morning those using the PHP Windows builds will be happy to hear.

During my time at Emini I was using an old beat up machine to build PHP snapshots for Windows. It was only a Pentium II 400MHz and compiling a PHP snapshot on that machine took more than an hour. After leaving Emini I needed to find a new box for compiling PHP snapshots and PECL extensions for the Windows platform.

The light at the end of the tunnel came when Wez Furlong reminded him about a box OmniTI had that could handle just that. Now, what used to take over an hour to run takes around six minutes (a full compile of the latest snapshot with all of the extensions, including checkout and upload of the Win32 snapshot).

0 comments voice your opinion now!
windows snaps builder machine omniti opteron minutes windows snaps builder machine omniti opteron minutes


Edin Kadribasic's Blog:
PECL4WIN Build Box Dead
November 14, 2006 @ 16:38:00

Some unfortunate news from Edin Kadribasic to be felt particularly by the Windows PHP users out there - the box that hosts the PECL packages for Windows has suffered a bit from a power failure.

The power failures are very rare in Denmark, but nonetheless this one managed to take out the build box. The website itself is not affected, but there are no updates for the time being.

The PECL4WIN project hosts a repository of PECL extensions precompiled for the Windows platform. The packaging and distribution system used by PECL is shared with its sister, PEAR.

UPDATE (11.15.2006) - The box is back up and working at 100% again (faulty memory was to blame). A new build has already been created.

1 comment voice your opinion now!
pecl4win box machine power failure downtime update pecl4win box machine power failure downtime update


Kian Hui Teo's Blog:
Switching between PHP 5.1.x and Zend Core for Oracle
May 22, 2006 @ 17:46:32

Via this post from Christopher Jones we learn about Kian Hui Teo's blog post talking about making the switch between the normal PHP 5.1.x installation and the Zend Core for Oracle.

This situation arises as I had installed Zend Core for Oracle (ZCO), and I wanted to try out some PDO functions. As ZCO comes with PHP 5.0.5, I was stuck, and PDO is only included from PHP 5.1.x onwards, I had to install PHP 5.1.x on my Windows box so that I can play with PDO. The assumption is that we have ZCO installed and working with a Apache2 server. I share the steps here on how to install another version of PHP so that it will co-exist peacefully with ZCO.

The post outlines a process to allow both the Zend Core and a normal installation of PHP 5.1.x to live peacefully (and still be able to switch from one to the other at any time). It's actually a relatively simple ten-step process to follow, especially if you've had much experience with installing PHP from scratch. When complete, you can start up one or the other, making it easy to test scripts in both or to just use the functionality in one (as he needed with PDO).

1 comment voice your opinion now!
zend core oracle php5 switch one machine pdo zend core oracle php5 switch one machine pdo



Community Events





Don't see your event here?
Let us know!


test framework development language interview release community phpunit podcast application unittest introduction manifesto symfony2 api opinion series conference package custom

All content copyright, 2012 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework