I have been trying my hand at the PHP implementation of Apache on an
Alpha with VMS 8.3. I find the documentation on getting things
working very lacking.
Currently I am having trouble determining what allows and disallows
certain fuctions, with the latest sticking point being the "glob()"
function.
When I try to use "glob" in a php script, I get the "Fatal Error: Call
to undefined function glob()" ...
I've been searching all around with google and this is usually solved
by going to PHP 4.3.0 - but the VMS implementation of PHP states that
it is 4.3.10, so it would seem that it should support this function.
In the end what I wanted to do was implement the free photo sharing
software called "Gallery" which is based on mysql and PHP with Apache
(at least, in my implementation). This function is the latest hurdle
and I've reproduced the error with a simple call to:
foreach (glob("*.txt") as $filename) ...
Any pointers would be greatly appreciated.
-- jls
P.S. I have put a "php_flag safe_mode off" in my php.ini file, just
fyi.
Most likely the glob() in PHP depends on the glob() in the CRTL, which
didn't come along until OVMS v8.2. The PHP kit for Alpha states that it
works on OVMS Alpha v7.3-2 or later, which would typically mean it was
linked on v7.3-2 or at least against 7.3-2 run-time libraries, where
there would be no glob() function to link to. So most likely the error
message you are getting is telling you the truth, i.e., the glob()
function really is unimplemented in the PHP kit you have.
You probably won't like any of your options, but these are the ones that
come to mind. You can log a call with HP and see if they have any plans
to update their three-year-old PHP kit, you can build it yourself from
sources (which various people have reported difficulty doing), or you
can ditch PHP and use Perl, which implemented its own glob() on VMS a
decade or more before anyone saw fit to add it to the CRTL.
> Most likely the glob() in PHP depends on the glob() in the CRTL, which
> didn't come along until OVMS v8.2. The PHP kit for Alpha states that it
> works on OVMS Alpha v7.3-2 or later, which would typically mean it was
> linked on v7.3-2 or at least against 7.3-2 run-time libraries, where
> there would be no glob() function to link to. So most likely the error
> message you are getting is telling you the truth, i.e., the glob()
> function really is unimplemented in the PHP kit you have.
> You probably won't like any of your options, but these are the ones that
> come to mind. You can log a call with HP and see if they have any plans
> to update their three-year-old PHP kit, you can build it yourself from
> sources (which various people have reported difficulty doing), or you
> can ditch PHP and use Perl, which implemented its own glob() on VMS a
> decade or more before anyone saw fit to add it to the CRTL.
Why can't he add glob to his version of the crtl?
--
PL/I for OpenVMS
www.kednos.com
3 years old? The PHP 1.3 ECO2 kit is from April 2008.
I have no experience porting code from other platforms, so if anyone
else has worked on a VMS/PHP port, it'd be nice to see what they have
done so far.
I'm already running VMS 8.3, which *should* include the glob()
function.... so it would seem as though the HP implementation of PHP
may not have that function activated.
How active are they working on it? The latest ECO is from April
2008.... is there any chance they'll be working on an update to
include this?
Unfortunately, I am just a hobbyist, so don't have a support contract
to contact them directly.
> "Craig A. Berry" <craig...@nospam.mac.com> wrote:
>> You can log a call with HP and see if they have any plans
>> to update their three-year-old PHP kit, [...]
>
> 3 years old? The PHP 1.3 ECO2 kit is from April 2008.
...and the release notes state that it only corrects various errors.
The original CSWS_PHP 1.3 kit was published in November 2005.
cu,
Martin
--
One OS to rule them all | Martin Vorlaender | OpenVMS rules!
One OS to find them | work: m...@pdv-systeme.de
One OS to bring them all | http://vms.pdv-systeme.de/users/martinv/
And in the Darkness bind them.| home: martin.v...@t-online.de
If you look at the on line PHP manual for the glob() function
<http://www.php.net/glob> you will see a number of replacements for
the function that people have written (scroll through the user
comments). I just tried the one called safe_glob and it worked fine on
my VMS machine. OpenVMS 7.3-2 running the lastest PHP.
Ken
And it is based on PHP 4.3 which was first released in December
2002.
And the PHP team will stop developing security patches for PHP 4
tomorrow (August 8th).
A PHP 5 port for VMS is long overdue !
Arne
Which could be because the code is intended to also run on
versions older than 8.2 !
Arne
He would still need to rebuild PHP with glob enabled.
And "add to CRTL" ??
Arne
>
>A PHP 5 port for VMS is long overdue !
>
Yeah, I'd guess so!
I've never done any porting work.... doubt I could accomplish such a
monumental task myself.
When I look at the way that application builds are created in the UNIX
world I cringe at the thought.