Solved

PHP Help needed

Posted on 2007-12-01
5
237 Views
Last Modified: 2008-03-26
Trying to install a script but get the following when I run the install.php page.

You must first customize the MySQL connections in vars.php to match yours or this script will not be setup!


------------------
Below is the vars.php script but don't know what I have to change. anyone know what I have to change ? I have already created the database and database user on cpanel.


<?php


require "sql.php";
require "act.php";


if ($sql_mode==2) {
$crishn = pg_connect("$sql_host","5432","$sql_data");
} else if ($sql_mode==3) {
$crishn = mssql_connect($sql_host, $sql_user, $sql_pass);
$crashn = mssql_select_db($sql_data);
} else if ($sql_mode==4) {
$crishn = odbc_connect($sql_data, $sql_user, $sql_pass);
} else {
$crishn = mysql_connect($db_host, $db_user, $db_pass);
$crashn = mysql_select_db($db_name);
}
$freelancers_count = SQLact("query", "SELECT * FROM freelancers_count");
$count = SQLact("result", $freelancers_count,0,"count");
$freelancers_cron = SQLact("query", "SELECT * FROM freelancers_cron");
$lastday = SQLact("result", $freelancers_cron,0,"lastday");
$freelancers_setup = SQLact("query", "SELECT * FROM freelancers_setup");
$siteurl = SQLact("result", $freelancers_setup,0,"siteurl");
$toplayout = SQLact("result", $freelancers_setup,0,"toplayout");
$bottomlayout = SQLact("result", $freelancers_setup,0,"bottomlayout");
$emailheader = SQLact("result", $freelancers_setup,0,"emailheader");
$emailfooter = SQLact("result", $freelancers_setup,0,"emailfooter");
$emailaddress = SQLact("result", $freelancers_setup,0,"emailaddress");
$companyname = SQLact("result", $freelancers_setup,0,"companyname");
$fsbamount = SQLact("result", $freelancers_setup,0,"fsbamount");
$bsbamount = SQLact("result", $freelancers_setup,0,"bsbamount");
$frefamount = SQLact("result", $freelancers_setup,0,"frefamount");
$brefamount = SQLact("result", $freelancers_setup,0,"brefamount");
$address = SQLact("result", $freelancers_setup,0,"address");
$city = SQLact("result", $freelancers_setup,0,"city");
$state = SQLact("result", $freelancers_setup,0,"state");
$country = SQLact("result", $freelancers_setup,0,"country");
$zipcode = SQLact("result", $freelancers_setup,0,"zipcode");
$currency = SQLact("result", $freelancers_setup,0,"currency");
$currencytype = SQLact("result", $freelancers_setup,0,"currencytype");
$buyer = SQLact("result", $freelancers_setup,0,"buyer");
$buyers = SQLact("result", $freelancers_setup,0,"buyers");
$freelancer = SQLact("result", $freelancers_setup,0,"freelancer");
$freelancers = SQLact("result", $freelancers_setup,0,"freelancers");
$mode = SQLact("result", $freelancers_setup,0,"mode");
$adminpass = SQLact("result", $freelancers_setup,0,"adminpass");
$attachmode = SQLact("result", $freelancers_setup,0,"attachmode");
$attachmaxi = SQLact("result", $freelancers_setup,0,"attachmaxi");
$attachpath = SQLact("result", $freelancers_setup,0,"attachpath");
$attachurl = SQLact("result", $freelancers_setup,0,"attachurl");
$catname = SQLact("result", $freelancers_setup,0,"catname");
$pcat1 = SQLact("result", $freelancers_setup,0,"pcat1");
$pcat1val = SQLact("result", $freelancers_setup,0,"pcat1val");
$pcat2 = SQLact("result", $freelancers_setup,0,"pcat2");
$pcat2val = SQLact("result", $freelancers_setup,0,"pcat2val");
$pcat3 = SQLact("result", $freelancers_setup,0,"pcat3");
$pcat3val = SQLact("result", $freelancers_setup,0,"pcat3val");
$balexpdays = SQLact("result", $freelancers_setup,0,"balexpdays");
$balmaxdays = SQLact("result", $freelancers_setup,0,"balmaxdays");
$tableborder = SQLact("result", $freelancers_setup,0,"tableborder");
$tablecellsp = SQLact("result", $freelancers_setup,0,"tablecellsp");
$tablecellpa = SQLact("result", $freelancers_setup,0,"tablecellpa");
$tablecolort = SQLact("result", $freelancers_setup,0,"tablecolort");
$tablecolorh = SQLact("result", $freelancers_setup,0,"tablecolorh");
$tablecolor1 = SQLact("result", $freelancers_setup,0,"tablecolor1");
$tablecolor2 = SQLact("result", $freelancers_setup,0,"tablecolor2");
$ppemailaddr = SQLact("result", $freelancers_setup,0,"ppemailaddr");
$deposit2checkout = SQLact("result", $freelancers_setup,0,"deposit2checkout");
$depositpaypal = SQLact("result", $freelancers_setup,0,"depositpaypal");
$depositnotify = SQLact("result", $freelancers_setup,0,"depositnotify");
$depositccurl = SQLact("result", $freelancers_setup,0,"depositccurl");
$depositccper = SQLact("result", $freelancers_setup,0,"depositccper");
$depositccfee = SQLact("result", $freelancers_setup,0,"depositccfee");
$depositccpay = SQLact("result", $freelancers_setup,0,"depositccpay");
$depositccsid = SQLact("result", $freelancers_setup,0,"depositccsid");
$depositccaut = SQLact("result", $freelancers_setup,0,"depositccaut");
$depositppper = SQLact("result", $freelancers_setup,0,"depositppper");
$depositppfee = SQLact("result", $freelancers_setup,0,"depositppfee");
$depositppaut = SQLact("result", $freelancers_setup,0,"depositppaut");
$depositmail = SQLact("result", $freelancers_setup,0,"depositmail");
$depositmlfee = SQLact("result", $freelancers_setup,0,"depositmlfee");
$depositother = SQLact("result", $freelancers_setup,0,"depositother");
$feedbackcmax = SQLact("result", $freelancers_setup,0,"feedbackcmax");
$projectper = SQLact("result", $freelancers_setup,0,"projectper");
$projectfee = SQLact("result", $freelancers_setup,0,"projectfee");
$projectper2 = SQLact("result", $freelancers_setup,0,"projectper2");
$projectfee2 = SQLact("result", $freelancers_setup,0,"projectfee2");
$withdrawcfee = SQLact("result", $freelancers_setup,0,"withdrawcfee");
$withdrawpaypal = SQLact("result", $freelancers_setup,0,"withdrawpaypal");
$withdrawpfee = SQLact("result", $freelancers_setup,0,"withdrawpfee");
$withdrawwire = SQLact("result", $freelancers_setup,0,"withdrawwire");
$withdrawwfee = SQLact("result", $freelancers_setup,0,"withdrawwfee");
$withdrawother = SQLact("result", $freelancers_setup,0,"withdrawother");
$withdrawofee = SQLact("result", $freelancers_setup,0,"withdrawofee");
$withdrawonam = SQLact("result", $freelancers_setup,0,"withdrawonam");
$withdrawoins = SQLact("result", $freelancers_setup,0,"withdrawoins");
$withdrawmini = SQLact("result", $freelancers_setup,0,"withdrawmini");
$withdrawnotify = SQLact("result", $freelancers_setup,0,"withdrawnotify");
$multiplecats = SQLact("result", $freelancers_setup,0,"multiplecats");
$featuredcost = SQLact("result", $freelancers_setup,0,"featuredcost");
$mprojectdays = SQLact("result", $freelancers_setup,0,"mprojectdays");
$projectudays = SQLact("result", $freelancers_setup,0,"projectudays");
$forumnextnum = SQLact("result", $freelancers_setup,0,"forumnextnum");
$maxextend = SQLact("result", $freelancers_setup,0,"maxextend");
$userportfolio = SQLact("result", $freelancers_setup,0,"userportfolio");
$refreturn1 = SQLact("result", $freelancers_setup,0,"refreturn1");
$refreturn2 = SQLact("result", $freelancers_setup,0,"refreturn2");



?>
0
Comment
Question by:freshjada
5 Comments
 
LVL 21

Expert Comment

by:nizsmo
ID: 20389362
these are the 2 important lines if you are using mysql:
$crishn = mysql_connect($db_host, $db_user, $db_pass);
$crashn = mysql_select_db($db_name);

you have to find out (maybe in another require file) where the $db_host, $db_user and $db_pass are declared and change the values accordingly.

hope this helps
0
 

Author Comment

by:freshjada
ID: 20430840
if

sql details are
my username - synapse
pass -candy
database name - atencorps

atencorps_atencorps

so what is the host ??
0
 
LVL 21

Accepted Solution

by:
nizsmo earned 50 total points
ID: 20432696
hmmm is mysql installed locally? if it is, try 'localhost' (without the quotes)
0
 
LVL 16

Expert Comment

by:CWS (haripriya)
ID: 21188525
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup topic area:
   Accept: nizsmo {http:#20432696}

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

cyberwebservice
Experts Exchange Cleanup Volunteer
0
 
LVL 1

Expert Comment

by:Computer101
ID: 21216918
Forced accept.

Computer101
EE Admin
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question