473,387 Members | 1,606 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to make PHP support other database WITHOUT recompiling?

RC
By default PHP always supports MySQL.
But all our database servers are PostgreSQL or
Informix. Order for me get PHP supports other
than MySQL. I need download PHP source codes and
compiled it "--with-pgsql=/var/lib/pgsql" option.
Then reinstall it.

I think there is must a way I can edit the php.ini
file, make php support other database beside MySQL.

Would anyone out there tell me how to do that if you
know the answer.

Thank Q very much in advance!
Apr 17 '06 #1
2 1455

RC wrote:
I think there is must a way I can edit the php.ini
file, make php support other database beside MySQL.


If you already have the modules, you can indeed do this. If you have
installed PHP on Windows or used the package from your distribution, it
is likely that you already have the modules or that they are available.
If this is the case, you can enable them in php.ini.

Apr 17 '06 #2
On Mon, 17 Apr 2006 07:43:18 -0400, RC wrote:
I think there is must a way I can edit the php.ini
file, make php support other database beside MySQL.


Indeed you can. You must download the corresponding PECL extension,
compile it, put it in the right directory and enable it like this:

extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20050922"
extension=oci8.so

For this, you must have shared library oci8.so in the directory defined as
an extension_dir:
[root@medo ~]# ls -l /usr/local/lib/php/extensions/no-debug-non-zts-20050922/
total 272
-rwxr-xr-x 1 root root 271587 Mar 31 08:43 oci8.so

If you are running Windoze, ready-made extensions can be downloaded from
http://pecl4win.php.net. If not, you'll have to download and compile your
own. In theory, you should be able to write "pecl install <module>", but
pecl command is a buggy junk that doesn't work, so you'll have to do it
the hard way:

pecl bundle <module>
cd module
phpize
../configure
make
make install

--
http://www.mgogala.com

Apr 17 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Primaria Falticeni | last post by:
Can I put a new charset or modify an existing one without recompiling MySQL? If yes, please tell me how. Thanks Anticipated, Iulian -- MySQL General Mailing List
6
by: someone | last post by:
Suppose that I have a class in an assembly that is delivered to the user, what can I do to change the class so that it doesn't break the binary compatibility? That is, user application can run...
8
by: Zheng Da | last post by:
I don't know where should I ask the question, so send the email to this group. I choose this group, because I want to write the program with c++ :) I want to write a program which support...
7
by: Steven Bethard | last post by:
I've updated PEP 359 with a bunch of the recent suggestions. The patch is available at: http://bugs.python.org/1472459 and I've pasted the full text below. I've tried to be more explicit about...
9
by: friendhouston | last post by:
Hi, Have a requirement where new items may be added later to an existing list of items. These new items may have new features but will need to contain minimum basic features like description and...
8
by: bob | last post by:
I am writing some code to create new tables in a SQL database. However, I don't want to try to create a table if it already exists. How can I test beforehand to see if a particular named table...
10
by: Jay | last post by:
In C# I can set up an Enum so that number are represented as keywords, which is very useful. Is there such a datatype in a database? I suppose I could use an extra table, with the ID column as...
1
by: rdcapasso | last post by:
Hi all- I am wondering if it is possible to add LDAP support to an existing installation of PHP 5.2.3 on FreeBSD 4.1.0 (i.e. without recompiling PHP). All of the documentation I find either deals...
39
by: alex | last post by:
I've converted a latin1 database I have to utf8. The process has been: # mysqldump -u root -p --default-character-set=latin1 -c --insert-ignore --skip-set-charset mydb mydb.sql # iconv -f...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.