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 »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Upgrade from 4.4.6 to 4.5 Drupal on Windows server
Pages: 1 [2] 3

Author Topic: Upgrade from 4.4.6 to 4.5 Drupal on Windows server  (Read 5189 times)

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Upgrade from 4.4.6 to 4.5 Drupal on Windows server
September 20, 2014, 02:17:52 pm
My understanding of PHP and windows is that / and \ are interchangeable (the system doesn't care which one you use, and you can use a mix of them in the same path string if you want). So this conversation might not be going down the right path (pardon the pun). ;)
Try asking your question on the new CiviCRM help site.

Dan C

  • I post frequently
  • ***
  • Posts: 179
  • Karma: 17
  • CiviCRM version: All
  • CMS version: Joomla 2.5 and 3.X, Drupal 7, Wordpress 3.7 and up
  • MySQL version: 5.1.7 and up
  • PHP version: 5.3.5 and up
Re: Upgrade from 4.4.6 to 4.5 Drupal on Windows server
September 20, 2014, 03:56:49 pm
Under Drupal changing the slashes from / to \ in civicrm_root definitely made a difference on a clean install.  Obviously that isn't the only problem, I believe I have found another one on the clean cache page like SemperFi mentioned, I just haven't traced the root of that one yet (although I have some theories).  So one down and more to go :)
CrusonWeb - Web Development, Implementation, and Support.  Specializing in CiviCRM and Joomla (although also knowledgable in Wordpress and Drupal as well).

Dan C

  • I post frequently
  • ***
  • Posts: 179
  • Karma: 17
  • CiviCRM version: All
  • CMS version: Joomla 2.5 and 3.X, Drupal 7, Wordpress 3.7 and up
  • MySQL version: 5.1.7 and up
  • PHP version: 5.3.5 and up
Re: Upgrade from 4.4.6 to 4.5 Drupal on Windows server
September 20, 2014, 05:48:18 pm
Quote from: SemperFi on September 20, 2014, 01:19:10 pm
but when I went on "CLean cache and update path" page and click on "Save" without changing anything, all my resources URL were once again messed up :
example : http://localhost/gdc/\wp-content/plugins/civicrm/civicrm/

Ok, I think I have a patch for this but I want to be sure I got the only problem before I put it up, the only paths that were getting messed up for you were the resource URLs right?  Your absolute paths were fine?
CrusonWeb - Web Development, Implementation, and Support.  Specializing in CiviCRM and Joomla (although also knowledgable in Wordpress and Drupal as well).

pmoz

  • I post occasionally
  • **
  • Posts: 101
  • Karma: 2
  • CiviCRM version: 4.4.0, 4.5.3
  • CMS version: Drupal 7.34
  • MySQL version: 5.1.68
  • PHP version: 5.4.9
Re: Upgrade from 4.4.6 to 4.5 Drupal on Windows server
September 20, 2014, 06:34:49 pm
My absolute paths get messed up too.

Changing slashes definitely has an effect.

Glad to see folks making progress!

My civicrm.settings.php was not replaced on upgrade, so the path was already correct prior to the upgrade.

As to Semperfi's resolution;

You Wordpress path (wp-content\plugins\files\civicrm\upload\dynamic\l10n-en_US.js) is different from my drupal path (sites\default\files\civicrm\dynamic\l10n-en_US.js).

IIS doesn't use htaccess so I added a web.config which got rid of the page not found errors for l10n-en_US.js and added some functionality, but something still must be afoot. 

The quick search just spins away and the Case Type page still comes up blank.

I've been painting all day and am tired, but I'll poke around some more later.

These are some good resources for folks interested in running on Windows in some manner.

As an aside, as I look around my site folder, I notice that the dynamic folder is in multiple locations.  Judging by the times that the folders were created, it looks as if when I save a new Base Directory, it creates a new dynamic folder with the l10n-en_US.js file inside. in the new base path.  So I have multiple dynamic folders.

Dan C

  • I post frequently
  • ***
  • Posts: 179
  • Karma: 17
  • CiviCRM version: All
  • CMS version: Joomla 2.5 and 3.X, Drupal 7, Wordpress 3.7 and up
  • MySQL version: 5.1.7 and up
  • PHP version: 5.3.5 and up
Re: Upgrade from 4.4.6 to 4.5 Drupal on Windows server
September 20, 2014, 07:44:06 pm
Quote from: pmoz on September 20, 2014, 06:34:49 pm
As an aside, as I look around my site folder, I notice that the dynamic folder is in multiple locations.  Judging by the times that the folders were created, it looks as if when I save a new Base Directory, it creates a new dynamic folder with the l10n-en_US.js file inside. in the new base path.  So I have multiple dynamic folders.

That might be part of the problem.  If you can determine which one goes with the base directory you currently have set could you remove the extras and see if that fixes any errors?  I know duplicate files can really screw up upgrades even on Linux environments so I'm wondering if something similar is occuring
CrusonWeb - Web Development, Implementation, and Support.  Specializing in CiviCRM and Joomla (although also knowledgable in Wordpress and Drupal as well).

SemperFi

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 3
  • CiviCRM version: 4.5.4
  • CMS version: Wordpress 4.0.1
  • MySQL version: MySQL 5.5.16
  • PHP version: PHP 5.3.17
Re: Upgrade from 4.4.6 to 4.5 Drupal on Windows server
September 21, 2014, 12:54:05 am
Quote from: danc on September 20, 2014, 05:48:18 pm
Ok, I think I have a patch for this but I want to be sure I got the only problem before I put it up, the only paths that were getting messed up for you were the resource URLs right?  Your absolute paths were fine?

Dan,
You're right only the resource URL are messed up when saving, absolute paths are not impacted.
Please share you're fix if you need someone to test
Thanks for investigating.

FYI : I'm running a Xampp server not IIS (too difficult to set up a website whereas it's very simple with xampp)

Dan C

  • I post frequently
  • ***
  • Posts: 179
  • Karma: 17
  • CiviCRM version: All
  • CMS version: Joomla 2.5 and 3.X, Drupal 7, Wordpress 3.7 and up
  • MySQL version: 5.1.7 and up
  • PHP version: 5.3.5 and up
Re: Upgrade from 4.4.6 to 4.5 Drupal on Windows server
September 21, 2014, 06:35:03 am
Ok, I have committed the change to my local fork.  You can find it at https://github.com/crusonweb/civicrm-core/commit/b97c17c42b1778c6123926a7413437b83cd01f68

Let me know how that works.  pmoz, I'm not sure if it will resolve your problem as well, I haven't been able to recreate that locally (I'm going to try a clean install on a lower version and upgrade to see if that makes it occur).  Maybe we will luck out though and this will resolve both issues.
CrusonWeb - Web Development, Implementation, and Support.  Specializing in CiviCRM and Joomla (although also knowledgable in Wordpress and Drupal as well).

SemperFi

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 3
  • CiviCRM version: 4.5.4
  • CMS version: Wordpress 4.0.1
  • MySQL version: MySQL 5.5.16
  • PHP version: PHP 5.3.17
Re: Upgrade from 4.4.6 to 4.5 Drupal on Windows server
September 21, 2014, 07:44:59 am
Dan,
This fix works perfectly !! No more issue when saving in "Clean caches and update path", URL are no more impacted.
I'll apply it on my production site. Thanks
Great job.

 8)

pmoz

  • I post occasionally
  • **
  • Posts: 101
  • Karma: 2
  • CiviCRM version: 4.4.0, 4.5.3
  • CMS version: Drupal 7.34
  • MySQL version: 5.1.68
  • PHP version: 5.4.9
Re: Upgrade from 4.4.6 to 4.5 Drupal on Windows server
September 21, 2014, 09:34:51 am
It fixes the issue with saving on the update path.  Good job.

It does not resolve anything else for me.

There is an interesting phenomena I've been noticing when I adjust the paths and directories...
If I update the base directory path to C:/inetpub/wwwroot\sites\default\files/ (which Civi says should be the base directory), it changes the image upload folder to the same path.

Same goes in reverse direction, if I save the image upload folder, the base directory is changed to the same path.  This was happening all along and definitely adding to the confusion.

I believe the image upload path should be C:/inetpub/wwwroot\sites\default\files\civicrm\persist/contribute/.  Is this correct?

My head hurts.

Dan C

  • I post frequently
  • ***
  • Posts: 179
  • Karma: 17
  • CiviCRM version: All
  • CMS version: Joomla 2.5 and 3.X, Drupal 7, Wordpress 3.7 and up
  • MySQL version: 5.1.7 and up
  • PHP version: 5.3.5 and up
Re: Upgrade from 4.4.6 to 4.5 Drupal on Windows server
September 21, 2014, 11:16:48 am
Quote from: pmoz on September 21, 2014, 09:34:51 am
It fixes the issue with saving on the update path.  Good job.

It does not resolve anything else for me.

There is an interesting phenomena I've been noticing when I adjust the paths and directories...
If I update the base directory path to C:/inetpub/wwwroot\sites\default\files/ (which Civi says should be the base directory), it changes the image upload folder to the same path.

Same goes in reverse direction, if I save the image upload folder, the base directory is changed to the same path.  This was happening all along and definitely adding to the confusion.

I believe the image upload path should be C:/inetpub/wwwroot\sites\default\files\civicrm\persist/contribute/.  Is this correct?

My head hurts.

Well at least one problem is down.  The image upload path could be anything you want it to be, but you are correct that the default is /sites/default/files/civicrm/persist/contribute/.

I do see that problem now, not sure why I didn't before.  I'm low on brain power right now but I will look at it more closely tonight.

EDIT: It actually looks like the base directory path has some issues on Linux servers as well, I tried changing it and it didn't save.  So there may be a deeper issue here, will still dig into it tonight.
« Last Edit: September 21, 2014, 11:21:45 am by danc »
CrusonWeb - Web Development, Implementation, and Support.  Specializing in CiviCRM and Joomla (although also knowledgable in Wordpress and Drupal as well).

Dan C

  • I post frequently
  • ***
  • Posts: 179
  • Karma: 17
  • CiviCRM version: All
  • CMS version: Joomla 2.5 and 3.X, Drupal 7, Wordpress 3.7 and up
  • MySQL version: 5.1.7 and up
  • PHP version: 5.3.5 and up
Re: Upgrade from 4.4.6 to 4.5 Drupal on Windows server
September 22, 2014, 07:04:42 pm
Hey Guys,

I resolved some more issues, this appears to take care of pmoz's problem where when the base directory was updated it would change the Image Upload Directory as well.  Could you test it as well and let me know?  It should work on all CMSs.

https://github.com/crusonweb/civicrm-core/commit/5d59d75ce22673acbb23239765ada032ca8ad110

Thanks,
Dan
CrusonWeb - Web Development, Implementation, and Support.  Specializing in CiviCRM and Joomla (although also knowledgable in Wordpress and Drupal as well).

SemperFi

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 3
  • CiviCRM version: 4.5.4
  • CMS version: Wordpress 4.0.1
  • MySQL version: MySQL 5.5.16
  • PHP version: PHP 5.3.17
Re: Upgrade from 4.4.6 to 4.5 Drupal on Windows server
September 23, 2014, 02:57:18 am
Hello Dan,

Your patch correctly updates the directories of the different resources after changing "New base directory" .
But, after saving this "New base directory", when you come back on the "Cleanup caches and update path" page, you should see as "Old base directory" the value you just put as "New base directory" -> but it's not see enclosed

It seems that it correctly got taken into account to change the resources directories but wasn't stored in the DB - am I clear ?
Can you check on yr side ?

Thanks

SemperFi

  • I post frequently
  • ***
  • Posts: 177
  • Karma: 3
  • CiviCRM version: 4.5.4
  • CMS version: Wordpress 4.0.1
  • MySQL version: MySQL 5.5.16
  • PHP version: PHP 5.3.17
Re: Upgrade from 4.4.6 to 4.5 Drupal on Windows server
September 23, 2014, 03:05:58 am
Quote from: danc on September 21, 2014, 06:35:03 am
Ok, I have committed the change to my local fork.  You can find it at https://github.com/crusonweb/civicrm-core/commit/b97c17c42b1778c6123926a7413437b83cd01f68

Hello Civi@Admin
Do you plan to add this fix to the next update of CiviCRM ? Or should we keep this fix to apply it manually going forward ?
It's really an enhancement for users of Civi on Windows platform installation.

Dan C

  • I post frequently
  • ***
  • Posts: 179
  • Karma: 17
  • CiviCRM version: All
  • CMS version: Joomla 2.5 and 3.X, Drupal 7, Wordpress 3.7 and up
  • MySQL version: 5.1.7 and up
  • PHP version: 5.3.5 and up
Re: Upgrade from 4.4.6 to 4.5 Drupal on Windows server
September 23, 2014, 06:00:37 am
SemperFi -

Once we have fixed all the bugs I will submit a pull request for inclusion in the Core.  Right now I am only committing locally because it is still a work in progress.  I don't know if we will make 4.5.1 though, I'm not sure what their timeline is on it.

The base directory is not stored in the database.  It is actually generated based on the Image Upload Directory path.  That's part of the reason why we were seeing the overwriting occur.  What you are seeing is a side effect of how the Base Directory is generated and isn't a Windows specific problem, it will happen on a Linux machine too.  Basically the code takes the Image Upload directory value and removes everything from /files/civicrm/ on and replaces it with /files/.  So if you add a /civicrm/ to the end of your base directory it is not going to display when you reload the page.

EDIT: It dawns on me I should probably elaborate a bit.  The base directory is only meant to point to the place where the civicrm folder is put, on Wordpress and Drupal this is within the /files/ folder.  So that is why it scrubs the end off of the image directory to get the base directory.  It doesn't care about the structure below that first civicrm directory, that is taken care of by the more specific directory settings, it is just looking for where to find the files directory (or in Joomla's case the media directory).
« Last Edit: September 23, 2014, 06:13:34 am by danc »
CrusonWeb - Web Development, Implementation, and Support.  Specializing in CiviCRM and Joomla (although also knowledgable in Wordpress and Drupal as well).

pmoz

  • I post occasionally
  • **
  • Posts: 101
  • Karma: 2
  • CiviCRM version: 4.4.0, 4.5.3
  • CMS version: Drupal 7.34
  • MySQL version: 5.1.68
  • PHP version: 5.4.9
Re: Upgrade from 4.4.6 to 4.5 Drupal on Windows server
September 23, 2014, 07:21:14 am
Great work Dan.

The more OS agnostic CiviCRM is the better for all so I expect any fixes that simplify installation on Windows, Linux, Mac are included in future releases.

I also had some success with getting everything functioning correctly on IIS.

I was still struggling with the Quick Search, the arrows in the Administration menu, blank Case Type screen and help pop-ups.

When on the Windows server, if I moved the dynamic folder to C:\inetpub\wwwroot\sites\default I could browse to the js file.
As soon as I moved it within the C:\inetpub\wwwroot\sites\default\files folder, I would get an HTTP Error 404.4 - Not Found
The resource you are looking for does not have a handler associated with it.
error.

I checked the handler mappings for the files folder and it only had listed one static mapping, while the default folder had many.

I selected the files folder, handler mapping and hit Revert to Parent.

As soon as I did this, all errors were fixed.

After a break, I will take a look at any web.config adjustments that I made to see if they are necessary.

Whew.

Pages: 1 [2] 3
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Upgrade from 4.4.6 to 4.5 Drupal on Windows server

This forum was archived on 2017-11-26.