Need help installing pastebin

manizzle

New Member
Messages
8
Reaction score
0
Points
0
As a computer programming enthusiast in college as well as majoring in compsci, I really wanted to have my own pastebin site that I can customize to my class needs and such. The only problem is that the instructions for installing pastebin are vague(for me). I attempted to install, but couldn't even get past making a virtual host. Is there someone who could explain to me how to setup a working install of the pastebin software on my x10hosting site please?

Thanks alot.
 

xPlozion

New Member
Messages
868
Reaction score
1
Points
0
I just downloaded pastebin's code, and reading over the INSTALL instructions, you need to do a few things (ignore the VirtualHost as it is for if you are setting up apache (which you do not need to do as cpanel takes over that role).

Assuming that you are going down the MySQL road, only these directions apply to you:
Code:
Requirements:
=============
- PHP 4.1 or higher (works with register-globals off)
- MySQL database server (now optional)

- For short url generation, Apache with mod_rewrite available. Something
  like the following configuration options should be used

    RewriteEngine on
    RewriteRule /([a-z0-9]+) /pastebin.php?show=$1

  If mod_rewrite is not available, modify the shorturl() function to 
  generate 'normal' urls.

- For instant "private" pastebins on subdomains, you'll need a wildcard
  DNS entry pointing at your server and ensure that pastebin virtual host
  is the first virtual host on your server. There may be other ways to 
  accomplish this, this was just the easiest for me.
  
  
Installation
============

If using the "mysql" storage engine, setup a new database with the following 
table

CREATE TABLE `pastebin` (
	  `pid` int(11) NOT NULL auto_increment,
	  `poster` varchar(16) default NULL,
	  `posted` datetime default NULL,
	  `code` text,
	  `parent_pid` int(11) default '0',
	  `format` varchar(16) default NULL,
	  `codefmt` mediumtext,
	  `codecss` text,
	  `domain` varchar(255) default '',
	  `expires` DATETIME,
	  `expiry_flag` ENUM('d','m', 'f') NOT NULL DEFAULT 'm',
	  
	  PRIMARY KEY  (`pid`),
	  KEY `domain` (`domain`),
	  KEY `parent_pid`,
	  KEY `expires`
	);

create table recent
(
	domain varchar(255),
	pid int not null,
	seq_no int not null,
	
	primary key(domain,seq_no)
);


Now you need to edit you base configuration file. Make a copy of 
lib/config/default.conf.php	and call the file my.domain.conf.php

For example, if your domain is superpaste.com, you'd call the file
superpaste.com.conf.php

Edit the file to configure the software to your requirements. You
can create alternative configurations for other host names simply
by creating a new configuration file.

That's it, you're good to go. Good luck!

If you need anymore help, I am here to assist in any way.

-xP
 

Nathan H

New Member
Messages
562
Reaction score
0
Points
0
CREATE TABLE `pastebin` (
`pid` int(11) NOT NULL auto_increment,
`poster` varchar(16) default NULL,
`posted` datetime default NULL,
`code` text,
`parent_pid` int(11) default '0',
`format` varchar(16) default NULL,
`codefmt` mediumtext,
`codecss` text,
`domain` varchar(255) default '',
`expires` DATETIME,
`expiry_flag` ENUM('d','m', 'f') NOT NULL DEFAULT 'm',

PRIMARY KEY (`pid`),
KEY `domain` (`domain`),
KEY `parent_pid`,
KEY `expires`
);

create table recent
(
domain varchar(255),
pid int not null,
seq_no int not null,

primary key(domain,seq_no)
);
To run this simply go into phpmyadmin, and go to SQL at the top, this will run the needed commands
 
Top