Ask Different (Apple)
Q&A for power users of Apple hardware and software
Latest Questions
2
votes
1
answers
238
views
How to access shortcuts for Forward and Backwards in PhpStorm when using a German keyboard on a Mac
I have recently switched from a PC to a Mac. I'm working a lot in **PhpStorm** and there use the keyboard shortcuts for Forward and Backwards, which on Windows are Ctrl + Alt + ← / → . Now I read that this is on Mac Cmd + [ and Cmd + ] . Fine... but since I use a German keyboard, "]" is on...
I have recently switched from a PC to a Mac. I'm working a lot in **PhpStorm** and there use the keyboard shortcuts for Forward and Backwards, which on Windows are Ctrl+Alt+←/→.
Now I read that this is on Mac Cmd+[ and Cmd+]. Fine... but since I use a German keyboard, "]" is on Opt+6 and "[" is on Opt+5. Pressing Cmd+Opt+6 does not navigate me Forward nor Backward.
Is there a meant-to-be solution for this problem? Or am I supposed to actually reconfigure my keyboard to find something that actually works? There must be more people like me having this problem, so I'm curious about what solutions exist.
Mathias Bader
(131 rep)
Apr 24, 2021, 02:10 PM
• Last activity: Jun 3, 2025, 07:06 AM
0
votes
1
answers
254
views
Subscribed calendars not shown on my device, but they can be opened manually [iOS 14.4.2]
I am trying to write a PHP service to make calendars from some data. Anyway, the example it returns (it is static during the test) shows up normally when trying to get it by `http://my_domain.com/ics.php` or just to download response as an `.ics` file (location, URL, description, alert fields have b...
I am trying to write a PHP service to make calendars from some data. Anyway, the example it returns (it is static during the test) shows up normally when trying to get it by
http://my_domain.com/ics.php
or just to download response as an .ics
file (location, URL, description, alert fields have been shown properly, I can save it on my device or CalDAV/Cloud server), so the iCS syntax is OK. But when I try to subscribe to it through webcal://my_domain.com/ics.php
, its events do not show up on my Calendar timeline (although I can still see it in the "Calendars" sections and even "refresh" it). When refreshing it, the events still can't be seen, but the server notices the request to my_domain.com/ics.php
.
I tried:
- Rebooting the device & server
- Making a static .ics
file and subscribing to it
- Adding response headers like Content-type: text/calendar
and
Content-disposition: attachment; filename=index.ics
- Disabling iCloud & Google Calendars accounts on the device
- Generating another event in the calendar
And nothing above helped. The subscribition works on Microsoft Outlook, Mozilla Thunderbird on Windows 10 device. On my i-device there was another public subscribed calendar, but it also did not worked.
The example of generated ICS can be watched here .
What should I change to make it subscribed and shown properly?
I will appreciate any provided help!
Added: now when accessing through webcal://
safari responses that "Can't opent the page because it is invalid"
Genken
(1 rep)
Apr 10, 2021, 07:26 AM
• Last activity: May 4, 2025, 10:07 AM
1
votes
1
answers
176
views
Apache + PHP - Internal Server Error + (13)Permission denied
Trying to get php working on my localhost. PHP has been code signed correctly and is running: >AH06662: Allowing module loading process to continue for module at /opt/homebrew/opt/php@8.2/lib/httpd/modules/libphp.so because module signature matches authority "Mo" specified in LoadModule directive Ye...
Trying to get php working on my localhost.
PHP has been code signed correctly and is running:
>AH06662: Allowing module loading process to continue for module at /opt/homebrew/opt/php@8.2/lib/httpd/modules/libphp.so because module signature matches authority "Mo" specified in LoadModule directive
Yet, when I try to open: /phpinfo.php I run into the following error:
>**Internal Server Error**
>The server encountered an internal error or misconfiguration and was unable to complete your request.
>
>Please contact the server administrator at you@example.com to inform them of the time this error occurred, and the actions you performed just before this error.
>
>More information about this error may be available in the server error log.
In errorlog I am seeing the following:
>[Thu Oct 26 16:40:53.069155 2023] [cgi:error] [pid 3910] [client ::1:52319] AH01215: (13)Permission denied: exec of '/Users/mo/Sites/1/phpinfo.php' failed: /Users/mo/Sites/1/phpinfo.php
[Thu Oct 26 16:40:53.071058 2023] [cgi:error] [pid 3910] [client ::1:52319] End of script output before headers: phpinfo.php
Does (13)Permission denied mean that I need to
chmod +a "_www allow execute" ...
something to do with the PHP execution? macOS 14 is really making things complicated.
Mou某
(891 rep)
Oct 26, 2023, 03:44 PM
• Last activity: Apr 28, 2025, 07:00 AM
0
votes
0
answers
187
views
After macOS update from 15.1 to 15.3.1 Homebrew httpd doesn't work
After updating macOS from 15.1 to 15.3.1 on my M4 Mac, I can't start Homebrew `httpd`: sudo /usr/local/opt/httpd/bin/apachectl start Password: httpd: Syntax error on line 177 of /usr/local/etc/httpd/httpd.conf: Cannot load /usr/local/opt/php/lib/httpd/modules/libphp.so into server: dlopen(/usr/local...
After updating macOS from 15.1 to 15.3.1 on my M4 Mac, I can't start Homebrew
httpd
:
sudo /usr/local/opt/httpd/bin/apachectl start
Password:
httpd: Syntax error on line 177 of /usr/local/etc/httpd/httpd.conf:
Cannot load /usr/local/opt/php/lib/httpd/modules/libphp.so into server: dlopen(/usr/local/opt/php/lib/httpd/modules/libphp.so, 0x000A):
Symbol not found: _libssh2_session_callback_set2\n Referenced from: /usr/local/Cellar/curl/8.12.1/lib/libcurl.4.dylib\n
Expected in: /usr/local/Cellar/libssh2/1.11.0_1/lib/libssh2.1.dylib
It worked fine on 15.1. I use httpd
on my mediawiki together with PHP 8.4.4.
The PHP configuration for httpd
in /usr/local/etc/httpd/httpd.conf
is:
LoadModule php_module /usr/local/opt/php/lib/httpd/modules/libphp.so
My PHP version:
brew info php
==> php: stable 8.4.4 (bottled), HEAD
General-purpose scripting language
https://www.php.net/
Installed
My httpd
version:
brew info httpd
==> httpd: stable 2.4.63 (bottled)
Apache HTTP server
https://httpd.apache.org/
Installed
Gerd
(211 rep)
Mar 3, 2025, 08:41 AM
• Last activity: Mar 3, 2025, 10:37 AM
1
votes
1
answers
64
views
Running Cron with PHP on macOS 12 Throws Error - Could not open input file
I have this in my crontab: ```bash * * * * * /Applications/MAMP/bin/php/php7.2.10/bin/php -f /Users/user/Documents/radio_bycron.php 2>&1 > /Users/user/Documents/radio_bycron.php_output.txt ``` In `/Users/user/Documents/radio_bycron.php_output.txt`, there's only one line which is: ```bash Could not o...
I have this in my crontab:
* * * * * /Applications/MAMP/bin/php/php7.2.10/bin/php -f /Users/user/Documents/radio_bycron.php 2>&1 > /Users/user/Documents/radio_bycron.php_output.txt
In /Users/user/Documents/radio_bycron.php_output.txt
, there's only one line which is:
Could not open input file: /Users/user/Documents/radio_bycron.php
I have already chmod 0777
the script /Users/user/Documents/radio_bycron.php
, but I am still getting this issue. The problem happens with or without the -f
flag.
If I execute the command directly on the Terminal, it works perfectly.
How can I solve this problem?
forgodsakehold
(413 rep)
Jul 25, 2024, 01:26 PM
• Last activity: Jan 25, 2025, 10:05 AM
1
votes
1
answers
235
views
Trying to execute shell commands opening multiple terminals
I have a shell command which I use to setup multiple servers (metro, laravel, ngrok). Each of these processes needs to be executed in its own Terminal window. The issue right now is that all I'm able to do is start the laravel server and the command hangs there... Is it possible to execute each line...
I have a shell command which I use to setup multiple servers (metro, laravel, ngrok). Each of these processes needs to be executed in its own Terminal window. The issue right now is that all I'm able to do is start the laravel server and the command hangs there...
Is it possible to execute each line of the command in their corresponding Terminal window?
#!/bin/bash
cd /Users/gabriel/Desktop/proyectos/laravelapp.com && php artisan serve
cd /Users/gabriel/Desktop/proyectos/laravelapp.com && php artisan db:drop && php artisan db:create && php artisan migrate --seed
ngrok http 8000
cd /Users/gabriel/Desktop/proyectos/woo/android && gradlew clean && cd .. && npx react-native run-android -- --reset-cache
cd /Users/gabriel/Desktop/proyectos/laravelapp.com && php artisan websockets:serve
gabogabans
(119 rep)
Jun 19, 2023, 01:05 PM
• Last activity: Nov 11, 2024, 05:04 AM
2
votes
1
answers
2855
views
Unable to use PHP in Apache on Big Sur
After using brew to install Apache version 2.4.46 on Mac OS Big Sur 11.2.3, and using brew to install PHP 8.0.6, I am unable to run PHP. I am running Apache from /usr/local/etc/httpd, and my Document Root is at /usr/local/var/www. I am not using the Apple supplied Apache. Here is my phpinfo.php: Her...
After using brew to install Apache version 2.4.46 on Mac OS Big Sur 11.2.3, and using brew to install PHP 8.0.6, I am unable to run PHP. I am running Apache from /usr/local/etc/httpd, and my Document Root is at /usr/local/var/www. I am not using the Apple supplied Apache.
Here is my phpinfo.php:
Here is my phpinfo.html:
Testing PHP embedded in HTML
Testing PHP embedded in HTML
Attempting to access https://myserver/phpinfo.php displays or downloads rather than executing the PHP code. Attempting to access https://myserver/phpinfo.html displays the Title and Heading but not the PHP result. LoadModule mod_php does not appear (even commented out) in my httpd.conf file. Everything else appears to work fine. What do I need to do to enable PHP?
Herb
(31 rep)
Jun 11, 2021, 12:58 AM
• Last activity: Jul 5, 2024, 01:06 AM
2
votes
1
answers
1996
views
Codesigning PHP 8 in Monterey
Following this guide: [How to sign homebrew PHP module in macOS][1] I'm stuck on step five: >**Locate location or path of PHP module from Apache's PHP LoadModule directive.** >``` >$ grep -nir "^loadmodule.*php" /etc/apache2 >/etc/apache2/other/00-httpd.conf:4:LoadModule php7_module >/opt/homebrew/o...
Following this guide: How to sign homebrew PHP module in macOS
I'm stuck on step five:
>**Locate location or path of PHP module from Apache's PHP LoadModule directive.**
>
>$ grep -nir "^loadmodule.*php" /etc/apache2
>/etc/apache2/other/00-httpd.conf:4:LoadModule php7_module >/opt/homebrew/opt/php@7.4/lib/httpd/modules/libphp7.so
>
I keep running into the error:
>>zsh: no such file or directory: /etc/apache2/other/00->httpd.conf:4:LoadModule
>
I've located my install of PHP at the following path:
>/usr/local/opt/php@8.1/8.1.0_3/lib/httpd/modules/libphp.so
But it seems to be some sort of error with /etc/apache2/other/00->httpd.conf - there doesn't even seem to be a httpd.conf file at that location.
Any ideas?
Mou某
(891 rep)
Nov 14, 2021, 12:23 PM
• Last activity: Apr 3, 2024, 03:32 AM
8
votes
2
answers
12721
views
How to install latest php without brew or is it possbile?
I have some old mac machines that can not update to Big Sur. So when using brew to install php@7.4 brew will complain "no bottle available". I updated brew to latest 2.7.5, brew then complained, > Warning: You are using macOS 10.12. We (and Apple) do not provide support for this old version. You wil...
I have some old mac machines that can not update to Big Sur. So when using brew to install php@7.4 brew will complain "no bottle available". I updated brew to latest 2.7.5, brew then complained,
> Warning: You are using macOS 10.12.
We (and Apple) do not provide support for this old version.
You will encounter build failures with some formulae.
I tried brew build from source but that also failed. So far the only solution I can found is from https://php-osx.liip.ch/ , but https://php-osx.liip.ch/ has deprecated and only support to 7.3.8. So is it possible to install php 7.4 or latest 8.0 on these old mac ?
--- update ---
One comment suggested to use macports. I tried macports on 10.13 and installed php 7.4!
Qiulang 邱朗
(879 rep)
Jan 21, 2021, 06:33 AM
• Last activity: Oct 16, 2023, 08:13 AM
0
votes
4
answers
6096
views
mcrypt for PHP 7.4 on Catalina
First of all, I was born and raised using a PC so I'm kind of new to Mac. I was hoping if someone can help me out. I'm using Catalina and trying to get the PHP extension mcrypt installed. I've been trying to use homebrew and I'm seriously stuck. I've researched this like crazy and all the forums are...
First of all, I was born and raised using a PC so I'm kind of new to Mac. I was hoping if someone can help me out. I'm using Catalina and trying to get the PHP extension mcrypt installed. I've been trying to use homebrew and I'm seriously stuck. I've researched this like crazy and all the forums are years old or using Ubuntu. I realize that mcrypt is deprecated but Laravel requires it so here I am.
I installed PHP 7.4 using homebrew. I had to add a couple of path lines to my
~/.zshrc
file because the terminal kept saying PHP was 7.3. I run brew install mcrypt
and it downloads and "Pours" into /usr/local/Cellar/mcrypt/2.6.8
. I try to update my 7.4 php.ini file with a dynamic library path. So I try adding extension=/usr/local/Cellar/php/7.4.5_2/pecl/20190902/mcrypt.so
to the ini for PHP. I restart apache and I get:
Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php/7.4.5_2/pecl/20190902/mcrypt.so' (tried: /usr/local/Cellar/php/7.4.5_2/pecl/20190902/mcrypt.so (dlopen(/usr/local/Cellar/php/7.4.5_2/pecl/20190902/mcrypt.so, 9): image not found), /usr/local/lib/php/pecl/20190902//usr/local/Cellar/php/7.4.5_2/pecl/20190902/mcrypt.so.so (dlopen(/usr/local/lib/php/pecl/20190902//usr/local/Cellar/php/7.4.5_2/pecl/20190902/mcrypt.so.so, 9): image not found)) in Unknown on line 0
I have no idea where to go from here. Anyone have a tip?
Thanks!
cbloss793
(103 rep)
Apr 30, 2020, 07:45 PM
• Last activity: Sep 6, 2023, 01:43 PM
-1
votes
2
answers
501
views
After upgrade to Monterey, a user-created launchd job does not run
I have a launchd job that is supposed to run a php script at 6am every day. The script runs a number of backup-related tasks. After upgrading to Monterey, the task no longer starts at its scheduled time. I use Lingon X to control it. When I run it manually from Lingon X as a "test", it starts, but s...
I have a launchd job that is supposed to run a php script at 6am every day. The script runs a number of backup-related tasks. After upgrading to Monterey, the task no longer starts at its scheduled time.
I use Lingon X to control it. When I run it manually from Lingon X as a "test", it starts, but sometimes does not finish. When I run the command from the terminal, the job starts and always runs to completion.
Here is the plist:
Disabled
EnvironmentVariables
PATH
/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/jas/Keybase.app/Contents/SharedSupport/bin:/usr/local/sbin
Label
RH-backup
ProgramArguments
/opt/local/bin/php
/Users/jas/Websites/RepHunter/cron/RH-backup.php
RunAtLoad
StandardErrorPath
/Volumes/Backup1/RH-backup/dbtemp/stderr.log
StandardOutPath
/Volumes/Backup1/RH-backup/dbtemp/stdout.log
StartCalendarInterval
Hour
6
Minute
0
StartOnMount
There is never any output in either stderr.log or stdout.log.
The only suspicious pattern is that it appears that when started manually, the job often quits after a certain interval. Since the executable is a php script, the first thing I checked was whether the script was timing out.
As a test, I added set_time_limit(900) to the php script. That should not matter, as per the php documentation the script timeout does not include the time when system calls are made. The purpose of the script is to make numerous systems calls. So it should not be consuming a lot of run time on its own.
Plus this script has be working for several years without any such issues.
Any ideas?
EDIT 1:
After further testing I discovered some problems, but not the solution.
1. Having the StandardOutPath and StandardErrorPath prevents the launchd job from running. We were thinking that it was because those paths were set to external drives was causing a problem. We just removed them completely. The script then runs.
2. The script runs and calls all the external commands. There are a couple of calls to rsync to copy some files around including from remote servers. That works fine.
3. Then the script calls duplicity to extract a file from the backup set. Duplicity immediately exits without extracting the file. That makes the rest of the functions in the script pointless.
4. When the script is run from the command line, it always works as expected. It also worked as expected as a launchd job for over two years under Mojave and Catalina. Only after the upgrade to Monterey did the script lose its ability to write files.
5. As a test, I gave Full Disk Access to duplicity. That makes no difference.
6. Workaround is to run the script manually from the command line. That always works.
Why does Monterey block launchd jobs from writing files?
EDIT 2:
1. As another test, I moved all of the intermediate files into /tmp/ with the hope that if a permissions issue might be revealed. That did not help.
2. I added capturing of error output for the duplicity command. The following is the error output when run as a launchd job (sorry about the formatting--the code markup is not working for this text so I put it in as a quote):
> Traceback (innermost last): File "/opt/local/bin/duplicity", line 117, in
> with_tempdir(main) File "/opt/local/bin/duplicity", line 103, in with_tempdir
> fn() File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/duplicity/dup_main.py",
> line 1522, in main
> action = commandline.ProcessCommandLine(sys.argv[1:]) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/duplicity/commandline.py",
> line 1158, in ProcessCommandLine
> config.gpg_profile = gpg.GPGProfile() File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/duplicity/gpg.py",
> line 92, in __init__
> self.gpg_version = self.get_gpg_version(config.gpg_binary) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/duplicity/gpg.py",
> line 108, in get_gpg_version
> res = gnupg.run([u"--version"], create_fhs=[u"stdout"]) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/duplicity/gpginterface.py",
> line 376, in run
> process = self._attach_fork_exec(gnupg_commands, args, File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/duplicity/gpginterface.py",
> line 429, in _attach_fork_exec
> self._as_child(process, gnupg_commands, args) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/duplicity/gpginterface.py",
> line 468, in _as_child
> os.execvp(command, command) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py",
> line 574, in execvp
> _execvpe(file, args) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py",
> line 616, in _execvpe
> raise last_exc File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/os.py",
> line 607, in _execvpe
> exec_func(fullname, *argrest) FileNotFoundError: [Errno 2] No such file or directory
>
> GPGError: failed to determine gnupg version of None from b''
EDIT 3:
Searching on that error message "GPGError: failed to determine gnupg version ...", I found a page at https://bugs.launchpad.net/duplicity/+bug/1865427 . That page suggested that for cron jobs adding --gpg-binary with the path to gpg.
I tried that, but the launchd job still did not work.
FINAL EDIT
Prior to the Monterey upgrade, gpg was on the default path used by the launchd job, for whatever reason. Configuration changes due to the OS upgrade caused it no longer to be on that default path. So previously it was not necessary to adjust the path for the launchd script, but now it is. Fixing that up solved this issue. So marking this question as answered.
Jeffrey Simon
(585 rep)
Jul 6, 2022, 09:39 PM
• Last activity: May 6, 2023, 10:03 PM
1
votes
1
answers
7619
views
zsh: bad CPU type in executable (on Intel, not M1)
I have the reverse case of the other question with the same name (https://apple.stackexchange.com/questions/408375/zsh-bad-cpu-type-in-executable). I used the mac moving assistant to go from an M1 **to an Intel**, and the PHP that is used in my terminal seems to be for the M1 silicon, because I get...
I have the reverse case of the other question with the same name (https://apple.stackexchange.com/questions/408375/zsh-bad-cpu-type-in-executable) .
I used the mac moving assistant to go from an M1 **to an Intel**, and the PHP that is used in my terminal seems to be for the M1 silicon, because I get
zsh: bad CPU type in executable: php
How can I find and uninstall the PHP that is used by -zsh to replace it with a new php?
user59971
(265 rep)
May 1, 2023, 01:23 PM
• Last activity: May 1, 2023, 02:17 PM
1
votes
1
answers
731
views
How can I solve this cakephp/cakephp 4.2.8 requires ext-intl PHP extension error on macOS?
With a MacBook Pro, I use MAMP and I believe I already have intl PHP extension [![enter image description here][1]][1] [1]: https://i.sstatic.net/doPqb.png When i am trying to update my cakephp project via composer i am getting this error - Root composer.json requires cakephp/cakephp ^4.2.8 -> satis...
With a MacBook Pro, I use MAMP and I believe I already have intl PHP extension
When i am trying to update my cakephp project via composer i am getting this error
- Root composer.json requires cakephp/cakephp ^4.2.8 -> satisfiable by cakephp/cakephp[4.2.8].
- cakephp/cakephp 4.2.8 requires ext-intl * -> it is missing from your system. Install or enable PHP's intl extension.
Then i checked which php and result is
which php
/usr/bin/php
I tried to use composer.phar file but still same error.
How to change default php (mac os ) to MAMP?

Yogesh Saroya
(141 rep)
Aug 24, 2021, 07:19 AM
• Last activity: Apr 26, 2023, 05:52 PM
0
votes
0
answers
87
views
Unable to remove PHP old path from system
Ever since I updated my MacBook PRO from 8.0 8.2, I can't seem to symlink php or add php to path anymore. I have to give the full path. ``` $ php -v -bash: /Applications/MAMP/bin/php/php8.0.8/bin/php: No such file or directory ``` ``` $ /Applications/MAMP/bin/php/php8.2.0/bin/php -v PHP 8.2.0 (cli)...
Ever since I updated my MacBook PRO from 8.0 8.2, I can't seem to symlink php or add php to path anymore. I have to give the full path.
$ php -v
-bash: /Applications/MAMP/bin/php/php8.0.8/bin/php: No such file or directory
$ /Applications/MAMP/bin/php/php8.2.0/bin/php -v
PHP 8.2.0 (cli) (built: Dec 9 2022 09:00:24) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.0, Copyright (c) Zend Technologies
$ sudo mv /usr/bin/php /usr/bin/~php
mv: rename /usr/bin/php to /usr/bin/~php: Operation not permitted
$ sudo ln -s /Applications/MAMP/bin/php/php8.2.0/bin/php /usr/bin/php
ln: /usr/bin/php: Operation not permitted
$ export PATH=$PATH:/Applications/MAMP/bin/php/php8.2.0/bin
$ php -v
-bash: /Applications/MAMP/bin/php/php8.0.8/bin/php: No such file or directory
$ echo $PATH
blah-blah-blah:/Applications/MAMP/bin/php/php8.0.8/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/MAMP/bin/php/php8.2.0/bin:blah-blah-blah:
php -v
-bash: /Applications/MAMP/bin/php/php8.0.8/bin/php: No such file or directory
Where is php8.0.8 stoned in ? Which file do I search for ?
macOS Mojave.
anjanesh
(467 rep)
Feb 25, 2023, 07:27 AM
2
votes
1
answers
2249
views
How do I change from PHP 7 to 8 when using Homebrew?
I am running macOS 12. Homebrew reports that PHP version 8.1.12 is installed. If I type `php -v` into terminal. It reports that PHP 7.4.33 is running. How do I get version 8.1.12 to be the version that macOS Recognises?
I am running macOS 12.
Homebrew reports that PHP version 8.1.12 is installed.
If I type
php -v
into terminal. It reports that PHP 7.4.33 is running.
How do I get version 8.1.12 to be the version that macOS Recognises?
Lawrence Cooke
(178 rep)
Jan 12, 2023, 07:04 AM
• Last activity: Feb 12, 2023, 01:01 AM
0
votes
1
answers
682
views
MacPorts set PHP82 as php
I am having a problem with correctly installing PHP using MacPorts. I installed PHP8.2 using `sudo port install php`. But I can't run PHP with `php`. I have to specify the exact version `php82`. I didn't see a command for setting this, like with python. sudo port select --set python3 python311 sudo...
I am having a problem with correctly installing PHP using MacPorts.
I installed PHP8.2 using
sudo port install php
.
But I can't run PHP with php
. I have to specify the exact version php82
. I didn't see a command for setting this, like with python.
sudo port select --set python3 python311
sudo port select --set python python311
I there a port command similar for PHP?
kresdjan
(3 rep)
Dec 15, 2022, 09:39 PM
• Last activity: Dec 15, 2022, 10:52 PM
1
votes
0
answers
1298
views
I have openssl on my macOS, but when I compile PHP, I get error
I use this command compile the php on my macOS: ``` ./configure \ --prefix=/opt/php-7.4.30 \ --with-config-file-path=/opt/php-7.4.30/etc \ --with-pdo-mysql=mysqlnd \ --with-mysqli=mysqlnd \ --with-libxml-dir \ --with-gd \ --with-jpeg-dir \ --with-png-dir \ --with-freetype-dir \ --with-iconv=/opt/hom...
I use this command compile the php on my macOS:
./configure \
--prefix=/opt/php-7.4.30 \
--with-config-file-path=/opt/php-7.4.30/etc \
--with-pdo-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-libxml-dir \
--with-gd \
--with-jpeg-dir \
--with-png-dir \
--with-freetype-dir \
--with-iconv=/opt/homebrew/Cellar/libiconv/1.17 \
--with-zlib-dir=/opt/homebrew/Cellar/zlib/1.2.12_1 \
--with-bz2=/opt/homebrew/Cellar/bzip2/1.0.8 \
--with-openssl=/opt/homebrew/Cellar/openssl@3/3.0.5/\
--with-curl=/opt/homebrew/Cellar/curl/7.85.0 \
--enable-soap \
--enable-mbstring \
--enable-sockets \
--enable-exif \
--with-readline=/opt/homebrew/Cellar/readline/8.1.2 \
--disable-ipv6
and in my macOS, I do have /opt/homebrew/Cellar/openssl@1.1/1.1.1q
% ls /opt/homebrew/Cellar/openssl@1.1/1.1.1q
AUTHORS INSTALL_RECEIPT.json NEWS bin lib
CHANGES LICENSE README include share
I get below error:
Configuring extensions
checking io.h usability... no
checking io.h presence... no
checking for io.h... no
checking for strtoll... yes
checking for atoll... yes
checking whether to build with LIBXML support... yes
checking for libxml-2.0 >= 2.7.6... yes
checking for OpenSSL support... yes
checking for Kerberos support... no
checking whether to use system default cipher list instead of hardcoded value... no
checking for openssl >= 1.0.1... no
configure: error: Package requirements (openssl >= 1.0.1) were not met:
No package 'openssl' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables OPENSSL_CFLAGS
and OPENSSL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
---
**Edit-01**
Before ask this question, I have tried:
export OPENSSL_CFLAGS="/opt/homebrew/Cellar/openssl@3/3.0.5/include"
export OPENSSL_LIBS="/opt/homebrew/Cellar/openssl@3/3.0.5/lib"
export PKG_CONFIG_PATH=/opt/homebrew/Cellar/openssl@3/3.0.5/lib/pkgconfig:$PKG_CONFIG_PATH
lustre
(81 rep)
Nov 3, 2022, 12:13 PM
• Last activity: Dec 7, 2022, 11:03 AM
1
votes
0
answers
1154
views
Apache stops working after installing Homebrew PHP (which is missing on Monterey)
Hello I have followed [these instructions to configure][1] builtin Apache web server on Macos 12.1, although I have realised that PHP was removed by Apple on Monterey. As such, I have installed homebrew and installed PHP from there, however, now Apache won't work, since the instructions below are no...
Hello I have followed these instructions to configure builtin Apache web server on Macos 12.1, although I have realised that PHP was removed by Apple on Monterey.
As such, I have installed homebrew and installed PHP from there, however, now Apache won't work, since the instructions below are not commented in
httpd.conf
:
LoadModule php_module /opt/homebrew/opt/php/lib/httpd/modules/libphp.so
SetHandler application/x-httpd-php
Attempting to open localhost through Chrome, will throw:
This site can’t be reached127.0.0.1 refused to connect.
Try:
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED
Riccardo
(283 rep)
Dec 15, 2021, 02:19 PM
• Last activity: Sep 24, 2022, 09:01 AM
8
votes
4
answers
21350
views
PHP not working after upgrading to OS Mojave
When i try to open localhost it gives me 403 error message like this "You don't have permission to access / on this server." I have tried changing the permission but nothing happens. It worked fine with High Sierra but after update its not working.I am using the pre installed apache and not using th...
When i try to open localhost it gives me 403 error message like this "You don't have permission to access / on this server."
I have tried changing the permission but nothing happens. It worked fine with High Sierra but after update its not working.I am using the pre installed apache and not using third party apps like xampp

Kalpesh Shende
(83 rep)
Sep 30, 2018, 06:40 AM
• Last activity: Jul 11, 2022, 09:19 PM
0
votes
1
answers
355
views
Default PHP included with Mac - enable imagecreatefromjpg
I've uncommented gd in php.ini - but I still can't get `imagecreatefromjpg()` to work... How does one enable php with jpg support? (the default php that comes with mac - not xampp or homebrew. trying to avoid multiple installations, low disk space etc) > Fatal error: Uncaught Error: Call to undefine...
I've uncommented gd in php.ini - but I still can't get
imagecreatefromjpg()
to work... How does one enable php with jpg support? (the default php that comes with mac - not xampp or homebrew. trying to avoid multiple installations, low disk space etc)
> Fatal error: Uncaught Error: Call to undefined function imagecreatefromjpg()
ina
(929 rep)
Jan 16, 2022, 12:29 PM
• Last activity: Mar 25, 2022, 06:07 PM
Showing page 1 of 20 total questions