• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2861
  • Last Modified:

is there a way to check if pecl is installed

I am trying to execute some perl from within a php file. Is there a way to check if it is installed on my server? I have looked at the phpinfo.php file that i place on my server and it says

PECL Module version       (bundled) 1.0.1 $Id: pdo_sqlite.c,v 1.10.2.6.2.3 2007/12/31 07:20:10 sebastian Exp $

does that mean I should be able to do it, when i try to run a basic script it as below it errors and says
 Fatal error: Class 'Perl' not found in /home/content/31/5093631/html/perltest.php  on line 4    
the first hello works but the "bye" does not.

any suggestions?

thank you
<?php

print "Hello from PHP! ";
$perl = new Perl();
$perl->eval('print "Hello from perl! "');
print "Bye! ";

?>

Open in new window

0
jaxbrian
Asked:
jaxbrian
  • 5
  • 4
1 Solution
 
karoldvlCommented:
It seems as if you're missing the Perl extension.

This article should help:
http://kb.mediatemple.net/questions/1682/Installing+PECL+extensions
0
 
karoldvlCommented:
0
 
jaxbrianAuthor Commented:
I am on a shared host. are there any options for me to have those files local in my root directory?
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
karoldvlCommented:
I doubt it. Your best chance is to have support install it for you globally. In some specific configurations that theoretically might be possible, at least according to this thread:
http://drupal.org/node/456686

But even if it works, it's so specific, that on most hosts that's not applicable.

Why do you need Perl in PHP? Maybe there's some other way to do it?
0
 
jaxbrianAuthor Commented:
I am trying to run a perl script that generates a keyword cloud in my php/html pages. do you have any suggestions? there are 2 .pl files and a .pm file that are associated with the cloud.

thanks for taking the time to look at my posts




0
 
karoldvlCommented:
Depending on your host configuration it might be possible to execute your Perl script using PHP's exec() function. Assuming that there's some parsable output from your Perl script. This may require some rewrites, input/output changes, but should be doable if you are able to call Perl interpreter this way.
0
 
osiris00Commented:
You can use this script to check whether it is installed (doesn't look like it)
http://www.wlscripting.com/tutorial/47

If you don't have perl on board, you can still communicate with the perl interpreter through PHP by putting a copy of perl58.so or perl58.dll  somewhere PHP can find it (in the PHP directory or in your system path).
0
 
jaxbrianAuthor Commented:
that is probably a bit beyond my ability, I am going to put in an email to my hosting company and see if they will add the perl extensions to the server. they may do it, they may not. when I find out I will post another topic on here. so, check back later or tomorrow for a topic called "is there another way to get perl to work with php"
thank you for your help,

B
0
 
jaxbrianAuthor Commented:
lol
0
 
jaxbrianAuthor Commented:
Thank you for your time and effort with this
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now