Search

User login

Poll

What is your favorite DB Server ?:
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
6 + 14 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

My YM

Author Information

sentono
Offline
Last seen: 6 days 18 hours ago
Joined: 09/21/2007

Alexa Rank

Who's online

There are currently 0 users and 6 guests online.
Home
  • warning: Invalid argument supplied for foreach() in /usr/home/wowtutorial/public_html/sites/all/modules/adsense_injector/adsense_injector.module on line 352.
  • warning: Invalid argument supplied for foreach() in /usr/home/wowtutorial/public_html/sites/all/modules/adsense_injector/adsense_injector.module on line 35.

How To Compile PHP 5.3.x To Support Perl Extensions

What is PECL Perl ?

PECL Perl is extension embeds Perl Interpreter into PHP. It allows execute Perl files, evaluate Perl code, access Perl variables and instantiate Perl objects.

In this tutorial i will describe how to compile PECL perl with PHP 5.3.x
I found that latest pecl perl-1.0.0.tgz can't compile with PHP 5.3.x

If you trying to compile pecl perl with PHP 5.3.x it will shows error like below :

/root/perl-1.0.0/php_perl.c:200: warning: initialization from incompatible pointer type
/root/perl-1.0.0/php_perl.c: In function âphp_perl_zval_to_sv_refâ:
/root/perl-1.0.0/php_perl.c:343: error: ‘zval’ has no member named ‘is_ref’
/root/perl-1.0.0/php_perl.c:1779: warning: assignment from incompatible pointer type
make: *** [php_perl.lo] Error 1

So after googling i found that pecl perl svn already have a patch there.
below are the steps how to patch and compile pecl perl with PHP 5.3.x

Download and Extract PECL Perl  Package

#cd /root/
#wget http://pecl.php.net/get/perl-1.0.0.tgz
#tar -zxvf perl-1.0.0.tgz
#cd perl-1.0.0

Download php_perl.c from SVN pecl perl and replace with the old one

you can download it using svn from this url http://svn.php.net/viewvc/pecl/perl/trunk/
but the strange thing is i can't download php_perl.c with svn and i don't know why
but finally i download it manually to my client and uploaded to /root/perl-1.0.0
if the ftp client ask to replace php_perl.c just press OK to replace the old php_perl.c file

Configure and Compiling Pecl Perl

#cd /root/perl-1.0.0
#/usr/local/bin/phpize
#./configure --with-perl=/usr/bin/perl --with-php-config=/usr/local/bin/php-config
#make
#make install

Edit php.ini

#pico /usr/local/lib/php.ini
### add perl.so in extension section ####
 
extension=perl.so

Restarting apache


#/usr/local/apache2/bin/apachectl stop
#/usr/local/apache2/bin/apachectl start

See the result with phpinfo

#cd /usr/local/apache2/htdocs
#pico phpinfo.php

<? phpinfo(); ?>

Open a Web Browser

http://<youripaddress>/phpinfo.php

You should see a perl extensions loaded in your phpinfo page

 

Comments

Where is new php_perl.c

I don't know where to download php-perl.c when svn doesn't work.

please tell me how to download it.

try go search in svn

first, try to googling first,

second, try to search directly into svn network

 

Windows extension

I would gladly pay a small amount to anyone that can compile and build a working windows extension of PECL Perl, aka php_perl.dll for PHP 5.3.x !!

hi tobias, you can email me

hi tobias, you can email me at chai@wowtutorial.org
i can help you out free of charge :)

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.

Recent comments

Facebook Fans

Sponsors

Online Store

Tag Cloud