• Resolved strarsis

    (@strarsis)


    Using latest png-to-jpg plugin on latest WordPress.

    The conversion is too fast in the png-to-jpg web UI and
    no files were actually converted.

    In PHP error log the following is logged:

    [...]
    [...] [error] [...]: *[...] FastCGI sent in stderr: "PHP message: PHP Warning:  file_get_contents([...]/uploads/2017/09/test_.png): failed to open stream: No such file or directory in [...]/plugins/png-to-jpg/png-to-jpg.php on line 374
    PHP message: PHP Warning:  file_get_contents([...]/uploads/2017/09/test_.png): failed to open stream: No such file or directory in [...]/plugins/png-to-jpg/png-to-jpg.php on line 375" while reading response header from upstream, client: 80.187.115.57, server: [...], request: "POST /wp/wp-admin/admin-ajax.php HTTP/2.0", upstream: "fastcgi://unix:/var/run/php-fpm-wordpress.sock:", host: "[...]", referrer: "[...]/wp/wp-admin/tools.php?page=png-to-jpg.php&tab=convert"
    [...]
    • This topic was modified 7 years, 3 months ago by strarsis.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author kubiq

    (@kubiq)

    Hello,

    “failed to open stream” means, that you’ve probably manually deleted that file, or it’s not accessible because of chmod, htaccess or other restrictions.

    That’s problem in your system, because yes, I can ask for each file if it exists and if it’s accessible, but it makes no sense as default working and properly set WordPress can’t have this error. It will also make whole algorithm slower, so I don’t plan to implement these checks.

    Just try to optimize your database, remove old and irelevant records, it will help ??

    Thread Starter strarsis

    (@strarsis)

    The reason for this issue could stem from the fact that [WordPress Bedrock](https://roots.io/bedrock/) is used in this setup which adjusts some paths (like to uploads/ directory where the image files reside in).
    This shouldn’t be a problem though when the paths are retrieved using WordPress methods instead hardcoding them (and assuming default paths).

    Plugin Author kubiq

    (@kubiq)

    Hmm, that’s probably some bad practice in that bedrock installation, because in my plugin there is nowhere hard-coded /uploads/, but everything is properly generated by wp_get_attachment_url() function…
    I have no idea what bedrock is, but probably it’s not official WordPress installation, am I right? They should fix wp_get_attachment_url by adding some filters etc., but unfortunately I can’t help you here.
    Still, I don’t understand how is this possible, because you should experience many problems if wp_get_attachment_url returns wrong URL

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Not converting (error)’ is closed to new replies.