Pear DB Error: extension not found - php

I am still new to php and linux but i try to give you all information I know.
We got a PHP web application using pear and smarty. It's runing on PHP 4 on a Linux system and with XAMP and PHP5 on my PC. I am trying to move the application on a new server with PHP7 and updated PEAR and all extensions (it's the same version as on XAMP), but all I get is: DB Error: extension not found.
I tried to find a solution but wasn't able to find anything which could help me.
The database we are using is a normal mysql database.
I'm not sure if there is still a path missing or what went wrong.
Maybe someone of you got a clue what the problem could be.

It sounds like your very old PHP4 code is using the mysql_ database extension?
If so that extension has been deprecated for years and was completely removed from PHP7. You wont be able to move that code to any version of PHP higher than PHP5.6 and even trying to do that you will almost definitely come across lots of other incompatibilities
I suggest you read http://php.net/manual/en/migration70.php in the menu on this page there is a section on migrating from all sorts of versions of PHP.
You will have to work out how far up the migration levels your code will actually move without major amendments. I would guess, not very far!

Related

How to install php_dba.dll for PHP on Windows?

i try to install PrivMX WebMail but seems like one error still problem here,
php-dba PROBLEM
i try to find php_dba.dll on php.ini but it seems there is nothing there
im trying to find it on google but still fail
currently im using PHP version: 5.6.12 witn wampwebserver on windowns server
Any help?
There is no php_dba.dll distributed officially until PHP 7.2. Even if you compile it yourself for lower, you might need to get drivers you need manually. Particularly for Oracle. Otherwise you should be fine just upgrading to 7.2 as it also suports LMDB.
Thanks.

How to update MySqli to php5-mysqlnd

I recently started coding with Codeigniter, so fairly new, even to php.
I built my first app, installed it on server after Xampp. I got this error
Message: mysqli::real_connect(): Headers and client library minor version mismatch. Headers:50542 Library:50626
After searching online I found that I need php5-mysqlnd. I found this nice article but don't know where all these processes are happening.
Is there a tool in Cpanel where all these codes for updating php5-mysqlnd are taking place?
All I know I have Linux hosting version 5.4.45 with Hostgator.
it looks like I found another way to do it (not like the way that link said).
I was going through my CPanel and found an option to change my PHP version. I clicked and on next page it asked what all components I want to include, I couldn't believe "Mysqlnd" was one of them.
I changed it to 5.6 from 5.4.45. That's all it took.
Thanks a lot.

Does php 5.6.6 work with mysql 5.6.23?

Or is php 5.4 only compatible with mysql? I've been having some problems getting my php to work with mysql.
I'm using PHP 5.6.6, Apache 2.4, MySQL 5.6.23. My PHP and Apache work just fine. I created a website using CSV. I wanted to learn how to use MySQL, but I was having problems trying to get MySQL to work with my PHP. Now, I have never take any courses on MySQL nor have I ever used. The only thing I have done with MySQL is install it from the community tab from the MYSQL download page. I followed all the instruction and set my file path to be C:\mysql, and my data path to be C:\mysqldata, but I don't know, why it doesn't seem to work with my php when I try to connect. Is there another step I have to take to connect? I know a lot of people use WAMP, which is something I might look into if I don't get this working, but If there's anyone who has installed all three (apache php and mysql) sperately, know what my problem might be, I'll really appreciate it.
PDO works on all PHP versions 5.1+, which is the preferred method to connect to MySQL.

Removing apacheinstallation from multiple package-managements

I am pretty new at this Mac OS thingy and I tried installing PHP54 on it. I know, there is a ton of tutorials out there and trust me, I have spend hours online reading. The problem is I am a newbie and I became impatient and just started installing from Brew, Port and compiling my own.
I really just want to start over, but I would like not to reinstall the OS and I really want to understand how to install into different folder, if I for example want different versions of PHP. (I saw that someone had that in a video tutorial, but he did not tell how to do it)
So the following is my questions to you experts:
How to remove all files from a HomeBrew-install (I think I removed some manually, so that the auto-remover don't work anymore)
How to remove all files from a MacPort-install (same as above)
How to remove the default PHP installation (I've managed to update it, but I don't think it was made correctly)
How to install a new version of PHP 5.3 along with 5.4 and 5.5
Installing MySQL and PhpMyAdmin so that it works with my PHP (I could not connect to the MySQL server the last time I installed it)
I don't think I have made any changes to the Apache-server (hopefully not)
I chose to do a reinstall of my OSX

php_monetdb.dll

I need the php_monetdb.dll for php 5.4. I've found that by building the monetDB with the HAVE_PHP=1 option on windows will create the dll, but the build procedure fails at numerous points. I am using the monetdb source from sourceforge which is a little outdated one. The newer version has problems in the .msc files itself so proceeding to the build itself is a pain. The older version that I am trying on is atleast passing the nmake step but failing on the nmake install step. The reasons vary from component to component. One states that the devenv /build does not exist. For this I copied the vcexpress and renamed it to devenv. I am not sure if this is right but when I run it from the command prompt it seems to work ok with a few warning alerts shown. During other make installs, the header files seem to be missing. Could anyone please help me with this. Also please let me know if there is any other alternative for this approach of getting php_monetdb.dll.
P.S: I am using windows 7, MSVC 10 express, PHP 5.4.4
For the build questions, see http://bugs.monetdb.org/show_bug.cgi?id=3121
For php_monetdb.dll, see
http://sourceforge.net/mailarchive/forum.php?thread_name=20120717145132.GU49719%40cwi.nl&forum_name=monetdb-developers
http://sourceforge.net/mailarchive/forum.php?thread_name=500581D5.8030808%40acm.org&forum_name=monetdb-developers

Categories