473,386 Members | 1,753 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

PHP fatal error : Class perl not found

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 11263
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
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
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|Wrap|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 Expert 4TB
Do you have the perl extension installed?
May 11 '10 #5
smohan
12
@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.php.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 Expert 4TB
Did you compile the source code?
May 11 '10 #7
smohan
12
@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 Expert 4TB
Does your phpinfo() output show that the Perl module is enabled?
May 11 '10 #9
smohan
12
@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_MODULES);

?>

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
smohan
12
after installing the extension, i run the command make test,
but i got this result

Number of tests : 70 70
Tests skipped : 0 ( 0.0%) --------
Tests warned : 0 ( 0.0%) ( 0.0%)
Tests failed : 70 (100.0%) (100.0%)
Tests passed : 0 ( 0.0%) ( 0.0%)
---------------------------------------------------------------------
Time taken : 4 seconds
================================================== ===================

================================================== ===================
FAILED TEST SUMMARY


what sud i do now to make the test successful
May 12 '10 #11
smohan
12
@Markus
re: PHP fatal error : Class perl not found
Does your phpinfo() output show that the Perl module is enabled?

I checked phpinfo(). but i could not find perl module in it.

Loaded Modules : core mod_log_config mod_logio prefork http_core mod_so mod_alias mod_auth_basic mod_authn_file mod_authz_default mod_authz_groupfile mod_authz_host mod_authz_user mod_autoindex mod_cgi mod_dir mod_env mod_mime mod_negotiation mod_perl mod_php5 mod_rewrite mod_setenvif mod_status
May 12 '10 #12
Markus
6,050 Expert 4TB
See why the tests failed. You should have logs of the tests in the tests directory.
May 12 '10 #13
smohan
12
@Markus
I dont have the logs in tests directory
May 12 '10 #14
smohan
12
There's no logs in any of the perl-1.0.0 directories. The directory includes int perl-1.0.0 is empty
May 12 '10 #15
smohan
12
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'
May 12 '10 #16
smohan
12
I got The solution.

There will be few files which will not be installed while installing the extensions. I tried this, I got the solution....

perl -MCPAN -eshell

and then eg
install Net::LDAP

It is running for me. Thank you Markus for ur concern on me.
May 12 '10 #17
pranavb85
"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

;)"

Can you explain more detail hoe you solve the problem?
Jun 11 '18 #18

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

Similar topics

5
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...
6
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...
2
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...
4
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...
351
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...
0
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...
0
by: .nLL | last post by:
Erorr is --------------------- Microsoft VBScript runtime error '800a0046' Permission denied /a.asp, line 3 -----------------------
5
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...
10
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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,...
0
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...

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.