flock-error - entry in guestbook vers. 1.7.2

More
15 years 3 months ago - 10 years 8 months ago #1068 by dmark70
i get a error-message after a new entry in the guestbook like this

Code:
Warning: flock() expects parameter 1 to be resource, boolean given in /is/htdocs/wp1116868_DERR15VHS5/www/seiten/gaestebuch3/add.php on line 212

can somebody help me?
Last edit: 10 years 8 months ago by Pete.

Please Log in or Create an account to join the conversation.

More
15 years 3 months ago #1069 by Pete
Open the file "add.php" with notepad.

Find this line:
Code:
@ $fp = fopen("data/list.txt","a");

Replace it with this:
Code:
$DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT']; @ $fp = fopen("$DOCUMENT_ROOT/data/list.txt","a");

Let me know if this helps.

Thanks,
Pete

DigiOz Webmaster
www.digioz.com

Please Log in or Create an account to join the conversation.

More
15 years 3 months ago #1076 by dmark70
i replaced this line, but the same error, now in line 213. and now?

Please Log in or Create an account to join the conversation.

More
15 years 2 months ago #1085 by Pete
Please create a new file called "test_gb.php", and copy and paste the following in it:
Code:
<?php echo "$DOCUMENT_ROOT/data/list.txt"; ?>

Access it through the browser and let me know what it gives you. Also, have you set your file permission for list.txt to CHMOD 777?

Thanks,
Pete

DigiOz Webmaster
www.digioz.com

Please Log in or Create an account to join the conversation.

More
15 years 2 months ago #1086 by yunuss85

Pete wrote: Open the file "add.php" with notepad.

Find this line:

Code:
@ $fp = fopen("data/list.txt","a");

Replace it with this:
Code:
$DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT']; @ $fp = fopen("$DOCUMENT_ROOT/data/list.txt","a");

Let me know if this helps.

Thanks,
Pete


Okay add not pead ftp host .

error : Your Addition to the Guestbook could not be processed at this time.

:S ????

Please Log in or Create an account to join the conversation.

More
15 years 2 months ago #1087 by Pete

yunuss85 wrote:

Pete wrote: Open the file "add.php" with notepad.

Find this line:

Code:
@ $fp = fopen("data/list.txt","a");

Replace it with this:
Code:
$DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT']; @ $fp = fopen("$DOCUMENT_ROOT/data/list.txt","a");

Let me know if this helps.

Thanks,
Pete


Okay add not pead ftp host .

error : Your Addition to the Guestbook could not be processed at this time.

:S ????


Create a new test file called "test_gb.php". Open it up with notepad and paste the following in it:
Code:
<?php echo "$DOCUMENT_ROOT/data/list.txt"; ?>

Access it through website and post here what the output is.

Pete

DigiOz Webmaster
www.digioz.com

Please Log in or Create an account to join the conversation.

Time to create page: 0.127 seconds
Powered by Kunena Forum