URL to your eFiction: http://www.jonasbrothersfanfictionarchive.com
Version of eFiction: 3.4.3
Have you bridged eFiction, if so with what?: SMF
Version of PHP: 4
Version of MySQL: can be found out from your host
Have you searched for your problem: yes
If so, what terms did you try: no story text
State the nature of your problem: After several months of taking stories, today the site decided not to take story text when a user posts a new chapter. Even weirder because if you go back and edit the chapter, it will happily take the story text.
We're storing the stories as files. No, the settings haven't accidentally been switched to storing in the database. Yes, the stories folder is set to 777. As far as we know, nothing has changed.
Do you have a test account for us? testuser/banana
Skins made by Kali are no longer supported!
Is it consistent? Or was it just one story doing that? If it was just one story did it maybe have the word 'curl' in the story?
******************************************
Mucking around in eFiction since circa 2001 (ver. 1.0)
Now running v.3
No, it's consistent and appears to be happening with some reviews too. We're inclined to blame it on something Dreamhost did (they were mucking with our private server) but we also deleted some stories and things so maybe we got ourselves out of sync or something?
Edit: Is there supposed to be a 0.txt file in the stories folder?
Skins made by Kali are no longer supported!
No there shouldn't.
Fantastico. WTF is my site doing? Apparently the 0.txt is what's being created when you try to upload a new chapter. It doesn't produce a properly numbered one until you go in and edit.
Skins made by Kali are no longer supported!
Alright, so I've discovered that the database query when a new chapter is posted works just fine. It knows what the correct chapter id is.
The problem is that the for whatever reason, the site just refuses to properly name the chapter text file correctly. It writes the file just fine, you can open it and the text is there, but it always names is "0.txt"
$insertchapter = dbquery("INSERT INTO ".TABLEPREFIX."fanfiction_chapters (title, inorder, notes, endnotes, validated, wordcount, sid, uid) VALUES
[line break to save forum formatting]
('".addslashes(($chaptertitle != "" ? $chaptertitle : $title))."', '$inorder', '".addslashes(format_story($notes))."',
[line break to save forum formatting]
'".addslashes(format_story($endnotes))."', '".($validated ? 1 : 0)."', '$wordcount', '$sid', '$uid')");
$chapid = dbinsertid( );
if( !file_exists("".STORIESPATH."/$uid/" ) )
{
mkdir("".STORIESPATH."/$uid/", 0755);
chmod("".STORIESPATH."/$uid/", 0777);
}
$handle = fopen("".STORIESPATH."/$uid/$chapid.txt", 'w');
if ($handle)
{
fwrite($handle, $storytext);
fclose($handle);
}
chmod("".STORIESPATH."/$uid/$chapid.txt", 0644);
if(($newchapter && $insertchapter != false) || $insertstory != false) {
if($newchapter) {
unset($_POST['submit']);
$output = write_message(_ACTIONSUCCESSFUL).editstory( $sid );
}
else {
if(!$admin) $output = write_message(_STORYADDED).viewstories( );
else $output .= write_message(_ACTIONSUCCESSFUL).editstory( $sid );
}
}
else $output .= write_error(_FATALERROR." "._TRYAGAIN);
}
Is the code in stories.php Did this somehow get changed?
Skins made by Kali are no longer supported!
Seems like you're not getting an insert id from mysql. Not sure why that would be happening though.
