1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Moved to a VPS server started getting a PHP warning...

Discussion in 'PHP' started by qwikad.com, Jan 25, 2014.

  1. #1
    Do you guys know anything about this warning I keep getting in my error log?

    PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/pdo_mysql.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0

    One of my scripts is not working any longer because of that. I was using that script with another cPanel and everything was fine, after moving to VPS cPanel I keep getting that error.

    Any help will be appreciated.
     
    qwikad.com, Jan 25, 2014 IP
  2. competent123

    competent123 Notable Member

    Messages:
    1,743
    Likes Received:
    69
    Best Answers:
    6
    Trophy Points:
    255
    #2
    look at /usr/local/lib/php.ini ( usually this is the location)

    extension=pdo_sqlite.so
    extension=sqlite.so

    comment out
    ;extension=pdo_sqlite.so
    ;extension=sqlite.so

    then restart apache - /etc/init.d/httpd restart

    it should be fixed
    if you are using zend/ioncube you will have to downgrade to php 5.2. version
    i am assuming you are having 5.3.2 version of php installed.
     
    competent123, Jan 25, 2014 IP
  3. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    7,151
    Likes Received:
    1,656
    Best Answers:
    29
    Trophy Points:
    475
    #3
    @competent123 but how do I access the .ini file? Can you explain this to me like I am just beginning to learn about servers, Apache and what not. I tried to locate that file via my VPS cPanel I couldn't. I go to my WHM panel, I can't see it there either. If you can just explain this to me step by step (1. first do this 2. do this 3. do this, etc.) it'd be greatly appreciated.
     
    qwikad.com, Jan 25, 2014 IP
  4. competent123

    competent123 Notable Member

    Messages:
    1,743
    Likes Received:
    69
    Best Answers:
    6
    Trophy Points:
    255
    #4
    first try to see if you can change php version for your domain only, as its the easiest and least likely to break something

    also make sure you restart apache after every config change, to load the changes.
    i learned this the hard way.
    http://www.siteground.com/tutorials/cpanel/php_version_change.htm
    see if you have this - php version manager , ( you MAY have it)

    first make sure you login to ROOT of the server

    to find if you are root, easiest way is to see the port you login to use cpanel
    2082/2083 are users/customers
    2086/2087 is for root


    you can work only if you are able to login to 2087 or 2086

    then goto php version there, you will find php editor or configuration or something like that

    only edit the php.ini file, nothing else

    try to comment out the line , that i indicated in last post

    these steps are very dangerous , its best left to professionals to do it.
    you may end up without the website.

    if you can find it, or you mess up, then recreating apache is the only option for you

    goto easy apache, standard configuration

    rebuild apache with the php version of your choosing.

    if everything fails.

    PM me.

    i'll see what i can do.
     
    Last edited: Jan 25, 2014
    competent123, Jan 25, 2014 IP
  5. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    7,151
    Likes Received:
    1,656
    Best Answers:
    29
    Trophy Points:
    475
    #5
    I went to my root of the server and created a php.ini file using PHP Configuration Editor. It showed me the php.ini page. But I can't edit it. Where do I go to actually edit it? It says that the path is this: .:/usr/lib/php:/usr/local/lib/php.ini but it's nowhere to be found.

    Do I actually need to manually create that path and then place that php.ini file in it?

    In the file extension=pdo_sqlite.so and extension=sqlite.so are not commented out.
     
    Last edited: Jan 25, 2014
    qwikad.com, Jan 25, 2014 IP
  6. competent123

    competent123 Notable Member

    Messages:
    1,743
    Likes Received:
    69
    Best Answers:
    6
    Trophy Points:
    255
    #6
    no
    if you have created that file, its useless as apache wont' use that file.
    you DON'T create the file, it will be already there , in the indicated directory.

    do one thing , if it works out this way
    make a copy of that php.ini file in your website directory ( usually /home/username/public_html)

    and comment out

    ;extension=pdo_sqlite.so
    ;extension=sqlite.so

    /usr/local/lib/php.ini this is the main server php config file.

    add ; in front of this line

    then restart apache ( cpanel would have a button to restart apache)
    most of the time if php.ini file is present, apache will use that file from directory.
    see if it works out.
     
    competent123, Jan 25, 2014 IP
  7. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    7,151
    Likes Received:
    1,656
    Best Answers:
    29
    Trophy Points:
    475
    #7
    Maybe I am not doing this right, but it didn't help.

    You mentioned maybe I should downgrade it to php 5.2. How do I do this through my root interface? I want to try this, see if that helps.

    My cPanel says I run 5.4.24 php version.
     
    qwikad.com, Jan 25, 2014 IP
  8. competent123

    competent123 Notable Member

    Messages:
    1,743
    Likes Received:
    69
    Best Answers:
    6
    Trophy Points:
    255
    #8
    then it should be ok, as the problem is in 5.3.2 version only

    go to php config editor ( in cpanel ROOT)
    and put ; before the two extensions
    restart apache.
    thats the only thing you have to do
     
    competent123, Jan 25, 2014 IP
  9. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    7,151
    Likes Received:
    1,656
    Best Answers:
    29
    Trophy Points:
    475
    #9

    This is what I have as an extension there .:/usr/lib/php:/usr/local/lib/php.ini

    Where would you put ; in that line?
     
    qwikad.com, Jan 25, 2014 IP
  10. competent123

    competent123 Notable Member

    Messages:
    1,743
    Likes Received:
    69
    Best Answers:
    6
    Trophy Points:
    255
    #10
    you dont' put ; in that like

    you have to edit php.ini file
    add me to skype, i'll do it

    Regards
     
    competent123, Jan 25, 2014 IP
  11. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    7,151
    Likes Received:
    1,656
    Best Answers:
    29
    Trophy Points:
    475
    #11
    Downgrading to 5.2.17 has actually solved the issue. Go figure. Thanks for your help @competent123 !
     
    qwikad.com, Jan 25, 2014 IP
    competent123 likes this.
  12. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #12
    Downgrading versions is NOT a solution - it's a patch, and a bad one at that. It's rarely, if ever, a good idea to downgrade versions, especially stuff that runs on a public webserver. Old versions may contain bugs and security-holes which are never being patched for that version, and old (outdated) versions are never a good idea.
    The better solution would be to figure out why you get the error, and then either modify the code, or change settings for the newer version to see if that works.
     
    PoPSiCLe, Jan 25, 2014 IP
    Nigel Lew likes this.
  13. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    7,151
    Likes Received:
    1,656
    Best Answers:
    29
    Trophy Points:
    475
    #13
    I totally agree with you and I will eventually get to it. The truth is even some well known web hosting providers are still using php 5.2. I guess there's a reason for it. For now I just need some stuff up and running. In a few months I will get back to this issue.
     
    qwikad.com, Jan 25, 2014 IP
  14. competent123

    competent123 Notable Member

    Messages:
    1,743
    Likes Received:
    69
    Best Answers:
    6
    Trophy Points:
    255
    #14
    Glad i could help.
     
    competent123, Jan 25, 2014 IP
  15. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #15
    The reason for it is partly the same reason you started this thread - some issues arise, and they're too chicken-shit to say to the customer "your code sucks, redo it" - instead they chose to be lenient with errors, and not upgrade to the latest version before "it's true and thoroughly tested" and therefore lagging by at least two major releases. Those are the webhosts you should avoid....
     
    PoPSiCLe, Jan 25, 2014 IP