Sessions in PHP 5 seem to be broken. I was getting the message "Call to a member function getTextValue() on a non-object in /usr/local/psa/include/sessions.php on line 104".
I was able to get past the error with a change to include/config.php.
getTextValue is a function of PEAR::MDB, so my guess is either that is not installed or misconfigured. I have been running this piece of code successfully on PHP5 since before the 4.0 release.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If the function is undefined, it would seem that one of the MDB (or MDB itself) isn't being included during execution. Check for file not found errors in the error log and be sure you have the correct RDMS type in the config file.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
****************************
pear install MDB
Skipping package "pear/MDB", already installed as version 1.3.0
No valid packages found
install failed
****************************
How do I check for session.use_trans_sid and PHP's gettext extension?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I went through the code, and do not see anywhere in sessions.php where $PSA_SESS_SQL is actually set to true. What version of MDB do you have installed? I assume it is the 1.3.0 version since that was the last release and it has been quite a while now.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm having the same problem, only in version 4.0.3 the error occurs on line 105. When logging in I receive a "Login Successful" message but when I click on any of the menu options (Users, Profiles, Pages, Settings) I am kicked back to the login page. And it logs a "PHP Fatal error: Call to a member function getTextValue() on a non-object in C:\Program Files\eclipse\workspace\psa\include\sessions.php on line 105" with every login attempt or page view.
I have installed and verified all that has been mentioned previously.
1. MDB version 1.3.0 is installed correctly.
2. phpinfo reports gettext installed and enabled.
3. phpinfo reports session.use_trans_sid is set to 1.
Query statements other than line 105 execute properly and appear in my sql log so I know MDB and gettext are functioning properly. I have arrived at the same conclusion as lycaste above in that the object $PSA_SESS_SQL is no longer valid but I can't figure out why.
Any help or additional things to look at/try would be greatly appreciated.
PSA Version: 4.0.3
Server OS: Win XP SP2
Web Server Software: Apache 2.0.48
Database System: mysql 5.0.51
PHP Version: 5.2.5
PEAR::MDB Version: 1.3.0
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I put together a test machine with Ubuntu 7.10, Apache 2.2.4, PHP 5.2.3 and MySql 5.0.45 and it has the same problem. So either I am consistent in what I am doing wrong or PSA doesn't get along with the newer version of one of its dependencies. I'm betting on a PHP issue.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am now getting a session issue and am unable to open the index.php file.
Fatal error: session_start() [<a href='function.session-start'>function.session-start</a>]: Failed to initialize storage module: user (path: /tmp) in /home/.garages/missdacia/website/include/config.php on line 74
I am using PHP 4.4.8 with gettext enabled and session.use_trans_sid turned On.
Doesnt seem to like the session_start() call in config.php.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I found in lots of forums that session.save_handler set to 'files' for local and master value fixes this issue, but mine is already set to 'files' and still the same error.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sessions in PHP 5 seem to be broken. I was getting the message "Call to a member function getTextValue() on a non-object in /usr/local/psa/include/sessions.php on line 104".
I was able to get past the error with a change to include/config.php.
if(!defined('PSA_INSTALLING') && !defined('PSA_RESTRICT_INC')) {
session_start();
session_write_close();
}
but the screens keep going back to the login screen.
What seems to be my problem?
getTextValue is a function of PEAR::MDB, so my guess is either that is not installed or misconfigured. I have been running this piece of code successfully on PHP5 since before the 4.0 release.
I do have the Pear::MDB module installed. Are there other things I can test for?
If the function is undefined, it would seem that one of the MDB (or MDB itself) isn't being included during execution. Check for file not found errors in the error log and be sure you have the correct RDMS type in the config file.
In the session.debug.txt, it looks like it is working, but it asks for a loging every time I ask for a new page or refresh the current.
*****************************
Read Session: 623c6adb91e5ac0f0d64a50b2fb26323
SELECT psa_sessions.value FROM psa_sessions WHERE psa_sessions.sesskey='623c6adb91e5ac0f0d64a50b2fb26323' AND psa_sessions.expiry > 1175256842
Session Exists: 623c6adb91e5ac0f0d64a50b2fb26323
Session Data:
Garbage Collection
DELETE FROM psa_sessions WHERE psa_sessions.expiry < 1175256842
Write Session: 623c6adb91e5ac0f0d64a50b2fb26323
Check Session: 623c6adb91e5ac0f0d64a50b2fb26323
Session Data:
SELECT psa_sessions.sesskey FROM psa_sessions WHERE psa_sessions.sesskey='623c6adb91e5ac0f0d64a50b2fb26323'
Key Exists: 623c6adb91e5ac0f0d64a50b2fb26323
UPDATE psa_sessions SET psa_sessions.expiry=1175258282, psa_sessions.value='' WHERE psa_sessions.sesskey='623c6adb91e5ac0f0d64a50b2fb26323' AND psa_sessions.expiry > 1175256842
Session Data:
Session Expire: 1175258282
Close Session
***********************************
****************************
pear install MDB
Skipping package "pear/MDB", already installed as version 1.3.0
No valid packages found
install failed
****************************
How do I check for session.use_trans_sid and PHP's gettext extension?
checking the phpinfo() output is the quickest way
Here I have the same problem, in the same configuration. All Pear installations are ok. I have made some trace, and just look into the error message:
"Call to a member function getTextValue() on a non-object in /usr/local/psa/include/sessions.php on line 104"
it means the object pointer used (ie $PSA_SESS_SQL in the source) is no longer valid (it's value is set to TRUE).
I went through the code, and do not see anywhere in sessions.php where $PSA_SESS_SQL is actually set to true. What version of MDB do you have installed? I assume it is the 1.3.0 version since that was the last release and it has been quite a while now.
Yes, I use the last version 1.3.0 here. I don't understand why it is set to true, but the error is the same.
I'm having the same problem, only in version 4.0.3 the error occurs on line 105. When logging in I receive a "Login Successful" message but when I click on any of the menu options (Users, Profiles, Pages, Settings) I am kicked back to the login page. And it logs a "PHP Fatal error: Call to a member function getTextValue() on a non-object in C:\Program Files\eclipse\workspace\psa\include\sessions.php on line 105" with every login attempt or page view.
I have installed and verified all that has been mentioned previously.
1. MDB version 1.3.0 is installed correctly.
2. phpinfo reports gettext installed and enabled.
3. phpinfo reports session.use_trans_sid is set to 1.
Query statements other than line 105 execute properly and appear in my sql log so I know MDB and gettext are functioning properly. I have arrived at the same conclusion as lycaste above in that the object $PSA_SESS_SQL is no longer valid but I can't figure out why.
Any help or additional things to look at/try would be greatly appreciated.
PSA Version: 4.0.3
Server OS: Win XP SP2
Web Server Software: Apache 2.0.48
Database System: mysql 5.0.51
PHP Version: 5.2.5
PEAR::MDB Version: 1.3.0
I put together a test machine with Ubuntu 7.10, Apache 2.2.4, PHP 5.2.3 and MySql 5.0.45 and it has the same problem. So either I am consistent in what I am doing wrong or PSA doesn't get along with the newer version of one of its dependencies. I'm betting on a PHP issue.
Put this line in the top part of sessions.php
register_shutdown_function("session_write_close");
I found this solution here:
http://www.php.net/manual/en/function.session-set-save-handler.php#75336
I am using PHP 5.2.6, PEAR 1.7.1.
I have installed PEAR MDB and MDB2 because of this message I get from the webserver.
[abe]$ pear install -o pear/MDB
WARNING: "pear/MDB" is deprecated in favor of "pear/MDB2"
downloading MDB-1.3.0.tgz ...
Starting to download MDB-1.3.0.tgz (218,957 bytes)
.............done: 218,957 bytes
downloading XML_Parser-1.2.8.tgz ...
Starting to download XML_Parser-1.2.8.tgz (13,476 bytes)
...done: 13,476 bytes
install ok: channel://pear.php.net/XML_Parser-1.2.8
install ok: channel://pear.php.net/MDB-1.3.0
--end--
QUESTION: How do I know which driver i am using as I am supposed to input this in the config file.
Currently, I have:
'phptype' => 'MDB-1.3.0', // which PEAR::MDB database driver are you using?
QUESTION: How do I know if this is the correct driver for PEAR::MDB?
the phptype is expecting an entry like 'mysql' or 'pgsql'
Thanks for your response.
I am now getting a session issue and am unable to open the index.php file.
Fatal error: session_start() [<a href='function.session-start'>function.session-start</a>]: Failed to initialize storage module: user (path: /tmp) in /home/.garages/missdacia/website/include/config.php on line 74
I am using PHP 4.4.8 with gettext enabled and session.use_trans_sid turned On.
Doesnt seem to like the session_start() call in config.php.
I found in lots of forums that session.save_handler set to 'files' for local and master value fixes this issue, but mine is already set to 'files' and still the same error.