At the Verify requirements stage of an installation, with the URL: /install.php?profile=standard&locale=en I get:

Notice: Undefined index: SERVER_SOFTWARE in system_requirements() (line 51 of /var/www/drupal-7.0-beta2/modules/system/system.install).

Then when I continued on 7.x-dev it stopped working, unfortunately I didn't copy the error message.

Instead I tried 7.0-beta2 and there it is working fine.

I highly suspect this is due to my configuration of nginx, but this same configuration hasn't been a problem with anything before.

Comments

okokokok’s picture

The notice disappeared after adding

fastcgi_param SERVER_SOFTWARE nginx;

to my nginx configuration (see e.g. http://forum.nginx.org/read.php?2,3457).

But I didn't get the behavior I've learnt to expect from D6 - I'm not logged in after the setup and drush (3.3) doesn't work either.
So I'll reinstall.

okokokok’s picture

After reinstalling everything works as expected.

amateescu’s picture

Status: Active » Closed (works as designed)

So we should close this?

okokokok’s picture

Not having SERVER_SOFTWARE set is not a problem with D6.

And I don't think it's part of the design that Drupal fails when SERVER_SOFTWARE is not set.

So I think it should still be open but with low priority.

arhak’s picture

Priority: Normal » Minor
Status: Closed (works as designed) » Active

@#4 if you still have this issue, then don't let it close yet

@#3 an "undefined index" PHP Notice "works as designed"?
I hope not

amateescu’s picture

arhak, nope, but I thought 'After reinstalling everything works as expected.' was.

okokokok’s picture

@#4 if you still have this issue, then don't let it close yet

I don't have the issue because I changed my nginx setup.

I don't know if there are many nginx setups that don't set the SERVER_SOFTWARE variable. It had just worked fine for me for over 2 years without it.

jeffsheltren’s picture

Status: Active » Needs review
StatusFileSize
new1.05 KB

I just came across a similar issue and thought I could fix this while I was at it. In my case, OG_Mailinglist is doing it's own drupal bootstrap as part of postfix mail delivery (piping mail into Drupal), and I received a PHP notice:
Notice: Undefined index: SERVER_SOFTWARE in require_once() (line 13 of /var/www/support.tag1.it/htdocs/includes/mail.inc).

Seems like a simple isset() should work in both cases. I wasn't entirely sure if we want to set an error/warning if the variable isn't set in the install case, so for now I'm just setting it to an empty string if the variable is not set.

Attaching a patch to fix both of these notices.

poker10’s picture

Issue summary: View changes
Status: Needs review » Needs work
Related issues: +#2356055: Notice in includes/mail.inc define

Patch does not apply. It seems like that the first change was done in #2356055: Notice in includes/mail.inc define

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.