PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Nothing, the only errors in the error log are the same as the php warnings displayed.
It's like I said before, the functionality works, it reads/writes session data fine, but I get warnings displayed.
If I remove self::$link from any/all of the mysql_* functions, it won't work (and receive different errors because of this)
The reason the errors are flagging, it would appear, is because the resource type is lost between method calls, as per my example previously. However the actual pointer/handler must be fine because I can still use it.
Jenk wrote:The reason the errors are flagging, it would appear, is because the resource type is lost between method calls, as per my example previously. However the actual pointer/handler must be fine because I can still use it.
mysql_query tries to establish the default connection if the one given as parameter is invalid.
So, which one is printed from error_log('jmt_Session::open '.(($retval)?'success':mysql_error()));?
btw: I used php 5.1.4 on win32 and gentoo linux to test the script.
I've already said it fails if I remove self::$link, and generates a different error, that different error being "unable to connect using 'ODBC'@'localhost' (using password: no)" and it is connecting and the session data is updating when I have self::$link in.
am using 5.1.4 also in win32, but not got a linux box to try on.
Will run error_log() as in your post when I get home.
I swapped to a persistant connection and it works without error.
Can't imagine the connection is closing/expiring that quickly? What else would cause it to close? [edit: just occured to me that perhaps it's the change in scope that is closing the connection?]
Jeez.. I'm actually quite worked up now, it's taken me the best part of 3 days to get such a 'simple' thing working..