Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Re: getting perl and php to talk to each other

Reply
Thread Tools

Re: getting perl and php to talk to each other

 
 
SwissCheese
Guest
Posts: n/a
 
      03-07-2013
On 03/07/2013 01:53 AM, Cal Dershowitz wrote:
> On 03/05/2013 02:06 PM, Ben Morrow wrote:
>>
>> Quoth Cal Dershowitz <>:
>>> [x-posted to clp.misc]

>> [...]
>>>
>>> This article has me convinced that I want perl and php able to deal with
>>> each other:
>>>
>>> http://www.linuxjournal.com/article/9282?page=0,1

>>
>> Why on Earth would you want to do that? Seriously, I can't think of any
>> situation where mixing PHP and Perl is easier than just writing in Perl
>> in the first place.
>>
>> Note that the Perl in that article (or at least, the first page, which
>> was all I read) is pretty bad:
>>
>> - use of global filehandles, unnecessary since 2000,
>> - use of Thread.pm, deprecated since 2002,
>> - use of threads at all for such a trivial problem,
>> - using rindex and substr rather than pattern matching,
>> - using backticks instead of system(),
>> - using PHP to talk to a database, when Perl's DBI module is
>> considerably better than PHP's rather random database functions.
>>
>> I don't know PHP well enough to comment on it, but I wouldn't be
>> surprised if the PHP code was just as bad (for instance, I understand
>> PHP has a saner database interface these days; I don't know if it
>> existed in 2007, though).
>>
>>> so far so good, and then this thing which I've seen in the literature:
>>>
>>> using php_config 'php-config'
>>> Can't exec "php-config": No such file or directory at Makefile.PL
>>> line 55.
>>> Failed to find the 'php-config' executable. Make sure you have PHP and
>>> PHP sources installed, and that 'php-config' is in PATH. at Makefile.PL
>>> line 55.
>>> ...
>>>
>>> bla bla bla do not pass Go. Right now I have a default installation.
>>>
>>> Simple question: What types of things can I get configured with
>>> php-config? envelope data available? ftp data?

>>
>> php-config is a program installed with php, which tells other programs
>> how php was installed. For instance, on my system
>>
>> ~% php-config --libs
>> -lcrypt -lcrypt -lpcre -lm -lxml2 -lz -liconv -lm -lcrypt -lcrypt
>> ~% php-config --includes
>> -I/usr/local/include/php -I/usr/local/include/php/main
>> -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend
>> -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
>> ~%
>>
>> and so on. If you've installed php properly (including any required
>> development packages, if you're using a package system), you should have
>> a php-config executable somewhere. Make sure it's in your PATH before
>> running Makefile.PL.

>
> Struggling.
>
> $ php-config --libs
> No command 'php-config' found, did you mean:
> Command 'pdp-config' from package 'pd-pdp' (universe)
> Command 'php-config5' from package 'php5-dev' (main)
> php-config: command not found
> $


Try php-config5 as php-config is a link to php-config5. Here they
both reside in /usr/bin. If you are missing php-config link (it appears
so) then create it.

--
Norman
Registered Linux user #461062
-Have you been to www.php.net yet?-
 
Reply With Quote
 
 
 
 
SwissCheese
Guest
Posts: n/a
 
      03-14-2013
On 03/14/2013 06:28 AM, Cal Dershowitz wrote:
> On 03/07/2013 03:28 AM, SwissCheese wrote:
>> On 03/07/2013 01:53 AM, Cal Dershowitz wrote:
>>> On 03/05/2013 02:06 PM, Ben Morrow wrote:
>>>>
>>>> Quoth Cal Dershowitz <>:
>>>>> [x-posted to clp.misc]
>>>> [...]
>>>>>
>>>>> This article has me convinced that I want perl and php able to deal
>>>>> with
>>>>> each other:
>>>>>
>>>>> http://www.linuxjournal.com/article/9282?page=0,1
>>>>
>>>> Why on Earth would you want to do that? Seriously, I can't think of any
>>>> situation where mixing PHP and Perl is easier than just writing in Perl
>>>> in the first place.
>>>>
>>>> Note that the Perl in that article (or at least, the first page, which
>>>> was all I read) is pretty bad:
>>>>
>>>> - use of global filehandles, unnecessary since 2000,
>>>> - use of Thread.pm, deprecated since 2002,
>>>> - use of threads at all for such a trivial problem,
>>>> - using rindex and substr rather than pattern matching,
>>>> - using backticks instead of system(),
>>>> - using PHP to talk to a database, when Perl's DBI module is
>>>> considerably better than PHP's rather random database functions.
>>>>
>>>> I don't know PHP well enough to comment on it, but I wouldn't be
>>>> surprised if the PHP code was just as bad (for instance, I understand
>>>> PHP has a saner database interface these days; I don't know if it
>>>> existed in 2007, though).
>>>>
>>>>> so far so good, and then this thing which I've seen in the literature:
>>>>>
>>>>> using php_config 'php-config'
>>>>> Can't exec "php-config": No such file or directory at Makefile.PL
>>>>> line 55.
>>>>> Failed to find the 'php-config' executable. Make sure you have PHP and
>>>>> PHP sources installed, and that 'php-config' is in PATH. at
>>>>> Makefile.PL
>>>>> line 55.
>>>>> ...
>>>>>
>>>>> bla bla bla do not pass Go. Right now I have a default installation.
>>>>>
>>>>> Simple question: What types of things can I get configured with
>>>>> php-config? envelope data available? ftp data?
>>>>
>>>> php-config is a program installed with php, which tells other programs
>>>> how php was installed. For instance, on my system
>>>>
>>>> ~% php-config --libs
>>>> -lcrypt -lcrypt -lpcre -lm -lxml2 -lz -liconv -lm -lcrypt -lcrypt
>>>> ~% php-config --includes
>>>> -I/usr/local/include/php -I/usr/local/include/php/main
>>>> -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend
>>>> -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
>>>> ~%
>>>>
>>>> and so on. If you've installed php properly (including any required
>>>> development packages, if you're using a package system), you should
>>>> have
>>>> a php-config executable somewhere. Make sure it's in your PATH before
>>>> running Makefile.PL.
>>>
>>> Struggling.
>>>
>>> $ php-config --libs
>>> No command 'php-config' found, did you mean:
>>> Command 'pdp-config' from package 'pd-pdp' (universe)
>>> Command 'php-config5' from package 'php5-dev' (main)
>>> php-config: command not found
>>> $

>>
>> Try php-config5 as php-config is a link to php-config5. Here they
>> both reside in /usr/bin. If you are missing php-config link (it appears
>> so) then create it.
>>

>
> swiss,
>
> Can you elaborate?


The file 'php-config' is a pointer (hard/soft link) to 'php-config5'.
Running 'php-config' actually runs 'php-config5'. Run the command:

man ln

....to read up on how to use them. At worst you could just make a copy of
'php-config5' and rename it 'php-config' but I would have to say
creating the link is the proper thing to do.

--
Norman
Registered Linux user #461062
-Have you been to www.php.net yet?-
 
Reply With Quote
 
 
 
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      03-18-2013
SwissCheese wrote:
^^^^^^^^^^^
Please put your real name there. And stop crossposting without Followup-To
(F'up2).

> The file 'php-config' is a pointer (hard/soft link) to 'php-config5'.


Most likely it is not a hardlink, but a symlink.


F'up2 .php

PointedEars
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
-- from <http://www.vortex-webdesign.com/help/hidesource.htm> (404-comp.)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: getting perl and php to talk to each other Thomas 'PointedEars' Lahn Perl Misc 7 03-14-2013 12:38 PM
Re: getting perl and php to talk to each other, was Re: randomlysorting files in php M. Strobel Perl Misc 1 03-05-2013 07:20 PM
PHP Training Institute In Delhi, Live Projects on PHP. Short TermPHP Courses, PHP Scripts, PHP Training with Live Projects. Rajive Narain Java 0 09-18-2009 10:47 AM
Assistance please with getting pages to talk to each other mwschenckCRL XML 0 10-27-2006 10:53 PM
Desktop and Laptop will not talk to each other cteq Computer Support 4 01-22-2004 01:49 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57