Is the LAMP Stack Still Viable?

in STEMGeeks7 months ago


I had a hard time accessing sites in the HIVE-Ecosystem yesterday. I was unable to upload posts and comments to I don't know if the problem was with my computer, the keychain or a HIVE node.

The irony is that the post was about the dangers of building dependencies on programs and structures outside of one's control.

The term LAMP Stack refers to the combination of the Linux Operating System, the Apache Web Server, a MySQL database and the PHP programming language.

It is super easy to turn any Linux based computer into a robust multi-threaded internet server by installing the LAMP. One need simply write APT GET THIS and APT GET THAT, modify a few configuration files and the server is running.

More importantly, the LAMP Stack became a standard among discount web hosts. One could find places to host web sites for under $5 a month. There are some free services that host LAMP web sites as well, although I wouldn't trust them.

I was a computer snob and wanted to run JAVA on TomCat and got burned by an unsavory webhost.

I found the LAMP stack sufficient for most web sites.

The problem with any programming stack is that one becomes dependent on the layers of the stack.

The Fall of MySQL

MySQL was a darling of the Open Source community. The Finnish programmer Michael Widenius launched the project in 1995. He named it after his eldest daughter My.

Sun Microsystems, makers of the Java, acquired MySQL in 2008. Sun Microsystems had a stellar reputation with the programming community and people were thrilled.

A company called ORACLE acquired SunMicrosystems in 2010. ORACLE is famous for a predatory approach to licensing. ORACLE began adding propriety extensions to MySQL Enterprise. This caused programmers to panic. Any company that used MySQL could be subject to an audit and potentially large bill for using MySQL.

In response to the ORACLE purchase, Widenius created a hardfork of MySQL which he named MariaDB. Maria is his youngest daughter. The My/Maria hardfork was similar to the STEEM/HIVE hardfork.

When programmers install the LAMP stack, they have the choice of dinking around with a database named after My. Of course, one might consider a dalliance of My's cuter younger sister Maria.

It is also possible to swap out MySQL with Postgres or a number of other database servers. I've been experimenting with SQLite. Different databases often have different database types and slightly different structure.

The Fall of PHP

PHP started as a kludge for processing forms that used the CGI (Common Gateway Interface) offered by Apache. The kludge was sufficient to add dynamic server side features to web sites and became popular among web designers.

The first version had the name Personal Home Page indicating that its initial market was web enthusiasts putting up personal home pages.

PHP morphed into a programming language with the introduction of the Zend Engine. Many of PHP functions were simply wrappers for underlying C functions.

I have to admit. The thing I liked most about the initial versions of PHP was that it would automatically extract form elements and turn them into variables. PHP was loosely typed; so one could use variables even if they did not exist.

This meant that you could write simple programs that assumed that the form elements would become variables, making programming extremely easy.

Some PHP programmers were extremely sloppy and failed to declare internal variables, which created security holes. PHP removed the auto-extract feature.

PHP sent SQL commands to the server as plain text delimited by quotes. Well, this opened databases to SQL injection attacks.

For the most part, PHP was just a wrapper for C. Students were trained in school to think that "object oriented programmer" was superior to functional programming. Despite the fact that server side scripts do not really benefit from OOP, PHP added a wrapper for the "class {" structure used in C. They began adding other constructs from the world of Object Oriented Programming.

In PHP 7, the company deprecated the functional database connections. The replaced the functional database calls with an awkward PDO object.

The main purpose of a server side script is to provide a quick interface between the web page and server. PDO creates an extremely complex object that sits between the programmer and database. The language is simply too awkward for most amateur web programmers.

My big complaint with the PDO Object will not make sense to most readers. The PDOStatment Object Extends the Countable Object. I discovered in my code that in a small number of circumstances the PDOStatment object does not return the first row of a SQL query. I filed a bug and Zend responded by dismissing me.

If the database does not return the correct data with every single call; then the program is a total fail. The bug has something to do with the way that PDOstatement extends Countable. Anyway, I've been unable to recommend PHP to anyone because of this bug.

PHP Corporate Structure

As I understand, PHP began as an opensource project by Rasmus Lerdorf in 1994. Andi Gutmans and Zeev Suraski created a parser called the Zend Engine and released PHP as a language called "PHP Hypertext Preprocessor." ZEev and aNDi created a company called Zend Technologies to fund additional expansion of PHP.

Zend created an IDE called Zend Studio, a program called Zend Server and a certification program. The expectation is that if you want to program in PHP; you need to buy their products.

A company called Rogue Wave acquired Zend. A company called Perforce acquired Rogue Ware. A private equity firm called Clearlake Capital supported by Francisco Partners acquired Perforce.

Open source developers began dumping their PHP code; so in 2019 Zend spun off the "Zend Framework," which is the code utilized by Apache to the Linux Foundation. It is now part of a project called Laminas and is available with the BSD license.


When programmers adopt a stack of programs, they become dependent on the groups that control the stack. When the stack is well designed, it is usually possible to swap out the compromised portion of the stack with another.

If you don't want to use MySQL, you can dump My and go for her cuter younger sister Maria. I can no longer recommend PHP because of their hideous object oriented database connection, which has me questioning if I shouldn't just dump LAMP stack entirely.

I've been tempted to find ways to swap out the database with the blockchain. This brings me back to the mysterious experience yesterday when I could not access the HIVE blockchain.

Swapping out PHP has proven to be a bit more difficult. I might be able to swap Python for PHP.

The picture shows an antique lamp illuminating a PHP manual.

Posted with STEMGeeks


After 20 years programming in PHP I can say Long Life to PHP

Check your Full Vote Report - Made With PHP and Javascript with out MYSQL

Sometimes on 3Speak site I can't watch videos on computer. I don't know what is wrong? Maybe it's down?