Changeset 13853 for trunk/ippMonitor/raw
- Timestamp:
- Jun 15, 2007, 4:22:46 PM (19 years ago)
- Location:
- trunk/ippMonitor/raw
- Files:
-
- 1 added
- 1 edited
-
ipp.php (modified) (3 diffs)
-
site.php.in (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippMonitor/raw/ipp.php
r13692 r13853 2 2 3 3 $dTABLE = 80; 4 include 'site.php'; 4 5 5 6 function logintext () { … … 62 63 function dbconnect ($database) { 63 64 65 require_once('DB.php'); 66 67 // these are set in 'site.php' 68 global $DBHOST; 69 global $DBUSER; 70 global $DBPASS; 71 64 72 // connect to the database 65 // these should be set on installation 66 require_once('DB.php'); 67 $password = "ipp"; 68 $username = "ipp"; 69 $hostname = "alala"; 70 $db = DB::connect("mysql://$username:$password@$hostname/$database"); 73 $db = DB::connect("mysql://$DBUSER:$DBPASS@$DBHOST/$database"); 71 74 if (DB::iserror($db)) { 72 75 echo "<b>error accessing database</b><br>\n"; 73 echo "<b>tried mysql://$username:$password@$hostname/$database</b><br>\n"; 76 echo "<b>tried mysql://$DBUSER:XXX@$DBHOST/$database</b><br>\n"; 77 $result = $db->getMessage(); 78 echo "$result<br>"; 74 79 menu_end(); 75 80 } … … 471 476 $basename = str_replace ('..','',$basename); 472 477 473 # XXX !!! 474 $PERLLIB = "/home/kiawe/eugene/psconfig/dev.linux/lib"; 475 $BINDIR = "/home/kiawe/eugene/psconfig/dev.linux/bin"; 476 $SITE = "/home/kiawe/eugene/.ipprc"; 478 // these are defined by site.php 479 global $PERLLIB; 480 global $BINDIR; 481 global $SITE; 482 477 483 putenv("PERL5LIB=$PERLLIB:"); 478 484 $PATH = getenv("PATH"); 479 485 putenv("PATH=$BINDIR:$PATH"); 480 486 481 // echo "<br><b>ipp_filename.pl --site=$SITE --basename $basename --filerule $filerule --camera $camera --class_id $class_id</b><br>\n"; 487 // be careful of the definition of PATH in SITE: cannot contain HOME 488 // echo "<br>ipp_filename.pl --site=$SITE --basename $basename --filerule $filerule --camera $camera --class_id $class_id<br>\n"; 482 489 exec ("ipp_filename.pl --site=$SITE --basename $basename --filerule $filerule --camera $camera --class_id $class_id", $output, $status); 483 490
Note:
See TracChangeset
for help on using the changeset viewer.
