After selecting standard installation and clicking save and continue on the english language page, the following error message is shown.

Fatal error: Call to undefined function sys_get_temp_dir() in /usr/www/users/d7a5/modules/system/system.install on line 270

I succesfully installed and ran beta 4 on the same machine.

Any advice?

CommentFileSizeAuthor
#11 807622.patch665 bytesgrendzy
#4 807622.patch661 bytesgrendzy

Comments

David_Rothstein’s picture

What version of PHP are you using? The minimum requirement used to be 5.2.0, but was recently changed to 5.2.1 (see #551658: Figure out what to do about new private/public file separation).

Drupal is supposed to tell you that PHP version requirement on the requirements page, but it looks like there is a bug where it calls the above function (which doesn't exist in 5.2.0) before it ever is able to display the requirements page.... oops :)

SandStorm’s picture

Hi

Thanks, that was it. I (my provider) am running 5.2.0

So no alpha 5 for me then ...

Everett Zufelt’s picture

Title: Does not go past the Language Selector » Fatal error calling sys_get_temp_dir() in installer - pHP 5.2.0 and earlier
Version: 7.0-alpha5 » 7.x-dev
Priority: Normal » Critical

When installing with PHP 5.2.0 or earlier a PHP fatal error is encountered. This is because the requirements check is not performed before the installer attempts to call sys_get_temp_dir()

Marking as critical as users will encounter this error, not be able to install head, and not know how to resolve the problem.

grendzy’s picture

Status: Active » Needs review
StatusFileSize
new661 bytes

simple fix.

BTW - here is a testing strategy that doesn't require actually installing an old php version. Set DRUPAL_MINIMUM_PHP to something large like 5.2.100, then replace the call to sys_get_temp_dir() with something like XXX(). Without the patch you'll see the error, after applying the patch you should see the notice that you have an old PHP version.

Everett Zufelt’s picture

Applied patch and attempted to install system with php 5.2.0. The requirements check page is far more friendly than a PHP fatal error. However, it still seems silly that PHP 5.2.1 is the minimum requirement for Drupal 7, especially since this change occurred so late in the development cycle.

+1 for functionality, with reservations.

chx’s picture

Status: Needs review » Reviewed & tested by the community

Three years since PHP 5.2.1 is out... we are good.

Everett Zufelt’s picture

@chx

I agree that we are technically good on this issue. However, the number of years since php 5.2.1 has been released is arbitrary. What if it had been 2 years, or 1 year?

chx’s picture

Then we would be much more cautious. About 2-2.5 years should be enough to be included in practically every Linux distribution by now.

catch’s picture

This patch makes sense regardless of what the current PHP requirement is.

#551658: Figure out what to do about new private/public file separation may yet end up rolling back the requirements change but I think that should be handled there.

dries’s picture

+++ modules/system/system.install
@@ -74,6 +74,8 @@ function system_requirements($phase) {
+    // If PHP is old, it's not safe to continue with requirements check.

Are we missing the word 'the'?

grendzy’s picture

StatusFileSize
new665 bytes

fixed comment.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 807622.patch, failed testing.

aspilicious’s picture

Status: Needs work » Needs review

#11: 807622.patch queued for re-testing.

scor’s picture

Status: Needs review » Reviewed & tested by the community

back to RTBC

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.