Posted by HHH on 06/13/2009
0 CommentsNote: This guide is for server running WHM (Web Host Manager).
This guide has been tested and working fine on Fedora & Centos machines.
First login as root then run the following command in the Terminal:
Look at the current version of Pure-ftpd on your OS.
Then go to this site http://diff.cpanel.net/ftpinstall/pure-ftpd/src/ and download the corresponding version that you current have.
When finish downloading, run this command to rebuild your Pure-ftpd:
Read more...
This guide has been tested and working fine on Fedora & Centos machines.
First login as root then run the following command in the Terminal:
1.
/scripts/ftpup
Look at the current version of Pure-ftpd on your OS.
Then go to this site http://diff.cpanel.net/ftpinstall/pure-ftpd/src/ and download the corresponding version that you current have.
When finish downloading, run this command to rebuild your Pure-ftpd:
1.
rpmbuild --rebuild --define 'with_mysql 1' pure-ftpd-1.0.21-9.tls.src.rpm
Read more...
Posted by HHH on 06/13/2009
0 Commentssave as: dbcon.php
Read more...
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
<?php
class db {
var $query_count = 0;
var $connection_id = "";
var $query_id = "";
var $record_row = array();
var $cf = array();
var $obj = array (
'sql_host' => '',
'sql_user' => '',
'sql_pass' => '',
'sql_database' => ''
);
function connect()
{
$this->connection_id = @mysql_connect($this->obj['sql_host'], $this->obj['sql_user'], $this->obj['sql_pass']);
@mysql_select_db($this->obj['sql_database'],$this->connection_id) or $this->err(mysql_error());
}
function query($query)
{
$this->query_count++;
$this->query_id = mysql_query($query, $this->connection_id) or $this->err(mysql_error());
return $this->query_id;
}
function fetch_array($query)
{
$this->record_row = mysql_fetch_array($query, MYSQL_ASSOC);
return $this->record_row;
}
function get_num_rows($query) {
return mysql_num_rows($query);
}
function get_query_cnt()
{
return $this->query_count;
}
function close()
{
if ( $this->connection_id )
{
return @mysql_close( $this->connection_id );
}
}
function err($error)
{
echo "Database Error: $error";
}
}
?>
Read more...