perl.macperl.forum http://www.nntp.perl.org/group/perl.macperl.forum/ ... Copyright 1998-2014 perl.org Sat, 01 Nov 2014 13:22:48 +0000 ask@perl.org mp3:info - compiled binary by Nicholas Marrison Hi There <br/><br/>I ma new to os X and have not quite got my head around<br/>compiling modules.<br/><br/>Does anyone have an already compiled version of the<br/>mp3::info module?<br/><br/>Would really appreciate it fi you could send it my<br/>way!<br/><br/>Cheers<br/>Ron<br/><br/>Find local movie times and trailers on Yahoo! Movies.<br/>http://au.movies.yahoo.com<br/> http://www.nntp.perl.org/group/perl.macperl.forum/2005/05/msg16.html Mon, 02 May 2005 03:16:41 +0000 chdir to "root" in MacPerl 5.2.0r4 vs MacPerl 5.6.1r2 by The Roschkes I&#39;m running OS 9.2.2. In MacPerl 5.2.0r4 I was able to &quot;chdir&quot; to &quot;::&quot;<br/>from the volume level and operate as if I was above the volume level --<br/>e.g. &lt;*&gt; would return a list of volumes (e.g. hard drive and CD name).<br/><br/>This doesn&#39;t seem to work in MacPerl 5.6.1r2. Is there some syntax I<br/>can use other than &#39;chdir &quot;::&quot;&#39; that will allow me to chdir to &quot;above<br/>the volume level&quot; in MacPerl 5.6.1r2?<br/><br/>Thanks.<br/><br/>//dave<br/><br/>Details: Here is the output from the same script run under each version<br/>of MacPerl:<br/><br/>===============================================================================<br/><br/>MacPerl 5.2.0r4 Application, Perl version 5.004<br/><br/>pwd is: iMac 700 HD: OurData:Dave:Perl scripts<br/>$newpwd is: ::::<br/><br/>Attempting to: chdir &quot;::::&quot;<br/>Success! `pwd` returns: &quot;iMac 700 HD:<br/>&quot;<br/><br/>Attempting to: chdir &quot;::&quot;<br/>Success! `pwd` returns: &quot;<br/>&quot;<br/>List of files (volumes) at this level with &lt;*&gt;:<br/>iMac 700 HD:<br/>Photos - Nadine/Juanita/Dad:<br/><br/>===============================================================================<br/><br/>MacPerl 5.6.1r2 Application, Perl version 5.006001<br/><br/>pwd is: iMac 700 HD: OurData:Dave:Perl scripts:<br/>$newpwd is: ::::<br/><br/>Attempting to: chdir &quot;::::&quot;<br/>Success! `pwd` returns: &quot;iMac 700 HD:<br/>&quot;<br/><br/>Attempting to: chdir &quot;::&quot;<br/># No such file or directory<br/><br/>===============================================================================<br/><br/>and here&#39;s the MacPerl script that generated that output:<br/><br/>#!perl -w<br/><br/>print &quot;=&quot; x 79, &quot;\n&quot;;<br/><br/>print qq|MacPerl $MacPerl::Version, Perl version $]\n\n|;<br/><br/>print &quot;pwd is: &quot;, `pwd`;<br/><br/>chomp($newpwd = `pwd`);<br/># Add trailing : if not returned by `pwd` for diffs in MacPerl versions.<br/><br/>$newpwd =~ s/$/:/ unless ($newpwd =~ /:$/);<br/># Eliminate everything in the path but the colons, to get to the volume.<br/><br/>$newpwd =~ s/[^:]*(:)[^:]*/$1/g;<br/><br/>print qq|\$newpwd is: $newpwd\n|;<br/>print qq|\nAttempting to: chdir &quot;$newpwd&quot;\n|;<br/>if (chdir &quot;$newpwd&quot;) {<br/> print qq|Success! \`pwd\` returns: &quot;|, `pwd`, qq|&quot;\n|;<br/>} else {<br/> warn &quot;$!\n&quot;;<br/>}<br/><br/>print qq|\nAttempting to: chdir &quot;::&quot;\n|;<br/>if (chdir &quot;::&quot;) {<br/> print qq|Success! \`pwd\` returns: &quot;|, `pwd`, qq|&quot;\n|;<br/> # Print results of a glob if chdir was successful to &quot;root&quot;.<br/> print &quot;List of files (volumes) at this level with &lt;*&gt;: \n&quot;;<br/> print map { &quot;$_\n&quot; } &lt;*&gt;;<br/>} else {<br/> warn &quot;$!\n&quot;;<br/>}<br/><br/>print &quot;\n&quot;;<br/><br/><br/> http://www.nntp.perl.org/group/perl.macperl.forum/2003/11/msg15.html Thu, 27 Nov 2003 16:37:36 +0000 Re: [MacPerl-Forum] Desktop Clearing by Joshua Juran --On Tuesday, November 11, 2003 9:24 AM -0500 Donald Plugge <br/>&lt;plugge@usa.net&gt; wrote:<br/><br/>&gt; I&#39;m attempting to write a small utility to help clean up my desktop. The<br/>&gt; idea is to rename desktop files to an &quot;unsorted&quot; folder for later review.<br/>&gt; The trick is that not all desktop items are on the system disk. I&#39;m<br/>&gt; playing around with MacPerl::Volumes to get a list of devices, then I<br/>&gt; loop thru the volumes with glob() to get any &quot;Desktop Folder&quot; files.<br/>&gt;<br/>&gt; My file spec doesn&#39;t seem to get the desktop files:<br/>&gt;<br/>&gt; $spec = &quot;$vol:Desktop Folder:*.*&quot;;<br/><br/>First of all, &quot;*.*&quot; will not match filenames without a &quot;.&quot; in them, which <br/>may not be what you want. But it&#39;s moot, since globs don&#39;t match pathnames <br/>with spaces in them, IIRC.<br/><br/>I would (for each volume) make a dirhandle of the desktop folder. Then <br/>iterate through the handle and operate on the items (or store the names and <br/>operate in bulk later). See opendir and DirHandle, or whatever&#39;s current <br/>these days.<br/><br/>&gt; Before I go further, has anyone created this code already?<br/><br/>No doubt. :-) It&#39;s pretty easy, but let me know if you want some sample <br/>code.<br/><br/>Josh<br/><br/>-- <br/>Joshua Juran<br/>Metamage Software Creations - Mac Software and Consulting<br/>http://www.metamage.com/<br/><br/> * Creation at the highest state of the art *<br/><br/><br/> http://www.nntp.perl.org/group/perl.macperl.forum/2003/11/msg14.html Tue, 11 Nov 2003 07:17:17 +0000 Desktop Clearing by Donald Plugge I&#39;m attempting to write a small utility to help clean up my desktop. The idea is to rename desktop files to an &quot;unsorted&quot; folder for later review. The trick is that not all desktop items are on the system disk. I&#39;m playing around with MacPerl::Volumes to get a list of devices, then I loop thru the volumes with glob() to get any &quot;Desktop Folder&quot; files. <br/><br/>My file spec doesn&#39;t seem to get the desktop files:<br/><br/>$spec = &quot;$vol:Desktop Folder:*.*&quot;;<br/><br/>Before I go further, has anyone created this code already? <br/><br/>Thanks.<br/><br/>Don<br/> http://www.nntp.perl.org/group/perl.macperl.forum/2003/11/msg13.html Tue, 11 Nov 2003 06:24:36 +0000 testing for file existence, listing files in specific dir, OS9 by Philip MacMenamin Hi, <br/><br/>I have a script which I wrote on my linux machine, but has to run on MacOS9s. <br/>In this script I need to test to see if files exist: <br/>if (-e $myFileName)<br/><br/>and I need to copy or move files around with in this directory. <br/>`mv $oldFileName $newName`;<br/><br/>How do I go about this in MacPerl?<br/><br/>Thanks, <br/>Philip.<br/><br/> http://www.nntp.perl.org/group/perl.macperl.forum/2003/09/msg12.html Fri, 26 Sep 2003 09:36:39 +0000 CommConnect.pl by Dwayne C Ayers I just installed MacPerl, I understand CommConnect.pl suppose to be in the<br/>lib folder but I do not have it.<br/><br/>Did they take it away?<br/><br/>Where can I get it?<br/><br/>Thanks,<br/>Dwayne<br/><br/> http://www.nntp.perl.org/group/perl.macperl.forum/2003/08/msg11.html Wed, 27 Aug 2003 07:32:35 +0000 Howto needed for WSAPI_ReadHTTPData AppleEvent by Emmanuel Rens Hi, I&#39;ve made a web based news forum (perl-cgi managed) which works <br/>perfectly on OSX, but I encounter problems porting it to 0S9:<br/><br/>The size of the messages I can send from a form to the server becomes <br/>prohibitively short : there is a limit of 32k in the MacHTTP server.<br/><br/>They told me that this size can be extended if I included a <br/>WSAPI_ReadHTTPData event in my script that would make MacHTTP read more. <br/>As this would apparently result in a failure if the input is shorter <br/>than 32 k I&#39;ll have also to get the size first with a <br/>WSAPI_GetIndexedParameter event. But all this AppleEvent stuff seems <br/>very complicated. At what stage should it appear in my CGI and how ? Is <br/>there someone who could give me an example of what to do ?<br/><br/>I thank you in advance for your help.<br/><br/>E. Rens<br/>---<br/><br/> http://www.nntp.perl.org/group/perl.macperl.forum/2002/09/msg10.html Fri, 13 Sep 2002 02:47:04 +0000 Re: [MacPerl-Forum] using *nix cgi's with macperl by Jeff Lowrey At 1:02 PM -0700 8/21/02, Support wrote:<br/>&gt;I am trying to use a cgi script that was written for a *nix system <br/>&gt;but I am using a mac with macperl. I&#39;m pretty sure I have to <br/>&gt;convert the newlines from &quot;\&quot; to &quot;:&quot; but apart from that I don&#39;t <br/>&gt;know what to do. Is there a program to convert it in one step or is <br/>&gt;there a similar *somewhat* simple way of doing this right?<br/><br/>You really should ask this question in the macperl-webcgi forum, <br/>rather than this one.<br/><br/>You probably want to use the &#39;Save As CGI&#39; option. And read the <br/>documentation that comes with MacPerl about CGIs.<br/><br/>-Jeff Lowrey<br/> http://www.nntp.perl.org/group/perl.macperl.forum/2002/08/msg9.html Wed, 21 Aug 2002 17:32:19 +0000 Re: [MacPerl-Forum] using *nix cgi's with macperl by Scott R. Godin on 08/21/2002 04:02 PM, Support at support@investorsleague.com wrote:<br/><br/>&gt; I am trying to use a cgi script that was written for a *nix system<br/>&gt; but I am using a mac with macperl. I&#39;m pretty sure I have to convert<br/>&gt; the newlines from &quot;\&quot; to &quot;:&quot; but apart from that I don&#39;t know what to<br/>&gt; do. Is there a program to convert it in one step or is there a<br/>&gt; similar *somewhat* simple way of doing this right?<br/><br/>File::Spec is the module package you&#39;re looking for in order to make<br/>filepaths work more compatibly cross-platform.<br/><br/>-- <br/>Scott R. Godin | e-mail : mactech@webdragon.net<br/>Laughing Dragon Services | web : http://www.webdragon.net/<br/><br/><br/> http://www.nntp.perl.org/group/perl.macperl.forum/2002/08/msg8.html Wed, 21 Aug 2002 14:52:35 +0000 using *nix cgi's with macperl by Support I am trying to use a cgi script that was written for a *nix system <br/>but I am using a mac with macperl. I&#39;m pretty sure I have to convert <br/>the newlines from &quot;\&quot; to &quot;:&quot; but apart from that I don&#39;t know what to <br/>do. Is there a program to convert it in one step or is there a <br/>similar *somewhat* simple way of doing this right?<br/> http://www.nntp.perl.org/group/perl.macperl.forum/2002/08/msg7.html Wed, 21 Aug 2002 13:02:57 +0000 Re: [MacPerl-Forum] Newbie needs help with cgi by Joel Rees &gt; I am trying to install a cgi on our server.<br/><br/>Try the cgi sub-list: macperl-webcgi@macperl.org (to which I am<br/>forwarding this).<br/><br/>I&#39;d try to give you a hand, but I don&#39;t have much experience with the<br/>the old environment, zero with webstar. (Don&#39;t have that much experience<br/>with the new environment yet, either, darn it. Got to talk my boss into<br/>letting us use Macs at work.)<br/><br/>I think you&#39;re looking at a long haul, by the way.<br/><br/>Man, forum is silent these days!<br/><br/>-- <br/>Joel Rees &lt;joel@alpsgiken.gr.jp&gt;<br/><br/>&gt; Currently we are running <br/>&gt; OS 9.2.2, webstar 3.0.2 and filemaker 4.1 to serve our files and meet <br/>&gt; our database needs. The purpose of the cgi script I am installing is <br/>&gt; to track the activity of our ads that we may publish on the web. It <br/>&gt; is called adtrackz. It was obviously written for a regular *nix <br/>&gt; server but I am trying to get it to work on our mac server using <br/>&gt; macperl. Here are his instructions for setting it up along with what <br/>&gt; I did (my notes are preceded by &quot;%%%%%&quot;:<br/>&gt; <br/>&gt; INSTALLATION INSTRUCTIONS<br/>&gt; <br/>&gt; I have designed this to be relatively easy to install. There are<br/>&gt; only 3 files.<br/>&gt; <br/>&gt; After unzipping adtrackz.zip you should have:<br/>&gt; <br/>&gt; config.cgi<br/>&gt; t.cgi<br/>&gt; adtrackz.cgi<br/>&gt; install.txt<br/>&gt; license.txt<br/>&gt; <br/>&gt; Follow each step carefully, double checking as you go and<br/>&gt; everything should work fine. Installing a cgi script isn&#39;t<br/>&gt; hard... it just takes delicate work and a bit of patience.<br/>&gt; <br/>&gt; %%%%%Was able to extract the files with stuffit with no problems.<br/>&gt; <br/>&gt; IMPORTANT!<br/>&gt; When editing the .cgi files, you must use a basic text editor<br/>&gt; such as notepad. Programs like WordPerfect or Microsoft Word will<br/>&gt; add unnecessary hidden characters to the text and it will corrupt<br/>&gt; the cgi files. If you accidentally corrupt a file, you can<br/>&gt; download a fresh copy of Adtrackz.<br/>&gt; <br/>&gt; <br/>&gt; #####################################################<br/>&gt; # STEP 1: PATH TO PERL<br/>&gt; #####################################################<br/>&gt; <br/>&gt; First, change the path to perl in each file. This is the first<br/>&gt; line and it looks something like this:<br/>&gt; <br/>&gt; #!/usr/bin/perl<br/>&gt; <br/>&gt; Your host should have information on your path to perl on their<br/>&gt; webpage somewhere.<br/>&gt; <br/>&gt; %%%%%After wracking my brain for a few hours I found out I did not <br/>&gt; have to do this with my mac and MacPerl I read somewhere that I was <br/>&gt; just supposed to open each script with MacPerl and save it as a cgi <br/>&gt; script, which I did.<br/>&gt; <br/>&gt; #####################################################<br/>&gt; # STEP 2: DIRECTORIES<br/>&gt; #####################################################<br/>&gt; <br/>&gt; Now, create the directories on your server.<br/>&gt; <br/>&gt; You must create a directory in your cgi-bin (or any directory<br/>&gt; that can execute cgi scripts). I called mine a, but that&#39;s just a<br/>&gt; suggestion.<br/>&gt; <br/>&gt; ex: cgi-bin/a<br/>&gt; <br/>&gt; Next, create another directory within a (or whatever you called<br/>&gt; it). This is the data directory.<br/>&gt; <br/>&gt; Ex: cgi-bin/a/data. <br/>&gt; <br/>&gt; Make sure to remember the full server path to this directory as<br/>&gt; you will have to enter it in config.cgi.<br/>&gt; <br/>&gt; You might need to create a blank index.html page and upload it to<br/>&gt; both the a and data directory. You must create the index file<br/>&gt; AFTER you run Adtrackz at least once. The data directory has to<br/>&gt; be empty when Adtrackz runs for the first time.<br/>&gt; <br/>&gt; The index file is to stop people from snooping around on your<br/>&gt; server. Your host should really set permissions so that people<br/>&gt; can&#39;t do that, but some of them don&#39;t.<br/>&gt; <br/>&gt; An easy way to check if you have to do this is to simply type the<br/>&gt; url to a directory in your cgi-bin.<br/>&gt; ex: http://www.adtrackz.com/cgi-bin/a/<br/>&gt; if you get a &quot;Error 403 Forbidden&quot;, then you don&#39;t have to worry<br/>&gt; about the index file.<br/>&gt; <br/>&gt; %%%%%In the WebSTAR folder there was a folder called &quot;cgi-bin&quot; and it <br/>&gt; was empty (we&#39;ve never used cgi&#39;s before on this server) so I created <br/>&gt; a folder inside &quot;cgi-bin&quot; called &quot;a&quot; and inside the &quot;a&quot; folder I <br/>&gt; created a folder called &quot;data&quot;. At the moment Im not too worried <br/>&gt; about the blank index page bit. So far I seem to have done <br/>&gt; everything correctly.<br/>&gt; <br/>&gt; #####################################################<br/>&gt; # STEP 3: EDIT YOUR VARIABLES<br/>&gt; #####################################################<br/>&gt; <br/>&gt; Now you have to edit config.cgi. There are only a few variables,<br/>&gt; let&#39;s take them one at a time.<br/>&gt; <br/>&gt; $datapath = &quot;/usr/www/something/httpd/cgi-bin/a/data/&quot;;<br/>&gt; Enter the full server path to the data directory on your server.<br/>&gt; The script needs to know where this is to work correctly.<br/>&gt; <br/>&gt; $home = &quot;/usr/www/something/httpd/htdocs/&quot;;<br/>&gt; This is the full server path to your home directory. In other<br/>&gt; words, the *server* path to http://www.yourdomain.com.<br/>&gt; <br/>&gt; $tcgi = &quot;http://www.domain.com/cgi-bin/go/t.cgi&quot;;<br/>&gt; This is the www path to the location of your t.cgi file.<br/>&gt; All 3 .cgi files will be located in your a directory (or<br/>&gt; whatever you called it).<br/>&gt; <br/>&gt; $domain = &quot;yahoo.com&quot;;<br/>&gt; This one is easy. Just enter your domain without the www, just<br/>&gt; like you see it there.<br/>&gt; <br/>&gt; $password = &quot;adtrackz&quot;;<br/>&gt; Choose a password. This is used for security reasons.<br/>&gt; It has to be 10 characters or less.<br/>&gt; <br/>&gt; %%%%%Now here is where it gets a little tricky. The following <br/>&gt; section enclosed in % symbols is the part of config.cgi that I was <br/>&gt; supposed to edit with the data that I put in there. The hard drive <br/>&gt; is called &quot;WebServer&quot; and the &quot;WebSTAR&quot; folder is in the main <br/>&gt; directory .<br/>&gt; <br/>&gt; %%%%%%%%%%%%%%%%%%&lt;CONFIG.CGI&gt;%%%%%%%%%%%%%%%%%%%%<br/>&gt; #Enter the required values for each variable below.<br/>&gt; #Be careful not to change anything else,<br/>&gt; #just what&#39;s in between the quotes.<br/>&gt; <br/>&gt; #The server path to the data directory, must end with a /<br/>&gt; $datapath = &quot;/WebServer/WebSTAR/cgi-bin/a/data/&quot;;<br/>&gt; <br/>&gt; #The server path to your home directory, must end with a /<br/>&gt; $home = &quot;/WebServer/WebSTAR/&quot;;<br/>&gt; <br/>&gt; #full www path to t.cgi<br/>&gt; $tcgi = &quot;http://www.investorsleague.com/cgi-bin/a/t.cgi&quot;;<br/>&gt; <br/>&gt; #your domain, simply enter it without the www&#39;s,<br/>&gt; $domain = &quot;investorsleague.com&quot;;<br/>&gt; <br/>&gt; #enter a password, max 10 characters<br/>&gt; $password = &quot;adtrackz&quot;;<br/>&gt; %%%%%%%%%%%%%%%%%%&lt;/CONFIG.CGI&gt;%%%%%%%%%%%%%%%%%%%%<br/>&gt; <br/>&gt; %%%%%originally I put the password to our webserver in the last part <br/>&gt; where it asks for a password. but I think it is just a password to <br/>&gt; log into this little ad tracking system from the web.<br/>&gt; <br/>&gt; #####################################################<br/>&gt; # STEP 4: UPLOAD THE FILES<br/>&gt; #####################################################<br/>&gt; <br/>&gt; Ok, now all you have to do is upload all 3 cgi files to your a<br/>&gt; directory (or whatever you called it). Make sure to chmod them<br/>&gt; to 755.<br/>&gt; <br/>&gt; Run adtrackz.cgi. It should prompt you for your password.<br/>&gt; <br/>&gt; %%%%%I have no Idea what &quot;chmod&quot; is or what I&#39;m supposed to do with it.<br/>&gt; <br/>&gt; #####################################################<br/>&gt; # TROUBLESHOOTING<br/>&gt; #####################################################<br/>&gt; <br/>&gt; If you are 100% sure that you have set all the permissions right,<br/>&gt; and all the paths are ok and you are still having problems, try<br/>&gt; chmoding the data directory to 777.<br/>&gt; <br/>&gt; Another common problem is sometimes people create the index.html<br/>&gt; file in the a and data directory before running Adtrackz at least<br/>&gt; once. See Step 2.<br/>&gt; <br/>&gt; If you are still having problems, contact me at<br/>&gt; support@adtrackz.com and I&#39;ll be glad to help.<br/>&gt; <br/>&gt; %%%%%%%%%%%%&lt;END INSTALATION INSTRUCTIONS&gt;%%%%%%%%%%%%<br/>&gt; <br/>&gt; As for the troubleshooting section, still no idea what chmoding is <br/>&gt; and there is nothing in the &quot;data&quot; directory and only the 3 cgi&#39;s in <br/>&gt; the &quot;a&quot; folder. So after I set all this up like this I try to load <br/>&gt; adtrackz.cgi from the web with the address <br/>&gt; http://investorsleague.com/cgi-bin/a/adtrackz.cgi and I get this in <br/>&gt; my web browser:<br/>&gt; <br/>&gt; Diagnostic Output<br/>&gt; # config.cgi did not return a true value.<br/>&gt; File &#39;WebServer:WebSTAR:cgi-bin:a:adtrackz.cgi&#39;; Line 30<br/>&gt; # BEGIN failed--compilation aborted.<br/>&gt; File &#39;WebServer:WebSTAR:cgi-bin:a:adtrackz.cgi&#39;; Line 30<br/>&gt; <br/>&gt; So from this I checked out adtrackz.cgi and found 28 lines of <br/>&gt; disclaimer (this is a paid copyrighted product which is why im only <br/>&gt; showing bits of the code), an empty line and then on line 30, this <br/>&gt; began:<br/>&gt; <br/>&gt; %%%%%%%%%%%%%%%%%%&lt;ADTRACKZ.CGI&gt;%%%%%%%%%%%%%%%%%%%%<br/>&gt; <br/>&gt; BEGIN { require &quot;config.cgi&quot;; }<br/>&gt; use vars qw ($datapath $home $tcgi $domain $password<br/>&gt; $idfile $campaigndata $campaigntypes $badhits $errors $initurl);<br/>&gt; <br/>&gt; BEGIN<br/>&gt; {<br/>&gt; use CGI::Carp qw(carpout fatalsToBrowser);<br/>&gt; open(LOG, &quot;&gt;&gt;$errors&quot;) or die(&quot;Unable to open $errors: $!\n&quot;);<br/>&gt; carpout(LOG);<br/>&gt; }<br/>&gt; <br/>&gt; use strict;<br/>&gt; use CGI;<br/>&gt; use Time::Local;<br/>&gt; use Fcntl &#39;:flock&#39;<br/>&gt; <br/>&gt; %%%%%%%%%%%%%%%%%%&lt;/ADTRACKZ.CGI&gt;%%%%%%%%%%%%%%%%%%%%<br/>&gt; <br/>&gt; So now here I am and I really don&#39;t know what to do to make this <br/>&gt; work. Can anyone see anything that I am doing wrong? I appreciate <br/>&gt; all help.<br/><br/> http://www.nntp.perl.org/group/perl.macperl.forum/2002/08/msg6.html Tue, 20 Aug 2002 02:54:25 +0000 Re: [MacPerl-Forum] Newbie needs help with cgi by Ronald J Kimball On Mon, Aug 19, 2002 at 10:20:58AM -0700, Support wrote:<br/>&gt; I am trying to install a cgi on our server. Currently we are running <br/>&gt; OS 9.2.2, webstar 3.0.2 and filemaker 4.1 to serve our files and meet <br/>&gt; our database needs. The purpose of the cgi script I am installing is <br/>&gt; to track the activity of our ads that we may publish on the web. It <br/>&gt; is called adtrackz. It was obviously written for a regular *nix <br/>&gt; server but I am trying to get it to work on our mac server using <br/>&gt; macperl. Here are his instructions for setting it up along with what <br/>&gt; I did (my notes are preceded by &quot;%%%%%&quot;:<br/><br/>Looking at the installation instructions, this system appears to have been<br/>designed for Unix and Windows machines. It may be that it will not work on<br/>a Mac without some extra porting work.<br/><br/><br/>Here are some simple things to do that will get you closer:<br/><br/><br/>&gt; %%%%%%%%%%%%%%%%%%&lt;CONFIG.CGI&gt;%%%%%%%%%%%%%%%%%%%%<br/>&gt; #Enter the required values for each variable below.<br/>&gt; #Be careful not to change anything else,<br/>&gt; #just what&#39;s in between the quotes.<br/>&gt; <br/>&gt; #The server path to the data directory, must end with a /<br/>&gt; $datapath = &quot;/WebServer/WebSTAR/cgi-bin/a/data/&quot;;<br/>&gt; <br/>&gt; #The server path to your home directory, must end with a /<br/>&gt; $home = &quot;/WebServer/WebSTAR/&quot;;<br/><br/>You may need to specify these paths in Mac format, e.g.:<br/><br/>$datapath = &quot;WebServer:WebSTAR:cgi-bin:a:data:&quot;;<br/><br/>$home = &quot;WebServer:WebSTAR:&quot;;<br/><br/>However, other parts of the program may assume that &#39;/&#39; is the path<br/>separator. Those would have to be rewritten to be portable to the Mac.<br/><br/><br/>&gt; Ok, now all you have to do is upload all 3 cgi files to your a<br/>&gt; directory (or whatever you called it). Make sure to chmod them<br/>&gt; to 755.<br/>&gt; <br/>&gt; Run adtrackz.cgi. It should prompt you for your password.<br/>&gt; <br/>&gt; %%%%%I have no Idea what &quot;chmod&quot; is or what I&#39;m supposed to do with it.<br/><br/>chmod is a Unix utility that sets the permissions on a file or directory.<br/>All the scripts need to be executable by all users. You probably don&#39;t<br/>need to do anything for this step.<br/><br/><br/><br/>&gt; As for the troubleshooting section, still no idea what chmoding is <br/>&gt; and there is nothing in the &quot;data&quot; directory and only the 3 cgi&#39;s in <br/>&gt; the &quot;a&quot; folder. So after I set all this up like this I try to load <br/>&gt; adtrackz.cgi from the web with the address <br/>&gt; http://investorsleague.com/cgi-bin/a/adtrackz.cgi and I get this in <br/>&gt; my web browser:<br/>&gt; <br/>&gt; Diagnostic Output<br/>&gt; # config.cgi did not return a true value.<br/>&gt; File &#39;WebServer:WebSTAR:cgi-bin:a:adtrackz.cgi&#39;; Line 30<br/>&gt; # BEGIN failed--compilation aborted.<br/>&gt; File &#39;WebServer:WebSTAR:cgi-bin:a:adtrackz.cgi&#39;; Line 30<br/><br/>On a Mac, this error usually means that the module was saved with Windows<br/>newlines. You need to convert the three CGI files to have Macintosh<br/>newlines. Here&#39;s a Perl script that does it:<br/><br/>#!perl -pi<br/><br/>tr/\012/\015/;<br/><br/><br/>Before you put too much work into this, you may want to make sure that the<br/>adtrackz system is intended to work on the Mac as written.<br/><br/><br/>Ronald<br/> http://www.nntp.perl.org/group/perl.macperl.forum/2002/08/msg5.html Tue, 20 Aug 2002 02:40:50 +0000 Newbie needs help with cgi by Support I am trying to install a cgi on our server. Currently we are running <br/>OS 9.2.2, webstar 3.0.2 and filemaker 4.1 to serve our files and meet <br/>our database needs. The purpose of the cgi script I am installing is <br/>to track the activity of our ads that we may publish on the web. It <br/>is called adtrackz. It was obviously written for a regular *nix <br/>server but I am trying to get it to work on our mac server using <br/>macperl. Here are his instructions for setting it up along with what <br/>I did (my notes are preceded by &quot;%%%%%&quot;:<br/><br/>INSTALLATION INSTRUCTIONS<br/><br/>I have designed this to be relatively easy to install. There are<br/>only 3 files.<br/><br/>After unzipping adtrackz.zip you should have:<br/><br/>config.cgi<br/>t.cgi<br/>adtrackz.cgi<br/>install.txt<br/>license.txt<br/><br/>Follow each step carefully, double checking as you go and<br/>everything should work fine. Installing a cgi script isn&#39;t<br/>hard... it just takes delicate work and a bit of patience.<br/><br/>%%%%%Was able to extract the files with stuffit with no problems.<br/><br/>IMPORTANT!<br/>When editing the .cgi files, you must use a basic text editor<br/>such as notepad. Programs like WordPerfect or Microsoft Word will<br/>add unnecessary hidden characters to the text and it will corrupt<br/>the cgi files. If you accidentally corrupt a file, you can<br/>download a fresh copy of Adtrackz.<br/><br/><br/>#####################################################<br/># STEP 1: PATH TO PERL<br/>#####################################################<br/><br/>First, change the path to perl in each file. This is the first<br/>line and it looks something like this:<br/><br/>#!/usr/bin/perl<br/><br/>Your host should have information on your path to perl on their<br/>webpage somewhere.<br/><br/>%%%%%After wracking my brain for a few hours I found out I did not <br/>have to do this with my mac and MacPerl I read somewhere that I was <br/>just supposed to open each script with MacPerl and save it as a cgi <br/>script, which I did.<br/><br/>#####################################################<br/># STEP 2: DIRECTORIES<br/>#####################################################<br/><br/>Now, create the directories on your server.<br/><br/>You must create a directory in your cgi-bin (or any directory<br/>that can execute cgi scripts). I called mine a, but that&#39;s just a<br/>suggestion.<br/><br/>ex: cgi-bin/a<br/><br/>Next, create another directory within a (or whatever you called<br/>it). This is the data directory.<br/><br/>Ex: cgi-bin/a/data. <br/><br/>Make sure to remember the full server path to this directory as<br/>you will have to enter it in config.cgi.<br/><br/>You might need to create a blank index.html page and upload it to<br/>both the a and data directory. You must create the index file<br/>AFTER you run Adtrackz at least once. The data directory has to<br/>be empty when Adtrackz runs for the first time.<br/><br/>The index file is to stop people from snooping around on your<br/>server. Your host should really set permissions so that people<br/>can&#39;t do that, but some of them don&#39;t.<br/><br/>An easy way to check if you have to do this is to simply type the<br/>url to a directory in your cgi-bin.<br/>ex: http://www.adtrackz.com/cgi-bin/a/<br/>if you get a &quot;Error 403 Forbidden&quot;, then you don&#39;t have to worry<br/>about the index file.<br/><br/>%%%%%In the WebSTAR folder there was a folder called &quot;cgi-bin&quot; and it <br/>was empty (we&#39;ve never used cgi&#39;s before on this server) so I created <br/>a folder inside &quot;cgi-bin&quot; called &quot;a&quot; and inside the &quot;a&quot; folder I <br/>created a folder called &quot;data&quot;. At the moment Im not too worried <br/>about the blank index page bit. So far I seem to have done <br/>everything correctly.<br/><br/>#####################################################<br/># STEP 3: EDIT YOUR VARIABLES<br/>#####################################################<br/><br/>Now you have to edit config.cgi. There are only a few variables,<br/>let&#39;s take them one at a time.<br/><br/>$datapath = &quot;/usr/www/something/httpd/cgi-bin/a/data/&quot;;<br/>Enter the full server path to the data directory on your server.<br/>The script needs to know where this is to work correctly.<br/><br/>$home = &quot;/usr/www/something/httpd/htdocs/&quot;;<br/>This is the full server path to your home directory. In other<br/>words, the *server* path to http://www.yourdomain.com.<br/><br/>$tcgi = &quot;http://www.domain.com/cgi-bin/go/t.cgi&quot;;<br/>This is the www path to the location of your t.cgi file.<br/>All 3 .cgi files will be located in your a directory (or<br/>whatever you called it).<br/><br/>$domain = &quot;yahoo.com&quot;;<br/>This one is easy. Just enter your domain without the www, just<br/>like you see it there.<br/><br/>$password = &quot;adtrackz&quot;;<br/>Choose a password. This is used for security reasons.<br/>It has to be 10 characters or less.<br/><br/>%%%%%Now here is where it gets a little tricky. The following <br/>section enclosed in % symbols is the part of config.cgi that I was <br/>supposed to edit with the data that I put in there. The hard drive <br/>is called &quot;WebServer&quot; and the &quot;WebSTAR&quot; folder is in the main <br/>directory .<br/><br/>%%%%%%%%%%%%%%%%%%&lt;CONFIG.CGI&gt;%%%%%%%%%%%%%%%%%%%%<br/>#Enter the required values for each variable below.<br/>#Be careful not to change anything else,<br/>#just what&#39;s in between the quotes.<br/><br/>#The server path to the data directory, must end with a /<br/>$datapath = &quot;/WebServer/WebSTAR/cgi-bin/a/data/&quot;;<br/><br/>#The server path to your home directory, must end with a /<br/>$home = &quot;/WebServer/WebSTAR/&quot;;<br/><br/>#full www path to t.cgi<br/>$tcgi = &quot;http://www.investorsleague.com/cgi-bin/a/t.cgi&quot;;<br/><br/>#your domain, simply enter it without the www&#39;s,<br/>$domain = &quot;investorsleague.com&quot;;<br/><br/>#enter a password, max 10 characters<br/>$password = &quot;adtrackz&quot;;<br/>%%%%%%%%%%%%%%%%%%&lt;/CONFIG.CGI&gt;%%%%%%%%%%%%%%%%%%%%<br/><br/>%%%%%originally I put the password to our webserver in the last part <br/>where it asks for a password. but I think it is just a password to <br/>log into this little ad tracking system from the web.<br/><br/>#####################################################<br/># STEP 4: UPLOAD THE FILES<br/>#####################################################<br/><br/>Ok, now all you have to do is upload all 3 cgi files to your a<br/>directory (or whatever you called it). Make sure to chmod them<br/>to 755.<br/><br/>Run adtrackz.cgi. It should prompt you for your password.<br/><br/>%%%%%I have no Idea what &quot;chmod&quot; is or what I&#39;m supposed to do with it.<br/><br/>#####################################################<br/># TROUBLESHOOTING<br/>#####################################################<br/><br/>If you are 100% sure that you have set all the permissions right,<br/>and all the paths are ok and you are still having problems, try<br/>chmoding the data directory to 777.<br/><br/>Another common problem is sometimes people create the index.html<br/>file in the a and data directory before running Adtrackz at least<br/>once. See Step 2.<br/><br/>If you are still having problems, contact me at<br/>support@adtrackz.com and I&#39;ll be glad to help.<br/><br/>%%%%%%%%%%%%&lt;END INSTALATION INSTRUCTIONS&gt;%%%%%%%%%%%%<br/><br/>As for the troubleshooting section, still no idea what chmoding is <br/>and there is nothing in the &quot;data&quot; directory and only the 3 cgi&#39;s in <br/>the &quot;a&quot; folder. So after I set all this up like this I try to load <br/>adtrackz.cgi from the web with the address <br/>http://investorsleague.com/cgi-bin/a/adtrackz.cgi and I get this in <br/>my web browser:<br/><br/>Diagnostic Output<br/># config.cgi did not return a true value.<br/>File &#39;WebServer:WebSTAR:cgi-bin:a:adtrackz.cgi&#39;; Line 30<br/># BEGIN failed--compilation aborted.<br/>File &#39;WebServer:WebSTAR:cgi-bin:a:adtrackz.cgi&#39;; Line 30<br/><br/>So from this I checked out adtrackz.cgi and found 28 lines of <br/>disclaimer (this is a paid copyrighted product which is why im only <br/>showing bits of the code), an empty line and then on line 30, this <br/>began:<br/><br/>%%%%%%%%%%%%%%%%%%&lt;ADTRACKZ.CGI&gt;%%%%%%%%%%%%%%%%%%%%<br/><br/>BEGIN { require &quot;config.cgi&quot;; }<br/>use vars qw ($datapath $home $tcgi $domain $password<br/> $idfile $campaigndata $campaigntypes $badhits $errors $initurl);<br/><br/> BEGIN<br/>{<br/> use CGI::Carp qw(carpout fatalsToBrowser);<br/> open(LOG, &quot;&gt;&gt;$errors&quot;) or die(&quot;Unable to open $errors: $!\n&quot;);<br/> carpout(LOG);<br/>}<br/><br/>use strict;<br/>use CGI;<br/>use Time::Local;<br/>use Fcntl &#39;:flock&#39;<br/><br/>%%%%%%%%%%%%%%%%%%&lt;/ADTRACKZ.CGI&gt;%%%%%%%%%%%%%%%%%%%%<br/><br/>So now here I am and I really don&#39;t know what to do to make this <br/>work. Can anyone see anything that I am doing wrong? I appreciate <br/>all help.<br/> http://www.nntp.perl.org/group/perl.macperl.forum/2002/08/msg4.html Mon, 19 Aug 2002 10:21:42 +0000 what editor should I use? by Stephan Tinnemeyer Hello,<br/><br/>I am new to the list and did not manage to search the archive first<br/>(seemed to be empty), thus, I apologize if this question is a FAQ.<br/><br/>What editor do you recommend for editing perl scripts? I am trying Alpha<br/>and it has the interesting feature of syntax colorising but this editor<br/>prints only black and white. I would love to have syntax colorised<br/>prints of the scripts. Does anybody know an editor this could be done with?<br/><br/>I you feel this is too OT you may answer me off list: mailto:tinne@asv-kiel.de<br/><br/>TIA<br/><br/>Stephan Tinnemeyer<br/>-- <br/>Dipl.-Chem. Stephan Tinnemeyer<br/>Lindenallee 20<br/>24105 Kiel<br/>Germany<br/> http://www.nntp.perl.org/group/perl.macperl.forum/2001/08/msg3.html Fri, 24 Aug 2001 10:19:16 +0000 Trouble Installing Module using CPAN-Mac by ehughes Hello All,<br/><br/>I am using MacPerl version 5.2.0r4 (17Apr98) on a Mac G4 using MacOs 9.1. It<br/>has 64 megs of RAM and VM is on. I am using the CPAN-shell to install<br/>Spreadsheet::WriteExcel. At the prompt I typed:<br/><br/>install &#39;Spreadsheet::WriteExcel&#39;<br/><br/>and off it took. After a couple of minutes it came back with the following<br/>message:<br/><br/># Can&#39;t unlink file<br/>:tmp:Spreadsheet-WriteExcel-0.31:WriteExcel:doc:merge1.gif:: Permission<br/>denied<br/>File &#39;Cyberia:Applications (Mac OS 9):MacPerl &#159;:site_perl:CPAN.pm&#39;; Line<br/>3184<br/># Can&#39;t unlink file<br/>:tmp:Spreadsheet-WriteExcel-0.31:WriteExcel:doc:merge1.gif:: Permission<br/>denied<br/>File &#39;Cyberia:Applications (Mac OS 9):MacPerl &#159;:site_perl:CPAN.pm&#39;; Line<br/>3184<br/># Can&#39;t unlink file<br/>:tmp:Spreadsheet-WriteExcel-0.31:WriteExcel:doc:merge1.gif:: Permission<br/>denied<br/>File &#39;Cyberia:Applications (Mac OS 9):MacPerl &#159;:site_perl:CPAN.pm&#39;; Line<br/>3184<br/># Can&#39;t unlink file<br/>:tmp:Spreadsheet-WriteExcel-0.31:WriteExcel:doc:merge1.gif::<br/>File &#39;Cyberia:Applications (Mac OS 9):MacPerl &#159;:site_perl:CPAN.pm&#39;; Line<br/>3184<br/># Can&#39;t unlink file<br/>:tmp:Spreadsheet-WriteExcel-0.31:WriteExcel:doc:merge1.gif:: Permission<br/>denied<br/>File &#39;Cyberia:Applications (Mac OS 9):MacPerl &#159;:site_perl:CPAN.pm&#39;; Line<br/>3184<br/># Can&#39;t unlink file<br/>:tmp:Spreadsheet-WriteExcel-0.31:WriteExcel:doc:merge1.gif:: Permission<br/>denied<br/><br/>And so on and so on. Can anyone get this module to load? Any hints as to<br/>what I should do next?<br/><br/>Elton<br/><br/>=========================================================================<br/>NOVA 505 W. Olive Ave. Suite 550<br/>Elton Hughes (Information Technology) Sunnyvale CA 94086<br/>Phone: 408-730-7235 Fax: 408-730-7643<br/>-------------------------------------------------------------------------<br/><br/><br/><br/> http://www.nntp.perl.org/group/perl.macperl.forum/2001/05/msg2.html Wed, 16 May 2001 14:43:34 +0000 List Changes by Chris Nandor In case you hadn&#39;t noticed, the MacPerl lists, formerly housed at<br/>macperl.org and run by Vicki Brown, are now housed at perl.org. Thanks<br/>much to Vicki and to Rich Morin for taking care of the lists. And thanks<br/>to Ask Bjoern Hansen for taking them over, along with all the other<br/>perl.org lists.<br/><br/>The subscription lists should have been carried over. If you find you are<br/>not any longer subscribed, please try subscribing again.<br/><br/>There are archives of all the lists for the perl.org box over at<br/>http://archive.develooper.com/.<br/><br/>-- <br/>Chris Nandor pudge@pobox.com http://pudge.net/<br/>Open Source Development Network pudge@osdn.com http://osdn.com/<br/> http://www.nntp.perl.org/group/perl.macperl.forum/2001/01/msg1.html Mon, 22 Jan 2001 15:41:40 +0000