 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Sankuru Blog: Adding support for if/while/do while, to a simple compiler & virtual machine in PHP
by Chris Cornutt 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.
voice your opinion now!
bytecode compiler virtual machine while if whiledo logic
DZone.com: Using a virtual machine to play with multiple versions of PHP
by Chris Cornutt 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.
voice your opinion now!
virtualbox virtual machine development platform compile
PHPMaster.com: From Zero to Cloud Setting up an EC2 Sandbox, Part 3
by Chris Cornutt 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.
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
by Chris Cornutt 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.
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
by Chris Cornutt 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.
voice your opinion now!
debian apache mysql php5 virtual machine virtualbox virtualpc vmware
Kian Hui Teo's Blog: Switching between PHP 5.1.x and Zend Core for Oracle
by Chris Cornutt 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).
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!
|