Re: DB_DataObject - MSSQL/Windows SBS
| From: | Justin Patrin | Date: | Sat, 10 Jul 2004 19:45:57 +0000 |
| Subject: | Re: DB_DataObject - MSSQL/Windows SBS | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-13614@lists.php.net to get a copy of this message | ||
Well, perhaps you should create the table classes on the linux box and
copy them to the windows server, then. There should be no difference
if it's the same DB.
Your problem may be in the versions of the PEAR packages you have
installed. Have you updated them on the windows server?
On Sat, 10 Jul 2004 18:49:09 +1000 (EST), Barry Steele
<barry@hpfm.com.au> wrote:
> Hi,
> I am in the process of installing an application on a new sever which is
> running Windows Small Business Server 2003, with Apache 1.3, php4.3.7
>
> I am having a severe issue with the following code:
>
> <db.ini>
> [DB_DataObject]
> database = "odbc://username:password/SLSV_Members";
> schema_location = /www/sites/slsa/SLSA_Members/include/DataObjects/
> class_location = /www/sites/slsa/SLSA_Members/include/DataObjects/
> require_prefix = /www/sites/slsa/SLSA_Members/include/DataObjects/
> ini_membership =
> /www/sites/slsa/SLSA_Members/include/DataObjects/SLSV_Members.ini
> class_prefix = DataObject_
> ignore_sequence_keys = 0
> debug = 0
> debug_ignore_updates = 0
> production = 0
> </db.ini>
>
> <dbtest.php>
> require_once "config.php";
> require_once "DataObjects/Members.php";
> $member = new DataObject_Members;
>
> echo "Now try using DB_DataObject<br>";
> $member->debugLevel(1);
> $member->MemberID= '1112944';
> //$transfers=$member->find(true);
> Var_Dump::display($member);
> echo "About to fetch DataObject<br>";
> $member->find(true);
> echo "Finished fetching<br>";
> </dbtest.php>
>
> I get the following output:
>
> <output>
> About to fetch DataObject
> dataobject_members: __find: 1
> </output>
>
> -- and there it dies.
>
> I built the DataObjects/Members.php file on a linux box, accessing data in
> MSSQL on the new server.
>
> If I try to use 'createTables.php'
>
> I get the following message :
>
> C:\PHP\PEAR\DB\DataObject>c:\php\php createTables.php
> e:\www\sites\slsa\SLSA_Mem
> bers\include\Membership.ini
> Content-type: text/html
> X-Powered-By: PHP/4.3.7
> Set-Cookie: ZDEDebuggerPresent=php,phtml,php3
>
> <code><B>db_dataobject_generator: 0:</B> CREATING FOR 0
> </code><BR>
> [db_error: message="DB Error: DB backend not capable" code=-9 mode=return
> level=
> notice prefix="" info=""]
> C:\PHP\PEAR\DB\DataObject>
>
> -- Which is very surprising when I was able to build them on the Linux box.
>
> I tried a similar thing using the mssql driver and got a collations/ntext
> error.
>
> The following code works as epxected:
>
> <code>
> DSN= "mssql://hpfm:hpfm@localhost/SLSV_Members";
> echo "Connecting to ".$DSN;
> $db =& DB::connect($DSN);
> if (DB::isError($db))
> {
> /*
> * This is not what you would really want to do in
> * your program. It merely demonstrates what kinds
> * of data you can get back from error objects.
> */
> echo 'Standard Message: ' . $db->getMessage() . "<br>";
> echo 'Standard Code: ' . $db->getCode() . "<br>";
> echo 'DBMS/User Message: ' . $db->getUserInfo() . "<br>";
> echo 'DBMS/Debug Message: ' . $db->getDebugInfo() . "<br>";
> exit;
> }
> else
> echo "Yahoo!! <br>";
>
> echo "Starting DB Tests: find some members<br>";
> echo "Use PEAR DB first<br>";
> $qry= "select * from Members where MemberID='1112944'";
> $memberResult=$db->query($qry);
> if (DB::isError($memberResult))
> {
> /*
> * This is not what you would really want to do in
> * your program. It merely demonstrates what kinds
> * of data you can get back from error objects.
> */
> echo 'Standard Message: ' . $memberResult->getMessage() .
> "<br>";
> echo 'Standard Code: ' . $memberResult->getCode() . "<br>";
> echo 'DBMS/User Message: ' . $memberResult->getUserInfo() .
> "<br>";
> echo 'DBMS/Debug Message: ' . $memberResult->getDebugInfo() .
> "<br>";
> exit;
> }
> else
> {
> $row = $memberResult->fetchRow(DB_FETCHMODE_ASSOC);
> Var_Dump::display($row);
> }
>
> </code>
>
> Can anyone explain what is going on and how to get around it? This is
> costing an inordinate amont of time at present.
>
> If I run the above code from a Linux box, accessing the same sqlserver
> database, it works!
>
> --
> Barry Steele
> www.hpfm.com.au
> Mob: +61 413 947980
>
> --
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> !DSPAM:40efb065194688967251321!
>
>
--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder
paperCrane --Justin Patrin--