• Awning Works 1
  • Socaz 2
  • Socaz 1
  • Randy Montana 3
  • Randy Montana 2
  • Randy Montana 1
  • Rodgers & Hammerstein 3
  • Rodgers & Hammerstein 2
  • Rodgers and Hammerstein 1
  • Love Fine Art
  • Oct
  • 10
  • 2011

PHP and MySQL command line with MAMP on OSX

Posted by admin In MAMP, MySQL, PHP, UNIX / LINIX | No Comments »

I found a handy article named

Getting command line access to PHP and MySQL running MAMP on OSX

by  Joaquin Lippincott .

It was very helpful for getting PHP and MySQL acces from the terminal on a mac.

In addition, one of the comments by Matthew Bacon was about getting the ZEND FRAMWORK up and running with the command line. I have copied it here for your convenience. I hope this helps someone.

Posted by Matthew Bacon on

To anyone who is having problems getting Zend_Tool working on their MAC OS X (10.6) in Terminal, this is how to solve the problem.

Step 1

Download the Zend Framework to your downloads folder. Once downloaded, rename the folder ZendFramework

Step 2

Open Terminal and type: sudo cp -r ~/Downloads/ZendFramework /usr/local/ZendFrameworkCli

Step 3

In Terminal, type: open ~/.bash_profile

Note: If file is not found…

Open the application TextEdit. Create a new file and make sure you are typing in plain text only. Type the following: alias zf=/usr/local/ZendFrameworkCli/bin/zf.sh

Save and exit TextEdit

Step 4

In Terminal, type: zf show version

Done!

 

  • Oct
  • 09
  • 2011

MySQL from the Command Line (terminal) in MAMP PRO

Posted by admin In MAMP, MySQL, UNIX / LINIX | No Comments »
MySQL from the Command Line (terminal) in MAMP PRO

To get to the command line for MySQL for MAMP or MAMP PRO just open up you terminal and enter the following:

 
/Applications/MAMP/Library/bin/mysql –host=localhost -uroot -proot

You can see all the databases by using the following command:

mysql command line command show databases

If you type the MySQL command : USE <table name>  you can then start using that particular database.

Another convenient command is SHOW TABLES. Can you figure out what that does?

Now you can type MySQL commands right from the command line.

 
 
 
  • Jul
  • 24
  • 2009

Creating Virtual Hosts ON Your MAC for MAMP

Posted by admin In MAMP, UNIX / LINIX, Web Design | No Comments »

Open up the terminal.
1)    Web-Two:~ webtwo$  cd /etc <–change directory to the etc directory

2)    Web-Two:etc webtwo$ sudo nano hosts <–super user do (does not stay logged in),  editor, file=hosts

3)    Password: *******  <– enter password

4)   Editor opens up. You will see something like this…

#
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost
fe80::1%lo0     localhost

5)  Type in the local IP followed by the name of the site you wish to make a virtual host for:
ie. 127.0.0.1 yoursite.you <– replace this with your name
You should do this for each site you wish to make a virtual host for , line by line.
Your /etc/hosts   file should now look more like this:
#
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost
fe80::1%lo0     localhost
127.0.0.1 yoursite.you

127.0.0.1 anothersite.you
127.0.0.1 yetanothersite.you

6)  Exit your editor, in this example I used, nano. Note: Be sure to SAVE the file.

7)  OK, now navigate to the file:    Applications/MAMP/conf/apache/httpd.conf  and open it in a text only editor ( like BBedit or Smultron or something )

8)  Scroll to the bottom of the httpd.conf file. For each site type in the following:

<VirtualHost *>
DocumentRoot “/Users/yourusername/Sites/site-folder-name”  <– replace with your own appropriate info
ServerName  localsite.you
<– replace with your own appropriate info
ServerAlias localsite.you <– replace with your own appropriate info
<Directory “/Applications/MAMP/htdocs”> <– do NOT change for MAMP
AllowOverride all  <– this allows the htacces file to work properly
</Directory>
</VirtualHost>

9) Save the Applications/MAMP/conf/apache/httpd.conf    file and RESTART your MAMP server.

Now, when you type in the  site   www.localsite.you  followed by your MAMP port (usually 8888) like this:

http://www.localsite.you:8888 your site will come up!

Hope this helps!

  • Jul
  • 24
  • 2009

Viewing the Websites You Are Developing Locally on Your Computer Using MAMP

Posted by admin In MAMP, UNIX / LINIX, Web Design | No Comments »

Normally, when using MAMP ( I am presently using the FREE version of MAMP) you view the site you are working on in a couple of ways.

Put your web site in the    /Applications/MAMP/htdocs/     folder and point your browser to   http://locahost:8888/

or (This is what I like to do for multiple site management)

Put your sites in appropriately named folders under the “Sites” folder.
Click on MAMP Preferences and select the “Apache” tab. Then click the “Select” button and browse to the “Sites” folder.

That way, you can easily get to any of the folders by typing in the URL http://localhost:8888/. You will be presented with a list of folders (as links). These folders are the sites you are developing under the Sites directory. Just click the folder (link) you wish to view and you’re there.

Hope this helps!

Flickr Stream