473,606 Members | 3,100 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHP fatal error : Class perl not found

2 New Member
Hi,

I have searched around for the solution to this problem, but I am trying to call a perl script from php, and get a fatal error:Class perl not found

I am using php 5.1.6 and apache 2.0 , php and apache is configured fine, as i am able to run <phpinfo()?> with out any problem. I have added php_perl.dll into my php.ini extensions ... and copied it to php/ext folder.

The scripts are very basic (from the source:http://devzone.zend.com/node/view/id/1712)

test.php:
Expand|Select|Wrap|Line Numbers
  1. <?php
  2.  
  3. print "Hello from PHP! ";
  4. //$erl = new Perl();
  5. //$perl->require("test1.pl");
  6. print "Bye! ";
  7.  
  8. ?>
  9.  
test1.pl:
print "Hello from perl! "


Thanks'

PB
Jul 15 '08 #1
17 11288
pranavb85
2 New Member
Hi,

I found the solution

I was getting all the steps correct, just made a small path error mistake in the ini file, and damn it took me like 2-3 hours to get to know this...

Now I really know, what all can go wrong when u try php->perl

;)
Jul 15 '08 #2
khalistoo
1 New Member
Hi,

I found the solution

I was getting all the steps correct, just made a small path error mistake in the ini file, and damn it took me like 2-3 hours to get to know this...

Now I really know, what all can go wrong when u try php->perl

;)

Hey Prana, can you please explain the steps cause i having exactly the same issue, and i have been looking in the php.ini, added the extension=perl. so

but nothing changed.
Oct 16 '08 #3
smohan
12 New Member
Hi,

Please if some one could help me out to solve this problem

I have searched around for the solution to this problem, but I am trying to call a perl script from php, and get a fatal error:Class perl not found

I am using php 5.1.6 and apache 2.0 , php and apache is configured fine, as i am able to run <phpinfo()?> with out any problem. I have added perl.so extension into my php.ini extensions

The scripts are very basic (from the source:http://devzone.zend.com/node/view/id/1712)

test.php:
Expand|Select|W rap|Line Numbers

Expand|Select|Wrap|Line Numbers
  1. <?php
  2.  
  3. print "Hello from PHP! ";
  4. //$erl = new Perl();
  5. //$perl->require("test1.pl");
  6. print "Bye! ";
  7.  
  8. ?>

test1.pl:
print "Hello from perl! "


Thanks'
May 11 '10 #4
Markus
6,050 Recognized Expert Expert
Do you have the perl extension installed?
May 11 '10 #5
smohan
12 New Member
@Markus
yes.....I got the extension from this link and followed the steps http://pecl.php.net/package/perl.

and also tried with this command, but got the following error.
root@cogitate-linux2:~# cvs -d :pserver:cvs.ph p.net:/repository co pecl/perl
cvs checkout: authorization failed: server cvs.php.net rejected access to /repository for user root
cvs checkout: used empty password; try "cvs login" with a real password


and also The file perl.so is empty, if tried to open, it shows the error
Could not open the file /usr/lib/php5/20060613+lfs/perl.so.
There is no application installed for this file type
May 11 '10 #6
Markus
6,050 Recognized Expert Expert
Did you compile the source code?
May 11 '10 #7
smohan
12 New Member
@Markus
mate......I have installed perl interpreter.... ...using the link http://pecl.php.net/package/perl.
.....and i included the extension perl.so in the php.ini file. I compiled and run the file in the browser.

This is the code

test1.pl
Expand|Select|Wrap|Line Numbers
  1. print "Hello from perl! "
test1.php
Expand|Select|Wrap|Line Numbers
  1. <?php
  2.  
  3. print "Hello from PHP! ";
  4. $perl = new Perl();
  5. $perl->require("test1.pl");
  6. print "Bye! ";
  7.  
  8. ?>


and the output is

Expand|Select|Wrap|Line Numbers
  1. Hello from PHP!
  2. ( ! ) Fatal error: Class 'Perl' not found in /var/www/mohan/test1.php on line 4
  3. Call Stack
  4. #    Time    Memory    Function    Location
  5. 1    0.0003    54160    {main}( )    ../test1.php:0
  6.  

This is wat i have edited in the php.ini file

; extension_dir = "/usr/lib/php5/20060613+lfs/perl.so"
extension_dir = "/usr/lib/php5/20060613+lfs/perl.so"
This is the path wher i the perl.so file stored in the directory

; extension=perl. so
extension=perl. so
May 11 '10 #8
Markus
6,050 Recognized Expert Expert
Does your phpinfo() output show that the Perl module is enabled?
May 11 '10 #9
smohan
12 New Member
@Markus
how to check that?


ya i got it.....it is intalled......


i used

<?php

// Show all information, defaults to INFO_ALL
phpinfo();

// Show just the module information.
// phpinfo(8) yields identical results.
phpinfo(INFO_MO DULES);

?>

save this prog in file called phptest.php and run in the browser


and also u can check it in command prompt using this command

perl -MTie::Hash -e 1

If you don't get any output from the above command then the module is installed; if you get an error, it's not installed


It is installed.....
May 12 '10 #10

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

Similar topics

5
68812
by: Randell D. | last post by:
Folks, I feel like pulling my hair out - I tried unsuccessfully over the past few days to install ImagMagick but because of version conflicts and missing libraries I had to give up. I originally choose ImageMagick because I've heard so much about it. I then decided to go with the inbuilt GD tools since I'm using PHP 4.3.3 that I compiled with --with-gd. I can use some of the image functions in PHP so why is this one undefined? What...
6
16623
by: o'seally | last post by:
solaris/linux admins/rookie_developers that battle with this error are probably all frustrated when it happens. i bet you're also somehow frustrated by this seemingly unsolvable error :-) ...take it easy, it'll go away once u've learned how to play around with a few things on your system and reorganised. i'm particulary a solaris junkie, but linux is my admiration. the issue here is Not the OS/Software, but rather the concept. first of all...
2
2943
by: Itjalve | last post by:
This gives me a fatal error. I'm using .NET VC7.1 and made a win32 consol app, I have no problems with VC6. Debug build. I have removed nearly all my code this is whats left. From the beginning the template was defined in a .h file, but that has no effect, same error. I have seen when searching for fatal error that there are some problems with templates and optimization, but nothing as simple like this. I'm i doing something wrong?
4
5641
by: ARF | last post by:
I'm testing AutoCAD 2005 automation via VS2005 Pro C++/CLR and I'm getting fatal compiler errors. I start with a default C++/CLR class library project and modify it by adding the following references: acdbmgd.dll acmgd.dll the entire source for the default library header file is:
351
12902
by: CBFalconer | last post by:
We often find hidden, and totally unnecessary, assumptions being made in code. The following leans heavily on one particular example, which happens to be in C. However similar things can (and do) occur in any language. These assumptions are generally made because of familiarity with the language. As a non-code example, consider the idea that the faulty code is written by blackguards bent on foulling the language. The term...
0
1606
by: Chuck Anderson | last post by:
I have a set of Php scripts that run on my home PC (Windows XP- Apache 2 - Php 4.4.1) that reads my web sites' daily Apache access log file (a gzipped file) on the remote server (Linux/Apache/CPanel), and inserts the entries into a database on my PC. I use gzlib to open the gzipped file on the remote server. This script has been working fine for months (nearly a year). Today, without changing anything, I got a new error message...
0
6600
by: .nLL | last post by:
Erorr is --------------------- Microsoft VBScript runtime error '800a0046' Permission denied /a.asp, line 3 -----------------------
5
7873
by: phpbilder | last post by:
dear friends, i am using visual studio php from jcx software (version 5.2.5) and apache from apache friends.com (version 1.6.6a), now i am trying to transform a xml document to a xsl file, i create a xsltporcessor class for processing, and when i try to run, i will get a fatal error "Fatal error: Class 'XSLTProcessor' not found", i also checked my phpinfo(), xsl is enabled on, XSL --------- enabled libxslt Version...
10
6955
by: happyse27 | last post by:
Hi All, I got this apache errors(see section A1 and A2 below) when I used a html(see section b below) to activate acctman.pl(see section c below). Section D below is part of the configuration of section c. Not sure where went wrong as the web page displayed internal server error. Also, what is the error 543? and error 2114. Where to find the list of errors in websites as it is not the standard apache error. I could not find...
0
8461
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
8448
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8317
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
6796
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5987
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3948
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
4010
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2454
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
0
1313
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.