Forum Moderators: coopster
and here is my code
<?php
if(DB_CONNECT == 1) return;
define("DB_CONNECT",1);
$DEMO = true;
$CONST_COMPANY = "Dspro LTD "; // Company name (e.g. Truelove, Inc)
$CONST_AFFMAIL = "example@example.com"; // Affiliate mail address
$CONST_ADDR1 = "13 latham rd"; // Address line 1
$CONST_ADDR2 = "twickenham"; // Address line 2
$CONST_ADDR3 = "middlesex tw1 1bn"; // Address line 3
$CONST_ADDR4 = "United Kingdom"; // Address line 4
$CONST_MAIL = "info@example.com"; // Main mail address
$CONST_SUPPMAIL = "info@example.com"; // Support mail address
$CONST_URL = "www.example.com"; // Site URL www.sitename.com
$CONST_SD_URL = "www.example.com/demo/speeddating"; // Site URL www.sitename.com
$CONST_PAYMAIL = "pay@example.com"; // Paypal Account
$CONST_DEFAULT_LANGUAGE = 'EN';
$CONST_CURRENCY = "GB"; // 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="info@example.com"; // email displayed for flirts
$CONST_IMAGE_COUNT = 4;
$CONST_INCLUDE_ROOT = "/usr/local/apache/home/username/public_html";
$CONST_LINK_ROOT = 'http://www.example.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 = "example";
$CONST_DB_NAME = "somename";
$CONST_DB_USER = "user";
$CONST_DB_PASS = "pass";
$CONST_SPEED_MATCH = 60*60*24*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;
?>
[edited by: jatar_k at 7:00 pm (utc) on June 1, 2005]
[edit reason] removed url [/edit]
Thank you for your posting -- but what should we do with it?
Some unrelated comments:
-- I would not post database login details to a public forum.
$CONST_DB_HOST = "#*$!";
$CONST_DB_NAME = "#*$!";
$CONST_DB_USER = "#*$!";
$CONST_DB_PASS = "xxx";
-- do not hardwire these login values into the program, but put them into an include file instead which is best put 1 level above the web server's document root directory level ..
-- You may put a single quote sign at the end of this line:
$CONST_LINK_ROOT = 'http://xxxxx';
in case you don't like that T_STRING message
Regards,
R.
[edited by: Romeo at 3:56 pm (utc) on June 1, 2005]
Warning: main(): open_basedir restriction in effect. File(/usr/local/apache/home/username/public_html/init.php) is not within the allowed path(s): (/home/example/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/example/public_html/db_connect.php on line 70
Warning: main(/usr/local/apache/home/username/public_html/init.php): failed to open stream: Operation not permitted in /home/example/public_html/db_connect.php on line 70
Warning: main(): open_basedir restriction in effect. File(/usr/local/apache/home/username/public_html/init.php) is not within the allowed path(s): (/home/example/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/example/public_html/db_connect.php on line 70
Warning: main(/usr/local/apache/home/username/public_html/init.php): failed to open stream: Operation not permitted in /home/example/public_html/db_connect.php on line 70
Warning: main(): Failed opening '/usr/local/apache/home/username/public_html/init.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/example/public_html/db_connect.php on line 70
[edited by: jatar_k at 7:01 pm (utc) on June 1, 2005]
[edit reason] generalized url [/edit]
Warning: main(home/public_html/init.php): failed to open stream: No such file or directory in /home/dspro04/public_html/db_connect.php on line 70
Warning: main(home/public_html/init.php): failed to open stream: No such file or directory in /home/dspro04/public_html/db_connect.php on line 70
Warning: main(): Failed opening 'home/public_html/init.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/dspro04/public_html/db_connect.php on line 70
and heres the code
code is as above - jatar_k
[edited by: jatar_k at 7:41 pm (utc) on June 1, 2005]
[edit reason] removed urls and code [/edit]
the above error states that it could not open the file init.php because it does not exist in the place that is specified in the file dbconnect.php on line 70
open dbconnect.php and look at line 70
the path there is wrong
you need to find the right path to the file and put it into the function on line 70 in dbconnect.php
hard for me to explain more, once the path is right those specific errors should go away, though they may be replaced by others. ;)
An important thing to remember is to always work through your errors one by one from first to last. Often some errors pop out just because of previous errors.
exzple of one Parse error: parse error, unexpected T_STRING in /home/dspro04/public_html/login.php(39) : eval()'d code on line 8
and somem images and links are [adress**.com...]
they should be
[adress***.com...]
[edited by: jatar_k at 11:24 pm (utc) on June 6, 2005]
[edit reason] no urls thanks [/edit]