Web Hosting Talk







View Full Version : quick perl translation please


bjseiler
08-12-2004, 06:00 PM
Can someone explain this command to me? I believe it is suppose to be editing a file (the configure file for php source) but I am trying to make sure that it is actually doing what it is suppose to.

perl -pi.bak -e 's/LIBS="-lpfpro/LIBS="-pthread -lpfpro/g' configure

RRolfe
08-12-2004, 06:30 PM
Its the command from php.net user contributions to edit the php configure file and replace the LIBS var to include pthreads compile option for php. This is the only way to make payflow pro features work on freebsd with php.

I am guessing thats EXACTLY what your trying to do ;)

bjseiler
08-12-2004, 06:35 PM
Basically, but, can you tell me what string I should be able to find in configure? Is it LIBS="-pthread -lpfpro"?

RRolfe
08-12-2004, 06:39 PM
it changes the line:
LIBS="-lpfpro"
to the line:
LIBS="-pthread -lpfpro"

in the configure file on the following line numbers:
68742 of 94117
68871 of 94117
69044 of 94117

RRolfe
08-12-2004, 06:40 PM
oh yeah.. and if your using it on Freebsd 4.x then your php has to run as cgi for it to work. If its not run as cgi, then your apache install also has to be compile with pthreads.

Although i have heard it works fine on freebsd 5. I have not confirmed this yet.

bjseiler
08-12-2004, 06:48 PM
Thanks for the help, but that did not solve the problem :-(

checking for pfproInit in -lpfpro... no
checking for PNInit in -lpfpro... no
configure: error: The pfpro extension requires version 2 or 3 of the SDK

bjseiler
08-12-2004, 06:57 PM
It is on FreeBSD 5.2.1, fresh install...... My head is spinning from trying about every "patch" I can find.

bjseiler
08-12-2004, 08:46 PM
Well, I searched and found a site's phpinfo showing pfpro working on freebsd 5.2 and they were using php 4.3.7 (current is 4.3.8).....so, I downloaded 4.3.9RC1 and installed it. Bingo, it works!

Thanks for your help!

RRolfe
08-12-2004, 08:47 PM
so its a problem wih 4.3.8?

bjseiler
08-12-2004, 08:50 PM
I am not a PHP expert by any means, but, it looks like it works on 4.3.7 and 4.3.9 but not on 4.3.8 (for me).

RRolfe
08-12-2004, 09:12 PM
were you able to compile it and run it as a module in freebsd 5 without the pthreads support?

bjseiler
08-12-2004, 09:26 PM
whw -- Honestly, this is a horrible answer, but I have no idea if pthreads was a catalyst or not and I am a little afraid now to play around with it since it works now. I went through so many patch ideas (pthreads, linuxthreads, compat4, recompiling apache, etc., etc., etc., ) that I have no idea which actually helped it finally work.