PoeticMediaLab / Lacuna

Lacuna: Digital Annotation for Teaching and Learning
http://www.lacunastories.com
GNU General Public License v2.0
36 stars 20 forks source link

Installation Error #223

Closed mrjcwu closed 5 years ago

mrjcwu commented 5 years ago

I've been trying to install Lacuna Stories, and am consistently running into the same error. The install script runs and installs modules, but each time, right after module 63, Taxonomy is installed, an error message shows up:

An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: http://lacuna.jasoncwu.com/install.php?profile=lacuna_stories&locale=en&id=1&op=do StatusText: Internal Server Error ResponseText:

This doesn't give me a lot of information to go on, so I'm not sure where to begin troubleshooting. Can anyone help?

dabush commented 5 years ago

Hi there, Sorry about the delay in getting back to you! This would appear to be a problem with your server, and a memory problem in particular: see this thread: https://www.drupal.org/project/openenterprise/issues/1406868. My hunch is that if you increase your memory limit the installation will go smoothly. Lacuna is fairly big so it's not surprising that your memory limit was exceeded during installation. If that doesn't work follow up and we'll try another solution.

Daniel

mrjcwu commented 5 years ago

Hello Daniel,

Thanks so much for the pointer, I had actually come across that thread in my attempt at troubleshooting. This is what I have in my php.ini:

max_execution_time = 1800 ; Maximum execution time of each script, in seconds (30) max_input_time = 1800 ; Maximum amount of time each script may spend parsing request data (60) memory_limit = 128M ; Maximum amount of memory a script may consume (8MB)

I have rebooted the server since making this edit. Is there a way to confirm how much memory is allocated for the install? Or am I making the changes in the wrong place?

I have also added the memory_limit line to my .htaccess file in the Lacuna root directory, and I continue to run into the same error. I have checked my php error log file and see nothing related to the installation. Is there some other error log I can check?

Thank you, Jason

mwidner commented 5 years ago

There are usually a couple of php.ini files. The one you want is for Apache (I'm assuming that's the web server you're using). The best way to verify that the settings are in place is through the phpinfo() function. You can create a file in your folder that also has Lacuna called phpinfo.php. Then put this code in it:

<?php phpinfo();

Then you can visit that page (phpinfo.php) and it'll display all your configuration settings. When you're done, I'd also delete that file.

mrjcwu commented 5 years ago

Thanks, Michael.

phpinfo() output confirms that I have 128M memory allocated both for master and local. Does this rule out memory as the installation issue?

What can I look at next? Are there error logs that the Lacuna installation generates?

mwidner commented 5 years ago

Is there anything else in the error response? Otherwise, I'd look in the Apache logs and see if there's anything in there. That would help us pinpoint the problem.

mwidner commented 5 years ago

Also, what OS and version you're using.

mrjcwu commented 5 years ago

Hello Michael,

Here's the server I'm running:

Linux 2.6.9-106.ELsmp #1 SMP Tue Dec 16 11:24:43 EST 2014 i686 i686 i386 GNU/Linux

I checked the logs in /var/log/httpd, and only access_log and referer_log show any changes during installation. Here are the last two entries in referer_log:

108.85.107.229 - - [08/Aug/2018:16:31:14 -0600] "POST /install.php?profile=lacuna_stories&locale=en&id=1&op=do HTTP/1.1" 200 139 "http://lacuna.[server].com/install.php?profile=lacuna_stories&locale=en&op=start&id=1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"

108.85.107.229 - - [08/Aug/2018:16:31:17 -0600] "POST /install.php?profile=lacuna_stories&locale=en&id=1&op=do HTTP/1.1" 500 - "http://lacuna.[server].com/install.php?profile=lacuna_stories&locale=en&op=start&id=1" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"

mwidner commented 5 years ago

You might also try editing the .htaccess file in the root project directory to include this line: php_value memory_limit 128M Unfortunately, this tends to be a hard problem to debug. Drupal isn't great about providing log information during installation.

mrjcwu commented 5 years ago

Hi Michael,

Yes, I had also added the memory_limit line to the local .htaccess file. Same issue still occurs.

mwidner commented 5 years ago

It looks like you may need to increase the memory limit even further. This thread suggests 1024M:

https://www.drupal.org/forum/support/upgrading-drupal/2017-07-21/ajax-http-error-code-500

If that fixes it, we'll be sure to add that requirement to our documentation. For reference, on our main server, we have the memory_limit set to 512M.

mrjcwu commented 5 years ago

Hello Michael,

I tried setting memory_limit to 1024M. Still failed with the same message at the same point of install.

I have also tried installing on a new server, and that install also failed - the only difference being the failure occurred earlier (the last module is 48, Notify, instead of 63, Taxonomy).

I also tried downloading the source again from github and re-running the installation from scratch on the new server, and it still fails in the same spot (after Notify).

mwidner commented 5 years ago

Ugh. How frustrating. This error is almost always a server configuration problem. The next things to try are changing the max execution time and max input time. So try changing the values to this, which will make them unlimited:

max_execution_time = -1 max_input_time = -1

mrjcwu commented 5 years ago

Michael,

Thank you for patiently helping with this install attempt. Your guidance and suggestions are very much appreciated.

Unfortunately, setting the execution and input time to -1 didn't change anything.

Is there a way to turn on verbose installation? I'm also scouring the web to see if there's any information on installation logs, but so far no dice.

mrjcwu commented 5 years ago

Hello Michael,

I added the following lines to install.php on both servers:

error_reporting(E_ALL); ini_set('display_errors', TRUE); ini_set('display_startup_errors', TRUE);

And I got the following error messages:

1) On the server that fails after Taxonomy module is installed: Parse error: syntax error, unexpected '[' in /var/www/lacuna_new/sites/all/modules/custom/course/course.module on line 1133

The code in question:

`/**

2) On the server that fails after the Notify module: Fatal error: Declaration of RulesRuleUI::form(&$form, &$form_state, $options = Array) must be compatible with RulesActionContainerUI::form(&$form, &$form_state, $options = Array, $iterator = NULL) in /...../sites/all/modules/contrib/rules/ui/ui.plugins.inc on line 0

I believe the issue is with the class declaration:

`/**

Does any of this help with troubleshooting where the issue is coming from?

mrjcwu commented 5 years ago

I just realized, in the first error, that's line 1133 in the file, but may not be the actual line the unexpected '[' is found in.

mrjcwu commented 5 years ago

Michael,

I think I've solved the issue with the error on the old server, where I'm running PHP 5.3.8:

"As of PHP 5.4 you can also use the short array syntax, which replaces array() with []."

Array declarations with [] were causing the installation to fail. After fixing the array in courses.module, the installer as able to proceed through installing a few more modules until running into the same error in another module.

However, since I am already in the progress of migrating to the newer server, which is running PHP 7.2.8, I will need to focus attention on issue #2 listed above:

Fatal error: Declaration of RulesRuleUI::form(&$form, &$form_state, $options = Array) must be compatible with RulesActionContainerUI::form(&$form, &$form_state, $options = Array, $iterator = NULL) in /...../sites/all/modules/contrib/rules/ui/ui.plugins.inc on line 0

mwidner commented 5 years ago

Oh! That explains it. Drupal 7 needs PHP 5.4 at a minimum. It may not work with PHP 7.2, though. Here are the complete PHP system requirements:

https://www.drupal.org/docs/7/system-requirements/drupal-7-php-requirements

On Fri, Aug 17, 2018, 9:22 PM mrjcwu notifications@github.com wrote:

Michael,

I think I've solved the issue with the error on the old server, where I'm running PHP 5.3.8:

"As of PHP 5.4 you can also use the short array syntax, which replaces array() with []."

Array declarations with [] were causing the installation to fail. After fixing the array in courses.module, the installer as able to proceed through installing a few more modules until running into the same error in another module.

However, since I am already in the progress of migrating to the newer server, which is running PHP 7.2.8, I will need to focus attention on issue

2 https://github.com/PoeticMediaLab/Lacuna/pull/2 listed above:

Fatal error: Declaration of RulesRuleUI::form(&$form, &$form_state, $options = Array) must be compatible with RulesActionContainerUI::form(&$form, &$form_state, $options = Array, $iterator = NULL) in /...../sites/all/modules/contrib/rules/ui/ui.plugins.inc on line 0

You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/PoeticMediaLab/Lacuna/issues/223#issuecomment-414026152, or mute the thread https://github.com/notifications/unsubscribe-auth/ABWkodS6OMl3Ieh5AA-szephP0nOFxJgks5uR3pNgaJpZM4VzQmJ .

--

Typed with thumbs. @mwidner http://michaelwidner.com

mrjcwu commented 5 years ago

Hi Michael,

Yes, the second issue is a known issue with compatibility with PHP 7.2:

https://www.drupal.org/project/rules/issues/2923477

I am going to see if I can run the new server with PHP 7.0. In the meantime, will the patch in the above link be eventually pulled into the Lacuna codebase?

mwidner commented 5 years ago

Yes. In fact, we have a new version in preparation that includes updates to all core and contributed modules. Because it looks like that patch has been merged into the Rules module, it will be included in that update. In the meantime, you should have no issues if you need to update any modules to work with your server configuration.

On Fri, Aug 17, 2018, 9:29 PM mrjcwu notifications@github.com wrote:

Hi Michael,

Yes, the second issue is a known issue with compatibility with PHP 7.2:

https://www.drupal.org/project/rules/issues/2923477

I am going to see if I can run the new server with PHP 7.0. In the meantime, will the patch in the above link be eventually pulled into the Lacuna codebase?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/PoeticMediaLab/Lacuna/issues/223#issuecomment-414026491, or mute the thread https://github.com/notifications/unsubscribe-auth/ABWkoeDwJnAfqMe5JviP-sopIFu9bFPBks5uR3v-gaJpZM4VzQmJ .

--

Typed with thumbs. @mwidner http://michaelwidner.com

mrjcwu commented 5 years ago

Hello Michael,

Thanks again for all your help! I dropped the server down to 7.0.31 and installation completed without any issues. Now on to exploring how to use the service!

Might I humbly suggest the addition of a verbose mode for installation for future releases?

Thanks again for your help!