Member Login

Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTI

ralphiooo (Programmer) (OP)
14 May 06 10:25
Hi, i'm getting the following error on one of the pages on my site:

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/includes/sessions.class.php on line 9

the start of the sessions.class.php is:



class session_handler {
    * __construct() - class constructor
    * @return   void
    public function __construct() {

    * set_handler() - sets the session handler
    * @return   void
    public static function set_handler() {
        session_set_save_handler(array('session_handler', 'open'), array('session_handler', 'close'), array('session_handler', 'read'), array('session_handler', 'write'), array('session_handler', 'destroy'), array('session_handler', 'gc'));

My server uses php 5 so i was getting lots of strict warning messages which i have managed to tweak to get rid off but now i am getting this error message on one of the pages on the site but none of the others.  The only difference with this file and the rest is that it has the extension .xml (it is an rss feed) and in my .htaccess file i have AddType application/x-httpd-php .xml .rss to make the server treat the file as a php file.

Appreciate it if someone could help.  Thanks
Olavxxx (Programmer)
15 May 06 5:47
You have one more ) than (.

array('session_handler', 'gc'));

Olav Alexander Mjelde
Admin & Webmaster

jpadie (TechnicalUser)
15 May 06 5:57
r u sure?  the pairs look matched to me.

i get no parse errors with this code.  i suspect that your server may have php4 and 5 installed contiguously and your htaccess directive is perhaps shoving the file down the wrong interpreter (or something tantamount).  
Olavxxx (Programmer)
15 May 06 5:59
jpadie: your right.. my eyes played a game on me.

Olav Alexander Mjelde
Admin & Webmaster

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close