How to install paste

Status
Not open for further replies.
14 comments
i've done with every thing but it's still showing (Unable to connect to database) i've created table as well and cofigure it as well but still Unable to connect to database
 
You have entered the correct host name, the user name that has full access and the complete database name in the config file??
Check in your cpanel if you have one to match that those are correct.

If you think they are correct then add them to this php script and upload it to your piblic_html folder using ftp or file manager and run it from the command line like this changing all the DB information including localhost if you need .. :
Code:
http;//yoursite.com/testdb.php
Code:
<?php
function ss_error($message) 
{
  echo  $message."<br>";
  die();
}

// set up database information 

$ss_dbhost = "localhost" ;
$ss_dbuser = "my_uusername";
$ss_dbpass = "my_databasepassword";
$ss_dbname = "my_databasename";

  if(!($ss_lnk = mysql_connect($ss_dbhost, $ss_dbuser, $ss_dbpass))) {
    ss_error("can not connect to MySql using $ss_dbhost using user $ss_dbuser");
    return;
  }
  if(!mysql_select_db($ss_dbname, $ss_lnk)) {
    ss_error("can not select database $ss_dbname");
    return;
  }
?>
save this in a file called testdb.php and upload to server..
 
edit the index.php file and add this line above the require_once statment
Code:
error_log("Just before the require start.php", 3, "/home/[your username]/public_html/errors.log");

now refresh, it will create errors.log in /home/[your username]/public_html/errors.log paste error logs for us,
i guess it is permission problem.
 
finally did it....i was doing blender.....
MySQL database
$CONF['dbhost']='localhost';
$CONF['dbname']='mysqldatabase';
$CONF['dbuser']='mysqluser';
$CONF['dbpass']='databasepassword'
by mistake i put detail in ['dbhost'] , ['dbname'], ['dbuser'], ['dbpass'] while i've to put that info in 'localhost', 'mysqldatabase' ......

thank you very much guyz for your help and specially Lock Down

but it's running very bad.......while site is loading fine
Code:
http://releaselog.eu/paste/index.php

and also it's not creating any paste ............saying nothing found.......and i checked table and i can't browse the table it's saying Table seems to be empty
 
Last edited:
You are welcome.

Looks like the database is lagging a lot. Use mysqltuner to see if it offers any solutions.

Also use top to see what resources you are using.
 
You are welcome.

Looks like the database is lagging a lot. Use mysqltuner to see if it offers any solutions.

Also use top to see what resources you are using.

It's not the database. for some reason your paths are /paste.info.tm when they should be /releaselog.eu/paste

Change that and you should be fine
 
Status
Not open for further replies.
Back
Top