Digital Signage

Web research, watch some Scala promo videos, talked to Kate to clarify options

Posted in Projects, Video and Audio | Leave a comment

Checked out Athletics screens

Checked out the big screens in teh recreation center i the athletic complex. Apparenly

  • they contract with outside venor (Matt was going to send me the name, but didn’t)
  • Vendor pays them
  • vendor inserts ads and other content
  • they send content to vendor
  • I’m not sure what the ratio of UVM to Vendor content is
  • all comes down voa ethernet to black box behind the screen
Posted in Projects, Video and Audio | Leave a comment

Script help

client asked

Hey all… I need to run a shell script on Zoo via PHP, and was
trying to use the PHP exec() function.

The script will manipulate some images using ImageMagick. Everything
works fine when calling the script from the command-line. I’m having
trouble, however, running it via PHP

The .sh file is owend by the account that the PHP file resides under.

What should the path to the shell script be (relative vs. absolute),
and will I encounter any issues trying to use exec() once my path is
correct?

Best to use absolute path, so there is no ambiguity

Best to use alias of your script’s folder. In general, any users alias is formed using the convention

    /users/x/y/xyzzzzz

where x is the first letter of the use’rs NetID, y is the second letter of the user’s NetID, and xyzzzzz is the user’s netid.

here’s an example. No issues for me running this in my home directory

#!/usr/local/bin/php
<?
passthru("/users/w/a/waw/mysqltest.pl");
$dog=exec("/usr/bin/date");
print "dog=$dog";
?>

except he meant to run it via http://www.uvm.edu/

I sugegsted he try cgi.uvm.edu — no SAFE mode there

Posted in Projects, Scripts - Programming | Leave a comment

Script questions

Student asked about 

I need to find the "virtual directory value relative from the root" of
my website.

Long reply:

‘"virtual directory value relative from the root" of my website. ‘ may have several interpretations, and may have different values and meanings depending upon the context and the server environment.

For example, you could use the PHP Magic Constant

    __FILE__

as in

    $virtual_directory_value = dirname( __FILE__ );

Which, in the case say of this script

    http://www.uvm.edu/~waw/archives/dog.php

has the value of

    /…/uvm.edu/fs/rack1e/u/staff/waw/public_html/archives

Which isn’t so much the "virtual directory value relative from the root" as it is the absolute path of the directory containing the script. And, on www.uvm.edu, at least, a value that may change, since sometimes CIT Technical Resources groups shifts users from one physical disk (rack1e above) to another without warning — so beware if you ever hard-code this value in a script as opposed to obtaining it from the Magic Constant.

In PHP, tried the command line
$HTTP_SERVER_VARS[‘DOCUMENT_ROOT’] but this is not my virtual root, but
something else entirely (it is /racka5/http-data/htdocs). For example,

We have the following other $HTTP_SERVER_VARS

    [SCRIPT_FILENAME] => /users/w/a/waw/public_html/archives/dog.php
    [SCRIPT_URI] => http://www.uvm.edu/~waw/archives/dog.php
    [SCRIPT_URL] => /~waw/archives/dog.php
    [REQUEST_URI] => /~waw/archives/dog.php
    [SCRIPT_NAME] => /~waw/archives/dog.php


$HTTP_SERVER_VARS[SCRIPT_FILENAME] is a preferred alternative to Magic Constant __FILE__, as it returns a fixed alias for the absolute path name of the script. In general, any users alias is formed using the convention

    /users/x/y/xyzzzzz

where x is the first letter of the use’rs NetID, y is the second letter of the user’s NetID, and xyzzzzz is the user’s netid. But again, such conventions are only needed if and when you have to hard-code such a value in a script (usually when you are using some package like older versions of phpBB or wordpress or mediawiki that cat figure it out themselves).

I expect SCRIPT_FILENAME is what you think you are looking for. Then

$spaw_dir = '/spaw/';
$spaw_root = $HTTP_SERVER_VARS['DOCUMENT_ROOT'].$spaw_dir;

Becomes

$spaw_dir = '/spaw/';
$spaw_root = dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME ']).$spaw_dir;

But now let’s put that in the context of the uvmsnow site. If your spaw code lives here

    /users/u/v/uvmsnow/public_html/spaw

and the code you want to have USE spaw is here

    /users/u/v/uvmsnow/public_html/admin

Then the code in, say, admin/demo.php that reads

    $spaw_dir = '/spaw/';
    $spaw_root = dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME ']).$spaw_dir;
    include $spaw_root.'spaw_control.class.php';

tries to include "/users/u/v/uvmsnow/public_html/admin/spaw/"

But that ain’t right — unless you put a copy of /spaw/ in admin. But then ,if you want to use spew from code in another folder, you have to do the same thing. Messy.

So, you could do something funky like this

    $spaw_dir = '/spaw/';
    $spaw_root = $HTTP_SERVER_VARS['SCRIPT_FILENAME'];
    $i=0;
    while (!file_exists($spaw_root.$spaw_dir) && $i < 10) {
        $i++;
        $spaw_root =dirname($spaw_root);
   }
    $spaw_root.=$spaw_dir;
    include $spaw_root.'spaw_control.class.php';

The $i helps to keep the loop in check in case of typos, missing folders, etc.

Posted in Projects, Scripts - Programming | Leave a comment

Art meets RadMind

Finished art lab. It all works like a charm – so far. Talked to Bill, he said Nancy and Tom would be trying stuff out soon. Dunno if all the printers will work, and there is the issue of yet another scanner, I think but all should be solvable. Still need to configure the loadsets a bit for ART and CMD differences.

Posted in Projects, Video Labs | Leave a comment

Digital Signage in Cook Commons

Took a look at the big screen near cook commons

  • no one sure who installed it
  • has a locked case for the DVD player, but o one knows where the key is
  • has no room for a PC. Maybe a mac Mini or laptop
  • has no network connection
  • manual?
  • remote control
  • Can’t see the connections on the back
  • Can’t get to the connections on the back

Discussed with Kate and RogerW (limited) possibilites for providing it with programming. Need to investigate more software/hardware options

Posted in Projects, Video and Audio | Leave a comment

Art meets RadMind

Started instaling, testing, using RadMind to configure Art Lab. Testing highly focused on Macromedia Dreamweaver, which consistently fails in the CMD. Son of a gun, it works great in Williams 414, on G4s, Gs, and dual G5s. So what’s wrong with the library? I dunno. Maybe I should reimage those machines. Anyway, brought  a few machines up to base level, then starting installing Art-specific stuff for their scanners, and Macroedia Director, too.

Posted in Projects, Video Labs | Leave a comment

Web Team mentoring

Keeping watch on the interns

Posted in mentoring, Projects | Leave a comment

Web Team mentoring

Mentoring the programming interns

Posted in mentoring, Projects | Leave a comment

WikiWinkWu

Colleauge had troubles amking wiki go. I found solutions (bad version of LocalSettings.php).

Posted in Projects, Scripts - Programming | Leave a comment