Quote from: byword at May 23, 2009, 08:15 PM
« PHP Parse Error »
PHP error debug
Error: fopen() [function.fopen]: Filename cannot be empty
Error type/ Nr.: Warning - 2
File: /home4/mymaindomain/public_html/myre-directeddomain/assets/snippets/spform/spformproc.inc.php
Line: 212
Line 212 source: if($fp = @fopen($banListFile, "r")) {
Any ideas - this has me stumped - would it have anything to do with the banlist file - I haven’t edited it and it had a default example IP address 0.0.0.0 uncommented. Or could it be that this is on a ADDON domain and I have incorrectly listed it in my refers list?
BTW - I think this MODX snippet has the most clear and comprehensive instructions, I would feel terrible if I had missed something
I had this happen to me on Bluehost as well. The variable $banListFile is losing its value somehow. There are a couple of solutions:
1. If you’re not using the banlist, just comment out the following code:
// Get the banList
/* if($fp = @fopen($banListFile, "r")) {
while($inString = read_file_line($fp))
$banList[] = $inString;
fclose($fp);
} */
2. If you’re using the banlist, hardcode the path to the banlist file just after the // Get the banList line:
// Get the banList
$banListFile = 'path_to_banlist_file';
3. If you want to do it right (portability wise), make $banListFile a third argument to the check_banlist() function on lines 202 and 394 and remove $banListFile from the list of globals on line 204.
Sorry about the trouble.