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.
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 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.
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.
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.
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.
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.
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
This is what I have as an extension there .:/usr/lib/php:/usr/local/lib/php.ini Where would you put ; in that line?
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.
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.
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....