Jump to content

tcarnes

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

tcarnes's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. premiso, Thanks for your help! I've got it working and am glad to see the details of the error. I could clean up the result a bit, but since I'm the only one getting the error emails, I'm just going to leave it as it is. One question: In your my_query function you set display_errors to 1 in the beginning and then reset it to 0 only if there is an error. Should I reset it to 0 even when there is not an error?
  2. When I have ini_set('display_errors', '1'); I will see a rather complete error message if I try to do something wrong with the database. ie: However, when I use the following code: $result[] = mssql_get_last_message(); return $result; I just get back: Any idea how I can get a more complete error message? I especially want to see the reason for the error (i.e., "Cannot insert the value NULL into column 'UserName', table 'ORDER'; column does not allow nulls. INSERT fails.") I am using MS SQL Server 2000 for this application.
  3. I have about 8,000 xml files that I need to transform to html for display in a browser. The transformToDoc function is returning a "false" for about 1,000 of them and I need to find out why. Is there a way to find out what the error was, why the transformation failed? My code is: $xsl = new DOMDocument(); $xsl->load('http://www.fda.gov/oc/datacouncil/stylesheets/spl/spl.xsl'); $proc = new XSLTProcessor(); $proc->importStylesheet($xsl); $xml = new DOMDocument(); $xml->load($xmlFile); $domTranObj = $proc->transformToDoc($xml); if ($domTranObj === false) { $isGood = 0; $error = 'XML Transformation Failed'; // How do I find out why the transformToDoc failed? $numbad++; } Would someone help point me in the right direction? How do I find out why the transformToDo failed? Terry
  4. How can I pass a necessary parameter while instantiating an object from a .NET assembly using DOTNET in PHP 5? The sample code that came with the .NET assembly shows how to do this is with VB and C#: VB: Dim transaction As New Paymentech.Transaction(RequestType.CC_AUTHORIZE) C#: Paymentech.Transaction(Paymentech.RequestType.CC_AUTHORIZE); I've tried the following using PHP: $transaction = new DOTNET("ptDotNetSDK20","Paymentech.Transaction(CC_AUTHORIZE) ") and $transaction = new DOTNET("ptDotNetSDK20","Paymentech.Transaction(RequestType.CC_AUTHORIZE) ") and even $transaction = new DOTNET("ptDotNetSDK20","Paymentech.Transaction(Paymentech.RequestType.CC_AUTHORIZE) ") and each time get errors "Failed to instantiate .Net object". I've even tried enclosing the parameter in single quotes, with no improvement. If I leave out the parameter and just try: $transaction = new DOTNET("ptDotNetSDK20","Paymentech.Transaction") I am able to create the transaction, but am then told "Transaction Object is invalid" when I later try to use it, which makes sense since I didn't create it with the necessary parameter in the first place. Can anyone help me? Terry
  5. Turns out the PHP couldn't find the dll because it wasn't in the Global Assembly Cache, and I couldn't use gacutil to put it there because it didn't have a strong name. So I got around that by placing the dll in the PHP directory on the web server. My next problem is trying to pass parameters using DOTNET, but that is a subject for another post. The problem of not being able to locate the file is solved.
  6. How can I pass a necessary parameter while instantiating an object from a .NET assembly using DOTNET in PHP 5? The sample code that came with the .NET assembly shows how to do this is with VB and C#: VB: Dim transaction As New Paymentech.Transaction(RequestType.CC_AUTHORIZE) C#: Paymentech.Transaction(Paymentech.RequestType.CC_AUTHORIZE); I've tried the following using PHP: $transaction = new DOTNET("ptDotNetSDK20","Paymentech.Transaction(CC_AUTHORIZE) ") and $transaction = new DOTNET("ptDotNetSDK20","Paymentech.Transaction(RequestType.CC_AUTHORIZE) ") and even $transaction = new DOTNET("ptDotNetSDK20","Paymentech.Transaction(Paymentech.RequestType.CC_AUTHORIZE) ") and each time get errors "Failed to instantiate .Net object". I've even tried enclosing the parameter in single quotes, with no improvement. If I leave out the parameter and just try: $transaction = new DOTNET("ptDotNetSDK20","Paymentech.Transaction") I am able to create the transaction, but am then told "Transaction Object is invalid" when I later try to use it, which makes sense since I didn't create it with the necessary parameter in the first place. Can anyone help me? Terry
  7. How can the PHP manual at phpfreaks not be the official PHP manual? Perhaps I should go back and try doing it the old COM way. Any idea how to translate the vb passing of a construction parameter into PHP using COM? Dim transaction As New Paymentech.Transaction(RequestType.CC_AUTHORIZE) Should this look like: <?php $transaction = new COM("Paymentech.Transaction(RequestType.CC_AUTHORIZE)"); ?> Thanks again for your help!
  8. I think the syntax changed in php5 and the DOTNET command. I got the syntax from the PHP Manual here: http://www.phpfreaks.com/phpmanual/page/class.dotnet.html Any other ideas? ???
  9. I am trying to call a .NET module from a php5 script. My code is: <?php $response = new DOTNET("Paymentech", "Response"); $transaction = new DOTNET("Paymentech", "Transaction"); ?> My script dies on the first line with the error: The sample VB code that came with the module states: Dim response AS Paymentech.Response Dim transaction As New Paymentech.Transaction(RequestType.CC_AUTHORIZE) This is my first real foray into .NET with PHP. Hopefully someone can help me. I believe my server is set up properly as the sample code given in the PHP manual does work: <?php $stack = new DOTNET("mscorlib", "System.Collections.Stack"); $stack->Push(".Net"); $stack->Push("Hello "); echo $stack->Pop() . $stack->Pop(); ?> And the sample compiled paymentech vb app also works. The sample vb app is in the same directory (on the server) as several paymentech dll's. Could that have something to do with this? How does my PHP script know where to get the information on the paymentech object? Thank you for any help anyone can offer! Terry
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.