Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Apache 2.1-1 and PHP 1.3 - no "glob" function?

41 views
Skip to first unread message

none

unread,
Aug 6, 2008, 8:47:42 AM8/6/08
to
Greetings all,

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.

Craig A. Berry

unread,
Aug 7, 2008, 9:50:52 AM8/7/08
to

> 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()" ...

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.

Tom Linden

unread,
Aug 7, 2008, 11:11:21 AM8/7/08
to
On Thu, 07 Aug 2008 06:50:52 -0700, Craig A. Berry
<craig...@nospam.mac.com> wrote:

> 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

none

unread,
Aug 7, 2008, 11:40:55 AM8/7/08
to

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.

none

unread,
Aug 7, 2008, 11:43:33 AM8/7/08
to
On Thu, 07 Aug 2008 08:11:21 -0700, "Tom Linden" <t...@kednos.company>
wrote:

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.

Martin Vorlaender

unread,
Aug 7, 2008, 12:33:36 PM8/7/08
to
none <nobod...@yahoo.com> wrote:

> "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

Ken Robinson

unread,
Aug 7, 2008, 12:57:06 PM8/7/08
to
On Thu, Aug 7, 2008 at 11:43 AM, none <nobod...@yahoo.com> wrote:
> On Thu, 07 Aug 2008 08:11:21 -0700, "Tom Linden" <t...@kednos.company>
> wrote:
>
>>On Thu, 07 Aug 2008 06:50:52 -0700, Craig A. Berry
>><craig...@nospam.mac.com> wrote:
>>
>>> 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?

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

Arne Vajhøj

unread,
Aug 7, 2008, 9:58:14 PM8/7/08
to
Martin Vorlaender wrote:
> none <nobod...@yahoo.com> wrote:
>> "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.

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

Arne Vajhøj

unread,
Aug 7, 2008, 9:59:31 PM8/7/08
to
none wrote:
> On Thu, 07 Aug 2008 08:11:21 -0700, "Tom Linden" <t...@kednos.company>
> wrote:
>> On Thu, 07 Aug 2008 06:50:52 -0700, Craig A. Berry
>> <craig...@nospam.mac.com> wrote:
>>> 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?
>
> 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.

Which could be because the code is intended to also run on
versions older than 8.2 !

Arne

Arne Vajhøj

unread,
Aug 7, 2008, 10:01:21 PM8/7/08
to
Tom Linden wrote:
> On Thu, 07 Aug 2008 06:50:52 -0700, Craig A. Berry
>> 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?

He would still need to rebuild PHP with glob enabled.

And "add to CRTL" ??

Arne

none

unread,
Aug 8, 2008, 8:41:36 AM8/8/08
to
On Thu, 07 Aug 2008 21:58:14 -0400, Arne Vajhøj <ar...@vajhoej.dk>
wrote:


>
>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.

0 new messages