I'm unable to run install.php for the latest CVS revision of Drupal 7. I'm getting the following error whenever I run it (I enabled Xdebug to make it more detailed):
Warning: include(): URL using bad/illegal format or missing URL in /var/www/localhost/htdocs/drupal-dev/includes/theme.inc on line 1253
Call Stack:
0.0037 670600 1. {main}() /var/www/localhost/htdocs/drupal-dev/install.php:0
0.0063 1055504 2. install_drupal() /var/www/localhost/htdocs/drupal-dev/install.php:1716
0.1838 9923160 3. install_display_output() /var/www/localhost/htdocs/drupal-dev/install.php:111
0.1841 9925560 4. theme() /var/www/localhost/htdocs/drupal-dev/install.php:682
0.1842 9928576 5. call_user_func_array() /var/www/localhost/htdocs/drupal-dev/includes/theme.inc:845
0.1842 9929112 6. theme_install_page() /var/www/localhost/htdocs/drupal-dev/includes/theme.inc:0
0.1856 9952736 7. theme_render_template() /var/www/localhost/htdocs/drupal-dev/includes/theme.maintenance.inc:155
Dump $_SERVER
Dump $_GET
Dump $_POST
Dump $_COOKIE
Dump $_FILES
Dump $_ENV
Dump $_SESSION
Dump $_REQUEST
Warning: include(/var/www/localhost/htdocs/drupal-dev/themes/garland/maintenance-page.tpl.php): failed to open stream: operation failed in /var/www/localhost/htdocs/drupal-dev/includes/theme.inc on line 1253
Call Stack:
0.0037 670600 1. {main}() /var/www/localhost/htdocs/drupal-dev/install.php:0
0.0063 1055504 2. install_drupal() /var/www/localhost/htdocs/drupal-dev/install.php:1716
0.1838 9923160 3. install_display_output() /var/www/localhost/htdocs/drupal-dev/install.php:111
0.1841 9925560 4. theme() /var/www/localhost/htdocs/drupal-dev/install.php:682
0.1842 9928576 5. call_user_func_array() /var/www/localhost/htdocs/drupal-dev/includes/theme.inc:845
0.1842 9929112 6. theme_install_page() /var/www/localhost/htdocs/drupal-dev/includes/theme.inc:0
0.1856 9952736 7. theme_render_template() /var/www/localhost/htdocs/drupal-dev/includes/theme.maintenance.inc:155
Warning: include(): Failed opening '/var/www/localhost/htdocs/drupal-dev/themes/garland/maintenance-page.tpl.php' for inclusion (include_path='.:/usr/share/php5:/usr/share/php') in /var/www/localhost/htdocs/drupal-dev/includes/theme.inc on line 1253
Call Stack:
0.0037 670600 1. {main}() /var/www/localhost/htdocs/drupal-dev/install.php:0
0.0063 1055504 2. install_drupal() /var/www/localhost/htdocs/drupal-dev/install.php:1716
0.1838 9923160 3. install_display_output() /var/www/localhost/htdocs/drupal-dev/install.php:111
0.1841 9925560 4. theme() /var/www/localhost/htdocs/drupal-dev/install.php:682
0.1842 9928576 5. call_user_func_array() /var/www/localhost/htdocs/drupal-dev/includes/theme.inc:845
0.1842 9929112 6. theme_install_page() /var/www/localhost/htdocs/drupal-dev/includes/theme.inc:0
0.1856 9952736 7. theme_render_template() /var/www/localhost/htdocs/drupal-dev/includes/theme.maintenance.inc:155
I am not getting anywhere in the install process -- this is the first thing that happens when I point my browser to install.php.
Here is the process I used to install:
1) cvs -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal checkout drupal
2) cp -Rp drupal/* /var/www/localhost/htdocs/drupal-dev/
3) cd /var/localhost/htdocs/drupal-dev
4) cp sites/default/default.settings.php sites/default/settings.php
I have checked to make sure that the file it is looking for (themes/garland/maintenance-page.tpl.php) does exist. The permissions for everything are correct, my development environment is PHP 5.2.10, Apache 2.2.11,and MySQL 5.0.70, on Gentoo Linux (2.6.30). I've also got several local installations of Drupal 6 which have no issues. I've tried wiping everything out, and fetching again from CVS several times today, just to make sure it wasn't just broken in between commits.
I asked about this in #drupal and #drupal-support on IRC, and nobody else was having this problem -- confirmed by several people -- but I've been working on this all day, and nobody seems to be able to figure out what is going on, and I have been doing everything "by the book" as far as installation, so I decided to post it up as a bug, in case there is someone else who is running into this.
--jrtayloriv
Comments
Comment #1
ksenzeeI'm seeing errors where Drupal can't find maintenance-page.tpl.php also. In my case I see them when there's been an error that the system is trying to display prettily by using the maintenance theme. In your case, I'm not sure whether it's that, or whether it's trying to use the maintenance page as part of the install process, and failing. That's not much help, I know. :/
Comment #2
jrtayloriv commentedIs there any way I could bypass this, and not use the maintenance theme to display the error?
Comment #3
jrtayloriv commentedStill having this problem after upgrading to latest CVS sources. Changing priority to "Critical" since it completely prevents me from using Drupal.
Comment #4
kwinters commentedCan you confirm that there are no missing / extra files or directories (update -Pd), that files are chown / chmodded correctly, etc.?
Most of the time when I have issues after an update, it's a result of a partial CVS update or trash in the DB.
Comment #5
jrtayloriv commentedThanks for your response.
I tried cvs update -Pd, but it did not fix my problem. Also, I have been trying to get this fixed (sporadically) for nearly a month, and have tried updating several times already (as well as doing complete checkouts) -- so this isn't the first time I've tried to update.
The only permissions that I've changed are the ones that are mentioned in the install guide. I've also tried to get it to work without changing those permissions. Neither works. File ownership is also set correctly.
Any other suggestions?
Thanks,
Jesse Taylor
Comment #6
kwinters commentedI checked out a fully clean install using a fresh virtual host to test this:
* Made new virtual host / database
* cvs -z6 -d :pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal checkout -dd73 drupal
* cp default.settings.php settings.php and added DB info
* Run install.php
That works just fine, so I'm thinking you have an apache or php setting that is breaking it.
Install.php (and a few other places) do:
So make sure that is actually resolving to something. Also, var_dump the params to theme_render_template($template_file, $variables) and see what you get, but the getcwd() seems more likely to fail.
Comment #7
kwinters commentedWent back and re-read other warning messages in your output, looks like the path info might be OK, but just for sanity's sake could you:
* sudo su [user apache is running as]
* ls -l /var/www/localhost/htdocs/drupal-dev/themes/garland/maintenance-page.tpl.php
And let us know the output?
Also, you could try making a PHP file that does just that include, for example:
Comment #8
jrtayloriv commentedInterestingly, adding the two var_dump() calls to theme_render_template() --
-- makes the page kind of work. When I remove the var_dump statements, it breaks again. I mean "makes the page kind of work" in the sense that the radio buttons for "Drupal" and "Drupal (minimal)" appear, but are still contains the error messages I originally posted about "bad/illegal format" at the bottom of the page, and the layout of the page is all messed up. I am also getting a message at the top that says string(39) "themes/garland/maintenance-page.tpl.php"
If I choose the "Drupal" radio button, and click "Save and continue", I get to the next page (which has the same error messages). When I click "Install Drupal in English" I get another set of errors:
As far as the params to theme_render_template(), $variables is empty, and $template_file contained the following (formatted for readability):
apache is the user that Apache runs under:
As far as the file containing:
Where would you like me to include this file?
Thanks again for your help.
--Jesse Taylor
Comment #9
ksenzeeWhere would you like me to include this file?
Just create it, call it "test.php" or something, and navigate directly to it in your browser. If it shows the maintenance page -- which it very likely will do -- then PHP is able to successfully include that page. If not, we've found a problem.
Comment #10
kwinters commentedI ran mine from the command line as the apache user (php -e test.php) but from the web is good too... might want to do both actually.
Comment #11
jrtayloriv commentedHere is the output from running from the command line:
And here is the result from doing it from a browser (with xdebug enabled):
I'll look around to see if I can determine what the problem is here. Any suggestions?
--Jesse Taylor
Comment #12
kwinters commentedIt looks like it included the file in both cases.
Do you have mod_security or something enabled? I'm thinking it's an Apache problem regardless.
Comment #14
jrtayloriv commentedNo, I do not have mod_security, suhosin, or any other such software installed on my server.
Yes, it very well might be an Apache/PHP problem, but it's also a Drupal 7 problem, in that none of my other web applications (Wordpress, Zencart, Drupal 6, OsCommerce, phpMyAdmin, and Magento) are having any problems with the server's configuration.
--Jesse Taylor
Comment #15
kwinters commentedRight, it would be better if Drupal would work with your configuration out of the box, or if that's not possible then at least tell you what's wrong with it during the install.
Still, there isn't much we can do about it until we know exactly what is causing the install to break. If you can, it would be helpful to fiddle with it until the install process works and post details. And if you can't, try to get a fully detailed look at your settings (php_info(), php.ini, httpd.conf, etc.) to someone securely. Please just don't post it online, since it gives away information that could lead to an attack.
If you can find someone on IRC in #drupal who is more familiar with Apache settings, that would be preferable. I can try to help but I can't make any promises, since I only do a little sys admin work.
Comment #16
jrtayloriv commentedI just updated to HEAD today, and did a clean re-install of PHP and Apache, and the issue has still not been resolved.
No luck yet finding anyone who knows how to diagnose the problem on IRC ... I'll keep looking around.
--Jesse Taylor
Comment #17
jrtayloriv commentedI found this -- http://bugs.php.net/bug.php?id=48837 -- and rebuilt PHP without curlwrappers, and made sure that safe mode and open_basedir were not on in php.ini, but am still experiencing the same problem.
--Jesse Taylor
Comment #18
damien tournoud commentedWhat is happening is that your PHP installation is interpreting:
As an URL. I would guess it is getting confused by the "localhost" in it? Could you try moving the base root to a different directory?
Comment #19
jrtayloriv commentedDamien --
You totally rock! I did:
mv /var/www/localhost/* /var/www && rmdir /var/www/localhostand then
find /etc -exec sed -i 's/\/var\/www\/localhost/\/var\/www/g' {} \;... and everything works fine now.
Now I finally get to start hacking on D7 ... Yippee :)
However, I'm still not certain this ticket should be closed, until there is a check to make sure that this doesn't happen for other people. Perhaps I'll start working on that ...
Many, many thanks.
--Jesse Taylor
Comment #20
jrtayloriv commentedUser javecantrell on #drupal was able to duplicate this error on his Gentoo server as well. His Fedora server did NOT experience the same issue. That is, this seems to be a problem with Gentoo's default PHP/Apache settings and Drupal 7.
In javecantrell's case, building PHP on Gentoo without curlwrappers DID fix the problem. In mine, it did not fix the problem.
I'm leaving this ticket open, until I figure out why the problem still occured for me, after I disabled curlwrappers
--Jesse Taylor
Comment #21
kwinters commentedDid you have safe_mode or open_basedir enabled? The bugs indicate that either of those plus --with-curlwrappers are the trigger for the bug.
The above PHP bug has been fixed on the php side ( http://svn.php.net/viewvc/?view=revision&revision=286323 ) which went into PHP 5.2.11, one minor version after jrtayloriv's.
If we do issue a warning during the install script, what should we even check for? If this particular bug is fixed it doesn't seem to be worth noting just that specifically, so maybe just warn that PHP is out of date and link to the PHP changelog?
Comment #22
sun.core commentedIs this still an issue?
Comment #23
jrtayloriv commentedI'm not sure if it's an issue -- I'm not using the same server setup anymore, so I have no way to test it myself. If it's important, however, I would probably suggest that someone test it on a similar setup to my old one.
Comment #24
Anonymous (not verified) commentedComment #25
fishandfly@gmail.com commentedThis is still an issue with me.
Nginx 0.7.65 PHP 5.2.10(with -curlwrapper) Drupal 7.26
Here is the message
Warning: require_once() [function.require-once]: URL using bad/illegal format or missing URL in /home/wwwroot/gim/d/includes/bootstrap.inc on line 2313
Warning: require_once(/home/wwwroot/gim/d/includes/errors.inc) [function.require-once]: failed to open stream: operation failed in /home/wwwroot/gim/d/includes/bootstrap.inc on line 2313
Fatal error: require_once() [function.require]: Failed opening required '/home/wwwroot/gim/d/includes/errors.inc' (include_path='.:') in /home/wwwroot/gim/d/includes/bootstrap.inc on line 2313
BTW,I just install drupal 6.30 with the same environment, everything is ok.