View previous topic :: View next topic |
Author |
Message |
chewzzqq -
Joined: 28 Sep 2005 Posts: 198
|
Posted: Wed Sep 28, 2005 3:55 am Post subject: HELP HELP |
|
|
i want 2 install wap site
but when i open home page,it write
Fatal error: Call to undefined function mysql_connect() in D:\Program Files\Abyss Web Server\htdocs\wap_db.php on line 52
what i want 2 write in line 52??
<?php
/*********************************************************************
*
* WapSite powered by CsC Portal. WapSite[tm] is module of CsC Portal.
*
* (C) 2004. CsC Portal. All rights reserved.
*
* http://cscp.cs-centar.net | http://www.cs-centar.net
*
********************************************************************/
// File: wap_db.php
// Desc: Use to define some simple functions, ex. db connect, admin user and pass, etc.
// Written on: 21.04.2004
$AdminName = ""; // define administrator name
$AdminUserName = ""; // define admin user name
$AdminPassword = ""; // define admin password
$AdminEmail = " "; // define admin email
$AdminPanel = ""; // define path to the admin panel [without / at the end]
$PortalDir = "wap_site"; // define path to the portal [without / at the end]
$SiteUrl = ""; // define full site address, ex. http://www.mysite.com
$SiteName = ""; // define what will shell be display as site name
$ContactEmail = " "; // define which email address will be used for contact address
$SupportEmail = " "; // define which email address will be used for support address
$Copyright = ""; // define site copyright, set by user
$Poweredby = "Powered by CsC Portal."; // define powered by message (please don't remove this!)
$db_host = ""; // define host name (default: localhost)
$db_username = ""; // define database username
$db_password = ""; // define database password
$db_name = ""; // define database name
// connecting to see which language is default [ DO NOT EDIT BELOW ANYTHING ]
define("HOST", "$db_host"); // define host name (default: localhost)
define("USER", "$db_username"); // define database username
define("PASSWORD", "$db_password"); // define database password
define("DATABASE", "$db_name"); // define database name
$LangFiles = array(
"1" => "<option>eng</option>",
"2" => "<option>ser</option>"
);
$LangCount = "2";
$db=mysql_connect(HOST, USER, PASSWORD); // connecting to the database
mysql_select_db(DATABASE, $db);
$language_1_set = mysql_query("SELECT * from cscp_wap_options WHERE id = 'panel'", $db);
if ($language_1_set) {
$language_set_f = mysql_fetch_row($language_1_set);
$SiteLang = $language_set_f[1];
include("lang/$language_set_f[1].php");
} else {
}
?> |
|
Back to top |
|
 |
Anonymoose -
Joined: 09 Sep 2003 Posts: 2192
|
Posted: Wed Sep 28, 2005 9:19 am Post subject: |
|
|
If you've pasted exactly your copy of wap_db.php, you haven't set *any* of the option for username/password/what database to connect to. It's not going to work until you do, and possibly set up your own MySQL server.
I suggest reading the readme file that probably came with the script. It's there for a reason. _________________
"Invent an idiot proof webserver and they'll invent a better idiot..." |
|
Back to top |
|
 |
chewzzqq -
Joined: 28 Sep 2005 Posts: 198
|
Posted: Wed Sep 28, 2005 9:46 am Post subject: |
|
|
Code: | $db_host = ""; // define host name (default: localhost)
$db_username = ""; // define database username
$db_password = ""; // define database password
$db_name = ""; // define database name
|
thx for reply
but i not understand ehat should i set 2 host name and database neme?
database name is for folder or url? |
|
Back to top |
|
 |
Anonymoose -
Joined: 09 Sep 2003 Posts: 2192
|
Posted: Wed Sep 28, 2005 11:06 am Post subject: |
|
|
Set the hostname to hostname or IP of the PC running the database you want to connect to.
Set the database name to the name of the database to connect to.
If you don't have a database to connect to, the script is pointless.
You need to read the fine manual. _________________
"Invent an idiot proof webserver and they'll invent a better idiot..." |
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Wed Sep 28, 2005 1:23 pm Post subject: Re: HELP HELP |
|
|
chewzzqq wrote: | i want 2 install wap site
but when i open home page,it write
Fatal error: Call to undefined function mysql_connect() in D:\Program Files\Abyss Web Server\htdocs\wap_db.php on line 52
|
The error means that your PHP does not support MySQL because the MySQL extension is not loaded/present.
PHP 4 has this extension by default. PHP 5 does not. So we recommend installing our preconfigured PHP 5 package which contains it: http://www.aprelium.com/abyssws/php5win.html . _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
chewzzqq -
Joined: 28 Sep 2005 Posts: 198
|
Posted: Sun Oct 02, 2005 10:38 am Post subject: |
|
|
thx for reply |
|
Back to top |
|
 |
|