Questions tagged [php]

PHP is a server-side scripting language used to build dynamic web pages.

Filter by
Sorted by
Tagged with
0 votes
1 answer
42 views

How to use input variable in .zshrc alias?

I'm trying to create this alias: alias mrc="php artisan make:controller $(user_input) --resource" so that I can just type mrc ControllerName in the terminal to produce: php artisan make:...
user avatar
0 votes
0 answers
25 views

Help with upgrading PHP 7.3 to PHP 8

I switched from Windows to macOS. I got this MacBook M1 and tried to install multiple versions of PHP to switch between them. I followed the steps here for PHP installation and messed up something. I ...
user avatar
0 votes
0 answers
15 views

How can I update php on my Mac? [duplicate]

I have a MacBook Pro with macOS 10.7.5 and I want to update the integrated php from php5 to php8 or 7. How can I?
user avatar
  • 55
0 votes
0 answers
17 views

php-fpm wrong version running processes

I have multiple PHP versions installed and managed through Homebrew, and I'm switching between them and it's working fine. I have the correct version (currently PHP 8.1) in my terminal and with Apache,...
user avatar
  • 199
0 votes
1 answer
90 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 ...
user avatar
  • 641
0 votes
0 answers
137 views

Can PHPMailer send emails without configuring MacOS mail client on Monterey?

On a brand new Macbook running Monterey (M1), as PHP was removed by Apple on OS 12, I have removed all "AMP" preinstalled by Apple and installed HomeBrew "AMP" (with PHP 7.4), ...
user avatar
  • 233
0 votes
0 answers
396 views

Apache stops working after installing Homebrew PHP (which is missing on Monterey)

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 ...
user avatar
  • 233
1 vote
0 answers
32 views

after updating php apache no longer loads at localhost on osx 10.12.6

I was trying to setup myphpadmin and it said I need to update php so I update php to 7.1 from terminal. I go to localhost and it says local server refused to connect. I restart apache then i typed ...
user avatar
1 vote
1 answer
17 views

ImageMagick Convert single frame = file not found

I am trying to extract the fist frame of a video convert ./video.mp4[0] ./sample.jpg I get file not found if I put [0] it works without [0] but this is not what I want All examples on the net suggest ...
user avatar
0 votes
0 answers
157 views

PhpMyAdmin gives lots of deprecation notices

I've just installed httpd, php & phpmyadmin with homebrew. Versions are : ~ % brew info httpd httpd: stable 2.4.51 (bottled) ... ~ % brew info php php: ...
user avatar
  • 101
0 votes
1 answer
954 views

Codesigning PHP 8 in Monterey

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&...
user avatar
  • 761
0 votes
1 answer
112 views

intl PHP extension on macbook pro

In my macbook i am using MAMP and its already have intl PHP extension When i am trying to update my cakephp project via composer i am getting this error Problem 1 - Root composer.json requires ...
user avatar
0 votes
0 answers
22 views

How do I start PHP upon startup?

I have a M1 Macbook air 8gpu/16gb/512ssd/Big Sur 11.4 and just started getting into some website work. When i restart the laptop I am unable to load the local websites on my machine. I get an error: ...
user avatar
  • 41
0 votes
0 answers
11 views

Upgrade of php not working on Late 2011 High Sierra

I have a late 2011 Macbook pro and want to setup my development environment.However, am struggling with php version. It is currently set to the default 7.1.16. I was hoping to do it with brew, but I ...
user avatar
0 votes
1 answer
1k 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 ...
user avatar
  • 1
1 vote
1 answer
91 views

Where does homebrew install a legacy php version?

In order to make some old software work, I need to downgrade my PHP version from 8 to 7.4. I run this command without any problems: brew install php@7.4 ... and homebrew buzzes and whirs and ...
user avatar
  • 113
0 votes
1 answer
35 views

How to access Shortcuts for Forward and Backwards in PhpStorm when using a German keyboard on a Mac

I currently 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 + Left/Right Key. Now I read ...
user avatar
0 votes
1 answer
94 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....
user avatar
  • 1
0 votes
0 answers
65 views

Launchct GD Extension with Freetype support not working on php

I'm Running a .plist php file previously, I've installed phpbrew and use 7.3.11 php version. Then I've just installed GD extension with freetype support I can running my php files into Macos terminal ...
user avatar
0 votes
1 answer
189 views

osx port install of php74 crashes with Illegal instruction: 4

I have an issue with php74 compiled by macports that is crashing with illegal instruction 4 when i run phpunit for unit testing my project. uname -v Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 ...
user avatar
  • 195
3 votes
1 answer
2k 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 ...
user avatar
0 votes
2 answers
478 views

How can I easily run multiple sites with PHP, Apache and mySQL for free on mac?

How can I easily run multiple sites with PHP, Apache and mySQL for free on mac with OSX? I use XAMPP on Windows and it works really well. When I want to add a new site on XAMPP in windows, I only ...
user avatar
  • 101
1 vote
1 answer
40 views

Bluetooth app with XAMPP permission problem in Mac OS 11

I using a web GUI for controlling some Bluetooth devices. I use PHP shell_exec command to run our created Bluetooth terminal app. My fiction was work until Mac OS 11. My customers upgrade Mac OS 10.15 ...
user avatar
  • 11
0 votes
0 answers
595 views

.htaccess not working after upgrading to php 8

Mac OS Catalina. I was using Apache with the default PHP shipped with the OS (7.3.11). I installed PHP 8 using Homebrew, replaced the PHP module in httpd.conf, and added the following code: <...
user avatar
7 votes
3 answers
14k views

PHP Version 7.3.22 to be removed in future macOS

I just attempted to load a new development page without having created the httpdconf entry, & got the PHPinfo page with the following in the header... PHP Version 7.3.22-(to be removed in future ...
user avatar
  • 571
1 vote
0 answers
124 views

trying to install php fails because of python dependency?

I just wanted to install php on Mac brew install PHP ... ==> Installing php dependency: python@3.8 ==> Pouring python@3.8-3.8.6.catalina.bottle.tar.gz Error: The `brew link` step did not ...
user avatar
  • 695
0 votes
0 answers
519 views

env: php: Bad CPU type in executable

I Worked before on my MacBook Pro on php applications and it was work smoothly , after I upgrade it to Catalina, when i use composer update it gives me an error , after reading about it I found that I ...
user avatar
  • 101
0 votes
0 answers
494 views

Why does phpinfo() still show 7.1 after upgrading to php 7.3 on macOS Mojave (10.14.6)?

I've attempted to upgrade my version of PHP to 7.3 by running: curl -s https://php-osx.liip.ch/install.sh | bash -s 7.3 and then adding the new install to my PATH via the following line in my ~/....
user avatar
  • 101
0 votes
1 answer
926 views

exec("php -v”) vs phpinfo() -- different php version

I have upgraded PHP version on my Mac to 7.3 with a command curl -s http://php-osx.liip.ch/install.sh | bash -s 7.3 and then export PATH=/usr/local/php5/bin:$PATH When I type php -v in terminal the ...
user avatar
0 votes
0 answers
156 views

Is there a working alternative for mysql on Sierra (10.12.6) that can be used with php?

Does mariadb function properly on Sierra? I can't get mysql to work and since Sierra isn't supported by mysql I'm giving up on trying to get it to function. does anyone have Sierra working as a ...
user avatar
0 votes
0 answers
81 views

launchd running php script fails under Catalina on exec diskutil

I have a php script that worked perfectly under Mojave from the terminal and as a launchd job. After changing to Catalina, the php script continues fine from the terminal, but the launchd job fails on ...
user avatar
0 votes
2 answers
4k 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 ...
user avatar
  • 103
1 vote
1 answer
213 views

Laravel new [project] not working despite PHP, Composer, everything working

I'm trying to install laravel, but keep getting the "The Zip PHP extension is not installed. Please install it and try again." warning. Here's the thing: I've installed php7.3, entering 'composer' ...
user avatar
1 vote
1 answer
1k views

Installed Apache 2.4 (httpd) using Home Brew, can I get it to use macOS' php7?

I'm running macOS 10.15 (Catalina) and have installed the latest Apache (2.4.43) using brew, basically following these steps. Seems to be working fine, but now I want to enable PHP 7 in Apache as ...
user avatar
  • 1,309
1 vote
1 answer
344 views

Extensions are disabled in `php.ini` and they still show up on `phpinfo.php`... why?

So, I finally decide it to switch from windows to Mac after 20 years, and I love it! I have so many questions... I've installed apache, php, mysql, imagemagick using homebrew and I have a couple of ...
user avatar
  • 111
0 votes
0 answers
241 views

How to change the version of PHP used in the web browser on the OS X Server?

I am running OS X 10.12.6 on a Mac mini as a server that includes a WordPress site in addition to several web apps that utilize PHP, but version 5.6 is the one installed. I have been doing ...
user avatar
2 votes
1 answer
1k views

PHP not running after upgrading to Catalina

I've followed all the tutorials, updated httpd.conf and other files. Apache works fine but PHP does not seem enabled. Pointing to php_info.php => <?php phpinfo() ?> I formerly ran High Sierra ...
user avatar
1 vote
1 answer
204 views

502 Proxy error when trying to use Homebrew php72 with Server.app websites

I'm having a puzzling issue with a website on macOS server (server.app 5.6, High Sierra 10.13). All works fine when the url length is below 70 characters. 70 and up and I'm getting a Proxy error. The ...
user avatar
0 votes
0 answers
500 views

Change PHP on MacOS Server, High Sierra

I am using MacOS Server 5.6.1 running on a Mac Mini with High Sierra (10.13.6. It works completely fine and I've been hosting few Wordpress websites on it without any major troubles for couple of ...
user avatar
0 votes
1 answer
5k views

Unable to edit config.inc.php in the phpmyadmin configuration

I'm trying to edit a file on my mac. The file is config.inc.php of XAMPP located in /opt/lampp/phpmyadmin. Permission of the folder and file: Phpmyadmin -> drwxr-xr-x 12 root wheel 4096 Config.inc....
user avatar
5 votes
2 answers
2k views

Developer not identified error when logging in Oracle Instantclient on Catalina

I have the Oracle Instantclient installed (PHP needs it for the oci extension to work), the install directory is /opt/instantclient_19_3 and every time I log in after a reboot I get the following ...
user avatar
  • 160
2 votes
0 answers
174 views

Mac Terminal Slow after upgrading to PHP7.3

I had my Mid 2013 macbook air running Mojave (10.14.5) with PHP 7.1.23 updated to PHP 7.3 from https://php-osx.liip.ch/ using the command curl -s https://php-osx.liip.ch/install.sh | bash -s 7.3 . ...
user avatar
  • 121
0 votes
1 answer
892 views

How do I fix macOS Mojave httpd syntax error in a localhost setup?

System details: OS Host: Mac OS Mojave PHP: 7.1.23 I am trying to set up my local server on a new Mac. I have been following the following instructions on https://discussions.apple.com/docs/DOC-...
user avatar
2 votes
1 answer
56 views

PHP won't include files properly since updating to Mojave

On our office Mac, we have a local Apache server running through the software AMPPS. Prior to updating to Mojave, everything was working correctly. Now, after updating, there is an issue with using ...
user avatar
  • 123
1 vote
1 answer
3k views

Stuck in upgrading PHP version on localhost Mojave

I'm trying to get PHP7.2 working on localhost, but phpinfo() keeps saying 7.1.19 is in place while ~php -v tells me PHP7.2.18 is in place. I run ~php -v it says: PHP 7.2.18 (cli) (built: May 2 ...
user avatar
1 vote
1 answer
444 views

Tracing PHP process killed on Mac does not work

I'm running a simple PHP process that uses a tiny bit of memory and CPU. The max memory limit is 2G and the script is run from console. The memory used never exceeds 200 MB. CPU use fluctuates ...
user avatar
0 votes
0 answers
2k views

Mcrypt Extension for Mojave's PHP 7.1 not using brew

I'm using macOS Mojave (10.14.3) and it already has apache2 and php 7.1 which are setup. I want mcrypt installed but all the info on the internet including this uses brew. I didn't install php using ...
user avatar
  • 361
1 vote
1 answer
186 views

launchd is not passing arguments to my PHP script

I'm having a weird problem. I use launchd to run a bunch of shell scripts that update content on my site. It was working fine when it was just calling scripts normally. But now I made the script a ...
user avatar
  • 1,628
1 vote
0 answers
591 views

Installing and using CodeIgniter on macOS?

I followed this tutorial online and I'm currently running macOS High Sierra. I tried a simple rest API using PHP and now I'm trying to implement it using CodeIgniter3.x framework. The one I created ...
user avatar
0 votes
3 answers
426 views

Give local PHP Full Disk Access in Mojave

I have a PHP webpage running on the local apache installation. The page uses shell_exec to access the messages/chat.db via sqlite3. shell_exec("sudo -u ben sqlite3 ~/Library/messages/chat.db \"...
user avatar