Pastebin – Turbo Boost Success!

Just been checking the stats on pastebin.com and clearly the recent changes have worked well! Usage has trebled since last week and it’s still very responsive.

It’s nice to see that people still want to use it, so I’m going to ride this wave of enthusiasm and improve it further over the coming weeks.

Your feedback, as ever, is welcome!

16 thoughts on “Pastebin – Turbo Boost Success!

  1. Dan Coats

    I am getting Warning: Invalid argument supplied for foreach() in pastebin/pastebin.class.php on line 284
    and Warning: Invalid argument supplied for foreach() in layout.php on line 82 with this new version..
    any clues?

  2. Nicolas

    Items set to delete on 1 day still show on the list, although clicking them doesn’t show the contents of the paste. (This is on a private pastebin within the official pastebin.com site, not on another site using your code)

  3. Stephen Ostrow

    Thanks the new pastebin speed and layout. Works great and will become my new exclusive pastebin, probably like a lot of people. One thing I noticed is that you forgot to make the “Remember Me” a label for the check box.

  4. Jeroen van Zijp

    Hello LordElph,
    I really appreciate your time and effort you put in this project. I am using your pastebin software on my own server @ http://pastebin.breq.ath.cx/ since 0.50 was just released. I was busy with installing the new version (0.60) but when I came to entering the MySQL queries which are mentioned in the file INSTALL, I got this error:

    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`
    )

    MySQL said: Documentation
    #1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘
    KEY `expires`
    )’ at line 16

    I can’t really see what’s wrong with the query… (I fixed the query for the table `recent` though.
    Can you help and tell me what the problem is, so I can go on? ๐Ÿ™‚
    Many thanks in advance,

    Jeroen van Zijp

  5. dotslash

    Hey Joroen,

    After doing some digging I found a working solution for this. I found it via a french blog after google translating…God Bless google… The setion here:

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

    I had to add ()’s around the parent_pid and expires key like so:

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

    I’m not much of a DBA so I can’t answer why, but the syntax took after enclosing the keys. I hope this helps!

    dotslash
    Socrates: “I drank what?”

  6. Jeroen van Zijp

    Hey man! Thanks for the workaround and for noticing me on my forum. ๐Ÿ™‚
    Fortunately I fixed the SQL query myself, with no experience with SQL in any way.
    Ensure to check back my site later! ๐Ÿ˜› I now have an own domainname so you can check on that later.
    The pastebin itself is to be found at http://pastebin.macbreq.nl/
    God bless and speak you later.

  7. pushedx

    Thanks for posting that tip dotslash. I ran into the same problem and used your solution to fix the query. Maybe lordelph can update the download ๐Ÿ˜‰

    Anyways, thanks lordelph for the pastebin. No amount of words can express how great it really is ๐Ÿ™‚

  8. tal

    sloved:

    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` )
    );

  9. Bob

    great to see that but I am trying to set that up in my .htaccess file and I am having one hell of a time, just can’t seem to get it to work.. anyone able to post an example of their working .htaccess?

  10. Nicholas Alipaz

    3. Change line #306 of layout.php as follows:
    http://pastebin.com/f19a87b14
    *This was needed because a post that had no children was showing “modifications of a post by view diff”. As you can see the username was missing, this is because the post was NOT a modification of another post.*

    4. A custom change I made so that the help page was seo friendly:
    In layout.php, change every instance of the help link:
    http://pastebin.com/f61e426d3
    Then in your .htaccess add:
    http://pastebin.com/f4c497673

Comments are closed.