I follow this ticket : http://blog.geertvd.be/2011/05/18/installing-the-intl-extension-on-mamp/.
When i reboot my MAMP server, and i execute a phpinfo(), the intl extension was not loaded.
I don't understand why. I have completed the good php.ini file (In my case : /Applications/MAMP/bin/php/php5.3.14/conf/php.ini, and i have the moved the intl.so) I have no error.
Thanks in advance.
I have found my problem. In fact i use MAMP Pro, and to edit php.ini file we have to click on File > Edit Config > Php ... And your configuration is ok after a restart !
Related
Got a problem I need to get working. I'm having difficulty getting NetBeans 12.2 to connect to Xdebug. When I try to debug I get the dreaded "Waiting For Connection (netbeans-xdebug)" which never connects. I'm running the following:
PHP version 8.0.2
Apache 2.4.46
Xdebug 3.0.3
I've read some of the other threads e.g.
netbeans shows "Waiting For Connection (netbeans-xdebug)"
Netbeans waiting for connection to XDEBUG
but they are for older versions of Xdebug and the solutions don't seem to work/commands are not the same. Having read the documentation and reading a solution in another threat my php.ini file has this at the end:
[xdebug]
zend_extension = C:\xampp\php\ext\php_xdebug-3.0.3-8.0-vs16-x86_64.dll
xdebug.client_port = 9003
xdebug.remote_handler = "dbgp"
xdebug.client_host = "localhost"
xdebug.mode=debug
xdebug.start_with_request=yes
When I click debug and run netstat I can see port 9003 is listening, but for some reason this just won't connect. I need this for work so I'm hoping someone can help a noob out? Best regards.
I had the same problem, and these are the steps how i solved it:
I reinstalled XAMPP, because I ruined my php.ini file due to configurate it too many times.
Then I followed the steps from the Xdebug homepage. You can overread it fast if you don't focus.
2.1 Download the .dll File and place it in your "Xampp/php extension directory" (C:\xampp\php\ext)
2.2 Name it to: "php_xdebug.dll"
2.3 Open the php.ini File (C:\xampp\php\php.ini)
2.4 Implement following line: "zend_extension = xdebug"
Note: I don't know if the order is important but for just in case put this Line under the following line: ";extension=shmop"
2.5 Activate the step debugger with implementing following lines:
"xdebug.mode=debug" (tells that
"xdebug.start_with_request=default"
Note: Here the same, put these lines under the following line: "extension=php_ftp.dll" (You can search for it, with the right editor)
Now you are finished with the php.ini file and can start with the Netbeans configuration.
The debug configuration in Netbeans (Tools > Options > PHP > Debugging):
Netbeans configuration
The project properties in Netbeans (right-click on project > properties):
Sources
For Source and Project Folder I entered the same directory, in this case my Project.
(right-click on project > properties > Run Configuration):
Run Configuration
Links:
https://xdebug.org/docs/step_debug
https://xdebug.org/wizard
My PHP xdebug config:
myphpinfo() - xdebug_config
Note: Step Debugger has to be enabled
PS: I tested this config. with PHP-8 and xdebug-3 and as "localhost" on Windows 10. It doesn't work for older versions!
I hope it solves your problem, i would be happy about a feedback!
There can be many reasons:
1.Missing php ini config
xdebug.idekey=netbeans-xdebug (or the value from netbeans settings - Session Id)
~ I think that form a specific version of netbeans 12.* this has been removed, but still you can give it a try
try to configure the path mapping
Map the xamp simulated server path to the real path on your computer
To see your server path you could try to do a var_dump($_SERVER['DOCUMENT_ROOT').
It must be written as in linux format using '/' sepparator.
3.Optional If you are debugging with chrome check if the netbeans connector addon is enabled. Try to debug also with other browsers like firefox or edge to see if there is a difference.
I am working on some stuff for mongodb and when I try to launch Apache using XAMPP an error occurs: "The procedure entry point compiler_globals_offset could not be located in the dynamic link library D:\XAMPP\php\ext\php_mongodb.dll" I do have a comment in php.ini (D:\XAMPP\PHP) that targets it: extension=php_mongodb.dll. The launch does work if I comment the extension=php_mongodb.dll
Thanks for your help.
I run into the same issue. But than I saw, that I had chosen the DLL for a wrong php version.
Just check for your self if you download the dll for the right php version
I have a folder on my Desktop named work where I keep all my php projects. I use MAMP and all projects are set to work on virtual hosts, for example, if I have a project named test I access this project on this URL http://test.dev.
Everything went ok until I updated to macOS Catalina when I started to have this error.
(1)Operation not permitted: Can't open directory for index: /Users/username/Desktop/work/php/development/projectname.
I set the permissions to the work folder and all subfolders to be read & write for my user and staff group, I tried all the terminal permission
commands: chmod 777, 755, etc.
I had the same problem like you, and I spent many days to solve it by doing:
stop MAMP, then open terminal and type
sudo /Applications/MAMP/bin/startApache.sh -> then Enter
and then type your admin password to give apache full privileges to start apache. (this way can let MAMP read any files on your Mac, include external drives)
now you can open MAMP and see that Apache is started, then click Start on MAMP app to start MySql too.
I've solved doing the following operations:
Quit MAMP and all the applications that are using mySql and Apache Server (stop all the instances)
Go to System Preferences, Systema & Privacy, Full Disk Access Tab
Click "add" and go to /Applications/MAMP/Library/bin and add apachectl
Run this command from the terminal: sudo /Applications/MAMP/bin/startApache.sh\
Open MAMP and press the Start Servers button
now you should be able to start your localhost app
This could be due to wrong permission given by the new MacOS Catalina permission manager. A possible way to solve this issue is to check if the folder in which the project is stored can be accessed by your Application.
To do this you have to:
Go to System Preferences
Go to System & Privacy
Go to Files and Folders
Be sure that the folder of your project is checked in the subsection concerning your Application
I hope this could solve your problem.
Prior to the steps below I added Full disk access to MAMP under the Security and Privacy Folder.
The steps I did after:
Stop MAMP
Open terminal
Then type: /Applications/MAMP/bin/startApache.sh
Start MAMP
Incase it wont work, try on the terminal: /Applications/MAMP/bin/stopApache.sh and then /Applications/MAMP/bin/startApache.sh
I had a similar problem with XAMPP. Apache just lost access to my external drive, which I included via a symlink. Even giving "Full Disk Access" to the httpd webserver didn't help.
The final solution was to start Apache with the sudo command:
sudo Applications/XAMPP/bin/apachectl start
did the job for me. Please note that
sudo apachectl start
would start the Apache that comes with macOS and thus wouldn't be used with XAMPP (and MAMP as well, I guess).
I switched from Lighttpd server to WAMP and then found sockets in php are not working. But php is configured and working. (phpinfo() works) I removed the comment for the php_sockets.dll in php.ini # C:\wamp\bin\php\php5.2.5.but still gives the error "Fatal error: Call to undefined function socket_create()". Any more configurations to do to enable sockets in php in WAMP? (php_sockets.dll is there as well, I've checked)
Thank You!
Apparently there are two php.ini files - and the command line uses a different one to the Apache server.
find the line ;extension=php_sockets.dll and remove the semi-colon from both files.
The Apache php.ini file is located at:
X:\WAMP INSTALL DIR\bin\apache\Apache2\bin\php.ini
The command prompt php.ini file is located at:
X:\WAMP INSTALL DIR\bin\php\php.ini
Worked straight away for me...
Title is misleading - in your case PHP soockets are merely not available.
I removed the comment for the php_sockets.dll in php.ini # C:\wamp\bin\php\php5.2.5
Did you check that is the .ini file which PHP is using at runtime?
Did you restart the webserver?
Have you got all logging enabled?
Do you get startup errors?
C.
Left click wamp->PHP->PHP Extensions->php_sockets
I haven't been able to find any resources on how to do this.. Anyone have any ideas or resources?!
I've tried changing the ./configure options and I'm solving things one at a time but it seems like this method could take forever.. My current error is..
checking for jpeg_read_header in -ljpeg... no
configure: error: Problem with libjpeg.(a|so). Please check config.log for more information.
I'm running Snow Leopard.
Any help would be great,
Matt Mueller
I know this is an old question- but still relevant.
I'm updating my MAMP and am keeping up to date on PHP's stable releases by using a guide I found at davidgolding.net
The Guide goes as follows:
First, run the
phpinfo()
function in a PHP script on your localhost or go to PHPMyAdmin and hunt down the configuration page. You should see a large chunk of configuration markup at or near the top:
'./configure' '--with-mysql=/Applications/MAMP/Library'
'--with-apxs2=/Applications/MAMP/Library/bin/apxs'
'--with-gd' '--with-jpeg-dir=/Applications/MAMP/Library'
'--with-png-dir=/Applications/MAMP/Library' '--with-zlib'
'--with-freetype-dir=/Applications/MAMP/Library'
'--prefix=/Applications/MAMP/bin/php5' '--exec-prefix=/Applications/MAMP/bin/php5'
'--sysconfdir=/Applications/MAMP/conf/php5' '--with-soap'
'--with-config-file-path=/Applications/MAMP/conf/php5'
'--enable-track-vars' '--enable-bcmath' '--enable-ftp' '--enable-gd-native-ttf'
'--with-bz2=/usr' '--with-ldap' '--with-mysqli=/Applications/MAMP/Library/bin/mysql_config'
'--with-sqlite' '--with-ttf' '--with-t1lib=/Applications/MAMP/Library'
'--enable-mbstring=all' '--with-curl=/Applications/MAMP/Library' '--enable-dbx'
'--enable-sockets' '--enable-bcmath' '--with-imap=shared,/Applications/MAMP/Library/lib/imap-2006i'
'--enable-soap' '--with-kerberos' '--enable-calendar'
'--with-pgsql=shared,/Applications/MAMP/Library/pg' '--enable-dbase'
'--enable-exif' '--with-libxml-dir=/Applications/MAMP/Library'
'--with-gettext=shared,/Applications/MAMP/Library' '--with-xsl=/Applications/MAMP/Library'
'--with-pdo-mysql=shared,/Applications/MAMP/Library' '--with-pdo-pgsql=shared,/Applications/MAMP/Library/pg'
'--with-mcrypt=shared,/Applications/MAMP/Library' '--with-openssl'
Copy and paste this whole chunk into your text editor and remove the single quotes (search and replace should do it). Look for the flag
--with-pdo-mysql=shared,/Applications/MAMP/Library
and replace it with:
--with-pdo-mysql=/Applications/MAMP/Library
If you don’t do this, you might end up with an error.
ld: symbol(s) not found
Finally, add the following flag to the end:
--without-iconv
After you have downloaded the latest PHP release of your choosing from PHP Sources Snapshots,
cd
to the downloaded directory in Terminal. Paste your reformatted configuration string (all of it, including the beginning ./configure command) and run it.
After the configuration phase is finished, run:
$ make
$ sudo make install
Relaunch MAMP, and you’re good to go.
The current version (1.9) of MAMP / MAMP PRO includes PHP 5.3 and is available on the MAMP download page.
This is bound to cause a lot of headaches. The simplest solution is to navigate over to the mamp website and grab the latest version of the application. Download it, hit the install button and you will find your php version has been updated to the latest version...
Hope this helps, I spent quite a bit of time fiddling about with upgrading PHP before I actually looked :S
I don't know if MAMP has changed its configuration in the last few years but none of the solutions here helped me. What I did, and what worked right away was:
Download the PHP version you want from MAMP
Unzip it and move the new PHP folder into the MAMP/bin/php folder where you will see other subfolders with names like php5.3.7
Restart MAMP
Go to the PHP panel under Server in MAMP and choose the new verion of PHP from the drop menu
Start MAMP.
reinstall whole MAMP is very safe. You dont even need to take a copy of old MAMP. the new install does it on its own. just feel free to download new MAMP and click install. only care u need to take is this
Edit httpd.conf and open up line to include vhosts.conf and copy old vhosts.conf from old MAMP folder.
Goto MAMP Download page
then choose
an update from the Heading
"Additional PHP versions for MAMP PRO 2.2"