Updated: Comment #N
Problem/Motivation
Drupal 8 install:
PHP version 5.4.10
Browser: Safari Version 6.0.5 (7536.30.1)
1. Download git for Drupal 8
2. Setup database
3. Start installation
a. Choose language: Pick English and click Save and continue
b. Choose profile: Pick Standard and click Save and continue (http://localhost:8888/drupal_folder/drupal/core/install.php?langcode=en)
c. Verify requirements: Database type: MySQL, database name: drupal, database username: root, database password: root (http://localhost:8888/drupal_folder/drupal/core/install.php?langcode=en&...)
It was installing modules. The progress bar got to 100%.
d. Received this error on this page: Installation profile (http://localhost:8888/drupal_folder/drupal/core/install.php?langcode=en&...):
An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: http://localhost:8888/drupal_folder/drupal/core/install.php?langcode=en&...
StatusText: Internal Server Error
ResponseText:
e. Continued by clicking on "the error page"
f. Get a blank white screen on this page (http://localhost:8888/drupal_folder/drupal/core/install.php?langcode=en&...)
g. Able to get to the installed site by taking off (/core/install.php?langcode=en&profile=standard&id=1&op=finished) from url
h. Brings me to (http://localhost:8888/drupal_folder/drupal/). I was expecting the front page, but it brought me to the Log in screen.
Proposed resolution
Particular Proposed resolution for resource limits
How to change the php memory limit and execution time in Mamp:
Find the php.ini file for the version of php that I'm running.
1. open the mamp application, click on preferences, switch to the php tab. This will tell you which version of php your are running.
For example, I'm running 5.4.10.
The file is:
/Applications/MAMP/bin/php/php5.4.10/conf/php.ini
Open it the file up in an editor, for example Sublime to make changes.
The lines as in in the php.ini file:
max_execution_time = 30 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
memory_limit = 32M ; Maximum amount of memory a script may consume (8MB)
Change the lines to:
max_execution_time = 60 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
memory_limit = 256M ; Maximum amount of memory a script may consume (8MB)
Stop the servers and restart for the changes to take effect.
You can verify the new memory limit and execution time by looking at php info.
When reinstalling from a git clone, be sure to:
1. remove your sites folder in terminal: sudo rm -r sites
2. git checkout sites
3. drop your database which you can do through phpMyAdmin/Databases
If you are installing from a tar, for example from an alpha release:
1. copy your settings.php file again
2. remove the active config and the active php directory from files
3. drop your database which you can do through phpMyAdmin/Databases
Particular Proposed resolution for curl problem
#1 The problem was a bit different: during installation, I could install in English but not in any other language. Solution is to install the PHP Curl extension.
Particular Proposed resolution for httpd.conf problem
#3 Add the following to my httpd.conf:
Order allow,deny
Deny from all
Satisfy All
Particular Proposed resolution for general problem
Divide up the batch so that it doesn't run into a resource problem. This is related to #12- #15
Remaining tasks
tbd
User interface changes
no
API changes
no
Related Issues
- #1022558: During install, "An AJAX HTTP error occurred. HTTP Result Code: 500..."
- #1370900: Fatal Error: Cannot access empty property in /sites/all/modules/entity_translation/includes/translation.handler.inc
- #2062057: Update PHP requirements page for Drupal 8: execution time
- #1885788: An AJAX HTTP error occurred during module installation via UI
Comment | File | Size | Author |
---|---|---|---|
#18 | core-memory.patch | 490 bytes | mgifford |
#13 | d8-install-error.png | 112.14 KB | organicwire |
progress_bar.jpg | 177.58 KB | bannorb | |
login_screen.jpg | 140.25 KB | bannorb | |
error_screen.jpg | 213.44 KB | bannorb |
Comments
Comment #1
johnheaven CreditAttribution: johnheaven commentedI also had a problem during installation, which I managed to get to the bottom of (thanks YesCT and berdir!).
The problem was a bit different: during installation, I could install in English but not in any other language. When I installed the PHP Curl extension, it started working.
Steps to reproduce
What happened
I just got a 500 server error (in Chrome) or a white page (in Firefox), with no further indications of what's wrong, as soon as I clicked "Save and Continue"
What I'd expect to happen
An indication that PHP Curl extension is required, so I can go away and install it.
Comment #2
Outi CreditAttribution: Outi commentedPHP version 5.4.10
Browser: Google Chrome Version 24.0.1312.52
I had exactly the same problem as bannorb, exactly as bannorb described it.
When the problem occurred, I checked the Apache error log on /Applications/MAMP/logs/apache_error.log, and there was this line:
[error] [client 127.0.0.1] client denied by server configuration: /Users/myusername/Sites/.DS_Store
I use MAMP and its Apache document root is /Users/myusername/Sites/. The .DS_Store file is created automatically by the operating system and Apache serves it and that's probably the problem.
I removed the .DS_Store file and begun the Drupal installation from the beginning by removing the /Sites directory, recreating it, creating the settings.php file, dropping all the tables from my data base and then running the site installation again. I suppose that the .DS_Store file will get created again so the proper solution would probably be to make Apache to ignore it. (I haven't tried it yet but fgm found a discussion about it here: http://hints.macworld.com/article.php?story=20030528144052271)
Now, the "Installing Drupal" screen completed, I had the same error message again:
"An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: http://localhost:8888/drupal_folder/drupal/core/install.php?langcode=en&...
StatusText: Internal Server Error
ResponseText:"
But this time, by clicking on "the error page" link, I got the site configuration page where I was able to set the site name, contact information and so on (I forgot to take a screenshot), and I was able to continue in a normal way.
So this is not resolved because I still got the error message, but I was anyway able to continue.
Comment #3
kmadel CreditAttribution: kmadel commentedI added the following to my httpd.conf and the install worked after having previously gotten the same error:
Order allow,deny
Deny from all
Satisfy All
From http://hints.macworld.com/article.php?story=20030528144052271
Comment #4
jghyde CreditAttribution: jghyde commentedThis did not work with latest d8 git clone. I'm using MAMP with php 5.4 on a MacBook.
Comment #5
jghyde CreditAttribution: jghyde commentedI found the problem. The default memory limit on MAMP and every other default distro of PHP is 32 MB. I suggest raising that number to a much higher number. After raising the PHP memory limit in php.ini, installation works.
Here's the error from the PHP logs:
Should we add a documentation to core/INSTALL.txt to remind new users to increase their php.ini memory limit?
Comment #6
cam10025 CreditAttribution: cam10025 commentedI raised the PHP memory limit and still received the error. I then read through my php logs and got this error:
I then raised the execution time to 120 seconds and no problems.
Windows 7 localhost
Comment #7
nasinandes CreditAttribution: nasinandes commentedHello,
I have the same problem:
- Mac OSX
- Safari 6.0.5
- Site on localhost with MAMP pro
- PHP 3.4.10
After update memory_limit value on my php.ini its works without problems (memory_limit = 232M).
Thanks for all!
Comment #8
nod_this does not look like an ajax bug.
Comment #9
dawehnerNevertheless this feels like a bug. At least we should try to provide an actual helpful error message.
Comment #10
YesCT CreditAttribution: YesCT commentedif the requirements really are more...
#2062057: Update PHP requirements page for Drupal 8: execution time
Comment #11
netsensei CreditAttribution: netsensei commentedI've just done the odd git clone of the 8.x... and I'm running into the same problem: I'm not getting passed the installation.
Problem
The 'Standard' installation breaks during the batch operation around step 39. I'm getting a 'maximum execution time exceeded: 30 seconds' error.
My PHP.ini configuration
PHP 5.3.14
Memory: 256M
Execution time: 30 seconds
Solution
Setting the max_execution_time to 60 seconds gets me through the installation.
Solution
I've experimented with the 'standard' profile code, since that's what's loaded and somehow triggers the error. First 2 clean tries, I ended up with a max execution time error on step 39 around
token_get_all()
inwww/core/vendor/doctrine/annotations/lib/Doctrine/common/Annotations/TokenParser.php
on line 58.That's when I started looking at standard.info.yml and the modules which get installed/enabled during installation. Through trial and error, I ended up removing Views & Views UI from standard.info.yml. Tadaa! Now installation succeeds with just max_execution time set to 30 secs.
Notes
Grokking down code: this comment in
_install_module_batch
sounds pretty relevant to me:So, on each AJAX request, the entire stack, including the module enabled in the last iteration, is bootstrapped. That's when I switched the order in standard.info.yml to read like this.
(note: the order in the yml file does not get respected since the list of modules gets sorted where required ones get enabled first.)
Execution now halts after/on step 39/40. Just when it says "installed Views UI" with an error in
/Users/netsensei/Workspace/drupal8/www/core/modules/views/lib/Drupal/views/Plugin/views/PluginBase.php
. Again, Views. I'm not sure what happens on 40/40 but afaik it's enabling the standard profile itself.This issue sounds similar to #1387438: Timeout on enabling modules: make it a batch operation.
Comment #12
ohthehugemanatee CreditAttribution: ohthehugemanatee commentedThis certainly seems related to the batching issue. I thought I'd add my trace in case it's helpful:
Offhand it looks like it's borking when it tries to enable the profile itself... so the workaround is just to install minimum. Interestingly if I reload, it looks like the AJAX bar starts where it left off, and I can complete installation. What actually gets enabled though, is a crap shoot. Sometimes the theme isn't there, etc.
Comment #13
organicwire CreditAttribution: organicwire commentedI also run into that issue. Installation was done using english.
Here's the error message and a screenshot:
Comment #14
BarisW CreditAttribution: BarisW commentedSame here. Would a requirement check on max_execution_time check do before running the installation?
Or can we prevent the process from running into a time-out?
Comment #15
netsensei CreditAttribution: netsensei commentedafaik PHP sets max execution time by default to 30 seconds. Which should be plenty enough time to wrap up a call.
I think we have to to either re-consider how the processing is divided over the iterations or try to fix the failing iteration itself.
Comment #16
woprrr CreditAttribution: woprrr commentedIn my configuration it's max_execution_time and memory_limit that brought me this error. Read related content in ==> https://drupal.org/requirements/php
Comment #16.0
woprrr CreditAttribution: woprrr commentedfixed img tag
Comment #16.1
bannorb CreditAttribution: bannorb commentedSummarized workarounds
Comment #16.2
YesCT CreditAttribution: YesCT commentedUpdated issue summary.
Comment #17
iantresman CreditAttribution: iantresman commentedI'm getting this too, running PHP 5.3.27 as fastCGI on a Redhat with CentOS 5.9. My PHP error log shows:
On clicking on the link to proceed to the Error screen, I am taken to the Configure Site page, where I can complete the installation process.
Comment #18
mgiffordCan we not just set a minimum memory limit for Core and and fail with a polite error message instead?
Should probably check for
max_execution_time = 60
as well.Let's just stop people trying to set up a new Drupal install, getting a 500 install and then having to crawl through pages like this:
Comment #19
falcon03 CreditAttribution: falcon03 commentedI had this issue with MAMP 2.2 and PHP 5.5.3 as well. The only solution that worked for me was changing the PHP memory limit from the default 32M to 128M.
Comment #20
mgiffordI do hope that 128M isn't the minimum required for Drupal 8. That could well be but it would be great to get that confirmed by others.
Comment #21
falcon03 CreditAttribution: falcon03 commented@mgifford, I do hope it as well... Otherwise people using Drupal with shared hosting plans are going to face hard times.
If 128M is the minimum required memory, the requirements check should fail if the php memory limit is set to a lower value, shouldn't it?
Comment #22
mgiffordAgreed. And it should fail nicely with a polite message directing folks where to go to address it.
Comment #23
mgiffordComment #24
mgiffordComment #25
YesCT CreditAttribution: YesCT commentedsince people will search for the error they are (currently) getting, lets keep it in the title somewhere.
Comment #26
Les LimFYI, 32M is enough for me with APC enabled, but I hit the memory limit without an opcode cache.
Comment #27
YesCT CreditAttribution: YesCT commentedComment #28
YesCT CreditAttribution: YesCT commentedhey! we already had code that warns about not enough memory... we just need to up those numbers.
So #2289183: Temporarily increase D8 memory limit to reflect current requirements is the fix we need.
Comment #29
anavarreIn #2289183: Temporarily increase D8 memory limit to reflect current requirements I was able to reprocude the AJAX error during the installation phase with memory_limit set to 32M and Zend Opcode cache turned off. Could people having the issue please comment on their configuration so that we can indeed narrown this down to the opcode cache?
FYI, if you're running 5.5, by default you shouldn't have anything to do (and it should actually not fail) as the built-in Zend Opcode cache is turned on. On the contrary, with 5.4, you don't necessarily have APC on and you should check.
Comment #30
Frogger80 CreditAttribution: Frogger80 commentedHi, I tried this on german Strato Account. Drupal 8 RC / PHP 5.6 / Mysql 5.5.45.
I got the same error. The installation starts, but breaks after step 20 (Datetime Module). I tried it several times.
Also I tried to setup php.ini, but it comes with the same end result.
max_execution_time = 120
max_input_time = 60
memory_limit = 256M
Seems not to be a memory or time related issue in my case or is it?