Re: DB_DataObject question
| From: | Justin Patrin | Date: | Wed, 08 Jun 2005 20:48:16 +0000 |
| Subject: | Re: DB_DataObject question | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-19551@lists.php.net to get a copy of this message | ||
On 6/8/05, Daniel Testa <dan@sbrha.org> wrote:
> Which versions of php is DB_Dataobject compatible with? I have one
> website that runs with php 5 and everything works great and happy. I
> migrated most of my core code to another web server running php 4.3.11.
> Doing this causes my php scripts to die whenever they try and use any of
> the auto generated class files made by createTables.php. They get parse
> errors.
>
> The error
>
> Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION
> or T_FUNCTION or T_VAR or '}' in
> /home/crazyl2/include/DataObjects/Chr_characters.php on line 12
>
>
>
> Can DB_dataobject run in 4.3.11? All the auto generated files come from
> the php 5 server so could that have something to do with it?
>
DB_DO works fine with PHP4. However, if you use the generator in PHP5
the generated files will have PHP5 syntax (public instead of var). If
you change all of the "public" var declarations to use PHP4 syntax you
should be fine.
--
Justin Patrin