I'm not sure what the correct filenaming convention is, but it is intentionally obfuscated so people don't know the actual filename, so this doesn't necessarily mean anything although I personally have no idea if this is the right naming convention or not.JediKnight2 wrote:Well crap...I am having the EXACT same issue....I was running the newest version of PHPBB2 installed the newest version of PHPBB3, ran the converter and everything is fine except for avatars...they worked BEFORE I did the conversion as I tested that to ensure folder permissions were ok...this happened AFTER I ran the converter. This is how it looks in code when it is pointing to the image..the image is in there
./download/file.php?avatar=2_1219363705.jpg
Also when I go to change the avatar the code points to
./download/file.php?avatar=2_1219363705.jpg but the name in the upload folder is f96dc530ae6064981b43d36524aabfee_2.jpg
I had a similar setup, no mods on the PHPBB3.02, but a few on the PHPBB 2.023 - mainly the attachment mod, the upload picture mod are the 2 I think might affect this.JediKnight2 wrote: Just to throw in information on my setup...
Your board's URL:
Version of phpBB3: 3.03
Fresh Install
Used nothing other than files provided with phpBB3. zip file to install
MODs you have installed: NONE on PHPBB3...I DO have some on the 2.0.23 board
When the problem started: After the conversion from PHPBB 2.0.23
Your level of expertise (be honest): Intermediate to Advanced
Template(s) used: prosilver, subsilver2
Language(s) used: English
Version of PHP used: 4.3.9
Database and version used: MySQL 4.1.20
Code: Select all
if (@readfile($file_path) === false)
{
$fp = @fopen($file_path, 'rb');
if ($fp !== false)
{
while (!feof($fp))
{
echo fread($fp, 8192);
}
fclose($fp);
}
}
flush();
Code: Select all
echo file_get_contents($file_path);
Mine started on line 382JediKnight2 wrote:Well...I paid someone to fix it and I would like to know from SOMEONE in the know with PHPBB3...why this would happen...
The fix was in the file.php file...the original code starting on line 405
Code: Select all
Location: http://localhost/phpBB3/download/file.php?avatar=2_1220219567.jpg
Image dimensions: 0px × 0px (scaled to 200px × 149px)
Size of File: 7.87 KB (8056 bytes)
Alternate Text: User avatar
Hey man, thanks you very much, this helped to me too. I guess someone must tell this to people in phpbb to include in new update or phpbb4.JediKnight2 wrote:Well...I paid someone to fix it and I would like to know from SOMEONE in the know with PHPBB3...why this would happen...
The fix was in the file.php file...the original code starting on line 405
Replace that withCode: Select all
if (@readfile($file_path) === false) { $fp = @fopen($file_path, 'rb'); if ($fp !== false) { while (!feof($fp)) { echo fread($fp, 8192); } fclose($fp); } } flush();
That fixed it for me...now the question is why...the reason I got was there was a php error on the lineCode: Select all
echo file_get_contents($file_path);
$fp = @fopen($file_path, 'rb'); and that returned false and the script returned to browser zero
SO IF it is a php error...how come everyone else isn't having an issue here? Is it because of a server setting on my end?
Well, ran into this problem today - everything had been working fine before. As I ran two phpbb3 forums on the same server and both encountered the same issue, I suspected it was due to a change on the server end by the admins.lupus_est wrote:Hey man, thanks you very much, this helped to me too. I guess someone must tell this to people in phpbb to include in new update or phpbb4.JediKnight2 wrote:Well...I paid someone to fix it and I would like to know from SOMEONE in the know with PHPBB3...why this would happen...
The fix was in the file.php file...the original code starting on line 405
<-- code skipped -->
That fixed it for me...now the question is why...the reason I got was there was a php error on the line
$fp = @fopen($file_path, 'rb'); and that returned false and the script returned to browser zero
SO IF it is a php error...how come everyone else isn't having an issue here? Is it because of a server setting on my end?
Thanks again, bye....
That perhaps is the issue. Quick check with phpinfo() showed that my server admin had disabled readfile (isn't it great when admins change things but don't inform anyone about it?). More info here for those interested: http://www.nusphere.com/kb/phpmanual/fe ... e-mode.htm[06-Dec-2008 03:21:18] PHP Warning: readfile() has been disabled for security reasons in /blahblahblah/download/file.php on line 386