help with PHP and interbase - php

im trying to create a PHP web application to connec to an interbase database. Iv installed xampp for the PHP and Apache. I then installed Firebird SQL 2.5 to get the required DLL's. however iv noticed that in the php\ext folder there doesnt seem to be a php_interbase.dll which from what iv read is needed. can some one please direct me in the right direction where I can get the needed DLL or even how i should ste up my machine in order for me to be able to connect to interbase.
when i try to connect to the database i get the following error
Fatal error: Call to undefined function ibase_connect() in C:\xampp\htdocs\phase\includes\config.php on line 11

php_interbase.dll Requires: gds32.dll (bundled)
http://www.firebirdfaq.org/faq191/
http://www.alberton.info/firebird_php_windows.html

Yes, it can. If your client is 64-bit, it's called ibclient64.dll, not gds32.dll

for windows64
copy file C:\Program Files\Firebird\Firebird__\WOW64\fbclient.dll
to :C:\Windows\SysWOW64\fbclient.dll

Related

XAMPP ORACLE - TNS:could not resolve the connect identifier specified

I am using Xampp on Windows 8 64 bit and using Oracle 11g Express Edition Command line.
I did uncomment oci8 extension on php.ini files restart Apache n i am using correct password my php code is
<?php
$conn = oci_connect('system','asd','locahost/XE');
?>
but i am getting this error
ORA-12154: TNS:could not resolve the connect identifier specified in C:\xampp\htdocs\am\index.php on line 2
but on other pc with windows 7 its working correctly.
My command line sql is running perfectly but php connection is not establishing.
Note:
when i was installing oracle on this pc (win8) i got an error as
The installer is unable to instantiate the file C:\Users\McLAUGH~1\AppData\Local\Temp{078E83D7-3FCC-4A72-903B-995C7CE44681}\KEY_XE.reg. The file does not appear to exist.
but i did press ok n everything seems to be fine but now this problem is happening please help me. Thanks
For the error you mentioned, please go throught the following link and follow the steps mentioned in it and try if your issue get resolved.
http://blog.mclaughlinsoftware.com/tag/install-oracle-11g-release-xe/

Using PHP 5.4 and Freetds

I keep getting the following message when trying to connect to a ms sql database via PHP
Fatal error: Call to undefined function mssql_connect()
I need to do it using FREETDS, I have followed the instructions: http://docs.moodle.org/24/en/Installing_MSSQL_for_PHP
I am using WAMP with php 5.4 the extension is ticked in my extension list in wamp toolbar. One thing I wonder is whether it's something to do with freetds.conf under a standard wamp install where should this go? I have it sitting in the root of c and under bin/php/php5.4.16. The only info I have changed in it is the IP address of the server I want to connect to, is this correct?

connect to SQL Anywhere by TCP/IP

I'm new in sql anywhere, currently I'm trying to connect using PHP.
This is what I've got so far:
$conn = sqlanywhere_connect ( "UID=usr;PWD=pass;ENG=serv;DBN=bd_name;COMMLINKS=TCPIP{HOST=10.1.1.189:2638}" );
SQL Anywhere is installed on another machine, where I can't run apache, website is running on localhost (xampp). This is only for test, when website would be ready I will connect to correct db.
This is error I've got:
Warning: sqlanywhere_connect(): The SQLAnywhere client libraries could not be loaded. Please ensure that dbcapi.dll can be found in your PATH environment variable. in C:\xampp\htdocs\core\cache\includes\elements\modsnippet\25.include.cache.php on line 21
I haven't got dbcapi.dll file, but I'm not sure I should have it.
In documentation I couldnt find this file (SQL Anywhere 10 which I've got), but for SQL Anywhere 11 I could find pages where was info about this file.
To use sqlanywhere_connect I've download SQL Anywhere module for curren ver. of PHP onto my machine and I've add it to php.ini file.
What should I do? Should I download missing file? Would it be enough or I could get more errors asking for other files?
I had a similar problem and the solution proposed here:
https://groups.google.com/forum/#!msg/sql-anywhere-web-development/zK9Tf-X3cYk/GAoqK2DnB9EJ
worked for me.
Specifically, my xampp + php needed the 32 bit dbcapi.dll but when I installed SQL Anywhere 12 I neglected to check the box to install the 32 bit version as well. Re-installing, chossing "modify" and installing the 32 bit SQL Anywhere 12 got "php test.php" working.
I would down load the missing file and go from there you are using xamp which is pre-built to talk to mySQl I doubt there is any extra .dll in the Instillation to connect with SQLAnywhere

db2_connect to as400 with php and wamp server

I have been trying to connect to a ibm db2 database but it seems impposible. The as400 is in a different server than the one running php.
Everytime I do a db2_connect I get the following error:
Fatal error: Call to undefined function db2_connect()
How can I make this function work?
Tip: I've already tried with odbc and it was a lost of time, but I'm open to suggestions on that path as well.
[EDIT]
I finally changed to java... it was impossible with php...
Check your php.ini file and make sure it has the DB2 extension enabled. http://www.php.net/manual/en/install.pecl.php
Try this link:
http://www.theregister.co.uk/2006/08/09/db2_udb_part2/
Deals with:
Installing the PHP DB2 extension,
Creating a connection,
Obtaining a result set
Also gives as an alternative the PDO option.
But as for DB2 on the AS400, am not sure if something still needs to be installed on the
AS400 for this to work?
Anyway, have used the ODBC Client Access with no problems at all. What difficulty did you run into?

How to set up OCI to connect to Oracle from PHP?

On the latest Ubuntu, I have a functioning PHP 5.2.4 installation. I want to use a remote Oracle server from PHP using OCI.
I've downloaded the "Instant Client Package - Basic Lite" (Link). I've unzipped the package containing the OCI libraries to a dir but I have no idea how to tell PHP that I want to use these libraries. Predictably, I get
Fatal error: Call to undefined function oci_connect() in...
when running this code:
<?php
$conn = oci_connect('hr', 'hrpw', 'someremotehost');
?>
I don't want to recompile PHP with Oracle support. What's the fastest way to wire up PHP so that I can use Oracle? Do I need any other libaries, like the Oracle client if I want to connect to a remote Oracle instance?
You need the PHP extension, try the following on your Ubuntu:
(sudo) pecl install oci8
Make sure your php.ini's (there should be one for your Apache and one for cli php) contain extension=oci8.so afterwards. Finally, you have to restart Apache and can confirm via <?php phpinfo(); ?> that the extension is loaded.
UPDATE:
Enter something like this when it asks you for ORACLE_HOME:
instantclient,/opt/oracle/instantclient
I think setting the environment variable would be another solution. /opt/oracle... is the path I put my instantclient in. I followed some tutorial a while ago, unfortunately I can't find it anmore.
HTH
I think you'll need to make sure that the $ORACLE_HOME/lib32 is in your $LD_LIBRARY_PATH, or else add that directory to the /etc/ld.so.conf file.
In the end, I downloaded Zend Core for Oracle and that worked.
http://www.zend.com/en/products/core/for-oracle

Categories