Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,028

HOME > PHP > PHP Forum > Warning: mysql_pconnect(): Can't connect to local MySQL server



 

Warning: mysql_pconnect(): Can't connect to local MySQL server

 



Topic : 004921

Guest




พี่วินคะ
ได้ download phpauction ไปใช้ แฅ่มันขึ้นแบบนี้นะคะ

Warning: mysql_pconnect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/fhlinux202/j/jungleton.com/user/htdocs/phpauction/includes/config.inc.php on line 189
Database access error. Please contact the site administrator.

นี่คือโค้ด ของ config.inc.php ที่มีปัญหาคะ จะแก้ยังไงดีคะ ช่วยหน่อยนะคะ
<?

/*

Copyright (c), 1999, 2000 - phpauction.org


This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation (version 2 or later).

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.


*/


/*======================================================================

Edit the lines below *

Both *nix and Windows directives are present. Default is *nix.
If you are running Phpauction under Windows comment the first line
of each couple, uncomment the second and edit it to reflect you box
charactaristics.
Note: windows slash (\) must be preceeded by another \ for PHP to read
the path correctly.

======================================================================*/


$SITE_NAME = "YOUR SITE NAME";
$SITE_URL = "http://172.26.0.4/phpauction/"; //Requires ending slash

$COOKIE_PREFIX = "PHPAUCTION";
$LOGGED_IN_COOKIE = $COOKIE_PREFIX."_LOGGED_IN";
$LOGGED_IN_NICK = $COOKIE_PREFIX."NICK_LOGGED_IN";

//-- Activate login box
//-- 1 means login box is shown in the right column in the home page
//-- 0 means login box is not shown
$LOGIN_BOX = 1;


//-- Activate News box
//-- 1 means News box is shown in the right column in the home page
//-- 0 means News box is not shown
$NEWS_BOX = 1;
$NEWS_TO_SHOW = 5; // Number of news you want to show in the NEWS column


/*========================================================================================
MONEY FORNATTING OPTIONS

You can choose between:

$MONEY_FORMAT = 1 => US notation: 1,500.00
$MONEY_FORMAT = 2 => NON US notation (Europe style) 1.500,00

and also define the number of decimal digits you want to be shown

$MONEY_DECIMALS = 2; (2 is the default)

and the position of the currency symbol:

$MONEY_SYMBOL_POS = "R" => the currency symbol will be displayed AFTER the amount
$MONEY_SYMBOL_POS = "L" => the currency symbol will be displayed BEFORE the amount
=========================================================================================*/

$MONEY_FORMAT = 1;
$MONEY_DECIMALS = 2;
$MONEY_SYMBOL_POS = "L";



//-- This is the directory where passwd.inc.php file resides - requires ending slash

$include_path = "./includes/";
#$include_path = "C:\\some\\path\\to\\includes\\";


//-- This is the directory where users pictures will be uploaded - requires ending slash
//-- Under Windows use something like C:\\path\\to\\you\\uploaddir\\

$image_upload_path = "/var/www/phpauction/uploaded/";
#$image_upload_path = "C:\\some\\path\\to\\uploaded\\";
$uploaded_path = "uploaded/";
#$uploaded_path = "uploaded\\";


//--
$MAX_UPLOAD_SIZE = 100000;



//-- This string is added to passwords before generating the MD5 hash
//-- Be sure to never change it after the firt set up or
//-- your users passwords will not work

$MD5_PREFIX = "put_here_along_and_unpredictable_string";



//-- Wether or not you want to show the acceptance text contained in
//-- acceptance.inc.php in users registration page

$SHOW_ACCEPTANCE_TEXT = 1;


/*
This is the log file generated by cron.php - insert the complete
file name (including the absolute path).
If you don't want to generate a log file for cron activity simply
leave this line commented.
*/

#$logFileName = "/var/www/auctions/logs/cron.log";
#$logFileName = "C:\\path\\to\cron.log";

/*
Set this to TRUE if you want cron to generates HTML output
BESIDES the cron file declared above. cron.php cannot generates
only HTML output.
*/
$cronScriptHTMLOutput = FALSE;


$expireAuction = 60*60*24*30; // time of auction expiration (in seconds)
$sessionLifeTime = 60*60*24*2; // time of a user session lifetime



//-- some constants

$err_font = "<FONT FACE=\"Verdana,Arial,Helvetica\" SIZE=\"2\" COLOR=red>";
$std_font = "<FONT FACE=\"Verdana,Arial,Helvetica\" SIZE=\"2\">";
$sml_font = "<FONT FACE=\"Verdana,Arial,Helvetica\" SIZE=\"1\">";
$smlnav_font = "<FONT FACE=\"Verdana,Arial,Helvetica\" SIZE=\"1\" COLOR=white>";
$tlt_font = "<FONT FACE=\"Verdana,Arial,Helvetica\" SIZE=\"4\">";
$tlt2_font = "<FONT FACE=\"Verdana,Arial,Helvetica\" SIZE=\"3\">";
$usr_font = "<FONT FACE=\"Verdana,Arial,Helvetica\" SIZE=\"4\" COLOR=\"#F6AF17\">";
$nav_font = "<FONT FACE=\"Verdana,Arial,Helvetica\" SIZE=\"2\" COLOR=\"#FFFFFF\">";





/*======================================================================
* *
* Don't edit the code below unless you really know what you are doing *
* *
======================================================================*/

//--
if(strpos($PHP_SELF,"admin/")){
$password_file = "../".$include_path."passwd.inc.php";
}else{
$password_file = $include_path."passwd.inc.php";
}



//-- Site administrator's email

if(strpos($PHP_SELF,"admin/")){
include("../includes/adminmail.inc.php");
}else{
include("./includes/adminmail.inc.php");
}

if(strpos($PHP_SELF,"admin/")){
include("../includes/currency.inc.php");
}else{
include("./includes/currency.inc.php");
}


include($password_file);

//-- Database connection

mysql_pconnect($DbHost,$DbUser,$DbPassword)
or die("Database access error. Please contact the site administrator.");
mysql_select_db($DbDatabase);


//-- sessions support

if(strpos($PHP_SELF,"admin/")){
include("../includes/sessions.inc.php");
}else{
include("./includes/sessions.inc.php");
}



?>



Tag : - - - -







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 28 ก.ค. 2548 20:32:32 By : patcharee View : 3576 Reply : 1
 

 

No. 1



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

มีปัญหาที่ mysql ครับ แต่จำ error ไม่ได้เหมือนกันครับ จะต้องลองติดต่อกับเจ้าของ server
เพื่อปรึกษาปัญหาและหาวิธีการแก้ไขครับ






Date : 2 ส.ค. 2548 10:57:03 By : @W_IN
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : Warning: mysql_pconnect(): Can't connect to local MySQL server
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 05
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่