473,785 Members | 2,421 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Uncaught exception 'PerlException'

12 New Member
Hi,
I'm very new to perl. I tried to use the perl module in php script, but im getting error

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. $perl = new Perl();
  3. $perl->eval("BEGIN {unshift( @INC, '/opt/otrs');}");
  4. $perl->eval('use Kernel::System::Email qw(new Send ConfigObject LogObject DBObject TimeObject MainObject EncodeObject _MessageIDCreate Log Get); ');
  5. $ar=array(From        => 'me@example.com',
  6.         To          => 'friend@example.com',
  7.         Subject     => 'Some words!',
  8.         Charset     => 'iso-8859-15',
  9.         MimeType    => 'text/plain', # "text/plain" or "text/html"
  10.         Body        => 'Some nice text',
  11.         InReplyTo   => '<somemessageid-2@example.com>',
  12.         References  => '<somemessageid-1@example.com> <somemessageid-2@example.com>',
  13.         Loop        => 1, # not required, removes smtp from
  14.         Attachment  => '',
  15.         Sign         => '',
  16.         Crypt         => '',
  17.     Priority    => '',);
  18. $ar1=array(Priority => 'error', Message => "Need $_!" );
  19. var_dump($perl->Send($ar1));
  20. var_dump($perl->eval('_MessageIDCreate->{ConfigObject}->Get();'));
  21. ?>
  22.  

But Im getting this error

Fatal error: Uncaught exception 'PerlException' with message '[perl] call error: (in cleanup) Can't call method "Log" on an undefined value at /opt/otrs/Kernel/System/Email.pm line 178. ' in /var/www/mohan/t8.php:19 Stack trace: #0 /var/www/mohan/t8.php(19): Perl->Send(Array) #1 {main} thrown in /var/www/mohan/t8.php on line 19

And the module is working fine It has no problem. Please help me in solving out this issue........
May 31 '10 #1
1 2300
chorny
80 Recognized Expert New Member
Can you try running Perl code without PHP as stndalone program?
Jun 6 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
3191
by: nrhayyal | last post by:
hi all, i am facing a problem in catching an exception which is uncaught in any of the catch block. not doing so will gives me coredump. I tried by rewriting set_unexpected() and set_terminate() function. But these works fine only for small programs. when i tried with my large applications which links to n num of different libraries, it doesnot work. so please help me to handle uncaught exception on any of the UNIX flavors(it will be...
7
2473
by: meaneyedcat | last post by:
When I call addField(), my table appears to be populated correctly with a new row in the table with all the required fields. However, when I call delete row on any new rows that have been created, I get the following error: Error: uncaught exception: " nsresult: "0x80004002 (NS_NOINTERFACE)" location: "JS frame :: http://localhost:3000/form/edit_fields/1 :: removeField :: line 65" data: no]
3
3473
by: c.prerovsky | last post by:
Hi there, I started messing around with JavaScript OOP a few days ago and still can't get this one to work. There are many things wich keep confusing me, eg. the various ways to define a class or especially methods. Ok, here's the code I'm trying to get to work. I'm trying to create a selection mask with drag handles, which will enable the user to select an area of an image. currently I'm stuck with "el.addEventListener('mousedown',...
5
3483
by: -Lost | last post by:
Error: uncaught exception: " nsresult: "0x80004001 (NS_ERROR_NOT_IMPLEMENTED)" location: "JS frame :: file:///D:/sites/_test/js/iterate_document.htm :: <TOP_LEVEL:: line 15" data: no] Line 15 being: s += j + ". " + i + ": " + document + "<br />\n"; All the code:
2
36725
Plater
by: Plater | last post by:
I am using the XMLHttpRequest to send a request every 5ish seconds or so. Everything works fine until I take the server down that the object is trying to retrieve data from. Then the firefox console keeps racking up these: uncaught exception: " nsresult: "0x80004005 (NS_ERROR_FAILURE)" If I turn the server back on, it continues to update it's data just fine. I know a simple solution is to just trap the exception, but I don't think I...
9
14156
by: xhunter | last post by:
Hi, I have written my code to load some content through ajax, which works perfectly, then I thought of adding a timeout to retry the action in case it has failed or something. here is the code : var requestTimer = setTimeout(function() { xmlHttp.send(post); }, 10000);
3
2542
by: George2 | last post by:
Hello everyone, Just want to check whether my understanding is correct, Both (1) and (2) only covers Windows C++ platform. 1. If there is uncaught exception, destructor is not ensured to be called for active object;
2
7476
by: josephx | last post by:
Hello, I got some of these errors listed below after executing an HTTP Post MIDlet on CLDC/MIDP platform, "Nokia S40 DP 2.0 SDK 1.1" and "S40 5th Edition SDK Feature Pack 1" and even for S60's SDK.. the application stops. However, it does work only on "Sun Java(TM) Wireless Toolkit 2.5.1 for CLDC" with the same errors displayed, but the application was able to execute successfully. Errors received are: Using Untrusted simulated domain...
3
3755
by: friend | last post by:
Error: uncaught exception: " nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://manimekalai/VulnMgmt/scanfi/crs_source/vulnupdate/latest.php?vulnerability=2451 :: centrePopup :: line 22" data: no] how to coorect thus the above error...........
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10325
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.