Open afridley opened 6 years ago
Those requests will only hit Craft/PHP if the files weren’t published correctly to begin with.
So I’m guessing either your cpresources/
folder doesn’t exist yet, or PHP doesn’t have execute + write permissions on it.
Hmm I tried changing the permissions and that didn't seem to do anything.
Whats odd is it creates cpresources in the /public directory.
If I manually move this to the base directory /var/www then I am able to install craft. It doesn't update the site but instead installs craft 3 alongside the craft2 installation
If I switch back to
$path = rtrim($craftPath, '/').'/app/index.php';
if (!is_file($path)) {
if (function_exists('http_response_code')) {
http_response_code(503);
}
exit('Could not find your craft/ folder. Please ensure that <strong><code>$craftPath</code></strong> is set correctly in '.__FILE__);
}
require_once $path;
I can see the craft2 site again.
Sorry I missed that you are installing Craft 3 in a craft/
subdirectory. Just so we’re on the same page, can you post a screenshot of your full directory structure?
I was facing a similar issue but in my case the files were not published properly due to a PHP memory limit fault while installing a plugin. I deleted all of the files in the cpresources/ directory and pointed to /admin which created all those files back properly.
Description
cpresources show up as 503 error when migrating a craft 2 site
Steps to reproduce
You should see the craft3 installation without any styles. If you inspect console it will show all css and scripts as
GET https://www.yoursite.com/cpresources/9315f24d/jquery-ui.min.js 503 (Service Unavailable)
There is an folder structure of cpresources in the public directory. No files are in these folders. May be left from original site.
Composer seems to install the scripts not into cpresources as there is no other folder but instead to yoursite/craft/vendor/craftcms/cms/src/web/assets/
For instance Install.min.js gets GET http://www.yoursite.com/cpresources/1fb4f109/install.min.js 503 (Service Unavailable)
the file seems to be located at
yoursite/craft/vendor/craftcms/cms/src/web/assets/installer/dist
not where it is looking in cpresources
Additional info