I duplicated my entire site to a different domain name as a testing environment, so I used the readme and went by it line by line.
1. Here's what I did to patch drupal core - I'm very new to patching so I'm not sure if the output is as intended?:
[root@server xx]# patch -p0 < drupal6.patch
(Stripping trailing CRs from patch.)
patching file includes/common.inc
(Stripping trailing CRs from patch.)
patching file includes/file.inc
(Stripping trailing CRs from patch.)
patching file includes/form.inc
(Stripping trailing CRs from patch.)
patching file includes/theme.inc
(Stripping trailing CRs from patch.)
patching file themes/garland/template.php
2. And then I applied the imagecache patch:
[root@server imagecache]# patch < imagecache.patch
(Stripping trailing CRs from patch.)
patching file imagecache.module
3. Then I placed the cdn folder into /sites/all/modules
4. I enabled the module.
5. I navigated to admin/settings/cdn, and this is where my problem begins. A huge chunk of error appeared at that page:
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/common.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 72.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/common.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 77.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/common.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 72.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/common.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 77.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/common.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 72.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/common.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 77.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/common.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 72.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/common.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 77.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/common.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 72.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/common.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 77.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/common.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 72.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/common.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 77.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/file.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 72.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/file.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 77.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/file.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 72.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/file.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 77.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/file.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 72.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/file.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 77.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/file.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 72.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/file.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 77.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/file.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 72.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/file.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 77.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/form.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 72.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/form.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 77.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/theme.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 72.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/theme.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 77.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/theme.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 72.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/theme.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 77.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/theme.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 72.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/theme.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 77.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/theme.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 72.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/theme.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 77.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/theme.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 72.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/theme.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 77.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/theme.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 72.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/includes/theme.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 77.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/themes/garland/template.php ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 72.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/themes/garland/template.php ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 77.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/themes/garland/template.php ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 72.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/themes/garland/template.php ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 77.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/sites/all/modules/imagecache/imagecache.module ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 72.
* warning: file_get_contents(/var/www/html/saigoheiki.com/hs/sites/all/modules/imagecache/imagecache.module ) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/saigoheiki.com/hs/sites/all/modules/cdn/cdn.requirements.inc on line 77.
* Please fix the following problems with the installation of the CDN integration module:
o CDN integration — Drupal core patch
This patch has not been properly applied to the following files (or the patch has been updated):
+ /var/www/html/saigoheiki.com/hs/includes/common.inc
+ /var/www/html/saigoheiki.com/hs/includes/file.inc
+ /var/www/html/saigoheiki.com/hs/includes/form.inc
+ /var/www/html/saigoheiki.com/hs/includes/theme.inc
+ /var/www/html/saigoheiki.com/hs/themes/garland/template.php
Please consult the installation instructions in the included README.txt.
o CDN integration — ImageCache module patch
This patch has not been properly applied to the following files (or the patch has been updated):
+ /var/www/html/saigoheiki.com/hs/sites/all/modules/imagecache/imagecache.module
Please consult the installation instructions in the included README.txt.
I am puzzled as to what went wrong. The "no such file or directory" error doesn't make sense because they do exist! Even puzzling is the part that states that I have not patched both drupal core and the imagecache module.
Any ideas as to where I went wrong?
Comment | File | Size | Author |
---|---|---|---|
#10 | 895118-10.patch | 773 bytes | Wim Leers |
#7 | cdn_trim_fullpath.patch | 972 bytes | As If |
Comments
Comment #1
Wim LeersThat doesn't make any sense! Maybe you've set strange permissions? In any case, I can't reproduce this on my computer.
Comment #2
Quarantine CreditAttribution: Quarantine commentedI know, this is all too strange! Can you confirm from my output of the two patches that the patch should have been applied correctly? I'm new to patching, and since it didn't say "patch is complete" or something along those lines, I'm not sure if the patches have been applied or not.
I'm a little nervous to try this on my live site, but I think I may give this a go on it. The patches can be reversed right?
Comment #3
Wim LeersThe patch is indeed applied successfully.
You can revert patches like this: "patch -p0 -R < blah.patch".
Can you go to http://dev/d6/admin/reports/status and tell me the output? It should fail similarly though. But fact is, there it is checked if the patches have been applied correctly. Oh, the irony!
Comment #4
Quarantine CreditAttribution: Quarantine commentedIndeed, a whole bunch of "failed to open stream" errors similar to the one I first posted appeared, and under CDN integration, it states "Not/incompletely applied patch or updated patch."
I'll try and install CDN on my live site later and I'll tell you how it goes! *crosses fingers
Comment #5
Wim LeersI would not recommend that …
Just create a fresh Drupal installation and see if you can reproduce it there. If you can, there must be a bug that I'm just not able to reproduce it. If you can't, it's something with your site.
Comment #6
Quarantine CreditAttribution: Quarantine commentedMy partner managed to fix the "failed to open stream" errors somehow. He patched the files first on his Windows before reuploading the patched files onto our server. That seems to fix it for some odd reason.
Comment #7
As If CreditAttribution: As If commentedI was getting the same errors, and I'm really surprised many others haven't reported this. If you look carefully at the error messages you will see that there is a blank space after the argument in file_get_contents(). The attached patch removes that trailing space by trimming the $full_path prior to checking it.
Comment #8
Wim LeersThen please fix the cause, and not the symptom. Where did those spaces get added then? I don't see them. (Look at the "_cdn_requirements_*_patch_patterns" functions.)
Comment #9
As If CreditAttribution: As If commented>> Where did those spaces get added then?
Good question, and I don't know the answer. Don't hold your breath waiting for me to figure it out ;-) My symptomatic patch does the trick for me.
But I can tell you this:
1. The installation patches applied fine (or at least they didn't report any errors).
2. The error occurs with the $kind == "core" files (common.inc, file.inc, theme.inc and garland/template.php)
3. I'm on a Linux server (so this isn't a Windows problem)
Comment #10
Wim LeersWell, you're only the second person to report this problem. When I do a
dvm($full_path);
call from within _cdn_requirements_check_patch_applied(), I don't see any spaces at the end of $full_path.
However, I've changed the code a little bit where this problem *should* be being introduced on your system. This change is acceptable for me. Please let me know if this fixes it for you! :)
Comment #11
stellrex CreditAttribution: stellrex commentedI'm also experiencing this issue as described above. My log gets flooded with errors similar to the following:
file_get_contents(/home/rme/public_html/includes/file.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in /home/rme/public_html/sites/all/modules/cdn/cdn.requirements.inc on line 74.
The exact same install works perfectly fine on a shared hosting account that I have, but spits out the errors when on a dedicated server. Any insight to what could be causing this?
I tried the patch, but it did not resolve this issue for me.
Comment #12
stellrex CreditAttribution: stellrex commentedNevermind, I believe I have solved the issue I was experiencing by redoing my folder permissions. I found that apache no longer had access to some folders on my dedicated server
Comment #13
Wim LeersSo it wasn't a bug after all?
Comment #14
Leks CreditAttribution: Leks commented# warning: file_get_contents(xxx/includes/common.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in xxx/sites/all/modules/cdn/cdn.requirements.inc on line xx.
# warning: file_get_contents(xxx/includes/file.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in xxx/sites/all/modules/cdn/cdn.requirements.inc on line xx.
# warning: file_get_contents(xxx/includes/form.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in xxx/sites/all/modules/cdn/cdn.requirements.inc on line xx.
# warning: file_get_contents(xxx/includes/theme.inc ) [function.file-get-contents]: failed to open stream: No such file or directory in xxx/sites/all/modules/cdn/cdn.requirements.inc on line xx.
# warning: file_get_contents(xxx/themes/garland/template.php ) [function.file-get-contents]: failed to open stream: No such file or directory in xxx/sites/all/modules/cdn/cdn.requirements.inc on line xx.
CDN — Drupal core patch (for complete CDN coverage) Not/incompletely applied patch or updated patch.
This patch has not been properly applied to the following files (or the patch has been updated):
* xxx/includes/common.inc
* xxx/includes/file.inc
* xxx/includes/form.inc
* xxx/includes/theme.inc
* xxx/themes/garland/template.php
in function _cdn_requirements_check_patch_applied in file xxx/sites/all/modules/cdn/cdn.requirements.inc
It works for me.
Comment #15
Wim LeersCan you please format that properly? It's too opaque to be understandable. Thanks!
Comment #16
Wim LeersComment #17
Wim LeersClosing due to lack of response.