Posted by nschindler on October 18, 2007 at 5:02pm
Jump to:
| Project: | Views |
| Version: | 5.x-1.6 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (won't fix) |
Issue Summary
When running update.php, and occasionally during cron runs, the following error is logged:
Type php
Date <whenever>
User <my user name>
Location <my url>/update.php?op=do_update
Referrer <my url>/update.php?op=selection
Message require_once(./sites/all/modules/views/views_cache.inc) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in <path to>/sites/all/modules/views/views.module on line 622.
Severity error
Hostname <my host name>update.php will not complete with views enabled without disabling javascript in my browser.
Running the following:
Database interface - mysqli
Database version - 5.0.26
Drupal version - 5.2
PHP version - 5.1.2
memory_limit - 64M
Thanks,
Nate
Comments
#1
I have the exact same problem. Can anyone help?
#2
can you try wiping your views directory and reinstalling?
#3
Same result after re-installing. I followed these steps:
1) Disable Views modules
2) rm -fr sites/all/modules/views
3) unpacked views-5.x-1.6.tar.gz into sites/all/modules/
4) re-enabled Views modules (only Views itself needs to be enabled for the error to appear)
5) ran update.php
Also, I've switched my db driver from mysqli to mysql since I opened this issue. There was no change in behavior.
If I modify views.module at line 622 to change:
require_once("./$path/views_cache.inc");to:
require_once("views_cache.inc");the update script behaves as expected and there are no errors reported in the log. Is $path not set by update.php?
Thanks,
Nate
#4
I hacked a little at update.php. It seems that $path is set to "content" (the word content, literally) while running update.php. In normal site pages, $path is empty. So, when running update.php, it's looking for "./content/views_cache.inc", which doesn't exist, while normally it's looking for ".//views_cache.inc", which is a valid path.
I have no idea where $path gets set to "content" by update.php.
-Nate
#5
I'm experiencing this with the latest views module installed for 6.x. Here's the exact error:
PHP Fatal error: require_once() [function.require]: Failed opening required './sites/all/modules/og/og_views/og_views.views.inc' (include_path='.:/usr/local/lib/php/') in /usr/local/apache2/drupal6/sites/all/modules/views/views.module on line 470
Files are world readable. Any ideas?
#6
I changed the version to the one I'm using since the version this was originally under is an old one even for 5x.
#7
Please don't take over old issues. Views 2 and Views 1 are different pieces of software.
#8
This looks like the current working directory of PHP is changed during the request. I cannot think of an situation where
<?php$path = drupal_get_path('module', 'views');
?>
would result in 'content'. And the original error message you posted does not indicate this either:
require_once(./sites/all/modules/views/views_cache.inc): failed to open stream: No such file or directory in sites/all/modules/views/views.module on line 622.It is looking for views_cache.inc in the proper path, but the current working directory is no longer the root directory of your Drupal site.
a) Are you using drupal.sh to run cron?
b) Did you already try to disable other contrib modules?
#9
Regarding b), It's been a while now, so I can't say with certainty that I did remember to disable all other modules... I think what I did was the opposite of what you're asking and disabled modules until update.php finished properly, which was when I disabled Views. I don't think I had considered Views conflicting with another third-party module, so I didn't make it a point to leave Views enabled and disable everything else. I'll have to experiment with this and get back to you.
Regarding a), Our site is chrooted, so we use Poormanscron.
Thanks,
Nate
#10
Hi,
I'm not 100% if this is the same issue but I am getting a similar error. I posted on the forum here: http://drupal.org/node/446224
This site is also using poormanscron.
#11
Unable to replicate. No updates for more than 30 days.