Saturday, December 05, 2015

Hello You Silly Person

NOTE: I finally got PHP7 installed and working from Apache2.

I logged into the server as "root" and ran all of the scripts without "sudo."

there is not supposed to be a "root" user on Ubuntu; my web host created one so the administration of their VPS servers would be consistent.

Anyway, they are going to send me to Ubuntu Hell for logging in as a superuser, but maybe I am already there.

I've been working my web server configuration.

For those of you who think I am too stupid to get PHP 7 installed on a server, I posted the image above to prove that I got the program installed. This little command line program executes the phpversion() command and tells me that it's version 7.0.
I am smart enough to get PHP on the server. I am just not smart enough to get the web server to run the blazing script.

I can't officially write a hello world because the flappin' program can only talk to me.

BTW, I realized I probably made a mistake installing Ubuntu. The Ubuntu world seems driven by the idea that installing programs is all about the installation script.

The site AskUbuntu says that, since PHP7 was just released on Dec 3, we shouldn't expect a Ubuntu script for quite sometime. It sounds like it might be a couple of months.

I've been reading web pages about all of the different install scripts and forks of install scripts that people have made for this release. The idea that we can maintain web servers through magic scripts by third parties is even more confusing than the idea of just learning to read and directly edit configuration files.

The command line tells me that PHP is working. I now just need to figure out what I need to do to apache2 so that it can find and execute the programs.

I did learn one thing today. Apparently, admins were adding the line:

AddHandler application/x-httpd-php .php? 

to their Apache configuration file; so that php would run on various php extensions and that script-kiddies would upload files with the a name like "image.php.png" The upload program would think this a harmless image. Apache2 would see that it matches the AddHandler pattern and execute the malicious code in the file.

Anyway, all the nice little scripts by ubuntu are fun. In the long run, I still think it best to figure out the configuration files and to learn what programs do what on the web server.

I am just wondering how much longer it will take before I get this server ready. I need to find a page that tells me all the pieces that need to be in place for apache to run php on scripts and I can't find a good resource.

No comments: