FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » randomly sorting files in php
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: getting perl and php to talk to each other [message #180599 is a reply to message #180596] Tue, 05 March 2013 22:06 Go to previous messageGo to previous message
Ben Morrow is currently offline  Ben Morrow
Messages: 5
Registered: March 2013
Karma:
Junior Member
Quoth Cal Dershowitz <cal(at)example(dot)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.

Ben
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to avoid the use of session variables in this script
Next Topic: all done
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 14 17:22:40 GMT 2024

Total time taken to generate the page: 0.04946 seconds