Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #8656

Re: getting perl and php to talk to each other

From SwissCheese <swisscheese@cfl.rr.com>
Newsgroups comp.lang.php, comp.lang.perl.misc
Subject Re: getting perl and php to talk to each other
Date 2013-03-14 06:51 -0400
Organization cheese...
Message-ID <khsa0r$3p1$1@dont-email.me> (permalink)
References (3 earlier) <3b-dnfsjxuAJJajMnZ2dnUVZ_qCdnZ2d@supernews.com> <sr6i0a-mdq1.ln1@anubis.morrow.me.uk> <kqKdnfWb5I3RpKXMnZ2dnUVZ_h-dnZ2d@supernews.com> <kh9tib$9k9$1@dont-email.me> <xpGdnU52KfSrO9zMnZ2dnUVZ_qWdnZ2d@supernews.com>

Cross-posted to 2 groups.

Show all headers | View raw


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 <cal@example.invalid>:
>>>>> [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?-

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

randomly sorting files in php Cal Dershowitz <cal@example.invalid> - 2013-02-28 17:49 -0800
  Re: randomly sorting files in php Jerry Stuckle <jstucklex@attglobal.net> - 2013-02-28 23:45 -0500
    Re: randomly sorting files in php Cal Dershowitz <cal@example.invalid> - 2013-02-28 22:23 -0800
      Re: randomly sorting files in php David Robley <me@home.invalid> - 2013-03-01 17:24 +1030
        Re: randomly sorting files in php Cal Dershowitz <cal@example.invalid> - 2013-03-03 18:59 -0800
          getting perl and php to talk to each other,  was Re: randomly sorting files in php Cal Dershowitz <cal@example.invalid> - 2013-03-05 01:19 -0800
            Re: getting perl and php to talk to each other,  was Re: randomly sorting   files in php "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2013-03-05 19:43 +0100
              Re: getting perl and php to talk to each other,  was Re: randomly sorting   files in php The Natural Philosopher <tnp@invalid.invalid> - 2013-03-05 19:20 +0000
            Re: getting perl and php to talk to each other Ben Morrow <ben@morrow.me.uk> - 2013-03-05 22:06 +0000
              Re: getting perl and php to talk to each other Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-03-06 00:20 +0100
                Re: getting perl and php to talk to each other Ben Morrow <ben@morrow.me.uk> - 2013-03-05 23:59 +0000
                Re: getting perl and php to talk to each other The Natural Philosopher <tnp@invalid.invalid> - 2013-03-06 01:01 +0000
                Re: getting perl and php to talk to each other Jerry Stuckle <jstucklex@attglobal.net> - 2013-03-05 20:08 -0500
                Re: getting perl and php to talk to each other Cal Dershowitz <cal@example.invalid> - 2013-03-06 22:37 -0800
                Re: getting perl and php to talk to each other Ben Morrow <ben@morrow.me.uk> - 2013-03-07 06:57 +0000
                Re: getting perl and php to talk to each other Cal Dershowitz <cal@example.invalid> - 2013-03-07 00:52 -0800
                Re: getting perl and php to talk to each other Jerry Stuckle <jstucklex@attglobal.net> - 2013-03-07 08:17 -0500
                Re: getting perl and php to talk to each other Cal Dershowitz <cal@example.invalid> - 2013-03-14 03:41 -0700
                Re: getting perl and php to talk to each other The Natural Philosopher <tnp@invalid.invalid> - 2013-03-14 11:14 +0000
                Re: getting perl and php to talk to each other Jerry Stuckle <jstucklex@attglobal.net> - 2013-03-14 08:06 -0400
                Re: getting perl and php to talk to each other Jürgen Exner <jurgenex@hotmail.com> - 2013-03-14 04:18 -0700
                Re: getting perl and php to talk to each other Scott Johnson <noonehome@chalupasworld.com> - 2013-03-14 05:38 -0700
                Re: getting perl and php to talk to each other Ben Morrow <ben@morrow.me.uk> - 2013-03-07 14:25 +0000
                Re: getting perl and php to talk to each other Jerry Stuckle <jstucklex@attglobal.net> - 2013-03-07 08:14 -0500
                Re: getting perl and php to talk to each other Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-03-06 02:08 +0100
              Re: getting perl and php to talk to each other Cal Dershowitz <cal@example.invalid> - 2013-03-06 22:53 -0800
                Re: getting perl and php to talk to each other "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2013-03-07 09:46 +0100
                Re: getting perl and php to talk to each other David Robley <me@home.invalid> - 2013-03-07 21:43 +1030
                Re: getting perl and php to talk to each other "Peter H. Coffin" <hellsop@ninehells.com> - 2013-03-07 07:32 -0600
                Re: getting perl and php to talk to each other SwissCheese <swisscheese@cfl.rr.com> - 2013-03-07 06:28 -0500
                Re: getting perl and php to talk to each other Ben Morrow <ben@morrow.me.uk> - 2013-03-07 14:33 +0000
                Re: getting perl and php to talk to each other Cal Dershowitz <cal@example.invalid> - 2013-03-14 02:16 -0700
                Re: getting perl and php to talk to each other Cal Dershowitz <cal@example.invalid> - 2013-03-14 03:28 -0700
                Re: getting perl and php to talk to each other SwissCheese <swisscheese@cfl.rr.com> - 2013-03-14 06:51 -0400
                Re: getting perl and php to talk to each other Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-03-18 12:54 +0100
                Re: getting perl and php to talk to each other SwissCheese <swisscheese@cfl.rr.com> - 2013-03-18 20:23 -0400
                Re: getting perl and php to talk to each other alexd <troffasky@hotmail.com> - 2013-03-07 19:09 +0000
                Re: getting perl and php to talk to each other Henry Law <news@lawshouse.org> - 2013-03-07 20:09 +0000
                Re: getting perl and php to talk to each other Cal Dershowitz <cal@example.invalid> - 2013-03-14 02:23 -0700
                Re: getting perl and php to talk to each other The Natural Philosopher <tnp@invalid.invalid> - 2013-03-07 20:43 +0000
                Re: getting perl and php to talk to each other Alastair Black <abqab.nemo@example.net> - 2013-03-07 14:47 -0700
                Re: getting perl and php to talk to each other "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2013-03-07 23:11 +0100
                Re: getting perl and php to talk to each other Alastair Black <abqab.nemo@example.net> - 2013-03-07 15:50 -0700
                Re: getting perl and php to talk to each other Jerry Stuckle <jstucklex@attglobal.net> - 2013-03-07 19:45 -0500
                Re: getting perl and php to talk to each other Cal Dershowitz <cal@example.invalid> - 2013-03-14 02:19 -0700
                Re: getting perl and php to talk to each other Jerry Stuckle <jstucklex@attglobal.net> - 2013-03-14 07:55 -0400
                where to put the binaries was Re: getting perl and php to talk to each other Cal Dershowitz <cal@example.invalid> - 2013-03-14 03:11 -0700
                Re: where to put the binaries was Re: getting perl and php to talk to each other The Natural Philosopher <tnp@invalid.invalid> - 2013-03-14 11:12 +0000
                Re: where to put the binaries was Re: getting perl and php to talk to each other Jerry Stuckle <jstucklex@attglobal.net> - 2013-03-14 08:04 -0400
  Re: randomly sorting files in php Captain Paralytic <paul_lautman@yahoo.com> - 2013-03-04 02:45 -0800
    Re: randomly sorting files in php Cal Dershowitz <cal@example.invalid> - 2013-03-14 03:39 -0700

csiph-web