Categories
mac Tutorials

How to clear your scratch disks on your Mac

Here’s how to free up space on your Mac scratch disks.

Have you seen the message when opening Adobe Photoshop? “The currently selected scratch disks are full. Please modify scratch disk preferences that will come into effect in the next launch.”

This means that your internal hard drive is full, or almost full. And some apps need a few gigs to run.

Here’s how to fix it

Step 1. Go to About this Mac

Click the Apple icon on the top left hand side of your screen. A list of dropdown options will appear. Then click “About This Mac”

Step 2. Click on the Storage tab

A new window will appear. Click the “Storage” tab.

Give it a minute for the Storage to calculate which files are using the space. The more full it is, the longer it will take.

Step 3. Next, Click the button “Manage”

This will open up a new window. Here you will see a list of things taking up a lot of space on the left hand column.


Step 4. Review your apps

You can see in my screenshot above the Applications are taking up 38.81 GB of space. There may be some apps that you just aren’t using. You can delete those from here.

Click on the app. Then click on the “delete” button.

Step 5. Next, review your documents

Documents is a common place where you will find files that are taking up a lot of space.

Click on the “Documents” on the left hand column. You will see a list of documents appear on the right hand side. Again, review your documents and click on the ones taking up too much space. And click delete.

Go throughout the list and delete anything you can.

If you are unsure what it is, click on Show in Finder to open the file and see what it is.

Step 6. Continue to review any other places that you have unneeded files

Step 7. Go to your trash bin and empty it out.

Step 8. Close out your applications. And relaunch them. They will now be able to run with your free space.

Congrats! You’re done.

Categories
Apache mac MAMP PHP Tutorials

Migrating PHP and Apache to latest Mac OS after update

After upgrading you MacOS, you will need to reconfigure your MAMP server. Fortunately, it’s pretty easy to do. However, sometime hiccups happen. Here’s a quick guide to follow that will walk you through the things to check.

1. enable php.ini

cd /etc

move default to php.ini

sudo cp php.ini-5.2-previous php.ini

If you need to resetup php.ini follow these directions here.

2. Enable virtual hosts

See part 1 of :

Follow the directions of part 5

How to setup multiple sites hosted on your Mac with OSX 10.8 + (MAMP Part 5)

3. Restart Apache

sudo apachectl restart

Check if it’s working.

4. Getting 500 internal error

check error log

5.  Enable rewrite engine

/etc/apache2/httpd.conf

uncomment following line

#LoadModule rewrite_module libexec/apache2/mod_rewrite.so

6. Enable PHP

/etc/apache2/httpd.conf

uncomment following line

#LoadModule php5_module libexec/apache2/libphp5.so

If you’re using php version 7, uncomment this line instead

#LoadModule php7_module libexec/apache2/libphp7.so

7. save and restart apache

sudo apachectl restart

8. If you’re still getting “ERR_CONNECTION_REFUSED”

ERR_CONNECTION_REFUSED apache php error

Run configtest to see if any modules in httpd.conf need to be removed or enabled

sudo apachectl configtest

9. If you’re getting error 403

403 Forbidden You don’t have permission to access / on this server.

Check Apache is able to read the mime types. Add this line to the Mime types section in your /etc/apache2/httpd.conf file

AddType application/x-httpd-php .php

 

 

Categories
mac Terminal Tutorials

Mac – How to clear a file’s contents using Terminal command

A quick trick to empty a file using Terminal on Mac.

1. Open Terminal

2. enter the following command in Terminal

cat /dev/null > fileName

If you get a warning Permission Denied you can do the following trick.

sudo sh -c 'cat /dev/null > fileName'
Categories
mac MAMP PHP Tutorials

How to turn display_errors to on in php.ini file

This is a quick tutorial that will walk you through turning display errors on in your php.ini file.