Displaying 2 results from an estimated 2 matches for "connect_db".
2006 Dec 18
2
AGI Help Please
..._implicit_flush(false);
set_time_limit(6);
$stdin = fopen("php://stdin","r");
$stdout = fopen('php://stdout', 'w');
function read() {
global $stdin, $debug;
$input = str_replace("\n", "", fgets($stdin, 4096));
return $input;
}
function connect_db() {
$database="asteriskcdrdb";
include("./common.php");
include("./dbconnect.php");
}
// parse agi headers into array
while ($env=read()) {
$env = str_replace("\"","",$env);
$s = split(": ",$env);
$agi[str_replace("agi_...
2006 May 03
6
ActiveRecord and Lost Connection
...ERR: invalid process URL state
Mysql::Error: Lost connection to MySQL server during query: SELECT *
FROM numbers_feed_links WHERE (
parsed = ''0'') ORDER BY created_on desc
Here is kind of a unit-test
#
# Berlin Brown
# Used to test active record connection
# Run with:
#
# ruby connect_db.rb
#
require ''active_record''
require ''logger'';
# Use the following to reformat the logging message:
# class Logger; def format_message(severity, timestamp, msg, progname) "#{msg}\n" end; end
ActiveRecord::Base.logger = Logger.new(STDOUT)
ActiveRecord...