I am a novice developer in web, and I have the following situation:
One of my customers wants to 'activate' php extensions for mysqli and oracle (oci8) on a Redhat Linux server.
The actual goal would be to be able to communicate (connect) with a remote Oracle database , which is located on a remote Unix server.
What do I have to do in order to implement those requirements?
Also note that any actions have to be available for command line, since I only have remote access to the Redhat server.
Thank you in advance.
p.s:
The Redhat server already has the following installed:
Oracle 10g.2
php 5.1.6
Apache 2.2.3
Related
I have a PHP application that is already hosted on Windows IIS Server.But when i try to run it now then it shows me the error."db driver not found".BUT i have installed Microsoft Drivers 5.6 for PHP for SQL Server .But still getting error.I'm using SQL Server Express 14.0.1000.169 version.
Is this a correct driver version to download ? or what is the error?.
firstly, are you sure you chose the correct dll for your computer to be the php extension? version, thread safety, system architecture. All of these matter. If that is correct then you can move on to the next step which are drivers.
I have two RHEL servers, one to host the PHP application, one to host the MySQL server.
Database server has MySQL Enterprise version 5.6.21 installed.
While getting the application server built, I asked that the rpm MySQL-client-advanced-5.6.21-1.el6.x86_64 be installed (to match server), but the hardware people don't like this version since 5.6.27 is available which addressed some vulnerabilities.
The question is the following:
Does the mysql client version on the application server affect the database queries coming from the PHP application?
We're using PDO to connect to and query MySQL.
If we do this, does the application server even need a mysql client library?
Please let me know if I can clarify.
Thanks!
PHP uses its own library/driver to connect to MySQL databases. The MySQL-client-advanced package is just the CLI mysql client. PHP does not use this.
For PHP (and PDO), you should install php-pdo and php-mysqlnd. php-mysqlnd is the "MySQL native driver" and contains some enhancements. It also contains the mysqli class and the pdo-mysql connector.
Note: php-mysqlnd versions are unrelated to the MySQL server version.
Quote from the Mysql website
MySQL Native Driver is a replacement for the MySQL Client Library (libmysqlclient). MySQL Native Driver is part of the official PHP sources as of PHP 5.3.0.
https://dev.mysql.com/doc/apis-php/en/apis-php-mysqlnd.html
I am building a web application on a Ubuntu Server 13.10 running Apache and PHP to connect to a RHEL production server on our LAN running Oracle8i (Oracle8i Enterprise Edition Release 8.1.7.4.0).
I have only connected to MySQL in the past so Oracle is a bit of a learning curve PHP wise. I have searched online but have found contradicting articles so looking for some feedback on any prerequisites required to be able to connect PHP to the Oracle server.
For MySQL it was as simple as installing the php5-mysql package and using mysqli_connect(ip,user,password,db); to connect. Are there PHP packages required for Oracle? Some sites mention a tsnames.ora file and others don't, and other sites are aimed towards newer Oracle versions (upgrading Oracle is not an option).
I am basically looking for some quick start tips on how to even get connected to the Oracle server.
Oracle uses the php5-oci8 package to enable the PHP Oracle connections. It should be just as simple to install that package and get it working.
Here's a helpful page on how to do that within Ubuntu.
I've got a problem and there doesn't seem to be a strait forward solution.
I'm running a Linux server with PHP and need to connect to a MSSQL database on a remote server (I don't have control over this server). Speaking to my host, they say that it's not possible eto install the MSSQL extensions on a linux box as they are only available on Windows Servers. So, I'm looking to see what other options i have.
Any ideas how I can do this on a linux box?!
it's not possible eto install the MSSQL extensions on a linux box
They lied. It is possible, but it requires FreeTDS to compile.
Other solution is to use other host (with windows) to act as proxy to MSSQL server, and communicate with it by SOAP/REST
you have to do it via an ODBC connection.. odbc_connect() etc etc.. Microsoft has drivers for this http://www.microsoft.com/en-gb/download/details.aspx?id=28160.. (edit) I have done this without any of the issues posted... the php.net website for odbc_connect even gives mSSQL examples in the manual http://php.net/manual/en/function.odbc-connect.php
Maybe this helps, send it to your server host:
http://pointbeing.net/weblog/2010/05/successful-microsoft-sql-server-support-for-php-on-linux.html
Commonly a database module is installed but in your case you could try to use a REST-API to talk with the MSSQL database. But that must be installed on a second server e.g. the database server itself.
Is there any method for direct access to remotely hosted Oracle Database without installing oracle in my computer.
I already had the host name, database name, username and password of the remotely hosted Oracle database. I am using Red Hat Enterprise Linux Server release 5 (Tikanga) and no Oracle yet install.
Your help would be precious.
Thank you in advance
You just need to install the oci8 PHP extension, see here for a tutorial.