Argh!!! PHP errors on my site. Please help.

Talk about anything and everything not related to this site or the Dreamcast, such as news stories, political discussion, or anything else. If there's not a forum for it, it belongs in here. Also, be warned that personal insults, threats, and spamming will not be tolerated.
Post Reply
User avatar
curt_grymala
Theme Inducer
Theme Inducer
Posts: 4274
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Fri May 30, 2003 12:14 pm
Location: Wherever I'm Needed
Has thanked: 0
Been thanked: 0
Contact:

Argh!!! PHP errors on my site. Please help.

Post by curt_grymala »

I posted this question on an HTML help forum, but most of the experts only frequent the forums once or twice a day, so I thought I would post it here, too, to see if any of the web experts here may be able to help:
curt_grymala wrote:I was trying to install a new PHP script on my server, and couldn't get it working the way I wanted, so I started messing with it a little bit.
Then, when I went to view it, I got a 500 Internal Server Error. So, I removed the whole thing from my server and started over again from scratch. Unfortunately, I still got a 500 error.
So, I removed it from my server again, and then went to my front page (which is a php file), and got a 500 error on it, too. Then, I checked all of the other php files on my server, and found that I am getting the same error on all of them.
I checked my error log, and found this:
error log wrote: [Sat Jul 24 13:11:04 2004] [error] [client 65.133.101.58] Premature end of script headers: /home/virtual/site32/fst/var/www/interpreters/php-script
Does anybody know what happened, and how I fix it?
DCHelp - A Newbie's Best Friend
DC Evolution - Disc Images
DreamZone Forums

I Refuse To Help Anyone That Says They've Tried Everything.
AmadeusZull
Soul Sold for DCEmu
Soul Sold for DCEmu
Posts: 4085
Joined: Wed Oct 17, 2001 7:44 pm
Location: NYC
Has thanked: 0
Been thanked: 0
Contact:

Post by AmadeusZull »

check syntax. be more helpful if u posted the source code u edited.
Image

I am no longer an ACE@ite. Never will I kiss his feet is what I don't. And that I don't, is good I do.
User avatar
curt_grymala
Theme Inducer
Theme Inducer
Posts: 4274
Joined: Fri May 30, 2003 12:14 pm
Location: Wherever I'm Needed
Has thanked: 0
Been thanked: 0
Contact:

Post by curt_grymala »

Well, I removed everything I edited. Unless the script that I uploaded somehow edited my "php-script" interpreter, none of the offending code should be left on the server.

If you need to know, the PHP script I was trying to use was:
<?php
// Scroll down a about a page for Constructor Initialization

include_once("lib/filemanager.class.php");
include_once("lib/locale.class.php");
include_once("lib/lib.func.php");

$errormsg = "";
$isChanged = false;
$isUpload = false;
$menuOption = 0;
$frm = $_POST;


//
// Because of locale support we simply check if button has value
// if so that indicates button was pressed. Possible problem
// with this. Will consider fixing at a later date
$actionCancel = !empty($frm["cancel"]) ? "Cancel" : "";
$actionConfirm = !empty($frm["confirm"]) ? "Confirm" : "";
$actionCopy = !empty($frm["copy"]) ? "Copy" : "";
$actionRename = !empty($frm["rename"]) ? "Rename" : "";
$actionDelete = !empty($frm["delete"]) ? "Delete" : "";
$actionUpload = !empty($frm["upload"]) ? "Upload Files" : "";
$actionNewDir = !empty($frm["newdir"]) ? "New Folder" : "";
$actionRefresh = !empty($frm["refresh"]) ? "Refresh" : "";
$subDir = !empty($_GET["f"]) ? $_GET["f"] : "";
$actionAdvance = !empty($frm["advance"]) ? "Advance" : "";
$actionAdvanceOption = !empty($frm["advanceoption"]) ? $_POST["advanceoption"] : 0;
if (empty($subDir))
$subDir = !empty($frm["f"]) ? $frm["f"] : "";
$actionSort = !empty($_GET["sort"]) ? $_GET["sort"] : -1;
$actionSortPrev = !empty($_GET["sortprev"]) ? $_GET["sortprev"] : 0;
$actionSortDir = !empty($_GET["sortdir"]) ? $_GET["sortdir"] : 0;

if (strcmp($actionRefresh,"Refresh")==0) {
$actionSort = -1;
$actionSortPrev = 0;
$actionSortDir = 0;
}

// Security Hack Patch.... double checks $subDir which is the variable
// input from $f ( POST and GET )
if (preg_match('/^[a-zA-Z0-9\/]+$/',$subDir )) {
// okay - valid sub directory
} else {
// bad - invalid possible hacking ../../
$subDir = "";
}



//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Initial Setup/configuration
//

// Init locale and set locale
$locale = new Locale; // set language
$locale->setLanguage("en-us"); // Set to English
//$locale->setLanguage("de"); // Set to German
//$locale->setLanguage("dk"); // Set to Danish
//$locale->setLanguage("pt-br"); // Set to Portuguese(Brazilian)
//$locale->setLanguage("es_ES@euro"); // Set to Spanish
//$locale->setLanguage("hu"); // Set to Spanish


// if $_ENV["temp"] isn't working simply set you temp dir ie: c:/temp
// $theFileManager = new FileManager("",$_ENV["TEMP"],"/var/www/bor",$locale);
$theFileManager = new FileManager("","/tmp","/var/www/bor/phpwebfilemgr",$locale,"curtiss");
$theFileManager->setMaxChainSubDir(1);// 0 allows as many infinite chained subdirectories, any value greater then 0 sets a maximum
// ie: 3 would allow you to only create 3 chained level
//
// Root
// |
// |----Child1----Child1.1----Child1.1.1
// |----Child2
// |----Child3
// |----Child4
//
// It is NOT a limit on how many subdirectories but a limit of subdirectories
// witin subdirectories. In the above example you won't be able to create
// a directory under Child1.1.1
// But you are still allowed to create directories under the root or any other child

$theFileManager->setIgnoreCaseNameSort(true); // set ignore on - ignore capital letters when sorting 'Name' column


// Set Compression Program Configuration
// If under *nix environment should be okay
// Under another environment you will need the equilvalent programs for tar and gzip
// ie: For windows you can use the tar, gzip & gunzip from http://unxutils.sourceforge.net/
// To make life easier for myself I broke the directory structure and stuck wbin at c: root
$compress_cfg["set_export_on"] = true;
$compress_cfg["set_import_on"] = true;
$compress_cfg["dir_tar"] = "c:/wbin/tar.exe";
$compress_cfg["dir_gzip"] = "c:/wbin/gzip.exe";
$compress_cfg["dir_gunzip"] = "c:/wbin/gunzip.exe";


// Set Extensions you do not want to allow for upload
// Don't forget you might have to adjust you size limit in the php.ini file
$invalidExtensions = array ("php","shtml","php3","inc","class","jsp","asp","xml","chm","exe");
$theFileManager->setInvalidExt($invalidExtensions);

if (!$theFileManager->isMemberDirExist()) {
echo $locale->getString(LID_TYPE_GENERAL,LID_MEMBER_DOES_NOT_EXIST);
die;
}

$theList = $theFileManager->getDirList($subDir); // get current directory listing


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

$isConfirm = false;

if ( strcmp($actionConfirm,"Confirm")==0) {
$isConfirm = true;

if ( strcmp($actionCopy,"Copy")==0) {
$isChanged = false;
for ($i=0; $i<$theFileManager->getFileCount(); $i++ ){
if (!empty( $frm["newname" . $i])) {
$isChanged = true;
$errormsg .= $theFileManager->copyFile($theList[$i]["name"],$frm ["newname" . $i]);
}
}
if (!$isChanged) {
$errormsg = $locale->getString(LID_TYPE_MESSAGES,LID_MSG_NO_FILE_GIVEN);
}
}

if (strcmp($actionRename,"Rename")==0) {
$isChanged = false;
for ($i=0; $i<$theFileManager->getFileCount(); $i++ ){
if (!empty( $frm["newname" . $i])) {
$isChanged = true;
$errormsg .= $theFileManager->renameFile($theList[$i]["name"],$frm ["newname" . $i]);
}
} // end for

if (!$isChanged) {
$errormsg = $locale->getString(LID_TYPE_MESSAGES,LID_MSG_NO_FILE_GIVEN);
}
} // end rename

if (strcmp($actionDelete,"Delete")==0) {
$isChanged = false;
$isUpload=true;
for ($i=0; $i<$theFileManager->getFileCount(); $i++ ){
if (!empty( $frm["newname" . $i])) {
$isChanged = true;
$errormsg .= $theFileManager->deleteFile($theList[$i]["name"],$frm ["newname" . $i]);

} // end if empty
} // end for
if (!$isChanged) {
$errormsg = $locale->getString(LID_TYPE_MESSAGES,LID_MSG_NO_DEL_FILE_GIVEN);
}
} // end delete

if (strcmp($actionUpload,"Upload Files")==0) {
$isUpload=true;
$isChanged=true;
$userfile = $_FILES["userfile"];
uploadFiles($userfile,$errormsg,$theFileManager,$locale);
}

if (strcmp($actionNewDir,"New Folder")==0) {
$theNewDirName = $frm["newdirname"];
$errormsg = $theFileManager->makeDirectory($theNewDirName,$subDir);
$isChanged=true;
}

if (strcmp($actionAdvance,"Advance")==0) {
$advActionFind = !empty($frm["find"]) ? "Find" : "";
$advActionExport = !empty($frm["export"]) ? "Export" : "";
$advActionImport = !empty($frm["import"]) ? "Import" : "";

// Begin Find Section
if (strcmp($advActionFind,"Find")==0) {
$findtext = !empty($_POST["findtext"]) ? trim($_POST["findtext"]) : "";
$findmatchcase = !empty($_POST["findmatchcase"]) ? $_POST["findmatchcase"] : 0;
$findexact = !empty($_POST["findexact"]) ? $_POST["findexact"] : 0;

if ($findmatchcase == 1) {
$bfindmatchcase = true;
} else {
$bfindmatchcase = false;
}

if ($findexact == 1) {
$bfindexact = true;
} else {
$bfindexact = false;
}

$theFileManager->initFind($findtext,$bfindmatchcase,$bfindexact);
$theFileManager->processFind();
$findResult = $theFileManager->getFindResult();
$findResultSize = count ($findResult);

$errormsg = "";

if ($findResultSize > 0) {
$errormsg .= $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_FIND_TOTAL_MATCHES) . ": " . $findResultSize . "<br><br>";
$errormsg .= "<ul>";
for ($i=0; $i< $findResultSize; $i++) {
if ($findResult[$i]["isDir"]) {
$findPath = $findResult[$i]["path"];
} else {
$findPath = $findResult[$i]["path"];
}
$errormsg .= "<li><a href=\"" . $PHP_SELF . "?f=" . $findPath . "\">";
if ($findResult[$i]["isDir"])
$errormsg .= "[Dir] - ";
else
$errormsg .= "[File] - ";
if (strlen($findResult[$i]["path"]) > 0)
$errormsg .= $findResult[$i]["path"] . "/" . $findResult[$i]["file"];
else
$errormsg .= $findResult[$i]["file"];
$errormsg .= "</a></li>";
}
$errormsg .= "</ul>";
} else {
$errormsg = "No Results Found";
}
$menuOption = 6;
}
// End Find Section


// Begin Export
if (strcmp($advActionExport,"Export")==0) {
$exportResult = $theFileManager->exportFile($_POST["exportfilename"],$compress_cfg);

if ($exportResult[0]) {
$errormsg = "Export Successfull! Right click on file and select 'save as' to download";
$isChanged=true;
$menuOption = 0;
} else {
$errormsg = "Export Failed: " . $exportResult[1];
$menuOption = 7;
}


}
// End Export Section


// Begin Import
if (strcmp($advActionImport,"Import")==0) {

$isChanged=true;
$userfile = $_FILES["userfile"];
if (empty($userfile["name"]) || empty($userfile["tmp_name"]) ) {
$importResult[0] = false;
$importResult[1] = "No Import File given";
} else {
$importResult = $theFileManager->importFile($_POST["exportfilename"],$compress_cfg,$userfile);
}

if ($importResult[0]) {
$errormsg = "Import Successfull!";
$isChanged=true;
$menuOption = 0;
} else {
$errormsg = "Import Failed: " . $importResult[1];
$menuOption = 8;
}
}
// End Export Section
}

} else {
//
// Call Appropriate Screen
//

if ( strcmp($actionCopy,"Copy")==0) {
if (isLeastOneCheckBox($frm,$theFileManager->getFileCount(),$modList)) {
$menuOption=1;
} else {
$errormsg = $locale->getString(LID_TYPE_MESSAGES,LID_MSG_NO_SEL_COPY_FILE_GIVEN);
}
} else if (strcmp($actionRename,"Rename")==0) {
if (isLeastOneCheckBox($frm,$theFileManager->getFileCount(),$modList)) {
$menuOption=2;
} else {
$errormsg = $locale->getString(LID_TYPE_MESSAGES,LID_MSG_NO_SEL_RENAME_FILE_GIVEN);
}
} else if (strcmp($actionDelete,"Delete")==0) {
if (isLeastOneCheckBox($frm,$theFileManager->getFileCount(),$modList)) {
$menuOption=3;
} else {
$errormsg = $locale->getString(LID_TYPE_MESSAGES,LID_MSG_NO_SEL_DEL_FILE_GIVEN);
}
} else if (strcmp($actionUpload,"Upload Files")==0) {
$menuOption = 4;
} else if (strcmp($actionNewDir,"New Folder")==0) {
$menuOption = 5;
} else if (strcmp($actionAdvance,"Advance")==0) {

// Switch statement to set appropriate screen based on
// Advance Option in the DropDown
switch ($actionAdvanceOption) {
case 0: $menuOption = 0; break;
case 1: $menuOption = 6; break; // Find File/Folder
case 2: $menuOption = 7; break; // Export
case 3: $menuOption = 8; break; // Import
default: $menuOption = 0; break;
};
}

}

if (strcmp($actionCancel,"Cancel")==0) {
$menuOption = 0;
}

if ($isChanged) {
$theList = $theFileManager->getDirList($subDir);
}

if ($actionSort > -1) {
$isASC = true; // default sort ASC
$sortdir = 0; // default sort ASC this is for the $_GET

if ($actionSortPrev == $actionSort) { // check did we sort on the same column
if (strcmp($actionSortDir,"1")==0) { // check last sort direction and reverses it
$isASC = true;
$sortdir = 0;
} else {
$isASC = false;
$sortdir = 1;
}
}

$actionSortPrev = $actionSort;
$sortResult = $theFileManager->sortDirList($theList,$actionSort,$isASC); // Call Sort

if ($sortResult[0])
$theList = $sortResult[1];
else
$errormsg = $sortResult[1];
} else {
$sortdir = 0;
}



include_once("screens/_scn_filemanager.php");
?>
All I edited was a few of the file paths, because I decided to place the script in my root directory, instead of placing it within a special directory called "phpwebfilemgr". I did this, because I wanted to see if it was possible to allow people to upload files directly to my site. I also remarked out the "Delete" button, and tried to remark it out from the "_scn_filemanager.php" file as well. That file looks like:
<html>
<head>
<title><?php echo $locale->getString(LID_TYPE_GENERAL,LID_TITLE) . " " .$locale->getString(LID_TYPE_GENERAL,LID_VERSION); ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="css/style.css">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<?php
if ($menuOption == 4 || $menuOption == 8) {
echo "<form action=\"" . $PHP_SELF . "\" method=\"POST\" ENCTYPE=\"multipart/form-data\">";
} else {
echo "<form action=\"" . $PHP_SELF . "\" method=\"POST\">";
}
?>


<?php if ($menuOption==0) { ?>

<table width="770" border="0" cellspacing="0" cellpadding="0">
<tr>

<td><span class="title">
<?php echo $locale->getString(LID_TYPE_GENERAL,LID_TITLE) . " " .$locale->getString(LID_TYPE_GENERAL,LID_VERSION); ?>
</span></td>
</tr>
<?php if (!empty($errormsg)) { ?>
<tr>
<td>

<?php echo "<b><font color=\"red\">" . $errormsg . "</font></b>"; ?>
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>

<?php } ?>
</table>

<table width="770" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="titlebar"><font face="Arial, Helvetica, sans-serif" size="-1"><?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_MEMBER); ?>:
<?php echo $theFileManager->getSiteName(); ?>
</font></td>
</tr>
</table>

<table width="770" border="0" cellspacing="0" cellpadding="0">
<tr class="buttonbar">

<td width="723"> &nbsp;
<?php
echo "<input class=\"button\" type=\"submit\" name=\"copy\" value=\"" . $locale->getString(LID_TYPE_HTML,LID_HTML_BUT_COPY) . "\">";
echo "<input class=\"button\" type=\"submit\" name=\"rename\" value=\"" . $locale->getString(LID_TYPE_HTML,LID_HTML_BUT_RENAME) . "\">";
echo "<input class=\"button\" type=\"submit\" name=\"delete\" value=\"" . $locale->getString(LID_TYPE_HTML,LID_HTML_BUT_DELETE) . "\">";
echo "<input class=\"button\" type=\"submit\" name=\"refresh\" value=\"" . $locale->getString(LID_TYPE_HTML,LID_HTML_BUT_REFRESH) . "\">";
?>
</td>
<td width="47" align="right">

<?php echo "<input class=\"button\" type=\"submit\" name=\"upload\" value=\"" . $locale->getString(LID_TYPE_HTML,LID_HTML_BUT_UPLOAD) . "\">"; ?>
</td>
</tr>
</table>
<table width="770" border="0" cellspacing="0" cellpadding="0">
<tr class="headingbar">
<td colspan="3"><b> <a href="<?php echo $_SERVER["PHP_SELF"] . "?sort=1&sortprev=" . $actionSortPrev . "&sortdir=" . $sortdir; ?>">
<?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_COL_NAME); ?>
</a></b></td>
<td width="215"><b><a href="<?php echo $_SERVER["PHP_SELF"] . "?sort=2&sortprev=" . $actionSortPrev . "&sortdir=" . $sortdir; ?>">
<?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_COL_LASTMOD); ?>
</a></b></td>
<td width="94">

<div align="right"><b> <a href="<?php echo $_SERVER["PHP_SELF"] . "?sort=3&sortprev=" . $actionSortPrev . "&sortdir=" . $sortdir; ?>">
<?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_COL_SIZE); ?>
</a></b></div>
</td>
</tr>
<?php if ($theFileManager->getIsSubDir() || $isUpload || $isChanged) { ?>
<?php if (strlen($theFileManager->getSubDir()) > 0) { ?>
<tr>
<td colspan="3">
<?php echo "<a href=\"" . $_SERVER["PHP_SELF"] . "\"><img src=\"images/upfolder.gif\" width=\"15\" height=\"13\" border=\"0\">&nbsp;<b>Home</b></a>"; ?>
</td>
<td width="215">&nbsp;</td>
<td width="94">&nbsp;</td>
</tr>
<tr>
<td width="29">&nbsp;</td>
<td colspan="2">&nbsp;
<?php
$lastSlash = strrpos($subDir,"/");
if (!$lastSlash) {
$lastFolder = $PHP_SELF;
} else {
$lastFolder = $PHP_SELF . "?f=" . substr($subDir,0,$lastSlash);
}

echo "<a href=\"" . $lastFolder. "\"><img src=\"images/foldero.gif\" width=\"16\" height=\"13\" border=\"0\">&nbsp;<b>" . $theFileManager->getSubDir() . "</b></a>";

?>
</td>
<td width="215">&nbsp;</td>
<td width="94">&nbsp;</td>
</tr>
<?php } ?>
<?php } ?>
<?php $totalSize = 0;
for ($i=0;$i<$theFileManager->getFileCount();$i++) {
?>

<tr bgcolor="<?php if ($i % 2 == 0) echo "#FFE53B"; else echo "#F2BE0B"; ?>">
<td width="29">
<input type="checkbox" name="<?php echo "checkbox" . $i ?>" value="1">
</td>
<td width="16">&nbsp;</td>
<td width="216">
<?php
if ($theList[$i]["isDir"]) {
if (strlen($subDir) > 0)
echo "<a href=\"" . $PHP_SELF . "?f=" . $subDir . "/" . $theList[$i]["name"] . "\"><img src=\"images/folder.gif\" width=\"15\" height=\"13\" border=\"0\">&nbsp;" . $theList[$i]["name"] . "</a>";
else
echo "<a href=\"" . $PHP_SELF . "?f=" . $theList[$i]["name"] . "\"><img src=\"images/folder.gif\" width=\"15\" height=\"13\" border=\"0\">&nbsp;" . $theList[$i]["name"] . "</a>";
} else {
if ($theFileManager->getIsFirewall())
$theLinkURL = "http://" . $theFileManager->getExternalURL() . $theFileManager->getWebRoot() . "/" . $theFileManager->getMember() . "/" . $subDir . "/" . $theList[$i]["name"];
else
$theLinkURL = "http://" . $_SERVER["SERVER_ADDR"] . $theFileManager->getWebRoot() . "/" . $theFileManager->getMember() . "/" . $subDir . "/" . $theList[$i]["name"];
echo "<a href=\"" . $theLinkURL . "\" class=\"text10plain\" >" . $theList[$i]["name"] . "</a>";
}
?>
</td>
<td width="215">
<?php echo $theList[$i]["lastmod"]; ?>
</td>
<td width="94">
<div align="right">
<?php
if ($theList[$i]["isDir"])
echo "&nbsp;";
else
echo $theList[$i]["size"];
$totalSize = $totalSize + $theList[$i]["size"];
?>
</div>
</td>
</tr>
<?php } ?>
<tr class="totalbar">
<td width="29">&nbsp;</td>
<td width="16">&nbsp;</td>
<td width="216">&nbsp;</td>
<td width="215">
<div align="right"><b>
<?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_TOTALSPACE); ?>
:</b></div>
</td>
<td width="94">
<div align="right">
<?php echo $theFileManager->getTotalSizeUsed(); //$totalSize; ?>
</div>
</td>
</tr>
</table>
<table width="770" border="0" cellspacing="0" cellpadding="0">
<tr class="buttonbar">
<td width="611" height="34"> &nbsp;
<?php
echo "<input class=\"button\" type=\"submit\" name=\"copy\" value=\"" . $locale->getString(LID_TYPE_HTML,LID_HTML_BUT_COPY) . "\">";
echo "<input class=\"button\" type=\"submit\" name=\"rename\" value=\"" . $locale->getString(LID_TYPE_HTML,LID_HTML_BUT_RENAME) . "\">";
echo "<input class=\"button\" type=\"submit\" name=\"delete\" value=\"" . $locale->getString(LID_TYPE_HTML,LID_HTML_BUT_DELETE) . "\">";
echo "<input class=\"button\" type=\"submit\" name=\"refresh\" value=\"" . $locale->getString(LID_TYPE_HTML,LID_HTML_BUT_REFRESH) . "\">";
?>
<input type="hidden" name="f" value="<?php echo $theFileManager->getSubDir(); ?>">
<input type="hidden" name="sortprev" value="<?php echo $actionSort; ?>">
</td>
<td height="34" colspan="2">

<div align="right">
<?php
echo "<input class=\"button\" type=\"submit\" name=\"newdir\" value=\"". $locale->getString(LID_TYPE_HTML,LID_HTML_BUT_NEWFOLDER) ."\">";
?>
</div>
</td>
<td width="95" height="34" align="right">

<?php echo "<input class=\"button\" type=\"submit\" name=\"upload\" value=\"" . $locale->getString(LID_TYPE_HTML,LID_HTML_BUT_UPLOAD) . "\">"; ?>
</td>
</tr>
</table>
<table width="770" border="0" cellspacing="0" cellpadding="0">
<tr class="buttonbar">
<td>
<select name="advanceoption">
<option value="0"><? echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_ADVANCE_OPTION); ?></option>
<option value="0">-----------------------</option>
<option value="1"><? echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_DROPDOWN_FIND); ?></option>
<?php if ($compress_cfg["set_export_on"]) { ?>
<option value="2"><? echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_DROPDOWN_EXPORT); ?></option>
<?php } ?>
<?php if ($compress_cfg["set_import_on"]) { ?>
<option value="3"><? echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_DROPDOWN_IMPORT); ?></option>
<?php } ?>
</select><?php echo "<input class=\"button\" type=\"submit\" name=\"advance\" value=\"" . $locale->getString(LID_TYPE_HTML,LID_HTML_BUT_GO) . "\">"; ?></td>
</tr>
</table>
<?php } ?>

<?php if ($menuOption==1) { ?>
<table width="770" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" ><span class="heading"><?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_COPY_HDR); ?></span></td>
</tr>
<tr>
<td colspan="2" >
<?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_COPY_INFO); ?>
</td>
</tr>
<tr>
<td colspan="2" >&nbsp;</td>
</tr>
<tr>
<td width="139" ><span class="heading"><?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_CURRENT_FILENAME); ?></span></td>
<td width="431" ><span class="heading"><?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_NEW_FILENAME); ?></span></td>
</tr>
<?php
for ($i=0;$i<count($modList);$i++) {
if ($modList[$i]) {
?>
<tr>
<td >
<div align="left">

<?php echo $theList[$i]["name"];?>
</div>
</td>
<td >

<input type="text" name="<?php echo "newname" . $i; ?>">
</td>
</tr>
<tr>
<td colspan="2" >&nbsp;</td>
</tr>
<? } } ?>
<tr>
<td colspan="2" >

&nbsp;
<?php
echo "<input class=\"button\" type=\"submit\" name=\"copy\" value=\"" . $locale->getString(LID_TYPE_HTML,LID_HTML_BUT_COPY) . "\">";
?>
<input type="hidden" name="confirm" value="Confirm">
<input type="hidden" name="f" value="<?php echo $theFileManager->getSubDir(); ?>">
<?php echo "<input class=\"button\" type=\"submit\" name=\"cancel\" value=\"" . $locale->getString(LID_TYPE_HTML,LID_HTML_BUT_CANCEL) . "\">"; ?>
</td>
</tr>
</table>
<?php } ?>
<?php if ($menuOption==2) { ?>
<table width="770" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" ><span class="heading"><?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_RENAME_HDR); ?></span></td>
</tr>
<tr>
<td colspan="2" >
<?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_RENAME_INFO); ?>
</td>
</tr>
<tr>
<td colspan="2" >&nbsp;</td>
</tr>
<tr>
<td width="139" ><span class="heading"><?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_CURRENT_FILENAME); ?></span></td>
<td width="431" ><span class="heading"><?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_NEW_FILENAME); ?></span></td>
</tr>
<?php
for ($i=0;$i<count($modList);$i++) {
if ($modList[$i]) {
?>
<tr>
<td >
<div align="left">

<?php echo $theList[$i]["name"];?>
</div>
</td>
<td >

<input type="text" name="<?php echo "newname" . $i; ?>">
</td>
</tr>
<tr>
<td colspan="2" >&nbsp;</td>
</tr>
<? } } ?>
<tr>

<td colspan="2" > &nbsp;
<?php
echo "<input class=\"button\" type=\"submit\" name=\"rename\" value=\"" . $locale->getString(LID_TYPE_HTML,LID_HTML_BUT_RENAME) . "\">";
?>
<input type="hidden" name="confirm" value="Confirm">

<input type="hidden" name="f" value="<?php echo $theFileManager->getSubDir(); ?>">
<?php echo "<input class=\"button\" type=\"submit\" name=\"cancel\" value=\"" . $locale->getString(LID_TYPE_HTML,LID_HTML_BUT_CANCEL) . "\">"; ?>
</td>
</tr>
</table>
<?php } ?>
<?php if ($menuOption==3) { ?>
<table width="770" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" ><span class="heading"><?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_DELETE_HDR); ?></span></td>
</tr>
<tr>
<td colspan="2" >
<?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_DELETE_INFO); ?>
</td>
</tr>
<tr>
<td colspan="2" >&nbsp;</td>
</tr>
<tr>

<td width="139" ><span class="heading"><?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_FILENAME); ?></span></td>
<td width="431" ><span class="heading"><?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_CHECK_CONFIRM); ?></span></td>
</tr>
<?php
for ($i=0;$i<count($modList);$i++) {
if ($modList[$i]) {
?>
<tr>
<td >
<div align="left">


<?php echo $theList[$i]["name"];?>
</div>
</td>
<td >


<input type="checkbox" name="<?php echo "newname" . $i; ?>" value="1" checked>
</td>
</tr>
<tr>
<td colspan="2" >&nbsp;</td>
</tr>
<? } } ?>

<tr>

<td colspan="2" > &nbsp;
<?php
echo "<input class=\"button\" type=\"submit\" name=\"delete\" value=\"" . $locale->getString(LID_TYPE_HTML,LID_HTML_BUT_DELETE) . "\">";
?>
<input type="hidden" name="confirm" value="Confirm">

<input type="hidden" name="f" value="<?php echo $theFileManager->getSubDir(); ?>">
<?php echo "<input class=\"button\" type=\"submit\" name=\"cancel\" value=\"" . $locale->getString(LID_TYPE_HTML,LID_HTML_BUT_CANCEL) . "\">"; ?>
</td>
</tr>
</table>
<?php } ?>
<?php if ($menuOption==5) { ?>
<table width="770" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" ><span class="heading">
<?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_NEWFOLDER_HDR); ?>
</span></td>
</tr>
<tr>

<td colspan="2" >
<?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_NEWFOLDER_INFO); ?>
</td>
</tr>
<tr>
<td colspan="2" >&nbsp;</td>
</tr>
<tr>

<td width="146" ><span class="heading">
<?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_NEWFOLDER_NAME); ?>
</span></td>
<td width="424" >&nbsp;</td>
</tr>
<tr>
<td colspan="2" >
<input type="text" name="newdirname">

<i>
<?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_NEWFOLDER_ONLY_CHAR); ?>
</i></td>
</tr>
<tr>
<td colspan="2" >&nbsp;</td>
</tr>
<tr>

<td colspan="2" > &nbsp;
<?php
echo "<input class=\"button\" type=\"submit\" name=\"newdir\" value=\"". $locale->getString(LID_TYPE_HTML,LID_HTML_BUT_NEWFOLDER) ."\">";
?>
<input type="hidden" name="f" value="<?php echo $theFileManager->getSubDir(); ?>">

<input type="hidden" name="confirm" value="Confirm">
<?php echo "<input class=\"button\" type=\"submit\" name=\"cancel\" value=\"" . $locale->getString(LID_TYPE_HTML,LID_HTML_BUT_CANCEL) . "\">"; ?>
</td>
</tr>
</table>
<?php } ?>
<?php if ($menuOption==4) { ?>
<table width="770" border="0" cellspacing="0" cellpadding="0">
<tr>

<td colspan="2" ><span class="heading"><?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_UPLOAD_HDR); ?></span></td>
</tr>
<tr>
<td colspan="2"><?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_UPLOAD_INFO); ?></td>
</tr>
<tr>
<td colspan="2" >&nbsp;</td>
</tr>
<tr>
<td width="48" >

<div align="right"><?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_FILE); ?>&nbsp;1:</div>
</td>
<td width="522" >

<input class=\"button\" type="file" name="userfile[]">
</td>
</tr>
<tr>
<td width="48" >

<div align="right"><?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_FILE); ?>&nbsp;2:</div>
</td>
<td width="522" >

<input class=\"button\" type="file" name="userfile[]">
</td>
</tr>
<tr>
<td width="48" >

<div align="right"><?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_FILE); ?>&nbsp;3:</div>
</td>
<td width="522" >

<input class=\"button\" type="file" name="userfile[]">
</td>
</tr>
<tr>
<td width="48" >

<div align="right"><?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_FILE); ?>&nbsp;4:</div>
</td>
<td width="522" >

<input class=\"button\" type="file" name="userfile[]">
</td>
</tr>
<tr>
<td width="48" >

<div align="right"><?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_FILE); ?>&nbsp;5:</div>
</td>
<td width="522" >

<input class=\"button\" type="file" name="userfile[]">
</td>
</tr>
<tr>
<td colspan="2" >&nbsp;</td>
</tr>
<tr>

<td colspan="2" > &nbsp;
<?php
echo "<input class=\"button\" type=\"submit\" name=\"upload\" value=\"" . $locale->getString(LID_TYPE_HTML,LID_HTML_BUT_UPLOAD) . "\">";
?>
<input type="hidden" name="confirm" value="Confirm">

<input type="hidden" name="f" value="<?php echo $theFileManager->getSubDir(); ?>">
<?php echo "<input class=\"button\" type=\"submit\" name=\"cancel\" value=\"" . $locale->getString(LID_TYPE_HTML,LID_HTML_BUT_CANCEL) . "\">"; ?>
</td>
</tr>
</table>
<?php } if ($menuOption==6) { ?>
<table width="770" border="0" cellspacing="0" cellpadding="0">
<tr>

<td colspan="2" ><span class="heading">
<?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_FIND_HDR); ?>
</span></td>
</tr>
<tr>
<td colspan="2">
<?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_FIND_INFO); ?>
</td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<?php if (!empty($errormsg)) { ?>
<tr><td colspan="2">&nbsp;</td></tr>
<tr>
<td colspan="2"><span class="text10find"><?php echo $errormsg; ?></span></td>
</tr>
<tr><td colspan="2">&nbsp;</td></tr>
<?php } ?>
<tr>
<td width="166">
<?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_FIND_FILE_FOLDER); ?>
</td>
<td width="604">&nbsp;
</td>
</tr>
<tr>
<td colspan="2">
<input type="text" name="findtext" maxlength="255" size="28">
<i>
<?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_FIND_MAX255); ?>
</i>
</td>
</tr>
<tr>
<td colspan="2">
<input type="checkbox" name="findmatchcase" value="1">
<?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_FIND_MATCH_CASE); ?>
<input type="checkbox" name="findexact" value="1">
<?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_FIND_WHOLE_WORD_ONLY); ?></td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2">
<?php
echo "<input class=\"button\" type=\"submit\" name=\"find\" value=\"" . $locale->getString(LID_TYPE_HTML,LID_HTML_BUT_FIND) . "\">";
?>
<input type="hidden" name="confirm" value="Confirm">
<input type="hidden" name="advance" value="1">
<input type="hidden" name="advanceoption" value="1">
<input type="hidden" name="f" value="<?php echo $theFileManager->getSubDir(); ?>">
<?php echo "<input class=\"button\" type=\"submit\" name=\"cancel\" value=\"" . $locale->getString(LID_TYPE_HTML,LID_HTML_BUT_CANCEL) . "\">"; ?>
</td>
</tr>
</table>
<?php } if ($menuOption==7) { ?>
<table width="770" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" ><span class="heading">
<?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_EXPORT_HDR); ?>
</span></td>
</tr>
<tr>
<td colspan="2" ><?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_EXPORT_INFO); ?>
</td>
</tr>
<tr>
<td colspan="2" >&nbsp;</td>
</tr>
<?php if (!empty($errormsg)) { ?>
<tr><td colspan="2">&nbsp;</td></tr>
<tr>
<td colspan="2"><span class="text10find"><?php echo $errormsg; ?></span></td>
</tr>
<tr><td colspan="2">&nbsp;</td></tr>
<?php } ?>
<tr>
<td width="145" >
<div align="left"><?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_EXPORT_FILENAME); ?></div></td>
<td width="625" >
<input type="text" name="exportfilename"></td></tr>
<tr><td colspan="2" >&nbsp;</td></tr><tr>
<td colspan="2" >
&nbsp;
<?php
echo "<input class=\"button\" type=\"submit\" name=\"export\" value=\"" . $locale->getString(LID_TYPE_HTML,LID_HTML_BUT_EXPORT) . "\">";
?>
<input type="hidden" name="confirm" value="Confirm">
<input type="hidden" name="advance" value="1">
<input type="hidden" name="advanceoption" value="1">
<input type="hidden" name="f" value="<?php echo $theFileManager->getSubDir(); ?>">
<?php echo "<input class=\"button\" type=\"submit\" name=\"cancel\" value=\"" . $locale->getString(LID_TYPE_HTML,LID_HTML_BUT_CANCEL) . "\">"; ?>
</td>
</tr>
</table>
<?php } if ($menuOption==8) { ?>
<table width="770" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" ><span class="heading">
<?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_IMPORT_HDR); ?>
</span></td>
</tr>
<tr>
<td colspan="2" ><?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_IMPORT_INFO); ?>
</td>
</tr>
<tr>
<td colspan="2" >&nbsp;</td>
</tr>
<?php if (!empty($errormsg)) { ?>
<tr><td colspan="2">&nbsp;</td></tr>
<tr>
<td colspan="2"><span class="text10find"><?php echo $errormsg; ?></span></td>
</tr>
<tr><td colspan="2">&nbsp;</td></tr>
<?php } ?>
<tr>
<td width="144" ><div align="left"><?php echo $locale->getString(LID_TYPE_HTML,LID_HTML_LBL_IMPORT_FILENAME); ?></div>
</td>
<td width="626" >
<input class=\"button\" type="file" name="userfile">
</td>
</tr>
<tr><td colspan="2" >&nbsp;</td></tr><tr>
<td colspan="2" >
&nbsp;
<?php
echo "<input class=\"button\" type=\"submit\" name=\"import\" value=\"" . $locale->getString(LID_TYPE_HTML,LID_HTML_BUT_IMPORT) . "\">";
?>
<input type="hidden" name="confirm" value="Confirm">
<input type="hidden" name="advance" value="1">
<input type="hidden" name="advanceoption" value="1">
<input type="hidden" name="f" value="<?php echo $theFileManager->getSubDir(); ?>">
<?php echo "<input class=\"button\" type=\"submit\" name=\"cancel\" value=\"" . $locale->getString(LID_TYPE_HTML,LID_HTML_BUT_CANCEL) . "\">"; ?>
</td>
</tr>
</table>
<?php } ?>
<?php echo "</form>"; ?>
</body>
</html>
I tried remarking it out with "//" first, and that is when I started getting the error.

Like I said, though, something must have happened to my actual interpreter, because none of the php scripts on my server will execute properly now. I have three different php things that I am trying to use on my server. They are:

a simple php file that only includes the following code:
<HTML>
<HEAD>
<TITLE>Mods of Rage News</TITLE>
<META name="description" content="">
<META name="keywords" content="">
<META name="generator" content="CuteHTML">

<link HREF="/BOR.css" REL="styleSheet" TYPE="text/css" title="MainCSS">

</HEAD>
<BODY BGCOLOR="#025E72" TEXT="#FFFFFF" LINK="#FFFFFF" VLINK="#800080" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">

<?php
include("BORTop.html");
?>

<h2 align="center"><font color="#7DE7FC">Mods Of Rage</font></h2>

<?php
include("trgnews/newsconfig.php");
include("$dir/maindisplay.php");
?>

<?php
include("BORBottom.html");
?>

<p>&nbsp
<table width="750" align="center" cellpadding=0 cellspacing=0><tr><td class="Headline" valign="top">Note:</td> <td class="Comment">We are aware that the ad script below causes some javascript and MySQL errors on the page. Unfortunately, we have no access to the script itself, and are therefore unable to fix any errors it may cause. We are required to display the ad script on at least one of our pages, and it must be loaded a specific number of times each day. We have placed the ad at the bottom of this page, and removed it from all of the other pages on our site.
<br>If you link to our site for anything, please be sure to link to this front page. We don't care if you click on the ads, but our host will disable our account if the ad does not load the required number of times.</td></tr></table>
<p>&nbsp
<center><script
type="text/javascript" src="http://www.thefreeserver.com/ads.php"></script></center>

</BODY>
</HTML>
a news script called "trgnews", and a phpbb forum. All of them return 500 Internal Server Errors. However, none of my shtml files return those errors.

In case you need to know, this is what the file "php-script" looks like:
#!/bin/bash
export SCRIPT_NAME=${PATH_TRANSLATED##${DOCUMENT_ROOT}}
export SCRIPT_FILENAME=$PATH_TRANSLATED
/usr/bin/php
The only other thing I did was that I chmod'd everything on my server to 777, because I was trying to get the upload script to work. Is it possible that chmod'ing everything might have caused the problem?
DCHelp - A Newbie's Best Friend
DC Evolution - Disc Images
DreamZone Forums

I Refuse To Help Anyone That Says They've Tried Everything.
ninja
DCEmu's own ninja
DCEmu's own ninja
Posts: 2381
Joined: Fri Sep 27, 2002 12:48 am
Has thanked: 0
Been thanked: 0

Post by ninja »

It shouldnt have affected it at all, if i recall 777 is RWE for everyone, so it should work. im to lazy to debug all that source, but a few questions:

does this script use any database's or files to save information to?
are all the path's for everything set correctly?
is the php interpreter working properly, you can check this by making a quick php display browser info script and uploading it...
Delete my posting account.

Thanks.
User avatar
curt_grymala
Theme Inducer
Theme Inducer
Posts: 4274
Joined: Fri May 30, 2003 12:14 pm
Location: Wherever I'm Needed
Has thanked: 0
Been thanked: 0
Contact:

Post by curt_grymala »

ninja wrote:is the php interpreter working properly, you can check this by making a quick php display browser info script and uploading it...
That's the thing. I don't think the interpreter's working properly, but I can't figure out what could have happened to it that would have made it quit working. It was working just fine this morning, and then it quit working. It just so happens that I was working on a PHP script at the time, but I honestly don't know whether that caused it, or whether it's all a big coincidence.
DCHelp - A Newbie's Best Friend
DC Evolution - Disc Images
DreamZone Forums

I Refuse To Help Anyone That Says They've Tried Everything.
ninja
DCEmu's own ninja
DCEmu's own ninja
Posts: 2381
Joined: Fri Sep 27, 2002 12:48 am
Has thanked: 0
Been thanked: 0

Post by ninja »

hmmm, try to run the code below and see if it works:
code wrote:<?php
# initialize sessions
session_start();

# set session variable to auto-increment
$_SESSION['VAR'] += 1;
echo "<p>If the following number increases everytime you hit the Refresh button, session
variables are working:",$_SESSION['VAR'],"</p>";

if (isset($_ENV["_FCGI_MUTEX_"])) echo "<p>FastCGI Enabled</p>";
phpinfo();

?>
not that great of a script, but it will at least tell you if the interpreter is doing basic commands.
Delete my posting account.

Thanks.
User avatar
curt_grymala
Theme Inducer
Theme Inducer
Posts: 4274
Joined: Fri May 30, 2003 12:14 pm
Location: Wherever I'm Needed
Has thanked: 0
Been thanked: 0
Contact:

Post by curt_grymala »

I get the exact same 500 Error when I try to run that script.

However - are you ready for the weird part? Here it is:

That script returns the 500 Error when I try to use it on the domain in question. However, the script works just fine on the root domain (the one I am having trouble with is a subdomain). In other words, I am getting 500 errors on http://bor.dcstuff.thefreeserver.net/ but the script works just fine on http://dcstuff.thefreeserver.net/

You can check it out by going to: http://bor.dcstuff.thefreeserver.net/Test.php and http://dcstuff.thefreeserver.net/Test.php
DCHelp - A Newbie's Best Friend
DC Evolution - Disc Images
DreamZone Forums

I Refuse To Help Anyone That Says They've Tried Everything.
User avatar
toastman
Iron Fist of Justice
Iron Fist of Justice
Posts: 4933
Joined: Sat Nov 10, 2001 3:08 am
Location: New Orleans
Has thanked: 0
Been thanked: 0
Contact:

Post by toastman »

Uhmmmm..... stupid suggestion follows........

Since the script works fine with the root domain but not the subdomain, couldn't you just have the 'Mods of Rage' site be http://dcstuff.thefreeserver.net/bor ? and just tiptoe around the problem for now?
No signature.
btm4k
DCEmu Super Fan
DCEmu Super Fan
Posts: 2602
Joined: Tue Feb 12, 2002 8:29 pm
Has thanked: 0
Been thanked: 0

Post by btm4k »

User avatar
curt_grymala
Theme Inducer
Theme Inducer
Posts: 4274
Joined: Fri May 30, 2003 12:14 pm
Location: Wherever I'm Needed
Has thanked: 0
Been thanked: 0
Contact:

Post by curt_grymala »

toastman wrote:Uhmmmm..... stupid suggestion follows........

Since the script works fine with the root domain but not the subdomain, couldn't you just have the 'Mods of Rage' site be http://dcstuff.thefreeserver.net/bor ? and just tiptoe around the problem for now?
Thanks for the suggestion Toastman. Unfortunately, while that may work (if I set up an automatic re-direct from our original index page, which is what most people are linking to), it still wouldn't solve the issue with our phpbb forums. i just installed phpbb forums on that subdomain a few days ago, and put quite a bit of work into getting them up and running, so i don't really want to have to uninstall and re-install them somewhere else.

@btm4k - thanks for the link. I tried them, but I'm not sure I put them in the right place. I put them up there in place of the file "php-script" (which is the one that was returning the error). That didn't change anything. I also noticed that there is a file called "php" in my /usr/bin/ directory, but it is 2.6 megs, so I don't really feel like checking it out if I don't have to (I'm not even sure I have the option to do so).

I'll keep plugging away at it, trying to figure it out. I posted about it in the official support forums for the server, too, but I don't think anybody ever actually gets a real response in those forums.
DCHelp - A Newbie's Best Friend
DC Evolution - Disc Images
DreamZone Forums

I Refuse To Help Anyone That Says They've Tried Everything.
User avatar
curt_grymala
Theme Inducer
Theme Inducer
Posts: 4274
Joined: Fri May 30, 2003 12:14 pm
Location: Wherever I'm Needed
Has thanked: 0
Been thanked: 0
Contact:

Post by curt_grymala »

I just found this info on the PHP web site:
It appears that the file() function causes file access problems for perl cgi scripts accessing the same files. I am using Perl v5.6.0 in linux with PHP/4.0.4pl1. After running a php app using the file() function, any perl cgi trying to access the same file randomly dies returning an internal server error: premature end of script headers.

The simple fix is to use fopen(), fgets() and fclose() instead of file().
Does that mean anything to me? I apologize, but I'm pretty stupid when it comes to PHP, so I don't know if that means I should just run a quick script that uses one of those functions, or what.

I haven't read through all of the PHP script that went with that File Upload script, but I would guess that it probably used the file() command somewhere.
DCHelp - A Newbie's Best Friend
DC Evolution - Disc Images
DreamZone Forums

I Refuse To Help Anyone That Says They've Tried Everything.
btm4k
DCEmu Super Fan
DCEmu Super Fan
Posts: 2602
Joined: Tue Feb 12, 2002 8:29 pm
Has thanked: 0
Been thanked: 0

Post by btm4k »

Do a rearch for "php.ini" (its even called that on unix). This is the file that tells PHP how compile things. Often times I found that there was nothing wrong with my scripts, but the php.ini was wacked. Its likely that your strange error is occuring because something changed in the php.ini (although I wouldnt know how that would happen). Anyway, thats my suggestion.
User avatar
butters
Classic Games Lover
Classic Games Lover
Posts: 5088
Joined: Fri Feb 08, 2002 6:50 pm
Location: Lubbock, Texas, United States, Sol 3, Milky Way Galaxy
Has thanked: 0
Been thanked: 0

Post by butters »

Did you chmod every file or just the directory? If the php script is world writeable Apache (assuming that is what you are using) will not execute it, at least by default. I don't know enough about Apache to tell you how to fix it, but you might try your scripts in another directory that is not world writeable.
User avatar
curt_grymala
Theme Inducer
Theme Inducer
Posts: 4274
Joined: Fri May 30, 2003 12:14 pm
Location: Wherever I'm Needed
Has thanked: 0
Been thanked: 0
Contact:

Post by curt_grymala »

Argh. Now, without me messing with anything, the php on our root domain has quit working. I'm getting the same 500 Error on http://dcstuff.thefreeserver.net/Test.php as I am getting on http://bor.dcstuff.thefreeserver.net/Test.php
This really sucks. I have posted in the official support forums for my host, but gotten no response. Damn.
DCHelp - A Newbie's Best Friend
DC Evolution - Disc Images
DreamZone Forums

I Refuse To Help Anyone That Says They've Tried Everything.
Post Reply