This is the error message I get if I If I try to upgrade gotwo on Windows Platform. PHP 5.2.6.

CommentFileSizeAuthor
#1 new_gotwo-6.x-1.2.tar__0.gz22.33 KBsolotandem

Comments

solotandem’s picture

Project: Grammar Parser » Coder
Version: 7.x-1.1 » 7.x-1.x-dev
Component: Code » Coder Upgrade
Category: bug » support
Priority: Critical » Normal
StatusFileSize
new22.33 KB

I downloaded gotwo and ran it through this module without any problems. I attached the output you would get from the live upgrade site.

Without further information (e.g. the Coder Upgrade settings, the file permissions to the Coder Upgrade output directories), this is a support item not a bug. Let me know.

rmiddle’s picture

Any steps to fix this as I am having the same problem? What should I look at to fix? What info do you want about might setup?

Thanks
Robert

hass’s picture

All settings are the default setting, permissions are ok, all folders have been created old/new ond others. I have added the extracted gotwo module to the old folder and pressed the convert button.

I used the online tool as interrims solution...

robin monks’s picture

Category: support » bug

Occurs for me as well, no log entires in watchdog:

Drupal 7.0 final
Windows 7 with XAMPP

/Robin

solotandem’s picture

Would each of you uncheck the default setting to "use a separate process" and report back? My guess is the exec($command) (which is invoked when a separate process is used) is failing as the $command syntax is not good on Windows.

Otherwise, given you are both running on Windows, it would be helpful if you could trace the source of the problem. It might be something peculiar to PHP implementation differences on Linux/Mac and Windows.

hass’s picture

Not it runs for some time and a module seems to have converted in the new/gotwo folder. In the background of the overlay I see the below notices / error messages:

ERROR: Undefined offset: 2 on line 726 in drupal7\sites\all\modules\grammar_parser\engine\grammar_parser.editor.inc (Notice) 
ERROR: Undefined offset: 2 on line 727 in drupal7\sites\all\modules\grammar_parser\engine\grammar_parser.editor.inc (Notice)
ERROR: Undefined offset: 2 on line 728 in drupal7\sites\all\modules\grammar_parser\engine\grammar_parser.editor.inc (Notice) 

After 3 minutes the gotwo upgrade process has finished, but I still get "Module conversion code was not run." This is a really long runtime. On the online page it takes seconds.

From a very quick review it have not converted hook_perm, not removed the $ret from hook_update and other stuff. It have upgraded the .info and a few SQL requests.

hass’s picture

tzzz, ran it again and the hook_permission has been converted... $ret in hook_update still exists. Seems to be luck if something is converted or not.

solotandem’s picture

Thanks for trying that change and replying. Regarding your conclusion, I wouldn't call it luck as I get the same results all of the time (and so do others -- this is the first I have heard of such an occurrence). But possibly something is interesting about running this on Windows or in your site configuration.

hass’s picture

This is xampp with php 5.2.6 out of the box. I guess this must be cross platform incompatible code. However I cannot guess why the convert results are different when running twice.

rmiddle’s picture

I run under Debian Pure linux and am seeing it so it isn't a windows issue. I will remove the run in background option and see the output.

Thanks
Robert

dsnopek’s picture

I'm running on a Ubuntu 10.10 box with PHP 5.3 and also seeing this problem. I unchecked the run in separate process option and it still happens.

Basically, I get the following info message:

Module conversion code will run in the same process.

And the following error message:

Module conversion code was not run.

For now, I guess, I'm just going to use the live site!

Regards,
David.

solotandem’s picture

This is interesting. The issue does not seem limited to a particular OS. (Between my box and upgrade.b.o, we have two other Linux distros -- not mentioned above -- upon which the code runs fine.) You all seem to confirm that it is not a setup issue (e.g. write permissions to the files directory).

Given that I am not going to setup dev boxes with all of these OSes, it would be helpful if someone could drop some debug output into the code and report their findings. Even though it reports back "conversion code was not run," have you checked for log and debug files and conversion output files?

drewkeller’s picture

I'm using the QuickStart 0.9: Ubuntu 10.10, PHP 5.3.3
Coder 7.x-1.0-beta6

I tried unchecking the "use separate process" and when I attempted a conversion, I got a page full of text.
With "use separate process checked", i get the same output as in post #11.

So then i tried with Coder 7.x-1.x-dev. Same results.

Then I figured, well maybe I should see what this page full of text is about. Looks like coder is complaining about everything in the "sites/default/files/coder" folder that it tries to write to (excerpt at bottom). I tried adding the memory.txt and log.txt files, but didn't seem to change anything. So I modified permissions on the "/coder" folder itself to make it writable and create/edit files for everyone (perhaps only www-data needs these permissions since that's the owner of the output ???). Tried again.... Success!!

    * Module conversion code will run in the same process.
    * Module conversion code was run.
    * Click to view the conversion log file.
    * Patch files may be viewed by clicking on Name links in the Directories and Modules tabs below.

I tried again with separate process and it worked, as well.

Unable to write to file: sites/default/files/coder_upgrade/memory.txt Unable to write to file: sites/default/files/coder_upgrade/memory.txt ::snip-- several of the above::
Unable to write to file: sites/default/files/coder_upgrade/memory.txt Unable to write to file: sites/default/files/coder_upgrade/log.txt Unable to write to file: sites/default/files/coder_upgrade/log.txt Unable to write to file: sites/default/files/coder_upgrade/log.txt Unable to write to file: sites/default/files/coder_upgrade/log.txt ERROR: file_put_contents(sites/default/files/coder_upgrade/memory.txt): failed to open stream: Permission denied on line 764 in /home/quickstart/websites/homewoodefc.org/sites/all/modules/coder/coder_upgrade/conversions/coder_upgrade.main.inc (Warning) 
::snip-- blah blah blah::
solotandem’s picture

@drewkeller, Thanks for the feedback.

To the others who posted on this issue, It could be the PHP version -- I am running 5.3 locally and on the upgrade live site. I recall that the upgrade site would not run with 5.2 which is the default version on my shared host. After inquiring, the hosting company indicated 5.3 was available and so I tweaked the code to call the 5.3 binary.

jpmckinney’s picture

Running OS X 10.6.6 and PHP 5.2.9, I unchecked "use separate process" and saw that in addition to the new/ and old/ folders, I also need to create a patch/ folder. Note that all of log.txt, memory.txt, runtime.txt, new/, old/, and patch/ must be writable by the server.

I'm seeing this error when converting flexifilter:

ERROR: get_class() expects parameter 1 to be object, boolean given on line 719 in
sites/all/modules/coder/coder_upgrade/conversions/coder_upgrade.function.inc (Warning)
ERROR: get_class() expects parameter 1 to be object, boolean given on line 745 in
sites/all/modules/coder/coder_upgrade/conversions/coder_upgrade.function.inc (Warning)

I see the message "Module conversion code was not run." but patches are created and the new/ folder is populated. The log.txt contains a few errors:

Converting the file => flexifilter.module
<snip>
ERROR: could not parse sql SELECT statement.
ERROR: Could not find a SQL string to parse in coder_upgrade_locate_query_string
ERROR: switch statement not found in hook_filter_tips
<snip>
Converting the file => tableofcontents.install
<snip>
ERROR: could not parse sql SELECT statement.
<snip>
Converting the file => tableofcontents.module
<snip>
ERROR: Could not find a SQL string to parse in coder_upgrade_locate_query_string
ERROR: switch statement operand does not match first function parameter in hook_filter_tips
ERROR: key is not 'list' in hook_filter
solotandem’s picture

Thanks for your post.

While your statement is correct that the items need to be writable, you should not need to create a patch folder (or any of the other items) provided the web server user has write access to files/coder_upgrade (which is an install requirement).

Questions:
- are you running the beta6 or a later dev release (there was a minor change around this code that could affect the message displayed)
- what happens if you enable "use separate process"
- can you output the $success variable in coder_upgrade_conversions_apply() [from your post, it seems the conversion completed as a patch file was created, yet it displays the opposite message]

jpmckinney’s picture

I may have messed up permissions while trying to determine the issue. I can try disabling and reinstalling coder to see if it creates patch/ on its own. I enable modules with drush if that makes any difference to install requirements being enforced.

Answers:
- I'm now using the dev release because beta6 has that "return $success === 0" bug in coder_upgrade_conversions_apply.
- Enabling "Use separate process" and running "Convert files" displays "Module conversion code was not run." and, indeed, there are no new files under new/ or patch/
- Upgrading from beta6 to the dev release took care of my earlier report of seeing "Module conversion code was not run." despite files being created in new/ and patch/.

I created new issues for the errors and warnings I see. I think the only other issue I am having now is that "Use separate process" does not work on my system.

Should I worry about the errors logged to log.txt?

robin monks’s picture

FWIW the errors I encountered happened in PHP 5.2. A new XAMPP for Windows with 5.3 is available, and I'll try testing it again with the newer PHP version to see if the results change.

tim foley’s picture

Same issue here. Running on Centos 5, PHP 5.3.5. Works in process, but not in separate process. Uning Feb 2011 Dev version.

rfay’s picture

subscribe

jeebsuk’s picture

I experienced the same issue, it seemed to work fine for me if you un-ticked the "use separate process" option in the settings. I'm running Xampp 1.7.1 and PHP 5.2.9 on Windows Vista Home Premium.

sutharsan’s picture

Status: Active » Needs review

Running into the same problem. Unchecking 'use separate process' also removes the error and give proper conversion results.
When running the 'separate proces' code at the command line

php sites/all/modules/coder/coder_upgrade/scripts/coder_upgrade.run.php -- file=sites/default/files/coder_upgrade/runtime.txt > sites/default/files/coder_upgrade/coder_upgrade.run.txt

I got the following errors, which shows that the problem caused by the environment and can probably not be solved by Coder module.

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20090626/php_mysqli.dll' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20090626/php_mysqli.dll, 9): image not found in Unknown on line 0
PHP Fatal error:  Call to a member function toString() on a non-object in /Users/erik/www/training/sites/all/modules/coder/coder_upgrade/conversions/coder_upgrade.function.inc on line 1509

However an addition to the error message could be helpfull: 'Module conversion code was not run. Try to run the coder upgrade in the same process by unchecking Use separate process'

grendzy’s picture

I'm getting this error on OS X, PHP 5.2.14 even after unchecking "Use a separate process". There's no additional info in the watchdog or apache error log. admin/reports/status shows no problems.

solotandem’s picture

Are you running the latest dev release of this module?

hass’s picture

Status: Needs review » Active
grendzy’s picture

I was using beta6. After upgrading to 7.x-1.x-dev (2011-04-17), I'm unable to install the module. I get the following error:

PHP Fatal error: Call to undefined function coder_upgrade_create_theme_cache_submit() in /Users/dylan/Sites/test/drupal/profiles/metaltoad/modules/coder/coder_upgrade/coder_upgrade.install on line 42

I tried disabling, uninstalling, and re-installing coder upgrade, and fatal error persists. If I try disabling / reenabling (with uninstall) I don't get the fatal error the second time, though /admin/config/development/coder/upgrade returns a 403 Access Denied.

solotandem’s picture

Status: Active » Needs review

The installation problem should be fixed by this commit.

After checking out the latest code, if you still get an error, would you be able to debug the reason? I know people who can/have run the module successfully on Windows, Linux, and Mac. Windows users will probably only be able to run the conversions in the "same process." Other OSes should be able to work with either setting.

This issue is getting nowhere fast with people simply reporting they can not run the conversions, but not willing to figure out why. The symptoms seem to suggest something peculiar about the site installation. Given that I do not have access to all of your hardware and OSes, it would be much appreciated if people would roll up their sleeves and find the cause.

hass’s picture

Status: Needs review » Active

There is no patch to review and the configuration setting is known that it does not solve the bug.

areynolds’s picture

I fixed my installation by:

  1. using the dev version
  2. making sure all the files were writable
  3. using the .make file to install the libraries module and the grammar parser library
  4. made sure that the Grammer Parser module was not enabled (you should get a warning if it is)

We should probably write up a README file; I'm guessing many issues stem from confusion on installing the module.

RKS’s picture

I would second a README on the enable/use as library.

What I'm getting is strange (to me at least.) When I run update, nothing happens. It reloads the screen, says it ran, but nothing was written. I have to go into the settings, uncheck run as separate, go back, and rerun the process. It then says it was not run. Finally, I have to go back into settings, check run as separate, go back and rerun, and it works.

Don't know why I have to go through all that or if I'm just doing something wrong. Running latest dev btw.

solotandem’s picture

I highly doubt the sequence of runs you describe "causes" it to work. Have you ever checked the web server logs when "nothing happens?" (Does that mean you get a blank screen?) What OS, etc. are you using?

My comments in #27 still apply.

Also, a README was added to the Grammar Parser project that details the installation options.

solotandem’s picture

Status: Active » Closed (cannot reproduce)

If someone can debug what happens and provide evidence of a bug, then please reopen. Otherwise, please refer to my comments on this issue.