Jump to content
xisto Community
Sign in to follow this  
wild20

Major Problems With Php Script Hold on for this one

Recommended Posts

Okay, so I got a php script for my site called php Bible. So I get it and go to install it, and then the problems start. You see it uses php, dud, to search and view scripture. So here are the instructions:


1) Upload the files to a useful place inside your web server's document tree. 2) Change the things that look wrong in config.php. 3) Make sure "AcceptPathInfo ON" (or analogous) is somewhere in your PHP file section of your web server config. 4) Go over steps 2 and 3 again, because you probably missed something for lack of documentation.


So I do this, you get a whole bunch of files for each chapter in the Bible. see this code below to explain more. Look at the files at the bottom and it shows what each book of the bible is named:


<?/* * config.php - The configuration for a simple web program written by Alex Markley to display chunks of the Holy Bible. *//*This file is part of PHPScripture (Formally Alex's PHPBible).PHPScripture is Copyright ďż˝ 2003, Alex MarkleyPHPScripture is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2 of the License, or(at your option) any later version.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program; if not, write to the Free SoftwareFoundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA*///Headerless?$config["headerless"] = FALSE; //Can be TRUE or FALSE. (Probably FALSE.)//Theme? (Only takes effect if headerless is false.) (It is the name of a folder within the themes folder.)$config["theme"] = "plain"; //No theme at all.//$config["theme"] = "eternity"; //Green and forresty.//$config["theme"] = "forest_bed"; //Green and forresty.//$config["theme"] = "aquatic_geometry"; //Blue, watery, etc.//Searching Stuff (Searching requires a sane version of GREP, and a sane shell to both be installed.)$config["good_shell"] = "/bin/sh"; //Full path to borne or bash or something similar.$config["grep_command"] = "egrep"; //Search command.$config["disable_searching"] = FALSE; //Can be TRUE or FALSE. (Probably FALSE.)//This stuff probably needs changed. ALL OF THESE VALUES SHOULD END IN A '/', EXCEPT IN VERY RARE CIRCUMSTANCES.$config["URI_prefix"] = "http://my.domain.org/path/to/script/"; //Where the script lives on the web.$config["script_suffix"] = "bible.php/"; //The name of the main script. (It may seem strange that this should end in a '/', but that is indeed the case.)$config["local_prefix"] = "/path/to/config/and/things/"; //Where the script lives on the disk.$config["bible_midfix"] = "bible/"; //The directory that the bible data is in. ($config["local_prefix"] . $config["bible_midfix"])$config["themes_midfix"] = "themes/"; //The directory that the bible data is in. ($config["local_prefix"] . $config["bible_midfix"])//This stuff doesn't need changed, but it's useful.$config["title"] = "Holy Bible"; //Title of the page.$config["element_wrap"] = 5; //Wrap every 5 things.$config["search_results_per_page"] = 20; // 20 search results to a page//Don't change the things below this line.$config["version"]["major"] = 1;$config["version"]["minor"] = 2;$config["version"]["subminor"] = 3;$bible_books[0]["long"] = "Genesis"; $bible_books[0]["short"] = "Ge";$bible_books[1]["long"] = "Exodus"; $bible_books[1]["short"] = "Ex";$bible_books[2]["long"] = "Leviticus"; $bible_books[2]["short"] = "Le";$bible_books[3]["long"] = "Numbers"; $bible_books[3]["short"] = "Nu";$bible_books[4]["long"] = "Deuteronomy"; $bible_books[4]["short"] = "De";$bible_books[5]["long"] = "Joshua"; $bible_books[5]["short"] = "Jos";$bible_books[6]["long"] = "Judges"; $bible_books[6]["short"] = "Jud";$bible_books[7]["long"] = "Ruth"; $bible_books[7]["short"] = "Ru";$bible_books[8]["long"] = "1 Samuel"; $bible_books[8]["short"] = "1Sa";$bible_books[9]["long"] = "2 Samuel"; $bible_books[9]["short"] = "2Sa";$bible_books[10]["long"] = "1 Kings"; $bible_books[10]["short"] = "1Ki";$bible_books[11]["long"] = "2 Kings"; $bible_books[11]["short"] = "2Ki";$bible_books[12]["long"] = "1 Chronicles"; $bible_books[12]["short"] = "1Ch";$bible_books[13]["long"] = "2 Chronicles"; $bible_books[13]["short"] = "2Ch";$bible_books[14]["long"] = "Ezra"; $bible_books[14]["short"] = "Ezr";$bible_books[15]["long"] = "Nehemiah"; $bible_books[15]["short"] = "Ne";$bible_books[16]["long"] = "Esther"; $bible_books[16]["short"] = "Es";$bible_books[17]["long"] = "Job"; $bible_books[17]["short"] = "Job";$bible_books[18]["long"] = "Psalms"; $bible_books[18]["short"] = "Ps";$bible_books[19]["long"] = "Proverbs"; $bible_books[19]["short"] = "Pr";$bible_books[20]["long"] = "Ecclesiastes"; $bible_books[20]["short"] = "Ec";$bible_books[21]["long"] = "Song of Songs"; $bible_books[21]["short"] = "So";$bible_books[22]["long"] = "Isaiah"; $bible_books[22]["short"] = "Isa";$bible_books[23]["long"] = "Jeremiah"; $bible_books[23]["short"] = "Jer";$bible_books[24]["long"] = "Lamentations"; $bible_books[24]["short"] = "La";$bible_books[25]["long"] = "Ezekial"; $bible_books[25]["short"] = "Eze";$bible_books[26]["long"] = "Daniel"; $bible_books[26]["short"] = "Da";$bible_books[27]["long"] = "Hosea"; $bible_books[27]["short"] = "Ho";$bible_books[28]["long"] = "Joel"; $bible_books[28]["short"] = "Joe";$bible_books[29]["long"] = "Amos"; $bible_books[29]["short"] = "Am";$bible_books[30]["long"] = "Obadiah"; $bible_books[30]["short"] = "Ob";$bible_books[31]["long"] = "Jonah"; $bible_books[31]["short"] = "Jon";$bible_books[32]["long"] = "Micah"; $bible_books[32]["short"] = "Mic";$bible_books[33]["long"] = "Nahum"; $bible_books[33]["short"] = "Na";$bible_books[34]["long"] = "Habakkuk"; $bible_books[34]["short"] = "Hab";$bible_books[35]["long"] = "Zephaniah"; $bible_books[35]["short"] = "Zep";$bible_books[36]["long"] = "Haggai"; $bible_books[36]["short"] = "Hag";$bible_books[37]["long"] = "Zechariah"; $bible_books[37]["short"] = "Zec";$bible_books[38]["long"] = "Malachi"; $bible_books[38]["short"] = "Mal";$bible_books[39]["long"] = "Matthew"; $bible_books[39]["short"] = "Mt";$bible_books[40]["long"] = "Mark"; $bible_books[40]["short"] = "Mr";$bible_books[41]["long"] = "Luke"; $bible_books[41]["short"] = "Lu";$bible_books[42]["long"] = "John"; $bible_books[42]["short"] = "Joh";$bible_books[43]["long"] = "Acts"; $bible_books[43]["short"] = "Ac";$bible_books[44]["long"] = "Romans"; $bible_books[44]["short"] = "Ro";$bible_books[45]["long"] = "1 Corinthians"; $bible_books[45]["short"] = "1Co";$bible_books[46]["long"] = "2 Corinthians"; $bible_books[46]["short"] = "2Co";$bible_books[47]["long"] = "Galatians"; $bible_books[47]["short"] = "Ga";$bible_books[48]["long"] = "Ephesians"; $bible_books[48]["short"] = "Eph";$bible_books[49]["long"] = "Philippians"; $bible_books[49]["short"] = "Php";$bible_books[50]["long"] = "Colossians"; $bible_books[50]["short"] = "Col";$bible_books[51]["long"] = "1 Thessalonians"; $bible_books[51]["short"] = "1Th";$bible_books[52]["long"] = "2 Thessalonians"; $bible_books[52]["short"] = "2Th";$bible_books[53]["long"] = "1 Timothy"; $bible_books[53]["short"] = "1Ti";$bible_books[54]["long"] = "2 Timothy"; $bible_books[54]["short"] = "2Ti";$bible_books[55]["long"] = "Titus"; $bible_books[55]["short"] = "*BLEEP*";$bible_books[56]["long"] = "Philemon"; $bible_books[56]["short"] = "Phm";$bible_books[57]["long"] = "Hebrews"; $bible_books[57]["short"] = "Heb";$bible_books[58]["long"] = "James"; $bible_books[58]["short"] = "Jas";$bible_books[59]["long"] = "1 Peter"; $bible_books[59]["short"] = "1Pe";$bible_books[60]["long"] = "2 Peter"; $bible_books[60]["short"] = "2Pe";$bible_books[61]["long"] = "1 John"; $bible_books[61]["short"] = "1Jo";$bible_books[62]["long"] = "2 John"; $bible_books[62]["short"] = "2Jo";$bible_books[63]["long"] = "3 John"; $bible_books[63]["short"] = "3Jo";$bible_books[64]["long"] = "Jude"; $bible_books[64]["short"] = "Jude";$bible_books[65]["long"] = "Revelation"; $bible_books[65]["short"] = "Re";?>

What you just saw was the config.php files. All files are uploaded into the directory http://forums.xisto.com/no_longer_exists/. The main file is called index.php, but used to be called bible.php. So I do this, and then it says to edit the config, see the above code it shows instructions near the top, and the urls to edit. So I go to test it out, and guess what? It doesn't work. I worked on it for two whole hours, and it still doesn't work. I need to know how to edit those files, if the index.php file, config.php file, and all the other files are located only in http://forums.xisto.com/no_longer_exists/. For the book, I am also including the bible.php code, which I changed to index.php. In case you are wondering, I did change in both these files that the bible.php, is now index.php.


<?/* * bible.php - A simple web program written by Alex Markley to display chunks of the Holy Bible. *//*This file is part of PHPScripture (Formally Alex's PHPBible).PHPScripture is Copyright ďż˝ 2003, Alex MarkleyPHPScripture is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2 of the License, or(at your option) any later version.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program; if not, write to the Free SoftwareFoundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA*/include("config.php");function is_valid_number($something) { if(preg_match("/^([0-9]+)$/", $something)) return(TRUE); else return(FALSE); }//We try to _GET the infos.if(isset($_GET["book"])) $config["book"] = $_GET["book"];if(isset($_GET["chapter"])) $config["chapter"] = $_GET["chapter"];if(isset($_GET["verse"])) $config["verse"] = $_GET["verse"];if(isset($_GET["operation"])) $config["operation"] = $_GET["operation"];if(isset($_GET["search"])) $config["search"] = $_GET["search"];if(isset($_GET["page"])) $config["page"] = $_GET["page"];if(isset($_POST["book"])) $config["book"] = $_POST["book"];if(isset($_POST["chapter"])) $config["chapter"] = $_POST["chapter"];if(isset($_POST["verse"])) $config["verse"] = $_POST["verse"];if(isset($_POST["operation"])) $config["operation"] = $_POST["operation"];if(isset($_POST["search"])) $config["search"] = $_POST["search"];if(isset($_POST["page"])) $config["page"] = $_POST["page"];if(isset($config["book"]) && strcmp($config["book"], "") == 0) unset($config["book"]);if(isset($config["chapter"]) && strcmp($config["chapter"], "") == 0) unset($config["chapter"]);if(isset($config["verse"]) && strcmp($config["verse"], "") == 0) unset($config["verse"]);if(isset($config["operation"]) && strcmp($config["operation"], "") == 0) unset($config["operation"]);if(isset($config["search"]) && strcmp($config["search"], "") == 0) unset($config["search"]);if(isset($config["page"]) && strcmp($config["page"], "") == 0) unset($config["page"]);if($config["disable_searching"] === TRUE) { if(isset($config["operation"]) && strcmp($config["operation"], "Search") == 0) unset($config["operation"]); unset($config["search"]); unset($config["page"]); }//Now we assemble a correct URL to redirect to.if(isset($config["book"])) { if(isset($config["book"])) { $stringbits[0] = ($config["book"]); if(isset($config["chapter"])) { $stringbits[1] = ("/" . $config["chapter"]); if(isset($config["verse"])) { $stringbits[2] = ("/" . $config["verse"]); } } } //Now assemble GET vars. unset($stringbits[3]); //Make sure is unset. if(isset($config["operation"]) && strcasecmp($config["operation"], "Go") != 0) //There is a special exception for operation "Go", because it's default anyway. { if(isset($stringbits[3])) $stringbits[3] = ($stringbits[3] . "&"); else $stringbits[3] = ($stringbits[3] . "?"); $stringbits[3] = ($stringbits[3] . "operation=" . $config["operation"]); } if(isset($config["search"])) { if(isset($stringbits[3])) $stringbits[3] = ($stringbits[3] . "&"); else $stringbits[3] = ($stringbits[3] . "?"); $stringbits[3] = ($stringbits[3] . "search=" . $config["search"]); } if(isset($config["page"])) { if(isset($stringbits[3])) $stringbits[3] = ($stringbits[3] . "&"); else $stringbits[3] = ($stringbits[3] . "?"); $stringbits[3] = ($stringbits[3] . "page=" . $config["page"]); } header("Location: " . $config["URI_prefix"] . $config["script_suffix"] . $stringbits[0] . $stringbits[1] . $stringbits[2] . $stringbits[3]); exit(); }if(isset($_SERVER["PATH_INFO"])) //The info from the path takes precedence. { $array = explode("/", $_SERVER["PATH_INFO"], 5); for($tint = 1;isset($array[$tint]);$tint++) { if($tint === 1) $config["book"] = $array[$tint]; else if($tint === 2) $config["chapter"] = $array[$tint]; else if($tint === 3) $config["verse"] = $array[$tint]; } }//echo(" \"" . $config["chapter"] . "\" \n");?><?if($config["headerless"] === FALSE) { ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd; <html> <head> <? if(!isset($config["operation"]) || !(strcmp($config["operation"], "print") == 0)) { ?> <style type="text/css"> <? include($config["local_prefix"] . $config["themes_midfix"] . $config["theme"] . "/theme.php"); ?> </style> <? } ?> <title><? echo($config["title"]); ?></title> </head> <body> <? }?><div align="center"><h1><? echo($config["title"]); ?></h1></div><?//Check for the validity of the input.if(isset($config["chapter"]) && (is_valid_number($config["chapter"]) === FALSE)) { if(strcmp($config["chapter"], "") != 0) echo("<h3>Sorry, Chapter needs to be a number.</h3>\n"); unset($config["chapter"]); //Just get rid of it. }if(isset($config["verse"]) && (is_valid_number($config["verse"]) === FALSE)) { //There is a non-numerical character in verse. We /should/ be able to examine it for range. $temp_array = explode("-", $config["verse"], 2); if(isset($temp_array[0]) && isset($temp_array[1]) && is_valid_number($temp_array[0]) === TRUE && is_valid_number($temp_array[1]) === TRUE) { $config["verse"] = $temp_array[0]; $config["verse_end"] = $temp_array[1]; //echo("<h3>Verse Range \"" . $temp_array[0] . "\" - \"" . $temp_array[1] . "\"</h3>\n"); if($config["verse_end"] <= $config["verse"]) { echo("<h3>Sorry. With a verse range, ending Verse needs to be larger then begining Verse.</h3>\n"); unset($config["verse"]); unset($config["verse_end"]); } } else { if(strcmp($config["verse"], "") != 0) echo("<h3>Sorry, Verse needs to be a number.</h3>\n"); unset($config["verse"]); //Just get rid of it. } }if(isset($config["verse"]) && !isset($config["chapter"])) { echo("<h3>Sorry, you need a chapter if you're going to have a verse.</h3>\n"); unset($config["verse"]); //Just get rid of it. }if(strstr($config["book"], "/") === FALSE) { $bookok = FALSE; //Assume the book is invalid. for($tint = 0;isset($bible_books[$tint]);$tint++) { //echo("<p> " . $tint . " " . $config["book"] . " " . $bible_books[$tint]["long"] . " " . $bible_books[$tint]["short"]); if(strcasecmp($config["book"], $bible_books[$tint]["long"]) == 0) //This is a ref to the long name. { $bookok = TRUE; //The book is valid. $bookindex = $tint; $config["book"] = $bible_books[$tint]["short"]; //But the name needs to be the short version. //echo(" <-- This!\n"); } else if(strcasecmp($config["book"], $bible_books[$tint]["short"]) == 0) //This is a ref to the short name. { $bookok = TRUE; //The book is valid. $bookindex = $tint; $config["book"] = $bible_books[$tint]["short"]; //Make sure the name is exact. (We checked case insensitive, the case does matter though, so it's fixed.) //echo(" <-- This!\n"); } } //If it's still okay. if($bookok === TRUE) { //echo("<p>Book still okay\n"); $bookfilename = ($config["local_prefix"] . $config["bible_midfix"] . $config["book"]); //Generate the real filename. //echo("<p>\"" . $bookfilename . "\"\n"); $bookfile = @fopen($bookfilename, "rb"); //Try to open the book. if($bookfile == FALSE) { $bookok = FALSE; //echo("<p>No such book! \"" . $bookfilename . "\"\n"); } else { //echo("<p>Book Opened! \"" . $bible_books[$bookindex]["long"] . "\"\n"); } //echo("<p>Book either opened or not.\n"); } }else { $bookok = FALSE; }if($bookok === FALSE && strcasecmp($config["operation"], "Search") != 0) //We'll be displaying a list of availible books if the book is bad we're not searching. { if(strcmp($config["book"], "") != 0) echo("<h3>Sorry, can't find Book \"" . $config["book"] . "\"</h3>\n"); ?><?//Prepare the required vars.$tint = 0;$wrap = 0;?><div align="center"><h3>Old Testament</h3><h4>The Books of the Law</h4><p><table border="0"><tr align="center" valign="middle"><?$wrap = 0;while($tint < 5) { if($wrap >= $config["element_wrap"]) { $wrap = 0; echo("</tr><tr align=\"center\" valign=\"middle\">"); } echo("<td><form ACTION=\"" . $config["URI_prefix"] . $config["script_suffix"] . $bible_books[$tint]["short"] . "/" . 1 . "/\" METHOD=\"post\"><input TYPE=\"submit\" VALUE=\"" . $bible_books[$tint]["long"] . "\"></form></td>\n"); $tint++; $wrap++; }?></tr></table><h4>The Books of History</h4><p><table border="0"><tr align="center" valign="middle"><?$wrap = 0;while($tint < 17) { if($wrap >= $config["element_wrap"]) { $wrap = 0; echo("</tr><tr align=\"center\" valign=\"middle\">"); } echo("<td><form ACTION=\"" . $config["URI_prefix"] . $config["script_suffix"] . $bible_books[$tint]["short"] . "/" . 1 . "/\" METHOD=\"post\"><input TYPE=\"submit\" VALUE=\"" . $bible_books[$tint]["long"] . "\"></form></td>\n"); $tint++; $wrap++; }?></tr></table><h4>The Books of Wisdom</h4><p><table border="0"><tr align="center" valign="middle"><?$wrap = 0;while($tint < 22) { if($wrap >= $config["element_wrap"]) { $wrap = 0; echo("</tr><tr align=\"center\" valign=\"middle\">"); } echo("<td><form ACTION=\"" . $config["URI_prefix"] . $config["script_suffix"] . $bible_books[$tint]["short"] . "/" . 1 . "/\" METHOD=\"post\"><input TYPE=\"submit\" VALUE=\"" . $bible_books[$tint]["long"] . "\"></form></td>\n"); $tint++; $wrap++; }?></tr></table><h4>The Books of the Prophets</h4><p><table border="0"><tr align="center" valign="middle"><?$wrap = 0;while($tint < 39) { if($wrap >= $config["element_wrap"]) { $wrap = 0; echo("</tr><tr align=\"center\" valign=\"middle\">"); } echo("<td><form ACTION=\"" . $config["URI_prefix"] . $config["script_suffix"] . $bible_books[$tint]["short"] . "/" . 1 . "/\" METHOD=\"post\"><input TYPE=\"submit\" VALUE=\"" . $bible_books[$tint]["long"] . "\"></form></td>\n"); $tint++; $wrap++; }?></tr></table><h3>New Testament</h3><h4>Accounts of Christ's Life on Earth, and of the Early Church</h4><p><table border="0"><tr align="center" valign="middle"><?$wrap = 0;while($tint < 44) { if($wrap >= $config["element_wrap"]) { $wrap = 0; echo("</tr><tr align=\"center\" valign=\"middle\">"); } echo("<td><form ACTION=\"" . $config["URI_prefix"] . $config["script_suffix"] . $bible_books[$tint]["short"] . "/" . 1 . "/\" METHOD=\"post\"><input TYPE=\"submit\" VALUE=\"" . $bible_books[$tint]["long"] . "\"></form></td>\n"); $tint++; $wrap++; }?></tr></table><h4>Letters from the Apostle Paul to Churches</h4><p><table border="0"><tr align="center" valign="middle"><?$wrap = 0;while($tint < 53) { if($wrap >= $config["element_wrap"]) { $wrap = 0; echo("</tr><tr align=\"center\" valign=\"middle\">"); } echo("<td><form ACTION=\"" . $config["URI_prefix"] . $config["script_suffix"] . $bible_books[$tint]["short"] . "/" . 1 . "/\" METHOD=\"post\"><input TYPE=\"submit\" VALUE=\"" . $bible_books[$tint]["long"] . "\"></form></td>\n"); $tint++; $wrap++; }?></tr></table><h4>Letters from the Apostle Paul to Individuals</h4><p><table border="0"><tr align="center" valign="middle"><?$wrap = 0;while($tint < 57) { if($wrap >= $config["element_wrap"]) { $wrap = 0; echo("</tr><tr align=\"center\" valign=\"middle\">"); } echo("<td><form ACTION=\"" . $config["URI_prefix"] . $config["script_suffix"] . $bible_books[$tint]["short"] . "/" . 1 . "/\" METHOD=\"post\"><input TYPE=\"submit\" VALUE=\"" . $bible_books[$tint]["long"] . "\"></form></td>\n"); $tint++; $wrap++; }?></tr></table><h4>Other Epistles</h4><p><table border="0"><tr align="center" valign="middle"><?$wrap = 0;while($tint < 65) { if($wrap >= $config["element_wrap"]) { $wrap = 0; echo("</tr><tr align=\"center\" valign=\"middle\">"); } echo("<td><form ACTION=\"" . $config["URI_prefix"] . $config["script_suffix"] . $bible_books[$tint]["short"] . "/" . 1 . "/\" METHOD=\"post\"><input TYPE=\"submit\" VALUE=\"" . $bible_books[$tint]["long"] . "\"></form></td>\n"); $tint++; $wrap++; }?></tr></table><h4>Prophecy</h4><p><table border="0"><tr align="center" valign="middle"><?$wrap = 0;while($tint < 66) { if($wrap >= $config["element_wrap"]) { $wrap = 0; echo("</tr><tr align=\"center\" valign=\"middle\">"); } echo("<td><form ACTION=\"" . $config["URI_prefix"] . $config["script_suffix"] . $bible_books[$tint]["short"] . "/" . 1 . "/\" METHOD=\"post\"><input TYPE=\"submit\" VALUE=\"" . $bible_books[$tint]["long"] . "\"></form></td>\n"); $tint++; $wrap++; }?></tr></table></div> <? }else if(strcasecmp($config["operation"], "Search") == 0) //Not displaying the title page, but are searching. { if(!isset($config["search"]) || strcmp(trim($config["search"]), "") == 0) //If there's nothing in there. { echo("<h3>If I'm going to search, I need something to search for. (Regular Expressions are supported.)</h3>\n"); } else { $config["search"] = addslashes(trim($config["search"])); $bdata_path = $config["local_prefix"] . $config["bible_midfix"]; //if(!isset($config["book"])) if($bookok === FALSE) { unset($files); //Make sure is unset. foreach($bible_books as $bible_book) { $files = ($files . $bible_book["short"] . " "); } $command = ("'" . $config["search"] . "' " . $files); } else { $command = ("'" . $config["search"] . "' " . $config["book"]); } if(($search_results = popen($config["good_shell"] . " -c \"cd " . $bdata_path . "; env LANG=C " . $config["grep_command"] . " -H -i " . $command . "\"", "r")) == FALSE) { echo("<h3>Error! Error! Unable to read search results!</h3>\n"); } else { echo("<div align=\"center\"><h3>Search Results</h3></div>\n"); if(is_valid_number($config["page"]) === FALSE) $config["page"] = 1; //If we can't use it, it is probably nothing. $evaluate_verse_next = TRUE; $page = 0; $subpage = $config["search_results_per_page"] + 5; while($search_results != FALSE && !feof($search_results)) { $buffer = fgets($search_results, 128); if($evaluate_verse_next === TRUE && strcmp(rtrim($buffer), "") == 0);//echo("<h3>Killed a buffer!</h3>\n"); else { if($evaluate_verse_next === TRUE) { //Ok, this is a new verse, so we need to parse in and mark up the verse header. $buffer = explode(" ", $buffer, 2); //Seperate the verse from the header. $versedata = explode(":", $buffer[0]); //Explode the chunks of the header. $buffer = $buffer[1]

I am including the rest of this in the next post.


Edited by OpaQue (see edit history)

Share this post


Link to post
Share on other sites

And here is the rest:

//Let's do our page thing.						if($subpage >= $config["search_results_per_page"])							{							$page++;							$subpage = 1;														if($page == $config["page"]) $display = TRUE; //Allowed to display.							else $display = FALSE;							}						else $subpage++;												if($display === TRUE && $previous_book != $versedata[0]) //This is a new book.							{							if(isset($previous_book)) if($display === TRUE) { $output_buffer = $output_buffer . ("</ul></li>"); $started_book_list = FALSE; }							for($tint = 0;isset($bible_books[$tint]);$tint++)								{								if(strcasecmp($versedata[0], $bible_books[$tint]["short"]) == 0) //This is a ref to the short name.									$tstring = $bible_books[$tint]["long"];								}														if(!isset($tstring)) echo("<p><b>Error! \$tstring unset!</b></p>\n");														if($display === TRUE) { $output_buffer = $output_buffer . ("<li>" . $tstring . "<ul>"); $started_book_list = TRUE; }							$previous_book = $versedata[0];							}						if($display === TRUE) $output_buffer = $output_buffer . ("<li><sup><a href=\"" . $config["URI_prefix"] . $config["script_suffix"] . $versedata[0] . "/" . $versedata[1] . "/" . $versedata[2] . "\">" . $versedata[1] . ":" . $versedata[2] . "</a></sup> ");						}					if($display === TRUE) $output_buffer = $output_buffer . (htmlentities($buffer));					$evaluate_verse_next = FALSE; //Assume that we're not going to evaluate the verse next time.					if(!(strpos($buffer, "\n") === FALSE)) //If there is a newline, then the verse is over.						{						$evaluate_verse_next = TRUE;						if($display === TRUE) $output_buffer = $output_buffer . ("</li>\n");						}					}				}			if(isset($started_book_list) && $started_book_list === TRUE) { $output_buffer = $output_buffer . ("</ul></li>"); $started_book_list = FALSE; } //Make sure we've closed the tags.						if($page != 0)				{				echo("<div align=\"center\">\n");				echo("<p>Page " . $config["page"] . " of " . $page . "</p>\n");								/////PREVIOUS				echo("<table border=\"0\" width=\"50%\"><tr>\n");				echo("<td align=\"left\" valign=\"middle\">\n");				echo("<form ACTION=\"" . $config["URI_prefix"] . $config["script_suffix"] . "\" METHOD=\"get\">\n");				echo("<input type=\"hidden\" name=\"operation\" value=\"Search\">\n");				if($bookok === TRUE) echo("<input type=\"hidden\" name=\"book\" value=\"" . $config["book"] . "\">\n");				echo("<input type=\"hidden\" name=\"search\" value=\"" . $config["search"] . "\">\n");				echo("<input type=\"hidden\" name=\"page\" value=\"" . ($config["page"] - 1) . "\">\n");				if(($config["page"] - 1) < 1 || $config["page"] > $page || $config["page"] < 1) echo("<input type=\"submit\" value=\"<< Previous Page\" disabled>\n");				else echo("<input type=\"submit\" value=\"<< Previous Page\">\n");				echo("</form>\n");				echo("</td>\n");								/////SEEK				echo("<td align=\"center\" valign=\"middle\">\n");				echo("<form ACTION=\"" . $config["URI_prefix"] . $config["script_suffix"] . "\" METHOD=\"get\">\n");				echo("<input type=\"hidden\" name=\"operation\" value=\"Search\">\n");				if($bookok === TRUE) echo("<input type=\"hidden\" name=\"book\" value=\"" . $config["book"] . "\">\n");				echo("<input type=\"hidden\" name=\"search\" value=\"" . $config["search"] . "\">\n");				echo("Page: <input type=\"text\" name=\"page\" value=\"" . $config["page"] . "\" size=\"4\" maxlength=\"10\">\n");				echo("<input type=\"submit\" value=\"Go\">\n");				echo("</form>\n");								/////NEXT				echo("<td align=\"right\" valign=\"middle\">\n");				echo("<form ACTION=\"" . $config["URI_prefix"] . $config["script_suffix"] . "\" METHOD=\"get\">\n");				echo("<input type=\"hidden\" name=\"operation\" value=\"Search\">\n");				if($bookok === TRUE) echo("<input type=\"hidden\" name=\"book\" value=\"" . $config["book"] . "\">\n");				echo("<input type=\"hidden\" name=\"search\" value=\"" . $config["search"] . "\">\n");				echo("<input type=\"hidden\" name=\"page\" value=\"" . ($config["page"] + 1) . "\">\n");				if(($config["page"] + 1) > $page || $config["page"] > $page || $config["page"] < 1) echo("<input type=\"submit\" value=\"Next Page >>\" disabled>\n");				else echo("<input type=\"submit\" value=\"Next Page >>\">\n");				echo("</form>\n");				echo("</td>\n");				echo("</tr></table>\n");				echo("</div>\n");				}						if(isset($output_buffer)) echo("<ul>\n" . $output_buffer . "</ul>\n");			else if($page == 0) echo("<p>Sorry, no search results.</p>\n");			else if($config["page"] > $page || $config["page"] < 1) echo("<p>Sorry, nothing in the requested page.</p>\n");			else echo("<p>Phew, there's nothing to display, and I'm not sure why. (This is a bug.)\n");			}		}	}else //Not displaying the title page, or searching. (Display actual scripture.)	{	echo("<div align=\"center\"><h2>" . $bible_books[$bookindex]["long"]);	if(isset($config["chapter"]) && !isset($config["verse"])) echo(", Chapter " . $config["chapter"]);	else if(isset($config["chapter"]) && isset($config["verse"])) echo(" " . $config["chapter"] . ":" . $config["verse"]);	if(isset($config["verse"]) && isset($config["verse_end"])) echo("-" . $config["verse_end"]);	echo("</h2></div>\n");		$evaluate_verse_next = TRUE;		$previous_chapter_exists = FALSE;	$next_chapter_exists = FALSE;	$previous_verse_exists = FALSE;	$next_verse_exists = FALSE;		$ever_displayed = FALSE;		if(isset($config["verse"]) && isset($config["verse_end"])) $range_error = TRUE;	else $range_error = FALSE;		$last_chapter = 0;		$range_hit_start = FALSE;	$range_hit_end = FALSE;		if(!isset($config["chapter"]) && !isset($config["verse"]))		{		echo("<div align=\"center\"><h3>Please select a chapter.</h3><table border=\"0\"><tr align=\"center\" valign=\"middle\">\n");		$wrap = 0;		}		while(!feof($bookfile))		{		$buffer = fgets($bookfile, 128);		if($evaluate_verse_next === TRUE && strcmp(rtrim($buffer), "") == 0);//echo("<h3>Killed a buffer!</h3>\n");		else //Buffer isn't killed.			{			if($evaluate_verse_next === TRUE) //Last thing we did was find the end of a verse.				{				for($tint = 0;isset($buffer[$tint]) == TRUE && $buffer[$tint] != ":";$tint++) {; }				$current_chapter = substr($buffer, 0, $tint);				$tint2 = $tint + 1;				for($tint = 0;isset($buffer[$tint + $tint2]) == TRUE && $buffer[$tint + $tint2] != " ";$tint++) {; }				$current_verse = substr($buffer, $tint2, $tint);								$display = FALSE; //Assume that we're not to display the data.								if(isset($config["chapter"]) && $current_chapter < $config["chapter"]) $previous_chapter_exists = TRUE;				if(isset($config["chapter"]) && $current_chapter > $config["chapter"]) $next_chapter_exists = TRUE;				if(isset($config["chapter"]) && isset($config["verse"]) && $current_chapter === $config["chapter"] && $current_verse < $config["verse"]) $previous_verse_exists = TRUE;				if(isset($config["chapter"]) && isset($config["verse"]) && !isset($config["verse_end"]) && $current_chapter === $config["chapter"] && $current_verse > $config["verse"]) $next_verse_exists = TRUE;				if(isset($config["chapter"]) && isset($config["verse"]) && isset($config["verse_end"]) && $current_chapter === $config["chapter"] && $current_verse > $config["verse_end"]) $next_verse_exists = TRUE;								if(isset($config["chapter"]) && isset($config["verse"]) && $current_chapter === $config["chapter"] && $current_verse === $config["verse"]) $display = TRUE;				else if(isset($config["chapter"]) && isset($config["verse"]) && isset($config["verse_end"]) && $current_chapter === $config["chapter"] && $current_verse >= $config["verse"] && $current_verse <= $config["verse_end"]) $display = TRUE;				if(isset($config["chapter"]) && !isset($config["verse"]) && $current_chapter === $config["chapter"]) $display = TRUE;								if(isset($config["chapter"]) && $current_chapter === $config["chapter"] && isset($config["verse"]) && isset($config["verse_end"]) && $current_verse === $config["verse"]) $range_hit_start = TRUE;				if(isset($config["chapter"]) && $current_chapter === $config["chapter"] && isset($config["verse"]) && isset($config["verse_end"]) && $current_verse === $config["verse_end"]) $range_hit_end = TRUE;								if(!isset($config["chapter"]) && !isset($config["verse"]))					{					if($last_chapter < $current_chapter)						{						if($wrap >= $config["element_wrap"])							{							$wrap = 0;							echo("</tr><tr align=\"center\" valign=\"middle\">");							}						echo("<td><form ACTION=\"" . $config["URI_prefix"] . $config["script_suffix"] . $bible_books[$bookindex]["short"] . "/" . $current_chapter . "/\" METHOD=\"post\"><input TYPE=\"submit\" VALUE=\"Chapter " . $current_chapter . "\"></form></td>\n");						$last_chapter = $current_chapter;						$wrap++;						}					}								if($display === TRUE)					{					if($ever_displayed === FALSE) //Never displayed before.						{						if(!isset($config["operation"]) || !(strcmp($config["operation"], "print") == 0)) echo("<div align=\"center\"><p><table width=\"60%\" border=\"3\"><tr><td align=\"left\" valign=\"middle\">\n");						else echo("<div align=\"left\"><p>\n");						}					$ever_displayed = TRUE;					echo("<sup><a href=\"" . $config["URI_prefix"] . $config["script_suffix"] . $config["book"] . "/" . $current_chapter . "/" . $current_verse . "\">" . $current_chapter . ":" . $current_verse . "</a></sup> ");					}				}			if($display === TRUE) //We are supposed to be printing the data here.				{				if($evaluate_verse_next === TRUE) echo(htmlentities(substr($buffer, strlen($current_chapter) + strlen($current_verse) + 2), ENT_COMPAT)); //This line actually dumps the data.				else echo(htmlentities($buffer, ENT_COMPAT)); //This line actually dumps the data.				}			$evaluate_verse_next = FALSE; //Assume that we're not going to evaluate the verse next time.			if(!(strpos($buffer, "\n") === FALSE)) //If there is a newline, then the verse is over.				{				$evaluate_verse_next = TRUE;				if($display === TRUE) echo("<br>\n");				}			}		}		if($range_hit_start === TRUE && $range_hit_end === TRUE) $range_error = FALSE;		if($ever_displayed === TRUE)		{		if(!isset($config["operation"]) || !(strcmp($config["operation"], "print") == 0))			{			echo("</td></tr></table></div>\n");			echo("<div align=\"right\"><p><a target=\"_blank\" href=\"" . $config["URI_prefix"] . $config["script_suffix"] . $config["book"] . "/" . $config["chapter"] . "/" . $config["verse"]);			if(isset($config["verse"]) && isset($config["verse_end"])) echo("-" . $config["verse_end"]);			echo("?operation=print\">Printable Mode</a></p></div>\n");			}		else			{			echo("</p></div>\n");			}		}		if(isset($config["chapter"]) && isset($config["verse"]) && (!isset($config["operation"]) || !(strcmp($config["operation"], "print") == 0)))		{		echo("<div align=\"center\"><form ACTION=\"" . $config["URI_prefix"] . $config["script_suffix"] . $config["book"] . "/" . $config["chapter"] . "/\" METHOD=\"post\">\n");		echo("<input TYPE=\"submit\" VALUE=\"Zoom Out\"></form></div>\n");		}		if(!isset($config["chapter"]) && !isset($config["verse"]))		{		echo("</tr></table></div>\n");		}	else if($ever_displayed === FALSE || $range_error === TRUE)		{		//Make sure we're sufficiently sorry.		echo("<div align=\"center\"><h3>Sorry. One or more of the requested passages does not exist. " . $bible_books[$bookindex]["long"]);		if(isset($config["chapter"]) && !isset($config["verse"])) echo(", Chapter " . $config["chapter"]);		else if(isset($config["chapter"]) && isset($config["verse"])) echo(" " . $config["chapter"] . ":" . $config["verse"]);		if(isset($config["verse"]) && isset($config["verse_end"])) echo("-" . $config["verse_end"]);		echo("</h3></div>\n");		$previous_chapter_exists = FALSE;		$next_chapter_exists = FALSE;		$previous_verse_exists = FALSE;		$next_verse_exists = FALSE;		}		if(isset($config["verse_end"])) $next_verse_start = $config["verse_end"];	else if(isset($config["verse"])) $next_verse_start = $config["verse"];	else $next_verse_start = 0;		fclose($bookfile);	}if(!isset($config["operation"]) || !(strcmp($config["operation"], "print") == 0))	{	?>	<div align="center">		<table border="0" width="50%">		<tr align="center" valign="middle">					<td align="left"><form ACTION="<? echo($config["URI_prefix"] . $config["script_suffix"] . $config["book"] . "/" . ($config["chapter"] - 1) . "/" . $config["verse"]); ?>" METHOD="post"><input TYPE="submit" VALUE="<< Previous Chapter" <? if(isset($config["verse"]) || !isset($previous_chapter_exists) || $previous_chapter_exists != TRUE) echo("DISABLED"); ?> /></form></td>				<td align="left"><form ACTION="<? echo($config["URI_prefix"] . $config["script_suffix"] . $config["book"] . "/" . $config["chapter"] . "/" . ($config["verse"] - 1)); ?>" METHOD="post"><input TYPE="submit" VALUE="<< Previous Verse" <? if(!isset($config["verse"]) || !isset($previous_verse_exists) || $previous_verse_exists != TRUE) echo("DISABLED"); ?> /></form></td>				<td align="right"><form ACTION="<? echo($config["URI_prefix"] . $config["script_suffix"] . $config["book"] . "/" . $config["chapter"] . "/" . ($next_verse_start + 1)); ?>" METHOD="post"><input TYPE="submit" VALUE="Next Verse >>" <? if(!isset($config["verse"]) || !isset($next_verse_exists) || $next_verse_exists != TRUE) echo("DISABLED"); ?> /></form></td>				<td align="right"><form ACTION="<? echo($config["URI_prefix"] . $config["script_suffix"] . $config["book"] . "/" . ($config["chapter"] + 1) . "/" . $config["verse"]); ?>" METHOD="post"><input TYPE="submit" VALUE="Next Chapter >>" <? if(isset($config["verse"]) || !isset($next_chapter_exists) || $next_chapter_exists != TRUE) echo("DISABLED"); ?> /></form></td>				</tr></table>		<p>Seek to any passage: 		<form ACTION="<? echo($config["URI_prefix"] . $config["script_suffix"]); ?>" METHOD="post">			Book: <select NAME="book">			<!-- <option VALUE="" SELECTED>All Books (for searching)</option> -->				<?				for($tint = 0;isset($bible_books[$tint]);$tint++)					{					if($bookok === TRUE && $tint === $bookindex) echo("<option VALUE=\"" . $bible_books[$tint]["short"] . "\" SELECTED>" . $bible_books[$tint]["long"] . "</option>\n");					else echo("<option VALUE=\"" . $bible_books[$tint]["short"] . "\">" . $bible_books[$tint]["long"] . "</option>\n");					}				?>			</select>			Chapter:				<?				if(isset($config["chapter"])) echo("<input TYPE=\"text\" NAME=\"chapter\" size=\"4\" maxlength=\"10\" value=\"" . $config["chapter"] . "\">");				else echo("<input TYPE=\"text\" NAME=\"chapter\" size=\"4\" maxlength=\"10\">");				?>			Verse:				<?				if(isset($config["verse"]) && !isset($config["verse_end"])) echo("<input TYPE=\"text\" NAME=\"verse\" size=\"4\" maxlength=\"10\" value=\"" . $config["verse"] . "\">");				else if(isset($config["verse"]) && isset($config["verse_end"])) echo("<input TYPE=\"text\" NAME=\"verse\" size=\"4\" maxlength=\"10\" value=\"" . $config["verse"] . "-" . $config["verse_end"] . "\">");				else echo("<input TYPE=\"text\" NAME=\"verse\" size=\"4\" maxlength=\"10\">");				?>			<input type="hidden" name="operation" value="Go">			<input type="submit" value="Go">		</form>				<? if($config["disable_searching"] != TRUE)			{			?>			<p>Search the text: 			<form ACTION="<? echo($config["URI_prefix"] . $config["script_suffix"]); ?>" METHOD="get">				Search in: <select NAME="book">				<option VALUE="">All Books</option>					<?					for($tint = 0;isset($bible_books[$tint]);$tint++)						{						if($bookok === TRUE && $tint === $bookindex) echo("<option VALUE=\"" . $bible_books[$tint]["short"] . "\" SELECTED>" . $bible_books[$tint]["long"] . "</option>\n");						else echo("<option VALUE=\"" . $bible_books[$tint]["short"] . "\">" . $bible_books[$tint]["long"] . "</option>\n");						}					?>				</select>									Terms: <input type="text" name="search" value="<? if(isset($config["search"])) echo($config["search"]); ?>">				<input type="hidden" name="operation" value="Search">				<input type="submit" value="Search">						</form>			<?			}		?>	</div>	<?	}?>	<hr><div align="center"><p>This is Alex Markley's <a href="http://bible.cyberMalex.com/">PHP<i>Script</i>ure</a> v<? echo($config["version"]["major"] . "." . $config["version"]["minor"] . "." . $config["version"]["subminor"]); ?>, displaying a copy of the <a href="http://WorldEnglishBible.org/">World English Bible.</a></p><p>This copy of the <a href="http://WorldEnglishBible.org/">World English Bible</a> is a draft version.Updates are available at <a href="http://eBible.org">http://eBible.org</a>.</p><p><small>"World English Bible" and WorldEnglishBible.org are trademarks of Rainbow Missions, Inc. The World English Bible is not copyrighted. The domain name eBible.org is a trademark of <a href="http://WorldEnglishBible.org/mpj/">Michael Paul Johnson</a>.</small></p></div><?if($config["headerless"] === FALSE && (!isset($config["operation"]) || !(strcmp($config["operation"], "print") == 0)))	{	?>	<div align="left">	<p>		<a <? if($theme_unset != TRUE) { ?>style="background:<? echo($config["color"]["body"]["background"]); ?>;color:<? echo($config["color"]["body"]["foreground"]); ?>;" <? } ?> href="http://validator.w3.org/check/referer"><img style="border:0;width:88px;height:31px" src="http://forums.xisto.com/no_longer_exists/; alt="Valid HTML 4.01!" height="31" width="88"></a>		<? if($theme_unset != TRUE) { ?><a style="background:<? echo($config["color"]["body"]["background"]); ?>;color:<? echo($config["color"]["body"]["foreground"]); ?>;" href="http://jigsaw.w3.org/css-validator/check/referer"><img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a> <? } ?>	</p>	</div>	<?	}?><?if($config["headerless"] === FALSE)	{	?>	</body>	</html>	<?	}?>

So what is suppose to happen is that the php pulls the requested text out and displays it, but when I click, lets say, 1 Choronicles, it tried to display http://forums.xisto.com/no_longer_exists/ And I don't know why, so I am at a total lost, and I know there is a lot of code, but if someone could help me, that would be great. There is enough files there to put this on your own directory and mess with it too if you need to. Please help! Thanks!

Share this post


Link to post
Share on other sites

This line:

$bible_books[12]["long"] = "1 Chronicles";	$bible_books[12]["short"] = "1Ch";
associates a request to read that chapter and verse from the request you have made. There are two arrays. The first one is the "long name" and the second is the "short" name. When you click on the long name, Voila!, it uses the short name to build the URL for the requested section of the Chronicles chapter and verse.

Are you getting the output you requested? There are some things which need to be altered in the above script, like the paths to the folders and such. Have you done all that yet? For instance, this line ($config["script_suffix"] = "bible.php/"; //The name of the main script. (It may seem strange that this should end in a '/', but that is indeed the case.))should be changed to "index.php" to match the re-naming of the script source file, and of course, you will need to alter the .htaccess file to make this your "home file" as well. There are a bunch of things in the config file which need to be altered if the posted code is what currently exists in the config file, I don't think anything will work until the changes are made. Example: $config["local_prefix"] = "/path/to/config/and/things/"; //Where the script lives on the disk.

Share this post


Link to post
Share on other sites

Since I was the one who made the suggestion for this script I think its up to me to help guide you. I went ahead and installed the script HERE so you can take a look at it.

The following is what I did to install it. Replace what I have with your data...

$config["URI_prefix"] = "http://forums.xisto.com/no_longer_exists/;;'>http://forums.xisto.com/no_longer_exists/;;
in your case it will be
$config["URI_prefix"] = "http://forums.xisto.com/no_longer_exists/;;'>http://forums.xisto.com/no_longer_exists/;;
The next line I changed is
$config["local_prefix"] = "/home/reinhart/public_html/bible/";
I'm not sure what it will be on your server.

Until you get it working, you are fully granted to use it on my site. just copy the following files to the directory and it will be fully operative. The first file is index.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://forums.xisto.com/no_longer_exists/ xmlns="http://forums.xisto.com/no_longer_exists/ http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Searchable Bible</title></head><frameset rows="0,*" frameborder="no" border="0" framespacing="0">  <frame src="top.html" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" />  <frame src="http://forums.xisto.com/no_longer_exists/&%2334; name="mainFrame" id="mainFrame" title="mainFrame" /></frameset><noframes><body></body></noframes></html>
The next file is called top.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://forums.xisto.com/no_longer_exists/ xmlns="http://forums.xisto.com/no_longer_exists/ http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Searchable Bible</title></head><body></body></html>
Because it is using a ZERO framesize, your URL will be shown and not mine.

Share this post


Link to post
Share on other sites

Hey thanks true2earn. Okay, here is what I got. Everything is uploaded into my other hosting, religiousinfo.trap17.com/bible I edited the config file so it looks like this:

//This stuff probably needs changed. ALL OF THESE VALUES SHOULD END IN A '/', EXCEPT IN VERY RARE CIRCUMSTANCES.$config["URI_prefix"] = "http://religiousinfo.trap17.com/bible/"; //Where the script lives on the web.$config["script_suffix"] = "bible.php/"; //The name of the main script. (It may seem strange that this should end in a '/', but that is indeed the case.)$config["local_prefix"] = "/home/terms200/public_html/bible/"; //Where the script lives on the disk.$config["bible_midfix"] = "bible/"; //The directory that the bible data is in. ($config["local_prefix"] . $config["bible_midfix"])$config["themes_midfix"] = "themes/"; //The directory that the bible data is in. ($config["local_prefix"] . $config["bible_midfix"])

And it didn't work :) Could you put on your config file here so I can look at it true2earn? Also, in order for it to work, do I need to put in the themes in? Anyway. I uploaded into my database 1 Choronicles, and first Chorinthians. So click on one of those, and you will see what it does. I really need some help. So go to religiousinfo.trap17.com/bible/bible.php and you can see it for yourself. remember though, I only uploaded first Choronicles, and first Chorinthians. I also noticed that it is suppose to bring you to yourdomain.com/bible/bible.php/1ch/1 How do I do that, I noticed that there is a frame around yours and I don't have any design installed, so I need to. Because all I have in the bible directory right now is the bible.php, config.php, 1ch, and 1co. That is it. Take that into consideration too. Hey thanks for all your help, I really appreciate it!

Share this post


Link to post
Share on other sites

By going straight to http://forums.xisto.com/no_longer_exists/ and not http://forums.xisto.com/no_longer_exists/bible.php I immediately see your porblem. All the bible data needs to be in its own directory and the themes needs its own directory. The structure should be:

YourRootDir	 |_____bible			 |___bible			 |___themes

Since you have the books in the 1st bible directory you'll need to change the line that says
$config["bible_midfix"] = "bible/";
to
$config["bible_midfix"] = "/";
but I wouldn't do this. It is vital that you keep the directory structure intact to maintain a working script. Changing anything can cause it to break (as you are experiencing). Once this is done, your script will be working. Make sure you upload the entire bible and themes directory. What I did is changed the second bible directory name to "data" (where all the bible books are) so I can keep things better sorted and changed the line above to say
$config["bible_midfix"] = "data/"; //The directory that the bible data is in.
Let me know how you are coming along.

Share this post


Link to post
Share on other sites

That is it! You are amazing, a gem, incredible. Do you realize what you have done! You have gotten a Bible working for me. Finally, if you don't mind, I will be crediting five credits to your account for your time and help, I really appreciate it. I can now move on with my other stuff on the Ministry. Hey thanks again, this is SO awesome!

Share this post


Link to post
Share on other sites

Hey, no problem. I enjoy helping someone if I can. All you really need to do now is to create your own theme to match the rest of your site. Shouldn't be that difficult. It wasn't necessary to credit my account but it is appreciated. Good luck with your ministy and God bless..

Share this post


Link to post
Share on other sites

No you deserved it. And besides, had you not showed me the program and how to do it, I would have been at a loss for months, literally, and I needed it up desperately. So thank you SO much again, and keep those credits, you can use them I am sure. Everyone can :) Hey thansk again, and have a great day. God bless everyone who helped me out :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.