?
Solved

PHP Help needed

Posted on 2007-12-01
5
Medium Priority
?
245 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 200 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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

762 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