Copy link to clipboard
Copied
I just got a weird message. The page shows properly. However, at the BOTTOM, this miessage appears:
Fatal error: Uncaught Exception: Serialization of 'PDOStatement' is not allowed in [no active file]:0 Stack trace: #0 {main} thrown in [no active file] on line 0
Does anyone have any idea what this means or where I might look to find the problem?
Any advice will be appreciated! Thanks...
Copy link to clipboard
Copied
Hi Elizabeth!
Unfortunately it's hard to full diagnose what the problem is without you providing a link to (or at least of screenshot) of the error in action or the steps to get to there. However, I can start by saying this is a PHP error that occurs when a website can't successfully connect to a database it needs to finish displaying it's content. If you're not sure what's causing the issue, you may need to contact your website host's technical support to identify the issue; it could be a corrupt or old WordPress installation or other one-click install application.
Hope this helps!
Copy link to clipboard
Copied
The database information is displayed correctly, so I don't think the host's tech support can help me. I'm using Dreamweaver & SQL/PDO. Thanks for your response.
Copy link to clipboard
Copied
Did you previously have a stored session?
Copy link to clipboard
Copied
I am using a session. I'm trying to set up a paged display of records. I'm reading all on the first time through. What I'd LIKE to do is then update the $firstrec value to show the next group.,, But this message appears the first time the page is called!!! Not at the top but at the bottom after the page is displayed!
Copy link to clipboard
Copied
When page opens, I'm reading data & saving variables I'll need for subsequent calls in session variables. If NEXT is chosen, I'm calling $_SERVER['PHP_SELF'] (I got this from David Powers' PHP Solutions). But I don't even get there before getting this fatal error. But the page displays ok!!!!! Most confusing. Makes no sense to me, but I'm new to this process.
Copy link to clipboard
Copied
What is a stored session and how does it differ from any session begun with session_start(); ?
Copy link to clipboard
Copied
See this:
https://www.w3schools.com/php/php_sessions.asp
Copy link to clipboard
Copied
Thanks. What I'm finding is that the session variables are great for regular variables, BUT - the database values I''ve saved in session variables disappear. I want to retain my position in a table I'm iterating - is there any way to do this? Actually, I'd also like to store the entire contents of a table in a session variable. This is not a table with thousands of entries. Around 70.
Copy link to clipboard
Copied
I'm getting there! I placed the database records in a 2 dimensional array and that's working. I still have some kinks to work out, but I'm no longer inside the paper bag. This forum is S-O-O-O helpful! Sometimes explaining the problem helps clarify the problem. Many thanks to all of you who respond to people like me!
Copy link to clipboard
Copied
The weird message disappeared when I used the data array.