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: -
<?php
-
-
print "Hello from PHP! ";
-
//$erl = new Perl();
-
//$perl->require("test1.pl");
-
print "Bye! ";
-
-
?>
-
test1.pl:
print "Hello from perl! "
Thanks'
PB
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
;)
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.
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 - <?php
-
-
print "Hello from PHP! ";
-
//$erl = new Perl();
-
//$perl->require("test1.pl");
-
print "Bye! ";
-
-
?>
test1.pl:
print "Hello from perl! "
Thanks'
Do you have the perl extension installed?
@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
Did you compile the source code?
@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 - print "Hello from perl! "
test1.php - <?php
-
-
print "Hello from PHP! ";
-
$perl = new Perl();
-
$perl->require("test1.pl");
-
print "Bye! ";
-
-
?>
and the output is -
Hello from PHP!
-
( ! ) Fatal error: Class 'Perl' not found in /var/www/mohan/test1.php on line 4
-
Call Stack
-
# Time Memory Function Location
-
1 0.0003 54160 {main}( ) ../test1.php:0
-
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
Does your phpinfo() output show that the Perl module is enabled?
@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.....
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
@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
See why the tests failed. You should have logs of the tests in the tests directory.
@Markus
I dont have the logs in tests directory
There's no logs in any of the perl-1.0.0 directories. The directory includes int perl-1.0.0 is empty
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'
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.
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?
Sign in to post your reply or Sign up for a free account.
Similar topics
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
by: .nLL |
last post by:
Erorr is
---------------------
Microsoft VBScript runtime error '800a0046'
Permission denied
/a.asp, line 3
-----------------------
|
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...
|
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...
|
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,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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$) {
}
...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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,...
|
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...
| |