LittleJack has asked for the wisdom of the Perl Monks concerning the following question:
I want to preface this question with the fact that
My task was this: view an image in a browser, click on something in the image, have perl run an ImageMagick command to modify the image.
It's not a great setup, but it's worked for me before. The problem is that I'm doing it on an M2 Mac.
This is basically it:
my $command = "/opt/local/bin/convert foo.jpg -crop ${w}x$h+$x+$x ./cr +opped/foo.jpg"; my $result = `$command`; say qq|{"result":"$result"}|;
So on my M2 mac, I get 6 as the result, and the convert doesn't work.
I solved the problem by just implementing it on an older Mac.
But what's going on here? My Apache is the XAMPP one:
Server version: Apache/2.4.56 (Unix) Server built: Oct 28 2023 12:23:23 Server's Module Magic Number: 20120211:126 Server loaded: APR 1.5.2, APR-UTIL 1.5.4, PCRE 8.44 2020-02-12 Compiled using: APR 1.5.2, APR-UTIL 1.5.4, PCRE 8.44 2020-02-12 Architecture: 64-bit Server MPM: prefork threaded: no forked: yes (variable process count) Server compiled with.... -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_FLOCK_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D DYNAMIC_MODULE_LIMIT=256 -D HTTPD_ROOT="/usr" -D SUEXEC_BIN="/usr/bin/suexec" -D DEFAULT_PIDLOG="/private/var/run/httpd.pid" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="/private/etc/apache2/mime.types" -D SERVER_CONFIG_FILE="/private/etc/apache2/httpd.conf"
My perl is:
Platform: osname=darwin osvers=22.0 archname=darwin-thread-multi-2level uname='darwin 5bxbb.p1s.plx.sd.apple.com 22.0 darwin kernel versio +n 22.1.0: thu dec 15 17:42:24 pst 2022; root:xnu-8792.41.9.100.2~1dev +elopment_x86_64 x86_64 ' config_args='-ds -e -Dprefix=/usr -Dccflags=-g -pipe -Dldflags= +-Dman3ext=3pm -Duseithreads -Duseshrplib -Dinc_version_list=none -Dcc +=cc'
My ImageMagick is:
Version: ImageMagick 6.9.11-60 Q16 x86_64 2021-01-25 https://imagemagi +ck.org
So, for some reason, that combination doesn't work and the system returns 6 which seems to mean "no such binary"?
Help me understand what's going on here Monks, and how I can resolve things like this in the future without having to return to an older Mac system?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl on M2 Mac issues: somewhere between Perl, Apache and ImageMagick my code fails
by bliako (Abbot) on Oct 24, 2024 at 06:58 UTC | |
by choroba (Cardinal) on Oct 24, 2024 at 08:40 UTC | |
by bliako (Abbot) on Oct 24, 2024 at 09:02 UTC | |
by LittleJack (Beadle) on Oct 25, 2024 at 01:04 UTC |