Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts

Sunday, October 11, 2009

ReBlog Beta 2.0 Unknown class passed as parameter

One of our customers uses reBlog to filter through some RSS Feeds & then provide their own output.

The version Godaddy Provides through their installable applications is one of the older ones & they wanted to try the beta 2.0.

When they tried to view their RSS feed they saw:
  • unknown class passed as parameter ClientController.class.php line 740
  • Warning: Unknown class passed as parameter in /library/RF/ClientController.class.php on line 740
We tried some different things with the .htaccess file but the easiest fix was to go to GoDaddy's Hosting Control Center, click Add-on Languages and change it from PHP 5.x to PHP 4.x.  They say it can take 24 hours but it took less than 5 minutes and the page refreshed without the error.

Friday, July 17, 2009

PHP IIS 2k3 Server 2003 OCILogon Error

Fatal error: Call to undefined function OCILogon() in D:\wwwroot\testdb.php on line 3

We received this message on a server running Server 2003, IIS, PHP attempting to attach to an Oracle Server.

Some Prelims

1) Make a new app pool (we made one called PHP)

2) instead of an Isapi.dll simply edit the configuration (directory) on the properties of the site/virtual directory.

3) click configuration, add an extension mapping for the location of your isapi "D:\PHP\php5isapi.dll"

4) change the app pool of this site/virtual directory - to use the PHP app pool from #1.  Supposedly this allows you to right- click on the app pool, click recycle & it will reload your php.ini file without taking down everything.  In reality though, this didn't work & we still had to run (to get it to update):

net stop http /y

net start w3svc

5) Make sure PHP is in your allowed Web Service Extensions.  This script (test.php) will confirm PHP is working:

<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php phpinfo(); ?>
</body>
</html>

2) check the 6th row in the above script's output

Configuration File (php.ini) Path                C:\WINDOWS

3) This tells us PHP is looking to c:\windows for the php.ini.  The second we copied our php.ini to that folder - everything started working.

4) use this script (testdb.php) to test your oracle connection:

<?php

if ($conn=OCILogon("username", "password", "DSN")) {
echo "Successfully connected to Oracle using OCI extension.\n";
OCILogoff($conn);
} else {
$err = OCIError();
echo "Error in connecting to the Oracle." . $err[text];
}
?>

But really, the bottom line was copying the php.ini file from d:\php to c:\windows.