Page 1 of 1

script can't read write file

PostPosted: 28. November 2004 17:56
by bas456
Recently I installed xampplite-win32-1.4.9 to test/run my website locally on my PC. I run XP PRO, NTFS (and of course xampplite).

Now I downloaded a script for search on my website.
The script is:
CJ Website Search V1.0
http://www.scriptsearch.com/cgi-bin/jump.cgi?ID=7877

Now the script gives an error:
# Warning: filesize() [function.filesize]: stat failed for /localhost/ORv1.0/search/site.dat in C:\xampplite\htdocs\ORv1.0\search\admin.php on line 410

Warning: fread(): supplied argument is not a valid stream resource in C:\xampplite\htdocs\ORv1.0\search\admin.php on line 410
Stats/Test Database

# Database State = Not Writable, CHMOD "site.dat"!
# Database Size =
Warning: filesize() [function.filesize]: stat failed for /localhost/ORv1.0/search/site.dat in C:\xampplite\htdocs\ORv1.0\search\admin.php on line 429
Bytes
# Website Count = 1

The script makes the check:
<?
if(is_writable($filename)
?>
And it seems the answer is false. How come?

It seems there is no read/write access to the file site.dat.
But: in NTFS all users have FULL CONTROL over all files.
In other forums people advised me to check if apache/php makes this problem.

Should I change something in apache/php (xampp) to make this script run?

PostPosted: 28. November 2004 18:22
by Wiedmann
Warning: filesize() [function.filesize]: stat failed for /localhost/ORv1.0/search/site.dat in C:\xampplite\htdocs\ORv1.0\search\admin.php on line 410

The function search for the wrong file. See the different paths...

PostPosted: 28. November 2004 19:20
by bas456
Wiedmann wrote:
Warning: filesize() [function.filesize]: stat failed for /localhost/ORv1.0/search/site.dat in C:\xampplite\htdocs\ORv1.0\search\admin.php on line 410

The function search for the wrong file. See the different paths...


You are right. Somehow in the config.php you have to enter:
C:xampplite\htdocs\ORv1.0\search
Instead of:
http://localhost/ORv1.0/search

However xampp is running so http://localhost/ORv1.0/search/site.dat should be a valid url. Strange...