CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Win7/XAMPP Install: Admin / Build / Modules Page Slow or Timeout
Pages: [1]

Author Topic: Win7/XAMPP Install: Admin / Build / Modules Page Slow or Timeout  (Read 14376 times)

michaelhaley

  • Guest
Win7/XAMPP Install: Admin / Build / Modules Page Slow or Timeout
March 06, 2010, 09:35:47 pm
I am wanting to setup a local development machine on a new Lenovo T400 notebook. I have searched this board all day and cannot find a decent solution to this problem. It seems to be a very common problem, however every solution I have found and tried does not solve my problem.

Setup
=====
Lenovo T400 3 GB RAM, Core2 2.4
Windows 7
Drupal 6.15
XAMPP 1.7.0
Apache 2.2.11
PHP 5.2.8 + PEAR
MySQL 5.1.30

Drupal works great out of the box with this setup and all of the core modules. Speed is decent.

However, after I install the CiviCRM module on the above Win7/XAMPP setup AND load the path http://localhost/admin/build/modules in my browser, I receive the following error:

Fatal error: Maximum execution time of 60 seconds exceeded in C:\xampp\htdocs\drupal\includes\file.inc on line 898

Many members on this forum have suggested various workarounds.

NONE OF THESE SOLUTIONS HAVE FIXED MY ISSUE
===========================================
Disable the Drupal Update Module.
Increase the max timeout to over 60s
Increase PHP memory limit to 64MB
Disable AVG, Windows firewall
Modify the Windows Host file
Install a different dev server (e.g. Uniserver)
Fix DNS IP6 in Firefox browser
Make changes to MySQL and switch from InnoDB engine to MyISAM
Install dev module and check MySQL queries. Result: Executed 85 queries in 164.83 milliseconds.

And on and on and on... =(

So, after using my head a bit, I suspected it might have something to do with the index.php process itself.

Using Xdebug and WinCacheGrind to view the data, the following results reveal that I may have found the culprit:

php:is_dir() avg. self time is 3.5 ms x 13,705 function calls = 47.630 secs process time.
php:opendir() avg. self time is 2.7 ms x 1,870 function calls = 5.025 secs process time.
file_scan_directory() avg. self time is 2.6 x 1,865 function calls = 4.793 secs process time.

Total process time of these three calls: 57.448 secs. No wonder it's timing out before 60secs!

Now, this makes sense because when you examine the number of directories in CiviCRM modules folder, there are 4,285 Files, 821 Folders.

One might shrug this off and conclude Drupal is just doing a lot of work during /admin/build/modules, however, when you examine WinCacheGrind a few lines down, I notice this:

php:readdir() avg. self time is ~0.0 ms x 17,440 function calls = 302 ms process times.

Any ideas how I can speed up these calls? Why is readdir() performing more calls than is_dir(), yet the process time it takes is 100x slower? Is there something I can do? Is this something to do with Windows 7 and PHP?

Please help!
« Last Edit: March 17, 2010, 04:03:24 pm by michaelhaley »

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Win7/XAMPP Install: Admin / Build / Modules Page Slow or Timeout
March 07, 2010, 03:12:32 am
#1 - the page you are trying to load is hugely memory intensive. If you are going to have a problem with memory on a drupal install it will be on that page. It's just a really hard-working page

#2 - your problem is definitely related to this solution

Increase the max timeout to over 60s

There are smatterings on php.ini files all over the place so you may have to find another one to edit. (I'm sorry I don't have WAMP installed anymore - I seem to recall you could right-click & get lots of settings to adjust.)

The bottom line though is that your

max_execution_time

on your phpinfo page will tell you what the max timeout is set to and you need to get that number to be nice and high.

I'm pretty sure wampp makes it easy to see the phpinfo page but if not you can just create a php file with this code in it and run it.


Code: [Select]
<?php
phpinfo
();

?>
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

michaelhaley

  • Guest
Re: Win7/XAMPP Install: Admin / Build / Modules Page Slow or Timeout
March 11, 2010, 02:48:36 pm
Thanks again for your reply.  I found a workaround.  It was simply dropping my Win7/XAMPP setup and switching to an Ubuntu/VirtualBox setup.  Now, all of Drupal's admin pages including CiviCRM fly.

I've posted this problem over on Drupal's Support Forum.  It appears using the PHP function is_dir() on a Windows file system is the bottleneck.  3ms per call doesn't seem slow, but when Drupal calls it 10K times while building one admin page, 30s becomes a real drain on productivity.

Seeing that XAMPP is a very popular development setup, it might be a good idea to promote this issue up the chain regarding this bottleneck between XAMPP and Drupal when running a larger module like CiviCRM.  It would have saved me hours and some hair!
« Last Edit: March 17, 2010, 04:09:55 pm by michaelhaley »

joshers

  • I’m new here
  • *
  • Posts: 2
  • Karma: 1
Re: Win7/XAMPP Install: Admin / Build / Modules Page Slow or Timeout
March 17, 2010, 01:26:09 pm
Similar issue.

windows 7
Drupal 6.16
xampp 1.7.1
PHP 5.2.9 + PEAR


Spent hours trying to figure it out and resulted in using a simple workaround - bitnami drupal stack
http://bitnami.org/stack/drupal

Denver Dave

  • Ask me questions
  • ****
  • Posts: 471
  • Karma: 9
Re: Win7/XAMPP Install: Admin / Build / Modules Page Slow or Timeout
June 11, 2010, 07:20:59 pm
I've just installed xampp and hoping that some work on my xp PC will help in upgrading our drupal / civicrm 1.9 linux server installation to CiviCRM 3.15

Even if I can't run Civicrm, maybe I can get or 237 MB database whittled down to size (mostly activity files).   Perhaps I don't even have to run CiviCRM on my XP machine to use it to help get the database in shape for the upgrade or maybe even the db upgrade.

Dave
« Last Edit: June 11, 2010, 08:32:41 pm by Denver Dave »

rcrusoe

  • Guest
Re: Win7/XAMPP Install: Admin / Build / Modules Page Slow or Timeout
June 17, 2010, 10:30:05 am
Thanks all of you for this info - excellent and very useful. I hadn't come across the bitnami stacks before but that is the best-looking solution and I'll be trying it out on a couple of windoze xp machines. For dev, testing and db work in particular the need for windoze sandbox installs is just a fact of life. I think there is value in pushing this ahead for CiviCRM - see for example 'how it works' on SugarCRM using their FastStack installers http://www.sugarcrm.com/crm/download/sugar-suite.html#installers. In doing some eval of current crm pkgs I was able to d/l, install, configure and run Sugar on an xp machine in about 15 mins total, then go to their admin panel and do a save/backup of the app files and the db that could be restored/moved to another installation very easily. Food for thought. DenverDave, your comment on working the db issues maybe merits a separate discussion. I've recently come back to working with CiviCRM after a fairly long hiatus, having been involved way back pre-1.0 in db and import issues. From what I can see in the forums etc it's still a source of heartburn, and folks still struggle with import, export, and data integration in production environments where 'real world' size files and dbs are involved.
Regards,
Howard J

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Win7/XAMPP Install: Admin / Build / Modules Page Slow or Timeout
June 17, 2010, 11:15:17 am

howard:

welcome back. we do think that civicrm has improved significantly since 1.0  including import/export/data integration. However there is still a lot to do :)

Considering that no one on the core team develops on windows (and this is unlikely to change), would be great if folks in the community can group together and help fill that hole (which is the underlying premise of open source after all). building easy to use and deploy installers on all platforms would make an awesome contribution. food for thought.

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

rcrusoe

  • Guest
Re: Win7/XAMPP Install: Admin / Build / Modules Page Slow or Timeout
June 18, 2010, 11:55:03 am
Thanks lobo - looking at 3.2, the progress is indeed incredible, and what you and dave g. and the community have accomplished is stunning. Finding an easy way to set up windoze dev/test I think would be really useful, and I'm trying the bitnami stack now. The drupal 6.16 installation pack has gone in quite easily on a thinkpad R51 laptop with 2 G of ram, 80G disk, win xp sp3. Additional modules like cck and views install no problem. CiviCRM 3.2b1 installs with some typical funky/quirky action on db config and url/directory paths, but eventually went in - well, sort of. The install finishes and says it's successful, but when I  try to access the config checklist, or go to the drupal main page and click the CiviCRM menu link to actually try and use it, it returns a "Connection Interrupted - The connection to the server was reset while the page was loading" error which I'm pretty sure is a bent framistat or reversed knutenvalve in the config settings somewhere :). Would be interested to know if the other posters, joshers or dave, got it working without errors. Although you and other team members won't be doing windoze anytime soon, you might find it useful to look at the linux version of the sugar faststack package to check out what it offers. Meanwhile I'll try to sort out what's happening with the bitnami install of Civi.
Regards,
Howard

demeritcowboy

  • Ask me questions
  • ****
  • Posts: 570
  • Karma: 42
  • CiviCRM version: Always the latest!
  • CMS version: Drupal 6 mostly, still evaluating 7.
  • MySQL version: Mix of 5.0 / 5.1 / 5.5
  • PHP version: 5.3, usually on Windows
Re: Win7/XAMPP Install: Admin / Build / Modules Page Slow or Timeout
June 18, 2010, 04:30:49 pm
The last time I saw that error it was because the PATH environment variable didn't contain the path to PHP. Some things will work, like basic php scripts, but usually anything that needs to load a dll like the mysql dll dies.

You need to restart apache after setting that.

Denver Dave

  • Ask me questions
  • ****
  • Posts: 471
  • Karma: 9
Re: Win7/XAMPP Install: Admin / Build / Modules Page Slow or Timeout
June 19, 2010, 10:29:59 am
I'm not seriously trying to run the production CiviCRM on my XP PC using xampp, but hey why not try to install and see what happens?

Clean install, no old versions or old files present.

Drupal 6.17 seems to have installed fine, but minimal testing

CiviCRM 3.15
Warned that the email server is not working (or maybe Drupal warned), but OK since I didn't start an email server
Stopped because php version 5.3.0 or later being used - commented out the check
Stopped because default directory is read only - could not seem to fix, so commented out the check.

3.15 seemed to complete installation
Noticed that the top menus (white text on black background) are not present - perhaps because of the above or other.

However, maybe I could install far enough to do the data conversion rolling CiviCRM version 1.9 forward to 3.15. Also might be handy for training others or giving non-internet connected demonstrations.   Not sure if I can get the old version to run on my XP, PC, but then I'm not sure about getting it to run on a separate Linux server for upgrade testing either.    Will report back.

If anyone else is interested, please report your results.
= = = = = =
small update to status
looked at http://localhost/drupal/index.php?q=civicrm/admin/setting/updateConfigBackend&reset=1
and changed themes, noticed menus present now, changed theme back and menu present.

However, there are issue when create a record or search.  I'll probably leave it here for now and work on getting a test version of our CiviCRM 1.9 working on XP or a separate linux server:
Quote
Error Details:

Array
(
    [callback] => Array
        (
            
  • => CRM_Core_Error
  • [1] => handle
            )

        
Code: [Select]
=> -1
    [message] => QuickForm Error: unknown error
    [mode] => 16
    [debug_info] => Form rule callback returned invalid value in HTML_QuickForm::validate()
    [type] => HTML_QuickForm_Error
    [user_info] => Form rule callback returned invalid value in HTML_QuickForm::validate()
    [to_string] => [html_quickform_error: message="unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="QuickForm Error: " info="Form rule callback returned invalid value in HTML_QuickForm::validate()"]
[/quote]

Dave
« Last Edit: June 19, 2010, 11:23:09 am by Denver Dave »

mrl586

  • I post occasionally
  • **
  • Posts: 63
  • Karma: 2
  • CiviCRM version: 4.0
  • CMS version: Drupal 7.0
  • MySQL version: 5.5.9
  • PHP version: 5.3.5
Re: Win7/XAMPP Install: Admin / Build / Modules Page Slow or Timeout
June 19, 2010, 01:48:30 pm
Quote from: Denver Dave on June 19, 2010, 10:29:59 am
However, there are issue when create a record or search.  I'll probably leave it here for now and work on getting a test version of our CiviCRM 1.9 working on XP or a separate linux server:
Quote
Error Details:

Array
(
    [callback] => Array
        (
            
  • => CRM_Core_Error
  • [1] => handle
            )

        [ code ] => -1
        
[message] => QuickForm Error: unknown error
    [mode] => 16
    [debug_info] => Form rule callback returned invalid value in HTML_QuickForm::validate()
    [type] => HTML_QuickForm_Error
    [user_info] => Form rule callback returned invalid value in HTML_QuickForm::validate()
    [to_string] => [html_quickform_error: message="unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="QuickForm Error: " info="Form rule callback returned invalid value in HTML_QuickForm::validate()"]

Dave
This is php 5.3 related issue.

Denver Dave

  • Ask me questions
  • ****
  • Posts: 471
  • Karma: 9
Re: Win7/XAMPP Install: Admin / Build / Modules Page Slow or Timeout
June 19, 2010, 10:41:05 pm
Thanks - of course I couldn't just leave things.

I uninstalled xampp 1.7.3 with php 5.3.1 and installed xampp 1.7.1 with php 5.2.9

Drupal 6.17 went in fine again and correctly notified me that I had not installed a mail server
Installed CiviCRM 3.1.5 after commenting out writeable default directory check.

Seems to be running fine, although somewhat slow, which surprises me, on my XP PC with limited testing - did a search and add contact.

Thanks - maybe this will assist me in converting our linux production server.  I feel more comfortable trying things on my XP PC.

Dave



« Last Edit: June 20, 2010, 08:10:55 am by Denver Dave »

rcrusoe

  • Guest
Re: Win7/XAMPP Install: Admin / Build / Modules Page Slow or Timeout
June 22, 2010, 07:16:42 am
Glad to see Dave had good luck using the xampp stack - I still can't get CiviCRM to work on the bitnami stack. Their drupal stack installs just fine, drupal 6.16 works fine. Removed all civiCRM files, db, etc and re-installed using different db name and user, same set of issues after 'successful' installation of civiCRM. civiCRM db is there, modules show up in drupal module admin, etc etc but still receive network connection error when clicking on the civiCRM menu link. Nothing in apache logs, nothing in drupal site logs, etc that would point to what's causing it. Played endless games with base url settings, directory path settings, etc. Dave, any chance you can post or email suitably sanitized copies of your config files for drupal and civiCRM? I'd really like to try and isolate this thing so I can get it working. Not sure I have the time at this point to start screwing around with it on another machine, although that would certainly be a possible next step, in order to smoke out possible machine-dependent config issues (nah, that would never happen on windoze). Several demo upcoming demo situations make it really helpful to have this thing running on the laptop and not need a live internet connection. Oh well.
Regards,
Howard

Denver Dave

  • Ask me questions
  • ****
  • Posts: 471
  • Karma: 9
Re: Win7/XAMPP Install: Admin / Build / Modules Page Slow or Timeout
June 22, 2010, 08:16:21 am
I suppose I could post the config files, but why not install xampp and see if you can duplicate my results.  It didn't take very long - that way you have your settings, not mine.

Now that I've been able to get the current Drupal 6.17 and CiviCRM 3.15 to run, I'm going to see if I can do a clean install of ....  Drupal 5.3 and CiviCRM 1.9 on my XP xampp PC.  If I can do that, I'll try to use the production database which I have already been able to load into MySQL on the XP PC - both the Bigdump and the mysql command line (using a script file) worked to load the data - took a while, but worked (phpmyadmin timed out).

Note for xampp rollback - rollback deleted my mysql script files from the mysql directory - I was able to restore from backup, but something to watch out for.  I've learned when upgrading things seem to get whacked.

Side note:
xampp 1.7.1 seems to be quite a bit faster at starting and stopping the Apache and MySQL servers than 1.7.3.  Once going, seems about the same.

« Last Edit: June 26, 2010, 12:43:20 pm by Denver Dave »

rcrusoe

  • Guest
Re: Win7/XAMPP Install: Admin / Build / Modules Page Slow or Timeout
June 23, 2010, 09:09:18 am
Dave, good advice, thanks. Just to be a little contrarian, I tried the bitnami stack and civi installation on a win2k machine, and of course, it works, using civi 3.2beta1. It's all so typical windoze, so now I will go back and clean out the xp installation and try again, but it's likely something on the particular xp machine is causing the problem. Very frustrating - I'd like to identify exactly what's causing the issue rather than just get it working, in order get to a stable scenario for future use.  Will try xampp if it still won't behave. Having said all that, the installation does run drupal, and created the civi db and such, which would at least let me use it for db work. The drupal backup & migrate module works nicely btw and will give you copies of your drupal and civi db quite easily from its own module admin interface, letting you bypass bigdump and phpmyadmin if all you need is the mysql dump file. My overall goal here is to have the ability to use windoze based db tools to work on things like export and import, db loading and such, by attaching to the mysql tables directly from ms access or workbench or whatever, to allow direct testing, editing, and so forth and test with the live civi installation. That scenario has worked fine in the past, but involved having a separate linux box running the lamp stack and civicrm, and connecting to it over the lan. Easy enough to do but not as portable and convenient as having it all on a laptop.
* * * * *
latest update - did the cleanup and reinstall on the xp laptop, with some minor tweaks, and now it works.  ??? but I don't know why. Will do some checking against saved copies of config files and db to see whether there are any visible differences.
Regards,
Howard

« Last Edit: June 23, 2010, 11:34:25 am by rcrusoe »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Win7/XAMPP Install: Admin / Build / Modules Page Slow or Timeout

This forum was archived on 2017-11-26.