HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

Apache 2.1 + PHP + MYSQL

 
Willem Grooters
Honored Contributor

Apache 2.1 + PHP + MYSQL

I have run into a number of problems with the combination Apache (2.1), PHP (4.1.3) and MySQL (4.1) on VMS.
First of all: PHP is SLOW. connections easily time out, I got errors of 'not enough core'.
What are feasable settings? Both APACHE$WWW and MySQLServer have sufficient quota (I think)

Second: Some data can simply not be read using PHP code, where uing mysql itself has no problem at all.
I've been told (cannot confirm) that this MOD_PHP's MYSQL-module is built agains MySQL, or 4.0 (since I do have the password-incompatibility issue). If so: Is there any PHP_Mysql around built against MySQL 4.1 (and running on OpenVMS)?

Third: I'm loosing users, where I'm certain I issues commit; on Mysql's commandline. It looks as if this is kept in memory and are not written back to disk. Does that ring a bell somewhere?

Forth: MySQL_Server crashed yesterday with ACCVIO, and after restarting, a number of databases seemed lost (MYSQL> SHOW DATABASES; showed just the default ones). Trying to re-create one of the "lost" said it couldn't create it, since it did already exist (and I knew that). SHOW DATABASES now shows all the databases added - but just withing MySQL, nor from the outside: PHP programs still could not find their database.
Again: What could be the point?

Willem
Willem Grooters
OpenVMS Developer & System Manager
10 REPLIES
Jean-François Piéronne
Trusted Contributor

Re: Apache 2.1 + PHP + MYSQL

You can get a PHP module interface for MySQL from
http://www.pi-net.dyndns.org/anonymous/kits/axp/

try php_mysql_mysql_419.zip

There is a new image of MySQLD at
http://www.pi-net.dyndns.org/anonymous/kits/tmp/

this fix some ACCVIO due to CC bug (need compile one of the source /noopt)

You can try yo use mysqlcheck to test and repair your database.

Warning: create your tables in InnoDB format, not MyISAM (except for the mysql database)

Jean-François
Jansen_8
Regular Advisor

Re: Apache 2.1 + PHP + MYSQL

JF's phpMSQL extention works with cwsw$php 1.2

For 1.3 I compiled the HP supplied source and linked against the current phpshr.exe and mysql libs.

If people are interested I can put it on my web-page. (Or are you planning to do it JF?

Jouk
Jean-François Piéronne
Trusted Contributor

Re: Apache 2.1 + PHP + MYSQL

Jouk,

you're right my extension was linked against cwsw$php 1.2 and HP has nor provide a compatible shareable image in 1.3...

Martin Borgman from oooovms has posted the same request in http://www.pi-net.dyndns.org/phpbb/index.php

I have put in this forum the material I have used to build the extension.

Feel free to duplicate or post yours.

Jean-Francois
Willem Grooters
Honored Contributor

Re: Apache 2.1 + PHP + MYSQL

Thanks for this data, I will rebuild PHP-MySQL using these files (though I would greatly appreciate Jouk's offer).
That may have solved the second and perhaps fourth issue ;-).
As on the first issue - the first idea on the cause of the crash, I had a look to the pagefilequota of APACHE$WWW (500.000) and MYSQL_SERVER (2.000.000). I raised the APACHE$WWW quota to 2.000.000 as well, and went on investigating the second and third issue: Indeed I lost some users, others lost there privileges: just "root" was still prenet - and complete.
In the sequence of restoring these privileges and users (using PHPMyAdmin) I observed pagefile-resources being consumed rapidly. Both pagefiles on this system (500.000 and almost 600.000 blocks) were almost completely in use - just using Apache, PHP and MySQL. After stopping the PHP code, it slowly returned to somewhat lower values but still much higher than when the system was started. Given the fact that committed changes were not saved in the database, I have the impression these were still in virtual memory - causing a high number of comitted pages (at this moment: 70% in one and about 65% in the other)

The database has been created using the example configuration - only the location of the database has been changed.

* What size is to be considered adaquate for the pagefile(s)
* how to force pages freed when changes have been committed (idf applicable)?
Willem Grooters
OpenVMS Developer & System Manager
Jean-François Piéronne
Trusted Contributor

Re: Apache 2.1 + PHP + MYSQL

Martin Borgman has just posted a very complete guide which explains how to build the module.

I will investigate your others problems.

Jean-Francois
ps.
I expect some problems with the SSL part as MySQL is compile /float=ieee and HP SSL not.
Willem Grooters
Honored Contributor

Re: Apache 2.1 + PHP + MYSQL

Update:
* Pagefile use has been found mainlu an Apache issue, not MySQL. At least: After I shutdown Apache, pagefile usage became normal again (max. 30% used of each), which did not happen after I shutdown MySQL_Server.
* I have rebuild PHP_MYSQL as described on the website, moved the result to apache$common:[php.extensions] where I found the original. It seems it requires a restart of Apache before the new image is found. After that, ANY MYSQL program will fail, and error_log shows:

PHP Warning: Unknown(): Invalid library (maybe not a PHP library) 'php_mysql.exe' in Unknown on line 0

Seecurity is correct (as the original file), and there have been no warnings or errors in building the executable.
Willem Grooters
OpenVMS Developer & System Manager
Hein van den Heuvel
Honored Contributor

Re: Apache 2.1 + PHP + MYSQL

Folks interested in this topic shoudl also check out: http://vamp.issinoho.com

[Willem, ik zie dat je daar al geweest bent.]

It was recently mentioned in comp.os.vms :

"The VAMP (VMS-Apache-MySQL-PHP) message board has been upgraded to run on the latest version of phpBB, namely 2.0.20
A full changelog is contained on the board forum, however changes are mainly bug fixes & security-related.

I've also done a little spring-clean. All users that I could identify as being spammers have been deleted and a new shiny theme and banner has been added.

Other than that it's business as usual. Hope you like the changes; any and and all comments welcome.

One of these days I'll get round to getting a decent URL for this to run on; until that time it remains at ttp://www.issinoho.com:8080/phpbb2/
"

fwiw,
Hein.
Willem Grooters
Honored Contributor

Re: Apache 2.1 + PHP + MYSQL

One thing I found out inverstigating the image resulting:
The modulename of the HP-delivered file is in uppercase, where the newly built one has it in Lowercase.
Would THAT be the issue?
If so, how can I force it to be uppercase?

(cc/version V7.1-015 on OpenVMS Alpha V8.2)
Willem Grooters
OpenVMS Developer & System Manager
Willem Grooters
Honored Contributor

Re: Apache 2.1 + PHP + MYSQL

I've got it build - but the reason of failure is quite different from what is expected, For a full decription see http://www.pi-net.dyndns.org/phpbb/viewtopic.php?t=64

The main problem , I think, is that PHP requires shared libraries to reside on SYS$LIBRARY, and references to other locations - being, IMHO, a decent VMS-way of doing things - is NOT supported. What's worse: it looks like linking against these SYS$LIBRARY files is another requirement. I tried linking against the original locations (and have copies of these files in SYS$LIBRARY), and then Interactive usage of PHP was no problem, accessing the very same script using Apache didn't recognize the image as a PHP library.....

Willem Grooters
OpenVMS Developer & System Manager
Willem Grooters
Honored Contributor

Re: Apache 2.1 + PHP + MYSQL

Once you know it, it's an easy solution. But VERY, VERY unlike VMS.
And, IMHO, not quite acceptable....
Willem Grooters
OpenVMS Developer & System Manager