FAQ Database Discussion Community


Laravel 5 - Remove public from URL

php,.htaccess,laravel,mamp,laravel-5
I know this is a very popular question but I haven't been able to find a working solution for Laravel 5. I've been trying to migrate from Codeigniter for a long time, but this convoluted installation process keeps putting me off. I don't want to run a VM, this just...

Entering data into mysql database using php

php,mysql,forms,mamp
Customer will complete a form and enter a pathway where they will want the CSV to be exported to. The pathway is entered using the top section of the php (below): <form action="register.php" method="post"> Enter file pathway where CSV will be saved: <input type="text" name="username" required="required"/> <br/> <input type="submit" value="Enter"/>...

Can't install mysql2 Gem on MAMP

ruby-on-rails,ruby,mamp,mysql2
After running bundle install, I got this error. I've tried editing the /etc/paths file and it still hasn't worked. Gem::Ext::BuildError: ERROR: Failed to build gem native extension. /Users/adam/.rvm/rubies/ruby-2.1.5/bin/ruby -r ./siteconf20150224-4249-ltvvu1.rb extconf.rb checking for ruby/thread.h... yes checking for rb_thread_call_without_gvl() in ruby/thread.h... yes checking for rb_thread_blocking_region()... yes checking for rb_wait_for_single_fd()... yes checking...

DB connection issue when trying to connect with Zend Framework Abstract.php No Such File Or Directory

php,mysql,sockets,zend-framework,mamp
I am trying to setup a ZF1 application on my local machine using MAMP. I am attempting to run the Ruckusing Database migrations, however it appears that ZF1 cannot connect to my DB. This is the command I am running and the error I get. crmpicco-MacBook:confirmation crmpicco$ php vendor/ruckusing/ruckusing-migrations/ruckus.php db:migrate...

my.cnf has no effect in MAMP 3

mysql,mamp,my.cnf
I'm trying to set the max_allowed_packet variable in MySQL (MAMP 3.0.6). I have created my.cnf in /Applications/MAMP/conf with the following content: [mysqld] max_allowed_packet = 256M I have restarted MAMP but the changes refuse to pick up. PHPMyAdmin still shows 4,194,304 for "max allowed packet" in the "Variables" section. What am...

php.ini display_errors = Off but still showing errors

php,.htaccess,mamp
I want to disable all php-warnings, errors, notices, etc. so ajax-requests don´t fail when there is an error in a script (in dev-mode). In php.ini I´ve set display_errors = Off, and in phpinfo() display_errors shows as off (both local & global). But in my scripts I still get error-warnings. I...

PHP Query issue in setting values?

php,mysql,sql,mamp,haversine
Quick question. I've got a SQL query which works with my database. However, I am to sure how to set parameters in my PHP file so that it works with my query? Any Ideas? I'm having trouble with the Set parameters in terms of php and making my query work....

How to start using MAMP and Python for a PHP developer?

python,mamp
So I've been developing using PHP and mainly working on WordPress sites. I need to learn python at the moment. I've read online a lot, and although they provide easy tutorials on how to learn the language of python, I need to learn how to get started with its development...

Configure MAMP to treat each directory in Htdocs as Root in Apache mod_redirect

apache,.htaccess,mod-rewrite,mamp
The issue is that when using MAMP for local development, the .htaccess file needs to differ in that the RewriteBase needs to specify the subdirectory for the specific site (as shown here on SO). Is there a way to configure MAMP MAMP/conf/apachehttpd.conf so that each virtual site gets it's own...

Logs symfony in Mamp

php,symfony2,mamp,phpstorm
I use Mamp to work with Symfony, but I I can not see the logs For Example public function indexAction () { $user = news User(); $form = $this->createForm(new UserType(), $user); return array( 'formUser' => $form->createView() ); } In this example I misspelled the new User() with news User(), but...

MAMP unable to insert data into database with PHP

php,apache,mysqli,mamp
I've been struggling with this problem for a really long time. The phpmyadmin of MAMP doesn't allow me to insert data into database with php. I use object oriented style mysqli, which works as following: $sql = "INSERT INTO data(dataid, pic, sen) VALUES('$i', '$pic', '$sen')"; if ($conn->query($sql)) { echo "success<br...

Passing GET variables to shell_exec in PHP

php,shell,get,mamp
I'm trying to run a shell script in PHP on my server that use youtube-dl to download a video. My code look like this: <form action="download.php" method="get"> <input type="text" name="link"><br> <input type="submit"> </form> and my download.php look like this: <?php $link = escapeshellarg($GET["link"]); $output = shell_exec('/Applications/MAMP/cgi-bin/youtube-dl ' .$link. ' 2>&1');...

Allow clients to run multiple simultaneous PHP requests

php,mamp
How can I allow one client to run multiple simultaneous PHP requests? I've been googling a lot. I tried session_write_close() at the top of my PHP script. I tried to edit the httpd.conf but nothing bites. What should I do?...

how to set php-rewrite on mamp?

php,codeigniter,mamp
I am using mamp on my mac for php devolpement. For several days ,I want to set my php-rewrite on mamp;on my windows ,i have set php-rewrite successfully 2 months ago. Now , the php-rewrite works ,I can visit my page without index.php in URL but, I can't visit .html...

Test emails locally with mamp

php,email,localhost,mamp,codekit
First thing first, i'm totally new to this kind of localhost server setup and i've been spending the last couple of days trying to figure this out, but with no luck. I'm developing a php website with an email form. I'm on a MAC using codekit and MAMP FREE and...

Set up a Django Project with Mamp?

python,django,mamp
I just downloaded a newer version of MAMP (3.2.1) and i noticed that this Version has Python installed and also seems to handle SQLite Databases. Shouldn't I be able to manage Django Projects with it? Where and how would i install it? I found some Posts in the Web (before...

PHP PhantomJS not loading in class through Composer

php,composer-php,mamp
I've followed the installation guide for PHP PhantomJS. When running a test script using PHP PhantomJS, I'm getting the error: PHP Fatal error: Class 'JonnyW\PhantomJs\Client' not found in ... I haven't used Composer before, so I maybe overlooking something. I'm running this from MAMP, so there may be some specifics...

Setting up BlackFire.io on a MAMP Pro installation (Mac OSX)

php,mamp
I'm having a great deal of difficulty getting BlackFire.io up and running locally on my my Mac OSX (10.10) and MampPro (3.2.1) setup. I've been able to follow most of the instructions successfully, but have believe that OSX's native PHP/Apache install is taking some of the installation commands and not...

How to align my PHP version on my Mac with the PHP version installed in MAMP during Laravel installation?

php,osx,laravel,mamp
I am installing Laravel on Yosemite, with PHP installed under MAMP. I have already installed Composer in Terminal successfully. The problem is that I have an older PHP version on my system (PHP 5.5.20 (cli)), while the PHP version in MAMP is 5.6.7. As a result, I have the following...

MySQL w/ MAMP - Symbolic link disappears after I quit MAMP

mysql,osx,mamp
How can I change my MAMP mysql.sock file path from /Applications/MAMP/tmp/mysql/mysql.sock to something else that doesn't get deleted whenever I quit MAMP or restart the computer? I'm running Mac OS X Yosemite. Details: MAMP / MySQL socket file gets erased every time I quit MAMP. This is understandable, given that...

how to override mcrypt path in iMac 10.10.3 in Mamp

php,mamp,mcrypt,imac
iMac: 10.10.3 (imac has two users) Mamp: 3.2.1 PHP: 5.6.7 sh-3.2# which php /usr/bin/php sh-3.2# sh-3.2# cd ~ sh-3.2# ls .CFUserTextEncoding .composer .sh_history .forward Library sh-3.2# touch .bash_profile sh-3.2# ls .CFUserTextEncoding .composer .sh_history .bash_profile .forward Library sh-3.2# nano .bash_profile sh-3.2# inside .bash_profile export PATH=/Applications/MAMP/bin/php/php5.6.7/bin:$PATH restart terminal: done restart mac: done...

Where command for MYSQLnd install must be used?

php,mysql,mysqli,mamp,mysqlnd
I must use this command to install MySQLnd on OS X. But I can't understand where exactly must I use it? ./configure --with-mysql=mysqlnd \ --with-mysqli=mysqlnd \ --with-pdo-mysql=mysqlnd \ [other options] ...

Running Composer with MAMP: Unable to load dynamic library mcrypt.so

php,composer-php,mamp,mcrypt
I am attempting to get composer running on my Mac and using MAMP. I installed composer using sudo curl -sS https://getcomposer.org/installer | phpmamp So, in .bash_profile, I've added the following alias alias phpmamp='/Applications/MAMP/bin/php/php5.5.14/bin/php' After installing, I also moved composer.phar to /usr/local/bin/composer Now I try to run composer and I get...

Chrome on OS X doesn't respect etc/hosts and/or httpd-vhosts.conf localhost subdomains

osx,apache,google-chrome,localhost,mamp
this is a situation that's been bugging me a lot the past few days. i have a lot of dev environment subdomains set up in my etc/hosts file like so... 127.0.0.1 localhost 127.0.0.1 sub.localhost 127.0.0.1 another.localhost 127.0.0.1 andanother.localhost 255.255.255.255 broadcasthost ::1 localhost fe80::1%lo0 localhost and then specified in my Applications/MAMP/conf/apache/extra/httpd-vhosts.conf...

PDO/MySQL connection using MAMP

php,mysql,pdo,mamp
I'm trying to code a simple CMS but got stuck when doing the PDO connection getting the try/catch error. I'm quite sure the error comes from MAMP when using PDO but I have no idea how to fix it. The code I've wrote is the following: includes/connection.php <?php try {...

How do I install ruby gems on OS X without rails? [closed]

php,ruby-on-rails,ruby,capybara,mamp
I'm trying to install the capybara gem on OS X. The issue is I am running MAMP, and do not wish to run rails due to potential conflicts. How can i install a gem? Where would a Gemfile even be without a application folder?

How to access my server MySql from IOS simulator to retrieve data swift

php,ios,mysql,swift,mamp
What could be wrong with this code, I'm trying to get into my MAMP sever which is turned on, I have one php file in the server where I'm testing the connections and such, this: <?php header('Content-type: application/json'); if($_POST) { $username = $_POST['username']; $password = $_POST['password']; echo $username echo $password...

How to find server id with MAMP

mysql,mamp
MySQL manual holds that the function UUID_SHORT() is guaranteed to be unique if the following conditions hold (list not extensive): The server_id of the current host is unique among your set of master and slave servers server_id is between 0 and 255 I'm using UUID_SHORT() on several MAMP servers. How...

Mysqli multi_query not executing all queries

php,mysql,mysqli,mamp,multi-query
I'm updating or inserting multiple rows in database tables using Mysqli and multi_query. They work fine when I use them on my local MAMP server but break down when I take them online. On the remote server only three of the four queries are performed... Both environments have PHP and...

Error Starting MySQL after Crash

mysql,innodb,mamp
I was merrily installing wordpress with MAMP pro when my Mac crashed. Now I cannot start MySql. Most stuff I read online tells me to throw some terminal commands at it, trying to kill the process. killall -9 mysqld But terminal report "No matching processes belonging to you were found"...

MAMP : Apache not starting while httpd is already running

php,osx,apache,mamp
I have strange problem here. I was installing mcrypt on my mac running yosemite and MAMP 3.0, PHP 5.6.1 Extension seemed like installed successfully. But when I restarted mac, MAMP was unable to start Apache, while mysql was running very fine. I came to know that port 80 in blocked....

How to check that the audio files in a directory match the file names stored in a MySQL database

php,mysql,mamp
I have set up a database that contains the file names of several audio files. The same audio files are in English and French. Firstly the customer will import their list of file names (in a CSV) into the database. Then using a drop box method, they will drop their...

Trouble installing MAPP Stack as Root user in OSX

apache,terminal,mamp,osx-yosemite,bitnami
trying to install bitnami mappstack as root user on osx. I follow the direction on their help page to a 't', but I keep getting a 'command not found' error when I try to run the installbuilder.sh as a super user. I'm not very good with the terminal. What the...

MAMP PRO - Trouble making hosts file accessible on Windows

windows,mamp,hosts
Today I've been starting to use MAMP PRO for Windows, it's in alpha right now. But im trying to make Dynamic DNS work, which doesn't seem to work for me. Every time I start up MAMP PRO, I get the following error: MAMP PRO has detected that access to hosts...

Webpage stopped responding to external CSS changes

html,css,mamp
I'm currently working on developing a website on my computer, and I've been very successful at working on my html and external stylesheet for some time. The results don't come out the way I want, but at least the code is doing what I tell it to do. However, I've...

Error Connecting to Database via PHP

php,mamp
I am trying to connect to my database via PHP but get blank page when I run through Safari(http://pushchat.local:11111/test/databasename.php) I can see my datbasename.php file under http://pushchat.local:11111/test/ as shown below: Following is my PHP code: try { if (!defined('APPLICATION_ENV')) define('APPLICATION_ENV', getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : ‘development’); require_once '../api_config.php'; $config = $config[APPLICATION_ENV];...