mamp

How to get Xdebug to work on a Mac

你。 提交于 2019-12-11 06:47:04
问题 I have spent a lot of time on this with no end product. Installed MAMP. Found "make" (was installed in different folder) Installed autoconf which was missing so I can run phpize Downloaded, compiled and installed xdebug according to: http://www.xdebug.org/find-binary.php Made necessary changes to correct php.ini. Restarted MAMP - but phpinfo() does not show xdebug. No matter what I do to the php.ini file located at /Applications/MAMP/conf/php5.3/php.ini, nothing changes. The site still loads

PDOexception - 'could not find driver'

99封情书 提交于 2019-12-11 04:47:17
问题 I woork on my local site with MAMP. Everything was going right till yesterday. Now, when I run my code, I get a : "Fatal error: Uncaught exception 'PDOException' with message 'could not find driver'..." It seems that I have non installed driver but it worked well until this day. How can I fix this problem ? Best, Newben 回答1: I had a similar problem. Sfblaauw's solution didn't work but it helped me identify the problem. First I installed php5-mysql using MacPorts: sudo port install php5-mysql

Why doesn't PHP see MAMP's MySQL PDO driver?

倖福魔咒の 提交于 2019-12-11 04:12:52
问题 Out of the box I only see sqlite under PDO drivers from phpinfo() . I saw the extensions folder is correct which has pdo_mysql.so . My php.ini has: extension=pdo_mysql.so Not sure why PHP is only registering the one driver. Meanwhile I know the MySQL server is running fine via MAMP by connecting in workbench. This is all in PHP 5.6.2. EDIT So I have PHP installed from default on my Mac. I also have MAMP which puts PHP in a different location. For example php -v will give me 5.4, for the

404 error for mod_rewrite using SSL and MAMP

隐身守侯 提交于 2019-12-11 03:29:45
问题 I am building an app in Zend Framework at the moment and testing it all locally. I have Mamp Pro as my web server and I have a self-signed SSL which all seems to work. My problem comes when I try to do mod_rewrite - I just get 404 pages. The way I have things set up (which may not be the best way...) In Mamp I have 2 virtualhosts set up both pointing to the same web directory (webroot/public/): secure.myapp.com myapp.com In my public directory is my index.php file and my .htaccess file. The

AFTER MySql restart : #1452 - Cannot add or update a child row: a foreign key constraint fails

半城伤御伤魂 提交于 2019-12-11 03:23:15
问题 AFTER MySql restart i get the this error when I try to update or insert a row : #1452 - Cannot add or update a child row: a foreign key constraint fails. The strange thing is that when I remove and add the key constraint again with phpMyAdmin the problem is gone. Also this I only have this problem with MAMP, not with WAMP, and also not on any other server until now. I use MySQL 5.5.9 , can anyone give a solution for this ? Thanks, Peter 回答1: I had the same problem with MAMP :/ I don't know

Where is the index.* file that is served as the MAMP start page URL?

那年仲夏 提交于 2019-12-11 02:39:53
问题 I'm trying to understand how MAMP manages the Apache web server but I cannot find the index.* file that is being served as the MAMP start page. The virtual hosts configuration, httpd-vhosts.conf , is not included and Applications/MAMP/htdocs contains only my own site so how/where is http://localhost/MAMP/?language=English configured? The preferences for my installation of MAMP show that the 'Start page URL' is /MAMP/ , is that an alias for another directory? 回答1: Instead of MAMP/htdocs like

how to display errors on MAMP?

倾然丶 夕夏残阳落幕 提交于 2019-12-11 02:35:12
问题 I have MAMP, and I don't know how to display errors on it, when I have error on my php code it shows only blank pages, i have searched on Google, and I saw that I have to change it to display_errors = on on all of the folders and versions... and include this on my page: error_reporting(E_ALL); ini_set('display_errors', 'on'); 回答1: Stop your server. Go to Applications/Mamp/bin/php/phpVERSION/conf/php.ini Set error_reporting=E_ALL display_errors=On Start your server. If this doesn't help -

How to install the mysqlnd driver with MAMP?

倖福魔咒の 提交于 2019-12-10 21:49:50
问题 Ive done a lot of online research, but I haven't found much on this, which I dont understand. But it seems that the mysql native driver doesn't come with the MAMP stack. For instance the mysqli get_result method doesn't work out of the box. I thought this was an error in my installation but after a clean reinstall the method still doesn't work, so apparently the driver is not install. It seems weird that there is so little material on the topic because a lot of people must be testing local

Connecting to MYSQLi through Terminal in Mac OS using MAMP

梦想与她 提交于 2019-12-10 19:45:27
问题 I am trying to run my PHP script via Terminal in Mac. When I try to run the script, I am getting this error: Warning: mysqli_connect(): (HY000/2002): No such file or directory This is how I am trying to connect: mysqli_connect('localhost','root','root','my_db'); I also tried to connect using the host: 127.0.0.1 instead of localhost and I then got this error: Warning: mysqli_connect(): (HY000/2002): Connection refused From what I've read online it might have something to do with mysql socket,

Sessions don't work on MAMP

匆匆过客 提交于 2019-12-10 19:24:46
问题 I'm using MAMP, but I have a problem with session. My code works perfectly on WAMP, but doesn't work on MAMP and I don't no why. I looked the phpinfo but there are the same for the session between MAMP and WAMP. PHP log file : [01-May-2012 12:18:28] PHP Warning: session_start() [<a href='function.session- start'>function.session-start</a>]: Cannot send session cookie - headers already sent by (output started at /Applications/MAMP/htdocs/Website/index.php:7) in /Applications/MAMP/htdocs