Cannot upload images to phpBB posts

The issue is mainly occurring due to the absence of some code. To fix this issue, do the following:

"cd" into the corresponding directory of phpBB.

Create a file "addform.html" with the following content:

Change the ownership of the file according to the need (ie. cpanel -> username: nobody).

Take a backup of the file "includes/template.php"

In the 265 line of ./includes/template.php you can fine the following code:
$str = implode("", @file($filename));

if (empty($str))
{

die("Template->loadfile(): File $filename for handle $handle is empty");
}

Add the following code below it:
if(basename($filename) === 'posting_body.tpl')

{

$str = str_replace('', '
• Add image to post', $str);

}

This will add the image upload facility in the phpBB posts.

  • 30 Users Found This Useful
Was this answer helpful?

Related Articles

 How to Change Your FTP Port

Lately FTP has been a problem for a lot of hosting providers. Especially since the recent influx...

 Child pid xxx exit signal Segmentation fault (11)

Sometimes apache is crashing and all or some PHP pages are showing blank when you browse it. Also...

 Mailman Error “Bug in Mailman version 2.1.11.cp3?

If you are getting following error when trying to modify mailinglist then execute following...

 How to stop generating core files

You may come across core files which gets generated within your accounts . The possible reason...

 cPanel :: Unable to locate clamd

If you are not able to restart clamd on cpanel server and getting following...