Support » Plugin: Easy Photography Portfolio » Plugin trying to open photography-portfolio.php from old server path

  • Resolved gabriellemartin


    Hi, I have a site throwing these errors from your plugin. This started happening immediately after migrating my site from an old host to a new one

    Warning: fopen(/path/to/old/server/wp-content/plugins/photography-portfolio/photography-portfolio.php): failed to open stream: No such file or directory in /path/to/new/server/wp-includes/functions.php on line 4834

    Warning: fread() expects parameter 1 to be resource, boolean given in /path/to/new/server/wp-includes/functions.php on line 4837

    Warning: fclose() expects parameter 1 to be resource, boolean given in /path/to/new/server/wp-includes/functions.php on line 4840

    I looked around in the code but couldn’t find anything about where the old path is being stored. Both the database and your plugin seem to use the __FILE__ constants and so on. Is there any way you can advise me on where to look for what is calling on those functions?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author justnorris


    The plugin isn’t responsible for this kind behavior. It seems to me that the server is doing something to produce those errors. Possibly some caching plugin? You need your hosting provider to help diagnose what’s happening here.

    All I can tell you for sure is that the plugin isn’t storing the paths anywhere – it’s as portable as a WordPress plugin can be. You need to look for the problem elsewhere.



    What worked for me is to
    a) change the theme of the website
    b) disable and re-enable the plugin
    c) then switch back to the theme you were using.

    It worked, but only if you switch the theme first (at least with minimalist-portfolio), if not, you’ll end up with an error screen and then you’ll have to enable the plugin from the Database.

    it surely is some kind of cache issue somewhere related with the plugins
    Hope this helps



    I’m having the exact same issue. Unfortunately, the above steps didn’t resolve the issue. I’ve cleared browswer cache as well as uninstalled any caching plugins.

    The issue arose when migrating from Bluehost to Hostgator.

    Plugin Author justnorris


    Hey @asaliga
    After caching plugins are uninstalled – they often leave traces of caching files around that are still in use – it’s not as simple as removing the caching plugin. Have a look at your /var/www/ directory and see if anything related to caching is still there.

    Also – in my opinion, Hostgator and GoDaddy are some of the worst hosting providers out there ( out of all the popular ones ). I’m not saying that the issue is related to Hostgator specifically, but I wouldn’t be surprised if it was.



    The same errors are being thrown on my end too… I scoured for suspicious caching leftovers, but no luck so far. FWIW I’m on Digital Ocean, but Linode throws the same error.

    It’s strange because fopen is referencing my local development path: /Applications/MAMP/htdocs/site/wp-content/plugins/photography-portfolio/photography-portfolio.php

    I can’t find any references to that path in the database or project-wide. Will update if I find a workaround

    • This reply was modified 5 months, 4 weeks ago by  nsn.

    Thank you ,we are waiting for the exact solution.

    all plugins disable and turn on = OK! It worked for me!

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.