|
Posted by eholz1 on 04/29/07 18:10
Hello php group,
I have a dev server running php 5.0 and apache 2.2, I have created
some php files that create classes, etc All works well with this.
But when I copy the files to my hosting service's server - I get the
following error :
Parse error: parse error, unexpected T_CLASS in /home/3/2/2/3468/3468/
usr/include/classes/Portfolio.php on line 2.
I have a file called common.php which references the classes I have
made.
a snippet of code is:
<?php
require_once '/home/3/2/2/3468/3468/usr/include/classes/
Portfolio.php';
require_once '/home/3/2/2/3468/3468/usr/include/classes/
PortfolioImage.php';
?>
The error occurs at the first line in the class definition: it gives
me the error where I have the word "abstract"
<?php
abstract class Portfolio
{
public static $db;
public static $queries;
..... other functions, methods, etc
} //end of class def.
I also get the same type of error (moving the PortfolioImages.php file
to the first position in common.php)
snippet:
<?php
/***
18 March 2007 - Modified to use the portfolio table ,for insert of
portfolio image data
10 April 2007 - Copied the PortfolioImage.php class to a class for the
portfolio table
***/
class PortfolioImage
{
public $id;
public $folio; //same as "p"
public $pfolder; //same as folder
public $pname;
public $_tn_width;
public $_tn_height;
public $oheight;
public $owidth;
..... other functions, methods, etc
} //end of class def.
The above code gives the same parse error but as soon as it sees the
first variable definition, public $id, but on a different line number
(9).
I see where PHP 4.3 should support OOP type coding, etc. Is there
something that my hosting service needs to do??? or something I need
to do???
I have considerable time developing the code, and would hate to have
to re-write for my hosting server!! Any ideas on this??
thanks,
eholz1
[Back to original message]
|