TeamPhotoshop
Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
Forum Home Latest Posts Search Help Subscribe

PHP error - Need help

Page: 1 Reply
Jan 10th 2005#164588 Report
Member since: Feb 7th 2002
Posts: 1564
Warning: main(): Failed opening '' for inclusion (include_path='./:/usr/local/lib/php') in guestbook/top.php on line 1

I can't post in this guestbook, and that's odd 'cause I have been able to and am able to at my own site. But here on this other site in which I'm using the same guestbook I get this error when trying to post, with the result hat nothing gets posted...

Line 1 in the top.php looks like this:

[php]
























if($send==1) {
if($visitorname=='' or $visitormessage=='') {
?>



Tillbaka till EPICENTER









Namn:


E-post:


Meddelande:






Kom ihåg att uppföra dig.


Din IP-adress loggas när du skriver i gästboken så håll det på en bra nivå.. Alla påhopp av något slag
leder omedelbart till ett meddelande till din INternet leverantör och du kan inte skriva inlägg här mer.


Din IP-adress



Logout"; } ?>






Seems like you forgot something important (maybe your name or your message)..


} else {
$lasketaan=explode("\n",$visitormessage);
if(count($lasketaan)>20) {
//your message has too many rows..
?>


your message has too many rows.. you should limit it a little..
Back to the guestbook


} else {



if($passwordlength=="no") {
?>


Did you really think that a single word needes to be longer than ? Looks like the admin didn't think so..
Back to the guestbook

} else {

$visitormessage=str_replace("\'", "'", $visitormessage);
$visitormessage=str_replace('\"', '"', $visitormessage);
$visitorname=str_replace("\'", "'", $visitorname);
$visitorname=str_replace('\"', '"', $visitorname);
?>






Ditt meddelande skickades, tack !

Klicka här för att komma tillbaka till gästboken..


Namn: Tidpunkt:

Meddelande:
", strip_tags($visitormessage)); ?>


}
}
}
} else {

// --> Piece of code #1 Starts <--


if ( ereg('[^0-9]', $n ) ) {
echo "You screwed it up..";
} else {
if(!$n or $n<0){
$n=0;
}
$i=$n;
}



$o=1;
//In case there has never been a single message yet..
if(file_exists($maindata)) {
$viesti = file($maindata);
$viestejä=count($viesti)-1-$n;
while($o <= 5) {


$viestiinfo=explode('::-::', $viesti[$viestejä]);
// --> Let's now rename the pieces of crap <--
$message_name=$viestiinfo[0]; //Senders name
$message_email=$viestiinfo[1]; //Sendsrs E-mail
$message_date=$viestiinfo[2]; //Date of sending
$message_time=$viestiinfo[3]; //Time of sending
$message_ip=$viestiinfo[4]; //Senders IP
$message_message=$viestiinfo[5];//The message
$message_comment=$viestiinfo[6];//A comment from the admin..
// --> Piece of code #1 Ends <--

// --> Piece of code #2 Starts <--
if($message_email!='' and $message_email != '?("&%') {
//So this means the e-mail is not empty..
$message_printname="$message_name";
$message_printname=str_replace("\'", "'", $message_printname);
$message_printname=str_replace('\"', '"', $message_printname);
} else {
$message_printname=$message_name;
$message_printname=str_replace("\'", "'", $message_printname);
$message_printname=str_replace('\"', '"', $message_printname);
}
//So in this case now the e-mail WAS left empty..
// --> Piece of code #2 Ends <--

// Checking if empty..
if($message_message=='') {
} else {
$message_message=str_replace("\'", "'", $message_message);
$message_message=str_replace('\"', '"', $message_message);
?>







$message_comment=str_replace("\'", "'", $message_comment);
$message_comment=str_replace('\"', '"', $message_comment);

?>


}
}
$n++;
$o++;
$viestejä=$viestejä-1;
}
}
?>

Namn: -
Tidpunkt:

Meddelande:


Senders IP:

Ban Sender's IP

Comment this message

Delete this message

Comment:





$messageamount=count($viesti);
?>
Det finns meddelanden vid denna tidpunkt...





if($i=='') { $i=0; } ?>


if($i+5>=count($viesti)) {
echo "Äldre";
} else {
?>
Äldre
}
if ($i-5 >= 0) {
?>
- Nyare
} else {
?>
- Nyare






}
?>

[/php]


Anyone ?
Reply with Quote Reply
Jan 10th 2005#164590 Report
Member since: Feb 7th 2002
Posts: 1564
I think I got it, hehehe...quite embarrasing actually ;)...I think I might have forgotten to chmod the database txt file, uhaaa...Well, any day being perfect is prolly just an illusion. I will go home and chmod some, and I'll get back to you on this matter

*slaps big, dead trout in back of head*

Patric.
Reply with Quote Reply
Jan 10th 2005#164591 Report
Member since: Feb 7th 2002
Posts: 1564
Yepp, that was it....Darn, how stupid can one be, eh ?
Reply with Quote Reply
Jan 10th 2005#164594 Report
Member since: Mar 18th 2001
Posts: 6632
Hm. Looks like the php code text styles need to be changed. Can't read that code at all on the red background.
Reply with Quote Reply
Jan 11th 2005#164623 Report
Member since: Feb 7th 2002
Posts: 1564
Yepp, saw that aswell...The same goes for the other code style sheets...
Reply with Quote Reply
Page: 1 Back to top
Please login or register above to post in this forum