Hey all -
Am new to this site, and am a total clueless idiot when it comes to scripts and coding - This one I'm sure is "easy" for ya'll - but I've been staring at it for 2 days now - and can't seem to see "the hooks"..
I searched around this site - and didn't find any exact matches - so thought I'd toss it out here to see if anyone could assist -
I'm trying to install a (unsupported) software package that (obviously) runs php and ties into mySQL DB - But am getting some errors in trying to find (or launch) certain init.php files - and since I'm totally illiterate on php syntex - I can't sort it out.. Any ideas?
Ok - Here's the file I've been trying to install/correct/run - "DB_connect.php" (will post the run errors below that....)
It says MySQL has started (or connected) then bombs - Is it really connected?? If so, then why isn't this init string launching - I know my "pointers" are off somewhere... but haven't a clue - Thanks
[/COLOR]
TXT viewer: db_connect.php
?php
if(DB_CONNECT == 1) return; define("DB_CONNECT",1);
$username = "username_admin";
$password = "XXXXXXXXXXX";
$hostname = "mysql2.mywebhost.com:3109";
$dbh = mysql_connect($hostname, $username, $password) or die("Unable to connect to MySQL");print "Connected to MySQL<br>";
$DEMO = true;
$CONST_COMPANY = "My Company Name"; // Company name
$CONST_AFFMAIL = "affiliate@subdomain.mysite.com"; // Affiliate mail address $CONST_ADDR1 = "PO BOX 14480 "; // Address line 1
$CONST_ADDR2 = "Your City "; // Address line 2
$CONST_ADDR3 = "Your State"; // Address line 3
$CONST_ADDR4 = "United States"; // Address line 4
$CONST_MAIL = "info@subdomain.mysite.com"; // Main mail address
$CONST_SUPPMAIL = "support@subdomain.mysite.com"; // Support mail address
$CONST_URL = "www.subdomain.mysite.com"; // Site URL www.sitename.com
$CONST_SD_URL = "www.subdomain.mysite.com/demo/speeddating"; // Site URL www.sitename.com
$CONST_PAYMAIL = "XXXXXXXXXXXX@com"; // Paypal Account $CONST_DEFAULT_LANGUAGE = 'EN';
$CONST_CURRENCY = "USD"; // Payments currency $CONST_SYMBOL = "$"; // Payments currency symbol $CONST_ZIPCODES = "Y"; // Include the zipcodes $CONST_THUMBS = "Y"; // include thumnails (requires GD libraries)
$CONST_VIDEOS = "Y"; // include video profiles $CONST_AUDIOS = "Y"; // include audio profiles $CONST_FLIRT="Y"; // Include Flirting code $CONST_RATING="Y"; // Include Rating code $CONST_EMAIL_CONFIRM = "Y";
$CONST_FLIRTMAIL="cupid@subdomain.mysite.com"; // email displayed for flirts
$CONST_IMAGE_COUNT = 4;
$CONST_INCLUDE_ROOT = "/hsphere/local/home/username/subdomain.mysite.com";
******IS THAT CORRECT?????*****
$CONST_LINK_ROOT = 'http://subdomain.mysite.com'; // Date and time formats (See the PHP Manual for more info)
$CONST_FORMAT_DATE_SHORT = 'm/d/Y'; // e.g. 11/28/1981 $CONST_FORMAT_TIME_SHORT = 'H:i'; // e.g. 16:47
#############################################################
start new text // // Layout Formatting //
$CONST_TABLE_WIDTH = '100%'; // main table width (recommend 500 to 750, default 600, can also be %)
$CONST_TABLE_CELLPADDING = 0; // main table cellpadding (recommend 0 to 20, default 0)
$CONST_TABLE_CELLSPACING = 12; // main table cellspacing (recommend 0 to 20, default 10)
$CONST_MEMIMAGE_HEIGHT = 18; // member status image height - Do Not Change unless recreating image (default 18)
$CONST_MEMIMAGE_WIDTH = 120; // member status image width - Do Not Change unless recreating image (default 120) $CONST_SUBTABLE_CELLSPACING = 0; // sub table cellspacing (recommend 1 to 5, default 0)
$CONST_SUBTABLE_CELLPADDING = 3; // sub table cellpadding (recommend 0 to 2, default 3)
$CONST_TABLE_ALIGN = "center"; // alignment of main table $CONST_STORYIMAGE_HEIGHT = 75; // story image height pixels $CONST_STORYIMAGE_WIDTH = 150; // story image width pixels $CONST_STORYIMAGE_WEIGHT = 10; // story image weight KB## end new text
########################################################### // // Database setup //
$CONST_DB_HOST = "mysql2.mywebhost.com:3109";
$CONST_DB_NAME = "DB NAME";
$CONST_DB_USER = "XXXXX_admin";
$CONST_DB_PASS = "XXXXXXXX";
$CONST_SPEED_MATCH = 606024*5; //how many time have users to define their matches after speed dating
$CONST_SPEED_SELECT = 2;
$CONST_INIT_FILE = $CONST_INCLUDE_ROOT."/init.php"; include $CONST_INIT_FILE;?>
1
***************************************************************
I'm getting errors on "Line 76" when it's trying to launch init.php (I think?) So, is something messed up in my DB - or something here in my $CONST_INCLUDE_ROOT values?
ERRORS:
Connected to MySQL
Warning: main(/hsphere/local/home/username(Not "root" FWIW?)/subdomain.mysite.com/init.php): failed to open stream: No such file or directory in /hsphere/local/home/username/subdomain.mysite.com/christian/db_connect.php on line 76
Warning: main(/hsphere/local/home/username/subdomain.mysite.com/init.php): failed to open stream: No such file or directory in /hsphere/local/home/username/subdomain.mysite.com/christian/db_connect.php on line 76
Warning: main(): Failed opening '/hsphere/local/home/username/subdomain.mysite.com/init.php' for inclusion (include_path='.:/usr/local/lib/php') in /hsphere/local/home/username/subdomain.mysite.com/christian/db_connect.php on line 76
------------------------------------------------------------------------------------------------------
I've obviously changed some files to protect my DB - but wanted to point out that I'm TRYING to first install this on a subdomain as a beta of sorts - hence the "subdomain.mysite.com" stuff - Not sure if my tags need to be pointing to the "true" root? root:root vs. User:user ??? Some files (after install) have moved themselves (or tagged themselves) into root::root - I don't get that at all -
Sorry to be so idiotic - but can't sort out these INCLUDE ROOT and LINK ROOT commands -
Many many thanks in advance!!
Killer-