Login in /admin: unable to load /include/captcha/image.php
  • Hi,
    I'm trying to login the first time in Newscoop.
    So I'm in my.domain.org/admin, I add user and pass but I have also a "Please enter the code shown in the image" No Image is shown.
    I checked the code and it search for a /include/captcha/image.php wich is not loading. If I connecto to
    my.domain.org/include/captcha/image.php it reports an error-image (error text that result as an image) saying "the image could not be displayed due some errors" (not reported).
    Checked the permission inside /include/captcha/ and I set image.php and php-captcha.inc.php to 755.
    No results.
    I'm not able to login.
    I also noticed that when I tryed to click login, It adds 2 or 3 characters after my password.

    Hoping there is a way to solve it.

    Thank you in advance,

    Jacopo
  • 5 Comments sorted by
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    check apache error log file
  • This is the error_log related:
    PHP Warning:  imageftbbox(): Could not find/open font in /var/lib/newscoop/include/captcha/php-captcha.inc.php on line 309
    PHP Warning:  imagefttext(): Could not find/open font in /var/lib/newscoop/include/captcha/php-captcha.inc.php on line 317

    Those are the line related in php-captcha.inc.php:
    309             $aCharDetails = imageftbbox($iFontSize, $iAngle, $sCurrentFo        nt, $this->sCode[$i], array());
      317             imagefttext($this->oImage, $iFontSize, $iAngle, $iX, $iY, $i        TextColour, $sCurrentFont, $this->sCode[$i], array());

    Thank you for the reply :)
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    folder /var/lib/newscoop/include/captcha/fonts should contain same files as https://github.com/sourcefabric/Newscoop/tree/master/newscoop/include/captcha/fonts
  • Hi Andrey,
    thank you for your reply.
    Actually there was no "fonts" folder. I downloaded it from github and finally I was able to login :)
  • Hi,Have you tried to refresh your website?Or you can try to the following code to load image,hope to help you:
    using RasterEdge.Imaging.Basic.Core;
    using RasterEdge.Imaging.Basic.Codec;
    using RasterEdge.Imaging.Basic;

    namespace RE__Test
    {
    public partial class Form1 : Form
    {
    public Form1()
    {
    InitializeComponent();
    }

    private void button1_Click(object sender, EventArgs e)
    {
    string fileName = "c:/Sample.png";

    REImage reImage = REFile.OpenImageFile(fileName);

    REFile.SaveImageFile(reImage, "c:/reimage.png", new PNGEncoder());
    }
    }