Tuesday, August 2, 2011

Apache 2.2 / PHP 'Broken' in Leopard

Still unclear if this was 'broken', or if Apple intended on this strange behavior, but after performing an Archive and Install of Leopard, was unable to access any sites within my "~/Sites" directory, for the first time ever, with the error message:

"Apache error message: "Forbidden - You do not have permission"

This issue does NOT surface if you perform an Archive / Install with the option "Preserving Users and Preferences". After five concurrent "10.5.x" updates without a fix, I finally decided to tackle it, because Apple sure didn't seem be offering any Mea Culpas, nor any explanations for their reasons for 'commenting out' (#) at least 2 key lines within "httpd.conf" config file. Here's the solution (or, ONE solution, at least):

Kill Apache Web Server (either from System Prefs > Sharing > Web Serving, and uncheck box), or, in Terminal, type: 

$/usr/sbin/apachectl stop

Pico, vi (or whatever your favorite c.l.i. text editor is), and open "private/etc/apache2/httpd.conf'".
Locate the line that reads #LoadModule php5_module libexec/apache2/libphp5.so"
UN-comment out (remove the '#' preceding this line), save and exit out of the session.
Restart Apache (System Preferences > Sharing > Web Serving, and CHECK the checkbox), or in Terminal type:
        $/usr/sbin/apachectl start
Note: I was surprised to find many forum entries that simply suggested changing permissions recursively for the directory /private/etc/apache2/. While some posted that this worked, it is not recommended.

Wednesday, October 27, 2010

Bootcamp Error Message Updating WinXP to SP3.

With more than enough drive capacity available on my Bootcamp partition, upon attempting to update my version of Win XP to Service Pack 3, kept getting the error message:

"There is not enough disk space on C:\WINDOWS\$NtServicePackUninstall$ to install Service Pack 3 Setup requires an additional 4 megabytes of free space or if you also want to archive the files for uninstallation,Setup requires 4 additional megabytes of free space. Free additional space on your hard disk and then try again".

Not sure if I'd call this a 'fix', but the workaround for this issue was a Registry hack, by adding a registry key and tweaking, as follows:


1. Click Start – Run – Type “regedit” and press enter.
2. Navigate to

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Setup]

HKEY_LOCAL_MACHINE
    \Software
         \Microsoft
              \Windows
                  \CurrentVersion
                       \Setup
                     
3. In the right pane, Right-click and select New – String value
4. Name it as “BootDir” and set it's value to “C:\”
Without even rebooting, SP3 immediately installed itself with no further anomalies. (Note: As with both platform's 'Software Update' routines, (thank God), the download itself (a little over a Gig) usually residing in a "temp" directory, which then goes 'poof!', was seen by XP, and only the 'Install' was performed). I wish Adobe's temp folders would also hang onto their downloaded files which never got installed, before their script(s) run, deleting any remnants of the downloaded files.

Sunday, September 28, 2008

Using Secure Copy (scp) to Get or Push Files Remotely

To get files from a remote machine to your local machine:

scp user@remote:/path/to/file/file.ext  /local/path/file.ext



To push files with Secure Copy:

scp /local/path/to/file.ext user@remote:/path/where/you/want/it/file.ext

Thursday, July 10, 2008

How to change the default format for screenshots

In past OS versions, Apple has chosen to use different formats for the screenshots that are generated by typing “Command-Shift-3” or “Command-Shift-4”, such as .pict, .jpg, and .pdf. Since Tiger, they seem pretty content to stick .png.

If you had workflows in place that used the previous formats, one quick ‘n dirty method to address this on the front end, is to change the format from the command-line, by doing the following:


  1. Open the Terminal application (/Applications/Utilities/Terminal.app).
  2. Type (or paste in from below):
              
defaults write com.apple.screencapture type pdf  — (or jpg or tif or pict or whatever format you want, as long as it's supported by Preview.app)

Next time you take a screenshot, verify that the global change (to the machine you did this on) took effect by:

  1. Single-clicking on the icon of the screenshot (which will appear on your Desktop with a filename that starts with the word, “Picture...”.
  2. Get Info by selecting “File > Get Info”, or using the shortcut “Command-i”
The “Get Info” window opens, in the first section “General”, next to “Format”, check to see the format is now “Portable Document Format (PDF)”.

Friday, August 11, 2006

Changes in DNS commands in Leopard

Prior to Leopard, if you wanted to clear out the DNS cache for web-paqe connectivity issues, you would fire up Terminal.app and type:

lookupd -flushcache


For whatever reason, beginning with Leopard, Apple has changed this command to:

dscacheutil -flushcache

Tuesday, May 23, 2006

Issues w/ extreme latency talking to network mounted sharepoints

End-user was reporting his brand-new Intel MacPro was taking forever to transfer files (any files) to his particular mounted sharepoint on the company's Xserve.

After verifying the problem by reproducing it (the LAN in question was gigabit), but the throughput numbers were more akin to 10 Base-T), I blew through all the usual suspect, quick 'n dirty, first line ruling out of points of failure:

— Testing his patch cable (at port and switch),
— Made sure his port on the switch was configured for 1000 Base-T,
— Verified all Server-Side configs for this user's account.
— Logged into another User Account -- was NOT able to reproduce the problem.

So I've isolated the anomaly to his User Account. What was throwing me off however, was that when logged back into the problem user account, I found I *WAS* able to mount OTHER network shares (such as my own laptop with File Sharing enabled) with normal (gigabit speeds) throughput.

So... it's now down to just HIS user account, on HIS machine, logging in ONLY to his share point on his company's File Server--other networked share points were normal. (AppleTalk was disabled on all clients, and he / they were all talking to their File Server over TCP/IP).
A protocol analysis was the only other logical Systematic Fault Isolation Procedure left that I could think of, so I launched my open-source packet sniffer, Wireshark, (formerly Ethereal) to analyze his machine's packet flow, and BINGO!

I discovered immediately, that his machine was talking to the server (and NOT the other network share points), with SSH encryption (my bad, as while troubleshooting another issue with this user's machine a few days earlier, I had selected "Do not allow communication over clear text", in the "Connect To Server" options box in his AFP client's console, and had inadvertently forgotten to UNcheck after I was done). Thus, everything the user was doing, that was Server related, was getting bottlenecked by the encryption process. Clearly, the fix was simply to UNcheck the checkbox to "Do not allow communication over clear text" options button in "Connect to Server" console / client.

Thursday, February 16, 2006

DV Editing -- Notes I Took

A short and very abbreviated list of some of the notes I took at a one-night class for Digital Video Editing. I kept referring to it as an outline for most video-editing projects, so posting it here.


• DV Captures at 720 x 480 (rectangular)
• Computers display square pixels / TVs display rectangular pixels.
• You need to change video from 720 x 480, to 640 x 480. (this doesn't change the resolution, just makes the pixels square).
• Apple has it's own implementation of both H.264 AND MPEG 4 (get to it by exporting "Movie to QuickTime", rather than the first codec popups you see).
• Select "None" for RAW video
• 2 different ways to compress video:
       
        a) Temporal (between keyframes, i.e., from frame to frame to frame...)
        b) Spacial (IN each frame, i.e. looks at all the pixels in each frame to determine the best way to  compress it).
• H.264 -- NEVER go below "Medium" quality.
• When possible, use a manual bit-rate (data rate)... rather than a "variable" bit-rate.
• When compressing for iPod video, do not exceed 2400 KBPS (ideally, use manual bit-rate of 2100, allowing for audio's bit-rate; however... if using H.264 as compressor, use data-rate value of 768.
• Use "Compression" - by Ben Wagner, for pretty intuitive GUI for on the fly compression.

Followers

about me

10 Years in Advertising (Account Exec), and 14 Years in I.T./System Administration (multi-platform, but specializing on the Mac platform).