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 7996853
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:48:44+00:00 2026-06-04T14:48:44+00:00

I use php+ apache on Fedora 16 fc16.x86_64. I’m learning php and sqlite3 (using

  • 0

I use php+ apache on Fedora 16 fc16.x86_64.
I’m learning php and sqlite3 (using PDO). But my code doesn’t work whatever.

<?php
    try {
    $db = new PDO('sqlite:./z4.db');
    $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    $db->prepare('SELECT * FROM users;');
    $posts = $db->execute();

        echo "test test";
        echo '<ul>';
        while ($post = $posts->fetchObject()) {
        echo '<li>' . $post->content . '</li>';
        }
        echo '</ul>';


    } catch (Exception $e) {
    die($e);
    }
?>

sqlite 3 is OK, database file is ok,

Output of php -m:

apc
bz2
calendar
Core
ctype
curl
date
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
igbinary
json
libxml
mbstring
mcrypt
memcache
memcached
mhash
mongo
mysql
mysqli
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_pgsql
pdo_sqlite
pgsql
Phar
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
sqlite3
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
zip
zlib

output of rpm -qa | grep php:

php-pecl-apc-3.1.9-2.fc16.x86_64
php-pgsql-5.3.11-1.fc16.x86_64
php-gd-5.3.11-1.fc16.x86_64
php-5.3.11-1.fc16.x86_64
php-pear-1.9.4-5.fc16.noarch
php-pdo-5.3.11-1.fc16.x86_64
php-pecl-mongo-1.2.10-1.fc16.x86_64
php-common-5.3.11-1.fc16.x86_64
php-devel-5.3.11-1.fc16.x86_64
php-cli-5.3.11-1.fc16.x86_64
php-mbstring-5.3.11-1.fc16.x86_64
php-mysql-5.3.11-1.fc16.x86_64
php-mcrypt-5.3.11-1.fc16.x86_64
php-pecl-memcached-1.0.2-6.fc16.x86_64
php-xml-5.3.11-1.fc16.x86_64
php-pecl-memcache-3.0.6-1.fc16.x86_64
php-pecl-igbinary-1.1.1-1.fc16.x86_64

After adding some extensions to php.ini it is warning:
Module ‘xyz’ already loaded on Unknown 0…
so I removed them.

  • 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-06-04T14:48:46+00:00Added an answer on June 4, 2026 at 2:48 pm

    When you execute php via the command line, you don’t generally execute the same php binary that your webserver runs. They can be different versions, and almost always have different php.ini and configs.

    Use phpinfo() from a script run through the webserver. Use that to find a correct php.ini file to edit, then restart the webserver to make sure settings update.

    turn on display_errors and set error_reporting to E_ALL

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

Sidebar

Related Questions

I'm trying to use php to get the list of loaded apache modules using
I am using PHP with Apache on Linux, with Sendmail. I use the PHP
I've installed various PHP packages to be able to use PHP with Apache but
I tried to use the Http Authentication Digest Scheme with my php (apache module)
I've installed Apache 2.2 on a Windows machine for use in PHP local coding
I use XAMPP on my desktop (Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1 MySQL
We use Windows for our development systems. I am installing PHP, Apache, MySQL manually.
I'm trying to use PHP to create a file, but it isn't working. I
I have an existing large(ish) PHP web app (using Apache and MySQL) which now
NetBeans is recommending to use MAMP for Apache + MySQL + PHP on the

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.