PHP Linter

I’ve recently installed Komodo Edit 9.1.0 and attempting to set the preferences the way I’m used to in 8, but having some difficulty. I cannot get the PHP linter to work. I’ve tried configuring the Lanugages > PHP > Interpreter, etc, with no success. I can still input bad code and the syntax linter does not show the indicator that there is a problem. How can this be fixed? FYI - I am working out of a project folder I’ve setup - nothing special really.

Setting the interpreter should definitely be enough. Could you try restarting Komodo to ensure your setting took?

If its still not working - open a PHP file, type in some erroneous PHP code and then hit Help > Troubleshooting > View Log file and share its contents here.

Thanks

I’ve set the Interpreter, restarted Komodo, and done Help > Troubleshooting > View Log file and there is nothing in there at all. It appears it is doing nothing. The exact same file and project work perfectly in Komodo Edit 8, but does not work in 9.

That can’t be right, can you check the pystderr.log file in your profile folder?

You may want to try a clean profile also.

How do I find my profile folder? I’m on a Mac.

I found the pystderr.log file. Here is what is at the bottom of it:

INFO: _hit_from_elem_imports:: ie: lookup (‘array_key’,) in => []
INFO: _hit_from_elem_imports:: ie: lookup (‘array_key’,) in <php-5.5 stdlib> => []
INFO: _hit_from_elem_imports:: ie: no matches found
ERROR: evaluating ‘array_key’ at OfferingsController.php#111: could not resolve first part of ‘array_key’

This line “INFO: _hit_from_elem_imports:: ie: lookup (‘array_key’,) in => []” is in there A LOT. Hope that helps.

This was at the top:

[ERROR] koCodeIntel: INFO: eval ‘array_key’ at OfferingsController.php#111 <Trigger ‘php-calltip-call-signature’ at 3575>
INFO: _hit_from_citdl:: expr: ‘array_key’, scoperef: (<blob ‘OfferingsController.php’>, [‘OfferingsController’, ‘admin_view’])
INFO: _hit_from_citdl:: expr tokens: [‘array_key’]
INFO: _hits_from_first_part:: find ‘array_key …’ starting at (<blob ‘OfferingsController.php’>, [‘OfferingsController’, ‘admin_view’]):
INFO: _hits_from_first_part:: scoperef now (<blob ‘OfferingsController.php’>, [‘OfferingsController’, ‘admin_view’]):
INFO: _hits_from_first_part:: checking namespace aliases
INFO: _hits_from_first_part:: pt3: is ‘array_key’ accessible on (<blob ‘OfferingsController.php’>, [‘OfferingsController’, ‘admin_view’])? no
INFO: _hits_from_first_part:: scoperef now (<blob ‘OfferingsController.php’>, []):
INFO: _hits_from_first_part:: checking namespace aliases
INFO: _hits_from_first_part:: pt3: is ‘array_key’ accessible on (<blob ‘OfferingsController.php’>, [])? no
DEBUG: _hit_from_elem_imports:: Checking imports, tokens[0]: ‘array_key’ … imp_elem: <blob ‘OfferingsController.php’>
INFO: _hit_from_elem_imports:: trying import everything: tokens: [‘array_key’]
INFO: _hit_from_elem_imports:: trying with lpath: (‘array_key’,)

Could you share the whole file please?

It is very large and when I try to put in here, this site throws an error - won’t let me.

The file is truncated whenever you restart Komodo. So try this - restart Komodo, immediately reproduce your issue, then copy the log file.

[2015-07-23 15:01:35,986] [INFO] Startup: Welcome to Komodo Edit 9.1.0 build 15798 (platform macosx, running on Darwin 14.4.0 version Darwin Kernel Version 14.4.0: Thu May 28 11:35:04 PDT 2015; root:xnu-2782.30.5~1/RELEASE_X86_64)
[2015-07-23 15:01:35,986] [INFO] Startup: /Applications/Komodo Edit 9.app/Contents/MacOS/komodo built on Sat May 30 05:06:11 2015
[2015-07-23 15:01:36,112] [WARNING] koInitService: Unable to determine the current locale settings, defaulting to mac-roman
[2015-07-23 15:01:36,431] [WARNING] console-logger: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create (1) in resource://gre/modules/Preferences.jsm:381
[2015-07-23 15:01:36,431] [WARNING] console-logger: Bootstrapped manifest not allowed to use 'component' directive. (1) in file:///Applications/Komodo%20Edit%209.app/Contents/Resources/extensions/scope-files@activestate.com/components/component.manifest:1
[2015-07-23 15:01:36,431] [WARNING] console-logger: Bootstrapped manifest not allowed to use 'contract' directive. (1) in file:///Applications/Komodo%20Edit%209.app/Contents/Resources/extensions/scope-files@activestate.com/components/component.manifest:2
[2015-07-23 15:01:36,432] [WARNING] console-logger: Bootstrapped manifest not allowed to use 'interfaces' directive. (1) in file:///Applications/Komodo%20Edit%209.app/Contents/Resources/extensions/scope-files@activestate.com/components/component.manifest:3
[2015-07-23 15:01:36,474] [WARNING] root: ko.logging has been converted to a CommonJS module; use require("ko/logging") instead (since Komodo 9.0.0a1).
    @chrome://komodo/content/komodo.js:48:1

[2015-07-23 15:01:36,642] [WARNING] console-logger: Expected end of value but found 'solid'.  Error in parsing value for 'border-width'.  Declaration dropped. (1) in chrome://global/skin/global.css:2334
[2015-07-23 15:01:36,661] [WARNING] console-logger: Expected end of value but found 'solid'.  Error in parsing value for 'border-width'.  Declaration dropped. (1) in chrome://global/skin/global.css:2334
[2015-07-23 15:01:36,738] [WARNING] console-logger: Unknown property 'border-radius-top-left'.  Declaration dropped. (1) in less://commando/skin/commando.less:18
[2015-07-23 15:01:36,738] [WARNING] console-logger: Unknown property 'border-radius-top-right'.  Declaration dropped. (1) in less://commando/skin/commando.less:19
[2015-07-23 15:01:37,052] [ERROR] console-logger: bad script XDR magic number (0) in :0
Traceback (most recent call last):
  File "", line 0, in 

[2015-07-23 15:01:37,115] [WARNING] keybindings: [Meta+Shift+Down] was used for 'cmd_selectDocumentHome', overriding to use 'cmd_selectDocumentEnd'
[2015-07-23 15:01:38,661] [WARNING] koLanguageServiceBase.indenting: Found non-positive guess of 0 (min 1)
[2015-07-23 15:01:39,067] [WARNING] koLanguageServiceBase.indenting: Found non-positive guess of 0 (min 1)
[2015-07-23 15:01:39,258] [WARNING] koLanguageServiceBase.indenting: Found non-positive guess of 0 (min 1)
[2015-07-23 15:01:39,524] [WARNING] koLanguageServiceBase.indenting: Found non-positive guess of 0 (min 1)
[2015-07-23 15:01:39,657] [WARNING] koLanguageServiceBase.indenting: Found non-positive guess of 0 (min 1)
[2015-07-23 15:01:39,790] [WARNING] koLanguageServiceBase.indenting: Found non-positive guess of 0 (min 1)
[2015-07-23 15:01:40,065] [WARNING] koLanguageServiceBase.indenting: Found non-positive guess of 0 (min 1)
[2015-07-23 15:01:40,206] [WARNING] koLanguageServiceBase.indenting: Found non-positive guess of 0 (min 1)
[2015-07-23 15:01:40,386] [WARNING] koLanguageServiceBase.indenting: Found non-positive guess of 0 (min 1)
[2015-07-23 15:01:40,682] [WARNING] koLanguageServiceBase.indenting: Found non-positive guess of 0 (min 1)
[2015-07-23 15:01:40,818] [WARNING] koLanguageServiceBase.indenting: Found non-positive guess of 0 (min 1)
[2015-07-23 15:01:42,247] [WARNING] koLanguageServiceBase.indenting: Found non-positive guess of 0 (min 1)
[2015-07-23 15:01:43,797] [WARNING] root: ko.findresults was already loaded, re-creating it.

[2015-07-23 15:01:43,814] [DEBUG] places_js: waiting for document complete
[2015-07-23 15:01:45,939] [WARNING] console-logger: mutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create (1) in file:///Applications/Komodo%20Edit%209.app/Contents/Resources/components/koamAddonManager.js:138

You reproduced your issue there? Thats just a standard startup log far as I can tell. Which is possible if there isnt actually an error associated with your issue, just making sure.

Yes, the problem was re-produced with this. I input invalid PHP code and there was no syntax indicating the error.

Have you tried this?

I’d prefer not to reset my editor, I’ve done a lot of customization. But maybe that’s my problem. However, I have not done anything extraordinary, that was not done previously in 8.

Trying a clean profile does not reset your editor, it just launches Komodo with a temporary profile and tells us whether the issue is to do with your settings.

Ok, yes, it appears has to do with settings. I was able to do the clean profile and all seems to work properly. Then when I go back and launch using my settings, it does not work.

I’ve now tried to uninstall and re-install KE9 and it retains my settings and the problem persists. At this point I’d like to reset so it works properly. Can you help with that?

Before attempting a full reset I would recommend you try a partial reset.

You can find out how to locate your profile folder here:

https://community.activestate.com/faq/komodo-profile-structure

I would recommend you try and delete your doc-state.xmlc file while Komodo is not running to see if that resolves your issue. If not you could try backing up your profile folder, then removing it, then starting Komodo to have it generate again.

If you decide to reset your profile folder I would recommend copying back the following files from your backup, as they likely are not contributing to your issue and contain some of the changes in preferences you’ve made:

  • prefs.xml
  • schemes
  • toolbox.sqlite
  • tools

I have reason to believe the schemes folder may be the culprit, but I will try what you have said and keep you posted. Thanks.