PHP Upgrade Errors from v5.0.5 to v5.2.6

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Dominika
Forum Newbie
Posts: 3
Joined: Thu Nov 06, 2008 9:24 am

PHP Upgrade Errors from v5.0.5 to v5.2.6

Post by Dominika »

Hi,

I am not a PHP programmer but inherited a project. They upgarded the PHP version to v5.2.6 and now the code throws errors. The error is as follows:

PHP Warning: PHP Startup: Unable to load dynamic library 'c:\PHP\ext\php_oci8.dll' - The specified procedure could not be found. in Unknown on line 0

Fatal Error handling CallPHP Warning: PHP Startup: Unable to load dynamic library 'c:\PHP\ext\php_oci8.dll' - The specified procedure could not be found. in Unknown on line 0 PHP Warning: mssql_query() [function.mssql-query]: message: Incorrect syntax near the keyword 'function'. (severity 15) in \\166.37.214.35\OAWebData$\Production\VSSPT\db.inc on line 126 PHP Warning: mssql_query() [function.mssql-query]: message: Could not locate entry in sysdatabases for database 'the'. No entry found with that name. Make sure that the name is entered correctly. (severity 16) in \\166.37.214.35\OAWebData$\Production\VSSPT\db.inc on line 126 PHP Warning: mssql_query() [function.mssql-query]: Query failed in \\166.37.214.35\OAWebData$\Production\VSSPT\db.inc on line 126

Can someone point me in the right direction as to what this means and where to begin to correct it?

Thanks,
D :cry:
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: PHP Upgrade Errors from v5.0.5 to v5.2.6

Post by RobertGonzalez »

Looks like you are trying to enable the Oracle 8 database handler extension. You might want to start here when looking into whether you have what is necessary to actually connect to the Oracle database server.

The reason I mention this is because the PHP core includes the Oracle extension by default (at least according to the manual it does) which means you might be shooting yourself in the foot trying to enable an extension that is already part of the core.

This was an issue with MySQL for a while but in the opposite direction. The extension used to be part of the core but because of license changes with MySQL it was removed so upgrades to PHP required enabling the MySQL extension when it hadn't required that before.
Dominika
Forum Newbie
Posts: 3
Joined: Thu Nov 06, 2008 9:24 am

Re: PHP Upgrade Errors from v5.0.5 to v5.2.6

Post by Dominika »

Hi,

Thanks for the reply.

I am actually not using an Oracle DB, only an MS SQL DB. The server PHP version is out of my control and I do not nhave access to anything but to the PHP website files. However, the admins for the upgrade and the server can access any files.

With the above said, would I be correct in saying that any reference to Oracle OCI8 should be removed from the code for it to stop the errors? If so, what exactly am I looking for, since I am assuming that the code that uses the MS SQL DB to connect to and draw queries does not need or does not reference any Oracle dlls or anything related to Oracle?

Thanks a lot,
D
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: PHP Upgrade Errors from v5.0.5 to v5.2.6

Post by RobertGonzalez »

No, the error you are getting has nothing to do with the code but with the php.ini settings (unless you are trying to dynamically load the OCI8 library).

What needs to happen is the php.ini file needs to be edited to remove/comment the line that says
[ini] extension=php_oci8.dll [/ini]

Though I am guessing now that you are also going to have to enable the MS SQL extension in order to use SQL server. That can be a little trickier if you do not have the necessary client libraries loaded on the machine that you are connecting to the database server with. It gets even trickier if you are trying to connect to SQL Server 2005 since many of the client libraries and drivers changed from the previous version of the database server.

I bid you good luck in the endeavor. I fought like hell to connect to our SQL Servers. Of course we are connecting from linux machines so that made it a little easier as we were able to build FreeTDS from source on the boxes.
Dominika
Forum Newbie
Posts: 3
Joined: Thu Nov 06, 2008 9:24 am

Re: PHP Upgrade Errors from v5.0.5 to v5.2.6

Post by Dominika »

Thank you so much, and looks like I have a heck of a fix to perform.

One last question. There is also another website on the same server that does not have any errors when upgraded to the v5.2.6 of PHP. This site also uses a MS SQL DB. Is it possible that one site breaks and one does not if both technically use MSSQL? Is it possible that the site with errors does somehow reference those oci8 dll?

Thanks you,
D
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: PHP Upgrade Errors from v5.0.5 to v5.2.6

Post by RobertGonzalez »

That is highly unlikely, if they are both connecting to the same type of database server and are both using the same web server with the same PHP instance.

One thing you can look for is a call like:

Code: Select all

<?php
dl('oci8');
?>
somewhere in the code. That would be code to try to dynamically load the OCI8 extension. That could lead to one app working and the other not working.
Post Reply