The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SQLite and PHP -- Tired

Discussion in 'General Discussion' started by wahabkhan, Sep 24, 2007.

  1. wahabkhan

    wahabkhan Active Member

    Joined:
    Sep 7, 2006
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Hi Everyone,
    I have been trying to setup SQLite with UTF-8 encoding on my cpanel server and have not been successful. I have different kinds of SQLite on the server and i really have no idea which one shud be removed and which one should be kept. Can any body help me ?

    root@server [/home/trial/www]# rpm -qa|grep sqlite
    sqlite2-devel-2.8.17-1.fc5
    sqlite-3.3.3-1.2
    php-sqlite-5.1.6-1.1
    sqlite-devel-3.3.3-1.2
    sqlite2-2.8.17-1.fc5
    python-sqlite-1.1.7-1.2

    I am tired and worn out bcoz of this issue.

    root@server [/home/trial/www]# php -i|grep -i "sqlite"
    PDO drivers => sqlite2, sqlite
    pdo_sqlite
    PDO Driver for SQLite 3.x => enabled
    PECL Module version => (bundled) 1.0.1 $Id: pdo_sqlite.c,v 1.10.2.6.2.2 2007/03/23 14:30:00 wez Exp $
    SQLite Library => 3.3.17
    Registered save handlers => files user sqlite
    SQLite
    SQLite support => enabled
    PECL Module version => 2.0-dev $Id: sqlite.c,v 1.166.2.13.2.9 2007/05/19 17:58:22 iliaa Exp $
    SQLite Library => 2.8.17
    SQLite Encoding => iso8859
    sqlite.assoc_case => 0 => 0
    OLDPWD => /root/SQLite-1.0.3
    _SERVER["OLDPWD"] => /root/SQLite-1.0.3
    _ENV["OLDPWD"] => /root/SQLite-1.0.3

    Any Help Would be appreciated.
     
  2. ebatista

    ebatista Member

    Joined:
    Jan 23, 2006
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    If you are using php 4.x:

    mkdir -p /tmp2/pear
    cd /tmp
    rm -rf pear
    ln -s /tmp2/pear
    pecl install SQLite-1.0.3
    cd /tmp2/pear/download/SQLite-1.0.3
    vi configure
    Add the line -> PHP_SQLITE_UTF8=yes
    ./configure
    make
    make install

    vi /usr/lib/php.ini
    extension=sqlite.so

    /etc/init.d/httpd restart

    rm -rf /tmp2
    rm -f /tmp/pear


    But, using php5 this doesn't work. It seens that php5 has native support to sqlite and the default charset is iso8859. I´m having the same problem with that.
     
  3. wahabkhan

    wahabkhan Active Member

    Joined:
    Sep 7, 2006
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Hi Batista,
    Naw..Its php5. I have been nearly banging my head against the walls now. Its php5.

    PHP 5.2.3 (cli) (built: Aug 31 2007 09:07:22)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
    with the ionCube PHP Loader v3.1.29, Copyright (c) 2002-2007, by ionCube Ltd., and
    with Zend Extension Manager v1.2.0, Copyright (c) 2003-2006, by Zend Technologies
    with Zend Optimizer v3.2.2, Copyright (c) 1998-2006, by Zend Technologies

    I am seriously out of ideas. I have done nearly everything now. I am suspicious of the rpms installed. I think, one or two of the installed rpms needs to be removed.

    root@server [/home/trial/www]# rpm -qa|grep sqlite
    sqlite2-devel-2.8.17-1.fc5
    sqlite-3.3.3-1.2
    php-sqlite-5.1.6-1.1
    sqlite-devel-3.3.3-1.2
    sqlite2-2.8.17-1.fc5
    python-sqlite-1.1.7-1.2

    How many rpms do you have installed? Can you check it and we can see where are we not making it right.

    What are you using the UTF8 encoding for?
     
  4. ebatista

    ebatista Member

    Joined:
    Jan 23, 2006
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Hello wahabkhan,

    Ok, so we have the same problem.

    The rpm packages installed on server are python-sqlite-1.1.7-1.2.1 and sqlite-3.3.6-2.

    But i think that the problem is that the php5 includes sqlite support and it's compiled with iso8859 by default.

    I found something in the web and we need to recompile the php5 with the option --enable-sqlite-utf8. But i can't do this work yet.

    I want utf8 support to use swsoft sitebuilder.

    And you?
     
  5. wahabkhan

    wahabkhan Active Member

    Joined:
    Sep 7, 2006
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    lolz. We are the passengers of the same ship. UTF8 for sitebuilder 4. well, It doesnt work with --enable-sqlite-utf8. I have tried everything. finally, i am thinking that may be i should use --disable-sqlite while compiling php5. I am out of sorts for now. I have tried nearly 5,6 combinations in past 2,3 hours. You have any idea at all as to what can be the problem here? Actually, swsoft couldnt help me at all, they pushed me on the wrong path saying to compile SQLite seperately and include and .so extension in php. And they were wrong becuase sqlite is built-in php. Out of my mind ryte now. Have my thinking hat on. :mad:
     
  6. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    711
    Likes Received:
    3
    Trophy Points:
    18
    Hello,

    If you do find the necessary flags you can get them into the ea3 build using "rawopts" as per http://www.cpanel.net/support/docs/easyapache.htm

    Also please let me know what you end up needing so as to support the sitebuilder in question as it may be a great addition as an option to ea3 herself :)
     
  7. wahabkhan

    wahabkhan Active Member

    Joined:
    Sep 7, 2006
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Hi,
    Should i create all the directories? like /var/cpanel/easyapache/rawenv....The directories exist till /var/cpanel and not furthur. All the directories on the easy apache documents page have not been created. Not the full paths i mean. I am running cpanel 11. So should i proceed with the creation of the directories and path not created?
     
  8. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    711
    Likes Received:
    3
    Trophy Points:
    18
    /var/cpanel/easy/apache/rawenv will exist once you've run easyaapche 3 once. Its currently only in CURRENT and EDGE.
     
  9. wahabkhan

    wahabkhan Active Member

    Joined:
    Sep 7, 2006
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Oh..does this mean the apache update in whm and easy apache 3 are different. Coz currently i am trying by editing the buildscript in cpapache. Should i run easy apache? I just need the SQLite to be compiled with php with UTF-8 encoding. and i have tried everything. Any ideas?
     
  10. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    711
    Likes Received:
    3
    Trophy Points:
    18
    They are the same, version 3 is the new one. Its only in CURRENT and EDGE

    Definitely, easyapache 1.5 not 3.0 sorry the URL I sent does not apply to that, ea 1.5 doesn't have a rawopts type funtionality, sorry :)
     
  11. ebatista

    ebatista Member

    Joined:
    Jan 23, 2006
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Searching the forum i found another way to do that.

    Just execute:

    CUSTOM_PHP_FLAGS="--enable-sqlite-utf8" /scripts/easyapache

    it works for me
     
    #11 ebatista, Oct 1, 2007
    Last edited: Oct 16, 2007
Loading...

Share This Page