View previous topic :: View next topic |
Author |
Message |
SXL WEB -
Joined: 13 Nov 2002 Posts: 28 Location: Elmira, NY - a small pleace from hell
|
Posted: Sun Jan 26, 2003 4:15 am Post subject: PHP (ABYSS) PHP (MAIN SERVER) |
|
|
i made a script on my computer called sxtag_version 5 pro.
and all the version i made 5 is the best.
the only problem is that i made it useing abyss web server as a host, and when i tryed to upload it on a real server it dont work i get all types of errors.
here is my script its kind of long "below"
<?PHP
$config = "config.php"; // your config file
require $config;
if($HTTP_POST_VARS['submit'])
{
if(!$HTTP_POST_VARS['name']) {
echo "You must enter a name";
exit;
}
if(!$HTTP_POST_VARS['message']) {
echo "Your Forgot A Message";
exit;
}
$fp = fopen('message.txt','a');
if(!$fp) {
echo "Error opening file!";
exit;
}
$line = date("m.d.y") . "|^|" . $HTTP_POST_VARS['name'];
$line .= "|^|" . $HTTP_POST_VARS['message'];
$line .= "|^|" . $HTTP_POST_VARS['op'];
$data = file($path . "/" . "$style" . "/" . 'icons.data');
$data = array_reverse($data);
foreach($data as $element) {
$element = trim($element);
$pieces = explode("|^|", $element);
$line = str_replace($pieces[0] , "<img src=\"$path/$style/" .$pieces[1] . "\">",$line);
}
$bad = file('badwords.txt');
$bad = array_reverse($bad);
foreach($bad as $element) {
$element = trim($element);
$pieces = explode("|^|", $element);
$line = str_replace($pieces[0] , $pieces[1],$line);
}
$line = str_replace("$web","</",$line);
$line = str_replace("http://","<a target=_blank href=http://",$line);
$line = str_replace("aim:","<a href=aim:goim?screenname=",$line);
$line = str_replace("mail:","<a href=mailto:",$line);
$line = str_replace("\r\n","<BR>",$line);
$line .= "\r\n";
fwrite($fp, $line);
if(!fclose($fp)) {
echo "Error closing file";
exit;
}
}
$data = file('message.txt');
$data = array_reverse($data);
foreach($data as $element) {
$element = trim($element);
$pieces = explode("|^|", $element);
echo $head . $pieces[3] . ">" . $pieces[1] . "</a>" . $mid_cl . $pieces[2] . $foot . $separator . "\r\n";
}
?>
<script type="text/javascript">
function sx(url) {
newin = window.open(url,'title','scrollbars=yes,resizable=no, width=200,height=300,status=no,location=no,toolbar=no');
}
</script>
<div align = "center">
<BODY LEFTMARGIN="<? echo $LEFTMARGIN ?>" TOPMARGIN="<? echo $TOPMARGIN ?>">
<link rel="stylesheet" href="<? echo $path . "/" . $style . "/" . $style ?>.css" type="text/css">
<FORM ACTION=<?=$PHP_SELF?> METHOD=post>
<INPUT TYPE="text" SIZE="<? echo $size ?>" maxlength="<? echo $max ?>" class="editbox" VALUE="<?PHP echo $nam ?>" NAME="name"><BR>
<INPUT TYPE="text" SIZE="<? echo $size ?>" maxlength="<? echo $max ?>" class="editbox" VALUE="<?PHP echo $web ?>" NAME="op"><BR>
<INPUT TYPE="text" SIZE="<? echo $size ?>" maxlength="<? echo $max ?>" class="editbox" VALUE="<?PHP echo $msg ?>" NAME="message"><BR>
<INPUT TYPE=submit NAME=submit class=button VALUE=Post it!> <INPUT type=reset class=button VALUE=Reset><br>
<?PHP echo $font ?>
<a href="javascript:sx('help.php');">Help</a> |
<a href="admin.php" rel="nofollow" target="_blank">Admin</a><br></font>
<?
$data = file($path . "/" . $style . "/" . 'icons.data');
$data = array_reverse($data);
foreach($data as $element) {
$element = trim($element);
$pieces = explode("|^|", $element);
echo "<a href=\"javascript:void(0)\" onClick=\"document.forms[0].elements[2].value+='" . $pieces[0] . "';return false;\"><img src=Icons/$style/" . $pieces[1] . " alt=Insert Mail link border=0></a>";
}
?><a href="javascript:void(0)" onClick="document.forms[0].elements[1].value+='mail:you@me.com';return false;"><img src="mail.gif" alt="Insert Mail link" border="0"></a>
<a href="javascript:void(0)" onClick="document.forms[0].elements[1].value+='aim:s/n';return false;"><img src="aim.gif" alt="Insert Aol-Messenger link" border="0"></a> _________________
|
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Sun Jan 26, 2003 8:19 pm Post subject: Re: PHP (ABYSS) PHP (MAIN SERVER) |
|
|
Errors you get may indicate what's wrong. What are the errors you received? _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
DLashley -
Joined: 18 Dec 2002 Posts: 207 Location: New York, NY
|
Posted: Mon Jan 27, 2003 11:49 pm Post subject: |
|
|
... and Abyss Web Server IS a real server. :wink: _________________ DLashley |
|
Back to top |
|
|
Guest
|
Posted: Tue Jan 28, 2003 11:43 am Post subject: ITS ME SXL WEB |
|
|
Warning: main(config.php) [function.main]: failed to create stream: Permission denied in /usr/home/anifh/public_html/dbz2/sxtag/post.php on line 3
Fatal error: main() [function.main]: Failed opening required 'config.php' (include_path='') in /usr/home/anifh/public_html/dbz2/sxtag/post.php on line 3 |
|
Back to top |
|
|
SXL WEB -
Joined: 13 Nov 2002 Posts: 28 Location: Elmira, NY - a small pleace from hell
|
Posted: Tue Jan 28, 2003 11:46 am Post subject: Re: PHP (ABYSS) PHP (MAIN SERVER) |
|
|
aprelium wrote: | Errors you get may indicate what's wrong. What are the errors you received? |
the errors im geting are
Warning: main(config.php) [function.main]: failed to create stream: Permission denied in /usr/home/anifh/public_html/dbz2/sxtag/post.php on line 3
Fatal error: main() [function.main]: Failed opening required 'config.php' (include_path='') in /usr/home/anifh/public_html/dbz2/sxtag/post.php on line 3 _________________
|
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Wed Jan 29, 2003 8:52 pm Post subject: Re: PHP (ABYSS) PHP (MAIN SERVER) |
|
|
SXL WEB wrote: |
Warning: main(config.php) [function.main]: failed to create stream: Permission denied in /usr/home/anifh/public_html/dbz2/sxtag/post.php on line 3
|
In line 3, there is a function that deals with the file system and that has an argument (may be a file name) to which your PHP script has no access permission (at the level of your operating system, do not be confused with Access Control of the web server.)
SXL WEB wrote: |
Fatal error: main() [function.main]: Failed opening required 'config.php' (include_path='') in /usr/home/anifh/public_html/dbz2/sxtag/post.php on line 3 |
Check you include_path in order to point to the directory where that config.php is. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|