Thu - December 11, 2003

OS X - zip Disk Does Not Appear on Desktop


I have had a problem with one of our systems not mounting a zip drive to the desktop, but it shows up in /Volumes/

After upgrading to OS X v 10.3 (thinking that could be the issue) I finally discovered that the zip drive link remains hidden in the /Volumes/ folder even after the drive is removed which was causing the icon to not mount on the desktop.

In order to fix the problem I had to run the following line from Terminal:
sudo rm/Volumes/._ZIP250

and authenticate when requested. I would imagine that this would work on any drive with the same problem.

Posted at 02:15 PM     Read More  

Cross Platform Fonts


What to do when a TrueType font doesn't work on Apple and Windows computers.

We have a problem with the official UCF font, Americana, not working on Apples and Windows PCs. We have a font for each platform which is causing printing problems as well as editing issues for the end user.

After much research I found a program called TypeTool 2 by FontLab. I downloaded the trial version from their website:
http://www.fontlab.com/

The trial worked beautifully and we purchased the full version to convert the font.

Posted at 01:42 PM     Read More  


Wed - November 19, 2003

OS X - SMB/CIFS Share Permissions


Modifying the SMB Share Permissions for public folders.

This problem arose with multiple people modifying the same Word document when connected to OS X from Windows via SMB. Any time a Word document was modified the access level would change to 644 as opposed to the 770 it was programmed to have.

I modified the /private/etc/smb.conf file to have a create mask of 0770 for the Public share.

MS Word saves documents differently than any other application which is why this problem came up. Word creates a temporary file which is modified by the user. When the document is saved, the original document is removed and a new document is created on the server with the same name. To the server a saved Word document is a new file.

Posted at 04:44 PM     Read More  


Fri - November 7, 2003

Win - Internet Explorer Issues


When IE can't read a site, but everything else can, blame Microsoft and update your operating system.

I spent a week troubleshooting and debugging a few thousand lines of code trying to figure out why I could view a site with literally every web browser I tried, except for IE on the PC. The Apple version worked perfectly as well. The site in question is a highly customized version of LinPHA, available from SourceForge.

It turns out there is a bug in IE that is patched with a critical security update. Originally the update did not automatically download on systems. You had to manually download it. I eventually figured this out when I was trying to figure out why one PC started working, and others did not. The issue was fixed with patch Q824145.

In order to keep users from thinking it was a problem with their browser, I wrote a Javascript to test their system for the patch and the systems/browsers affected, which happened to be Windows NT based systems with IE 5.01 or later. If the patch is not found it notifies users that they need to download it in order to view the images on the web site. Please note the semi-colon in front of the Q824145. This must be present to check for any patch using a Javascript detect.

<SCRIPT language=JavaScript>
var bplatform = (navigator.platform == "Win32");
var bappver = navigator.appVersion;
var bminor = navigator.appMinorVersion;
if(bplatform && ((bappver.indexOf("MSIE 6") != -1) || (bappver.indexOf("MSIE 5") != -1))) {
if (bminor.indexOf(";Q824145") == -1) {
alert("In order to view the images in the portfolio you may need to install the Microsoft KB824145 Critical Security Update for Internet Explorer versions 5 and 6. You do not have the patch and need to run Windows Update in order to bring your system up to date.");
}
}
</SCRIPT>

With the modifications, all systems are notified of this critical update and can view the online portfolio.

Posted at 02:34 PM     Read More  


Wed - October 15, 2003

php - The apostrophe and quotation mark


I eventually figured out why user data wasn't appearing in the database when sent with my php form.

I added "or die(mysql_errno() . ": " . mysql_error(). "\n");" to every database call in the script to find out why on earth user data was not appearing when they would submit results. I received word back after adding those lines that there was a syntax error and that the user had to remove the brackets and apostrophes from the text in order to get the data to submit properly. In order to properly process the symbols, you need to activate magic_quotes_gpc, which process apostrophes, quotation marks and other string related symbols for GET, POST, and COOKIE processes.

I modified the php.ini file located at /usr/local/php/lib and restarted apache but still no luck.

I tried the following line of code from the php.net site and it didn't work for me:
<? ini_set ("magic_quotes_gpc" ,"1" ); ?>

I then checked the phpinfo() on the server and found that the search path for the php.ini file is actually /usr/lib/php.ini. Apparently there are two versions living on the server. I opened a Terminal window and typed in:
cd /usr/lib
sudo pico php.ini

I then modified the get_magic_quotes_gpc to "On" and saved the file and then typed:
sudo apachectl graceful
to gracefully restart the Apache server.

Rerunning the phpinfo() showed that get_magic_quotes was now active. I re-tested the form and it now functions as intended.

Posted at 11:45 AM     Read More  

OS X - Disk Utility Permissions


What happens when you can't repair disk permissions because Disk Utility no longer has the proper permissions? Run Repair Disk Utility's Permissions 1.0.

While troubleshooting some odd files on my primary web server I found that they appeared to be temp files for the user www. Permissions were set to 600 on the files. The files were all 6 characters in length and all appeared in the root directory.

I tried running Disk Utility and found thousands of errors, but was unable to fix them due to "Operation not permitted" errors.

I did a lot of searching with Google and eventually found that this particular error is caused when Disk Utility no longer has the proper permissions and can't run as super-root (uid=0). I also found an application that fixes the problems at the following site:
http://homepage.mac.com/mdouma46/fdup/fdup.html

I copied the utility to my server hard drive and ran it. Enter the administrator password twice and it's done. I was then able to run disk copy and correct permissions. As for the odd files, haven't seen them since.

Posted at 10:21 AM     Read More  


©