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!
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?
@Dan – I emailed you but haven’t heard back!
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)
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.
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
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?”
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.
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 ๐
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` )
);
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?
I think maybe wordpress is garbling up some quotations on this page, so I posted the corrected MySQL query in (quite appropriately) the pastebin:
http://pastebin.com/f5c8e168a
I hope someone else gets some use.
Bob, I have:
http://pastebin.com/f7588d080
Note that I have changed the links to the help page in layout.php to be help.html
Also, be aware that my pastebin is in the /pastebin/ directory of my site, so change the .htaccess to reflect your path if need be.
oh yeah, I also renamed my pastebin.php file to index.php
so be careful with that too.
Ok, this is probably my last post. But I will sum up all changes I needed to do to get the installation done/bug free (from what I can tell).
1. Alter the MySQL query to:
http://pastebin.com/f129ec21c
2. Change the .htaccess addition to:
Installation in the root of the site:
http://pastebin.com/f583f07c5
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
dhjcbd 37278 dhjcbd order viagra 43074 75121 vjkfd fv order viagra 80064 nbcikrf http://cgi3.ebay.com/ws/eBayISAPI.dll?ViewUserPage&userid=order-viagra-online order viagra online ๐ 86012 wttwd dhjcbd