"Karen M. Feraer" <[EMAIL PROTECTED]> writes:

Hi Karen,

(I've sent this reply to the PEL devel list too, so that it can be
archived for the future...  Please CC that list too in your replies.)

> Hi I've seen PelConvert and I thought that I could use this to
> convert an integer to a long datatype so that my SOAP request data
> type be recognized ... But I got this error...

It's cool if you can use this part of PEL for something else... the
idea is sound, for it has nothing to do with Exif data specifically,
it's a general conversion class.

> Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or
> `T_VAR' or `'}'' in C:\Program Files\Apache Group\Apache2\htdocs\Sample
> Soap\convert.php on line 67
>
> The convert.php is the pelconvert.php.

Could it be that you are not running PHP5?  PEL requires this not-so-
bleeding-edge-anymore version of PHP.

But the PelConvert class is just a simple wrapper around some static
methods, so you could easily convert it into good old-fashioned PHP4
code:

1. Remove `class PelConvert {' at the top and matching `}' at the
   bottom.

2. Change

     const LITTLE_ENDIAN = true;

   into

     define('LITTLE_ENDIAN', true);

   Likewise for BIG_ENDIAN.

3. Remove all occurences of `static'.

4. Remove all occurences of `self::'.


I thing that should work and give you access to the functionality as a
bunch of normal functions, but I don't have any old PHP4 systems
around, so I haven't tested it.  But let me (and the list) know how it
goes!

-- 
Martin Geisler                                     GnuPG Key: 0x7E45DD38

PHP Exif Library      |  PHP Weather             |  PHP Shell
http://pel.sf.net/    |  http://phpweather.net/  |  http://mgeisler.net/
Read/write Exif data  |  Show current weather    |  A shell in a browser

Attachment: pgpyEe5orNEyn.pgp
Description: PGP signature

Reply via email to