Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 183

Deprecated: Assigning the return value of new by reference is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/lib/mtdb_base.php on line 36

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 258

Deprecated: Function ereg() is deprecated in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 258

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/mt-random.pl/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/archiveyear.zip/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/SimpleComments.pl/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/mt-cache.pl/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/blackliststats.pl/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/acronym.db/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/TinyTuring.pl.disabled/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/sql.pl/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/technorati.pl/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/validable.pl/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/MTTemplate.pl/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/mt-linksmentioned.pl/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/keyvalues.pl/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/MTGrid.pl/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/roundrobin.pl/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/projecthoneypot.pl/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/mt-list.pl/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/archiveyear.pl/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/authors.pl/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/SimpleComments.txt/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/ifempty.pl/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/SimpleComments.pl.orig/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/CatEntries2.8.pl/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/mt-relatedentries.pl/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/MTCloseComments.pl/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/switch.pl/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/acronym.pl/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/regex.pl/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/CheckLinks.pl/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/beautifier.pl/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/perlscript.pl/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/macros.pl/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/MTFastInclude.pl/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/MTIncludePlus.pl/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/category.pl/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110

Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/mt-rssfeed.pl/php) is not within the allowed path(s): (/nfs:/tmp:/usr/local:/etc/apache2/gs-bin) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/mt.php on line 110
Joe's Apt.: Proxy Auto-Config (PAC) Files and MacOS 10.4

« The New AT&T | Main | Dilbert Goes For Web (Services) Standards »

Proxy Auto-Config (PAC) Files and MacOS 10.4

UPDATE: I do believe the issue described herein is fixed as of MacOS 10.4.6. Thanks, Apple!

Ever since MacOS 10.4 "Tiger" I've been unable to use AT&T's corporate proxy auto-config (PAC) file in conjunction with Safari.

This PAC has no coding errors and works fine when fed directly to Firefox or other PAC-aware browsers. (Always has.) Meanwhile, Safari and other apps leverage the MacOS Network Preferences, and for some reason that same PAC file just doesn't work.

This afternoon, I finally got around to hacking the PAC file to bits, and I'm pleased to report I've found the smoking gun, and - at least in my case - how to get things working again.

I'm not at liberty to share AT&T's PAC but the issue boils down to one thing: global variables.

First, a wee bit of background: PAC files are written in JavaScript. The Proxy Client Auto-Config File Format as originally defined by Netscape is directly supported by several user agents. In the MacOS and Windows cases, PACs are also supported as a system-wide configuration that user agents can tap into if desired.

Now, in JavaScript there are global and local variables. In a nutshell, a variable is global in scope if it is declared:

  • Outside all functions, with or without the var keyword.
  • Inside any function, without the var keyword, but only once the function is called.

A variable is local in scope it if is declared:

  • Inside a function, with the var keyword.

So what's the problem? It turns out that, as of MacOS 10.4, if your PAC file has any variables defined outside of functions (and I mean any variables, with or without the var keyword), they will not be treated as global. In fact, they will not be visible inside any functions, period! As far as functions in the PAC are concerned, those variables don't exist.

In the case of AT&T's PAC, the fix was very straightforward. I moved a group of variables defined at the top, outside of function scope, to the start of the required FindProxyForURL function (taking care to make sure var is not used, making them global variables). Ta-dah, it works in Safari. Meanwhile, all the other browsers I use have no problem with the change. Sweet.

I'm not sure if this treatment of variables within a PAC is considered a bug or a feature, but I'm leaning toward the former. Meanwhile, I'm sharing this with Apple Support and asking for more insight on the matter.

To sum up, when it comes to PAC files:

  • Only define variables within functions, not outside of them.
  • Define all global variables at the start of FindProxyForURL.
  • Leave off the var keyword for those variables.

Happy New Year!

TrackBack

TrackBack URL for this entry:
http://www.joesapt.net/mt/mt-tb.cgi/39

Comments


Fatal error: Cannot redeclare identify_modifier_markdown() (previously declared in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/php/lib/modifier.markdown.php:109) in /nfs/c01/h16/mnt/4710/domains/joesapt.net/html/mt/plugins/Markdown/php/modifier.markdown.php on line 120