Results 1 to 9 of 9

Thread: mysqli extension in php5

  1. #1
    Join Date
    Jul 2011
    Beans
    3

    mysqli extension in php5

    I'm using an Asus EEE 1215B running Ubuntu 11.x (Natty Narwhal) with apache2, mysql and php5.3.5.

    I got the following error:

    Fatal error: Class 'mysqli' not found in /public_html/DocCon/DocConPHP/db_fns.php on line 22
    I installed php5 and mysql using the apt-get command. Should I go back and rebuild it from the source? Total newbie here...

    I have another box running Ubuntu 10.x and can do what I need to do without any problems. Any ideas on how to fix this? I suppose worst case I can just go back and reinstall Ubuntu 10.x...

  2. #2
    Join Date
    Nov 2005
    Location
    Carmel, Indiana U.S.A.
    Beans
    Hidden!
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: mysqli extension in php5

    How did you install LAMP?

    IndyTim / DataMan
    New Build : Core 2 Quad, 8G RAM, 1.75TB Storage ... it's fun!
    GRUB Partition Linux Backups- Ver2 Easy LAMP Install
    Linux ID 422356 Ubuntu User 15015

  3. #3
    Join Date
    Jul 2011
    Beans
    3

    Re: mysqli extension in php5

    Sorry -- what do you mean by LAMP? I'm a total newbie when it comes to Linux (well, I've used it before but never actually configured my environment)...

  4. #4
    Join Date
    Nov 2005
    Location
    Bordeaux, France
    Beans
    11,292
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: mysqli extension in php5

    LAMP is an acronym for Linux Apache MySQL PHPH, basically he's asking how you installed Apache, MySQL and PHP.
    「明後日の夕方には帰ってるからね。」


  5. #5
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    13,364
    Distro
    Kubuntu 18.04 Bionic Beaver

    Re: mysqli extension in php5

    Probably this will help:

    Code:
    sudo apt-get install php5-mysql
    This package contains the PHP module that interfaces with the MySQL server.

  6. #6
    Join Date
    May 2007
    Location
    East Yorkshire, England
    Beans
    Hidden!

    Re: mysqli extension in php5

    Uncomment the mysqli extension in php.ini.
    Website | Blog | The Arch Hurd Project

    If you want to ask about something I posted, send a PM, as I don't watch many threads

  7. #7
    Join Date
    Jul 2011
    Beans
    3

    Re: mysqli extension in php5

    Quote Originally Posted by Barrucadu View Post
    Uncomment the mysqli extension in php.ini.

    I uncommented this line: "mysqli.allow_local_infile = On" and it worked. That line was the only one commented in the php.ini file.

    Indytim, I used apt-get install to install (as root, of course) all the packages, including php5-mysql.

  8. #8

    Re: mysqli extension in php5

    @allan_ong's solution worked for me as well. funny, before i switched to ubuntu i'd never even noticed that line before, and i do this stuff for a living... o_0

    p.s. @allan_ong: you might want to mark this thread [SOLVED]

  9. #9
    Join Date
    Sep 2012
    Beans
    1

    Re: mysqli extension in php5

    Thanks allan_ong

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •