Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Programming/Scripts

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 13th July 2007, 14:03
Mosquito Mosquito is offline
Member
 
Join Date: Nov 2006
Posts: 85
Thanks: 5
Thanked 6 Times in 5 Posts
Default Storing Session Data in MySQL Table

Hello all,

I am having an odd problem that I was hoping you could help with. I have a PHP application that stores session data into a MySQL table. This process works fine on Windows Server 2003. I am now migrating this application to a linux server. Since the migration, it fails to work at all.

I continue to receive this message in my error logs:
Code:
PHP Fatal error:  Call to a member function query() on a non-object in /path/to/file/file.php on line 83
Line 83 looks like this (in Write_Session):
Code:
$result = $connection->query("SELECT session_id FROM $session_table WHERE session_id = '$sess_id'");
Now, normally, I would assume that their is a problem with the connection object. However, it is set globally and is used just fine in my Read_Session function:
Code:
$result = $connection->query("SELECT * FROM $session_table WHERE session_id = '$sess_id'");
I have compared the php.ini files of the Windows machine and the linux machine. Aside from the obvious linux/windows differences, all of my paths, variables, etc. are set correctly.

I am using (in case this helps)
Code:
PHP 5.2.2 (cli) (built: May  8 2007 08:15:05)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
Does anyone have any ideas?
Reply With Quote
Sponsored Links
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Statistic not working mzo Installation/Configuration 49 20th April 2011 12:19
Help with Bluetooth PAND josto HOWTO-Related Questions 1 7th August 2007 20:53
mysql clustering problem : cannot create table in database prince.fer Server Operation 2 16th April 2007 17:03
Website users? ctroyp General 25 6th January 2006 18:02


All times are GMT +2. The time now is 20:06.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.