We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25902
    • 27 Posts
    Heyas,
    WebloginPE image uploader is giving parse error after I upgraded to Evo 1.0 from Evo 1 RC3.

    It used to generate a parse error in Evo RC 3 which was fixed by editing line 2531 of the code or such like so:
    // old code $userImage = $modx->config[’base_path’].strtolower(str_replace(’ ’, ’-’, basename( $_FILES[’photo’][’name’])));
    to new code:
    $userImage = $modx->config[’base_path’].’assets/snippets/webloginpe/userimages/’.strtolower(str_replace(’ ’, ’-’, basename( $_FILES[’photo’][’name’])));

    and CHMOD userimages folder to 777.

    After the upgrade, I’m getting a similar parse error but for a different line:

    MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »

    PHP error debug
    Error: imagejpeg() [function.imagejpeg]: Unable to open ’/home/rozasure/public_html/modx/assets/snippets/webloginpe/userimages/dodol.jpg’ for writing: Permission denied
    Error type/ Nr.: Warning - 2
    File: /home/rozasure/public_html/modx/assets/snippets/webloginpe/webloginpe.class.php
    Line: 2609
    Line 2609 source: imagejpeg($image_p, $userImageFilePath, 100);

    Kindly advice, thanks.
    • It doesn’t look as if there are any problems with the path.
      It looks like you’re trying to upload an image that’s already there, either that or the permissions for the folder aren’t 777. I’m not familiar with the WebloginPE code, but my hunch is that this isn’t related to the Evolution 1.0.0 upgrade.
        Mike Schell
        Lead Developer, MODX Cloud
        Email: [email protected]
        GitHub: https://github.com/netProphET/
        Twitter: @mkschell
      • Quote from: netProphET at Jul 31, 2009, 05:31 PM

        It doesn’t look as if there are any problems with the path.
        It looks like you’re trying to upload an image that’s already there, either that or the permissions for the folder aren’t 777. I’m not familiar with the WebloginPE code, but my hunch is that this isn’t related to the Evolution 1.0.0 upgrade.


        Agreed. Definitely appears to be a permissions issue. There are some updates required to WebLoginPE to make compatible with PHP 5.3.0, but should not be for Evolution 1.0.0...
          Mike Reid - www.pixelchutes.com
          MODx Ambassador / Contributor
          [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
          ________________________________
          Where every pixel matters.
        • If he upgraded, it’s possible that the owner of the file or directory in question was changed, and now the script can’t write to it? Who is the owner, and what are the permissions of the file in question?
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 25902
            • 27 Posts
            Hi all, thanks for the replies. The issue has been resolved, it was due to the image file already existing as you stated. Somehow, when I imported the database, the user profile was not transferred correctly, so he does not exist in the records but his user image was.