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 #180713 is a reply to message #180632] Thu, 14 March 2013 09:16 Go to previous messageGo to previous message
Cal Dershowitz is currently offline  Cal Dershowitz
Messages: 36
Registered: February 2013
Karma:
Member
On 03/07/2013 06:33 AM, Ben Morrow wrote:
>
> Quoth swisscheese(at)cfl(dot)rr(dot)com:
>> On 03/07/2013 01:53 AM, Cal Dershowitz wrote:
>>>
>>> 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.
>
> Installing the php-dev package should have created this link:
> http://xrl.us/bomxwq .
>
> Ben
>

I can't tell what precisely is holding me back now. I do, for an
absolute fact, know that it is not due to a lack of OP spending time
trying to figure this stuff out as best he can.


$ cat phpini.sh



1 #!/bin/sh
2
3 set -e
4
5 #DEBHELPER#
6
7 if [ "$1" != "configure" ]; then
8 exit 0
9 fi
10
11 for i in php-config phpize; do
12 update-alternatives \
13 --install /usr/bin/"$i" $i /usr/bin/"$i"5 50 \
14 --slave /usr/share/man/man1/"$i".1.gz "$i".1.gz
/usr/share/man/man1/"$i"5.1.gz
15 done
16
17 exit 0
$ ./reg2.pl






1 #!/bin/sh

2
....


This primitive script is what I have for reg2.pl:

#!/usr/bin/perl -w
use strict;
use 5.010;
use File::Slurp;
my $in = 'phpini.sh';
my $out = 'php1.sh';
my @lines = read_file($in);

open( my $fh, ">", $out) or die $! ;
foreach (@lines) {
print $_ . "\n";
s/^\s+//;
s/^\d+//;
s/^\s+//;
print $fh $_;
}
close $fh;

....

$ cat php1.sh
#!/bin/sh
set -e
#DEBHELPER#
if [ "$1" != "configure" ]; then
exit 0
fi
for i in php-config phpize; do
update-alternatives \
--install /usr/bin/"$i" $i /usr/bin/"$i"5 50 \
--slave /usr/share/man/man1/"$i".1.gz "$i".1.gz
/usr/share/man/man1/"$i"5.1.gz
done
exit 0
$

....

$ ./php1.sh configure
update-alternatives: error: alternative path /usr/bin/php-config5
doesn't exist.
$

....

That has to say something there, doesn't it?
--
Cal
[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 13:23:14 GMT 2024

Total time taken to generate the page: 0.07413 seconds