PHP Classes

error on line 27

Recommend this page to a friend!

      DrasticTools  >  All threads  >  error on line 27  >  (Un) Subscribe thread alerts  
Subject:error on line 27
Summary:mySql.class.,php error
Messages:3
Author:Acland
Date:2008-08-19 02:12:55
Update:2008-08-20 22:18:08
 

  1. error on line 27   Reply   Report abuse  
Picture of Acland Acland - 2008-08-19 02:12:55
I've downloaded the examples and created a simple database to show the total people in each postcode of our mailing list. But when I load the page I get this error:

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in drasticSrcMySQL.class.php on line 27

Line 27 for that page is the first line of the class which is this: public $add_allowed = true; // may the user add records? Default is true.

I haven't altered that page at all and it doesn't matter what example.php pages I test - I always get that error. All I change in the example pages is the database table name and the fields I want to test the pages with. What am I doing wrong because this should be very straight forward.

Thanks in advance for any help

  2. Re: error on line 27   Reply   Report abuse  
Picture of dd dd - 2008-08-20 08:31:36 - In reply to message 1 from Acland
Sounds to me like a syntax error somewhere in the php part of your example file or in the examplemysqlconfig.php

  3. Re: error on line 27   Reply   Report abuse  
Picture of Acland Acland - 2008-08-20 22:18:08 - In reply to message 1 from Acland
I found the problem - seems like our server was running PHP4.0 so I downloaded xampp to a mac and have php and sql running on it and everything is working fine now. Thanks all for your help/