[HELP] Enabling Oracle (not OCI8) in XAMPP 1.5.0

Problems with the Linux version of XAMPP, questions, comments, and anything related.

[HELP] Enabling Oracle (not OCI8) in XAMPP 1.5.0

Postby MAFP » 22. March 2016 08:44

Hey everyone,

I'm currently facing in issue with transfering an old PHP application (which is still in productive use) from an old Windows 2000 Server onto a new system running CentOS 7 inside a VM on a ESXi server.
Since I'm not an expert when it comes to PHP (or web applications in general) I decided to look at the PHP version which is running on the old Windows 2000 server and install the equivalent PHP version on the CentOS machine to avoid any version mismatches or strange behaviour that might come up because of changes in PHP.

Bottom line: I needed PHP 5.0.5, so I ended up using XAMPP 1.5.0 which provided the exact versions for the PHP and MySQL part.

The project in question runs fine on the new system currently. It connects to two databases, one locally (MySQL) which I could export/import just fine and the other is a Oracle database hosted externally on another server. And this is where the problems began.

I understood that I somehow had to enable Oracle support within PHP, but I just learned that there is a difference between the "old" OCI and the newer OCI8 coding conventions.
The code in our project relies on "ora_" conventions, which look like this for example:

Code: Select all
$dbprod = ora_logon("$oradbuser@$oradbprod",$oradbpass);

Code: Select all
if (!@ora_parse($cursprod2,$query2))
     echo "Error in parse. Error was :", ora_error($curs2);

The error that gets thrown out looks like this:

Code: Select all
Fatal error: Call to undefined function ora_logon() in ...

On the old Windows 2000 Server machine it's just a matter of enabling the "oracle.dll" in the PHP.ini and it just works, which is no option on LAMPP 1.5.0 unfortunately.
It's also no option for us (as a company) to port this application to the newer "oci_" conventions, because the whole "ora_" situation is scattered all over the entire project which spans over several million lines of code and we don't have the time and resources to change it.

So my questions is, what would be the easiest way for me to get the older Oracle code supported on the new Linux server? Is there an extension that I can use to enable it?
I also read that I might have to recompile PHP with the Oracle parameter to activate it, which also wouldn't be a problem for me, but I would need assistance to reembed this new recompiled PHP version into the current active LAMPP folder/file structure.

I hope you guys can help us out here with this fiddly situation :)

Thanks and kindest regards,
Posts: 1
Joined: 22. March 2016 08:16
Operating System: CentOS

Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 13 guests