Jump to content

Error when moving to production...


rastographics
 Share

Recommended Posts

Site works great on staging, moved to production (different folder/user on same server), site front-end works, but trying to create a new page on the backend gives this error:

DirectoryIterator::__construct(../releases/1548970736/site/assets/files/1140/): failed to open dir: No such file or directory (in /wire/core/Pageimages.php line 134)

 

 

The database is an exact copy. Only thing I didn't copy over was the backups/cache/logs directories from assets. (I did copy the "files" directory).

The folder it is referencing "site/assets/files/1143" ...that directory never existed on staging or production. Don't know why it's trying to call that directory from the getAllVariations() method in wire/core/Pageimages.php???

image.thumb.png.8466422099bc0f3bec6e8bb8921caf7a.png

It gives this error no matter where in the tree i try to create a new page.

 

EDIT: Just realized that the "1143" in the error message "site/assets/files/1143" is the id of the new page I'm trying to create.

Edited by rastographics
Remove sensitive server info
Link to comment
Share on other sites

Did you update the site/config.php file $config->httpHosts array to include the new domain name? And/or change the root dir in your .htaccess file?

Had similar issue today where dev site on same server with same db was moved to new domain name and different site path, eg

From: http://999.99.99.99/~myclient dir/ to http://www.myclientsite.com

 

1/ Make changes to the /site/config.php httpHosts whitelist to add the new domain name:

/**

* Installer: HTTP Hosts Whitelist

* 

 */

$config->httpHosts = array(

    'www.mysite.com',

    'mysite.com',

    '999.99.99.99'

    );

  

2/ Make a change to the .htaccess file to update it from the old site root to the new site root:

# -----------------------------------------------------------------------------------------------

  # 11. OPTIONAL: Set a rewrite base if rewrites aren't working properly on your server.

  # And if your site directory starts with a "~" you will most likely have to use this.

  # -----------------------------------------------------------------------------------------------

 

  # RewriteBase /

  # RewriteBase /pw/

  # RewriteBase /~user/

  # RewriteBase /~myclient/

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...