Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3277748
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:24:13+00:00 2026-05-17T19:24:13+00:00

I have PHP 5.2.3, apache2.x, MySQL 5.x on a Linux machine. Everything was working

  • 0

I have PHP 5.2.3, apache2.x, MySQL 5.x on a Linux machine. Everything was working fine until yesterday. This morning all of a sudden one of the PHP files started to throw “Fatal error: Call to a member function execute() on a non-object in”. I use PDO (prepare, execute, close cursor etc). Have you ever come across this problem? does someone know a fix for this, please?

Many thanks,
R

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T19:24:14+00:00Added an answer on May 17, 2026 at 7:24 pm

    As Alan says, the problem is probably that prepare is returning false rather than a PDOStatement. The best way to debug this is to turn warnings on. To do this, put this code right after you initialise PDO:

    $db = new PDO();  // insert the following after this line
    $db->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING );
    

    This will mean that a PHP warning will be raised by PDO when the prepare statement fails. This should contain information that will help you debug the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My site was working fine until I followed this guide, http://www.howtoforge.com/how-to-set-up-apache2-with-mod_fcgid-and-php5-on-ubuntu-9.10 to set up
I have a LAMP (Linux/Apache/MySQL/Php) application that I should release soon. Even if I've
I have installed native apache and mysql,php in my linux server. I tried a
We have a custom PHP/MySQL CMS running on Linux/Apache thats rolled out to multiple
I have a local install of Apache / MySQL and PHP on Fedora Linux.
I have a site running a Linux/Apache/MySQL/PHP stack. I would like to connect to
I have a webserver setup using the standard linux, apache, mysql, php config and
I have a production server with apache2, php, mysql. I have just one site
So I have a simple Apache with MySql I am developing a PHP app.
I have installed xampp on Windows7(64bit).I want to work with PHP, Apache and MySql.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.