0

I get these errors:

Warning: fopen(tmp/::name.hsh) [function.fopen]: failed to open stream: Invalid argument in ...

Warning: fwrite() expects parameter 1 to be resource, boolean given in...

Warning: fclose() expects parameter 1 to be resource, boolean given in ...

Can anyone advise me what is the problem? Tough is a permission problem but permissions look fine

The code that generates the error is:

    if (!file_exists($File)) {
    $Handle = fopen($FileHash, 'w');
    fwrite ($Handle, $audio_hash.$LINE_BRK);
    fwrite ($Handle, $playlist.$LINE_BRK);
    fclose ($Handle);
    $Handle = fopen($File, 'w');
2
Contributors
4
Replies
6
Views
4 Years
Discussion Span
Last Post by LONGWAY
0

It seems $FileHash variable is false or not valid. Echo that and check if the path is correct.

Edited by cereal

0

Echoing gives no result...$FileHash is about the temp location...the path is ok but still fails to work in temp folder

0

Ok but can you paste an example of this path? Because maybe your calling tmp/name.hsh which is relative to the running script, instead of /tmp/name.hsh that point to the root of the OS.

0

is a player and doesnt work on localhost(xamp) or on real host...and the temp folder is tmp inside the htdocs or on real server ...tmp is at root/public files...the list of errors is little longer continues with next:
fopen(tmpa/::187jbg.xspf) [function.fopen]: failed to open stream: Invalid argument in ...xampp\htdocs...file.php
and after that follow same fwrite errors(now are 9 fwrite error warnings as above) and one fclose error and that s all
...i think these hsh file should be writen at tmp folder but gets error becouse of something and cant write it

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.