PHP completion not working Komodo Edit 8.5.3 Build 14067, platform macosx

When I make a new document for PHP and have not saved it, i seem to get good code completion for native PHP functions and my own code. But, whenever I work on a project file, I seem to get no PHP tooltips at all for either native PHP commands or my own code.

Here is the log file from when I try to use code completion:
[2014-07-13 08:14:40,160] [WARNING] koInitService: Unable to determine the current locale settings, defaulting to mac-roman
[2014-07-13 08:14:41,925] [DEBUG] places_js: waiting for document complete
[2014-07-13 08:14:44,687] [WARNING] root: ko.findresults was already loaded, re-creating it.

[2014-07-13 08:15:16,668] [ERROR] codeintel.oop.controller: error evaluating completions:
trigger: <Trigger ‘html-complete-tags-and-namespaces’ at 1>
log:

I am assuming the last log entry is some info about the cause of the problem and was generated after I tried typing a native command and using my won code.

I am using XAMPP.
Here is a screenshot of my project settings for PHP:

Many thanks if you can help. This problem is driving me nuts.

Leon Baird

Firstly I recommend you remove codeintel folder from /Users/<username>/Library/Application Support/Komodo[IDE|Edit]/<version> directory.
Secondary if first method doesn’t help - try to add default PHP folder to PHP Directories (I think in OSX PHP installed as default package, if not - download latest version of PHP (5.5.6 for you) from php.net).

Note if you want to follow @Defman21’s suggestion - Komodo needs to be shut down when you delete the codeintel folder.

Are you able to reproduce the issue on a small scale? eg. some baseline PHP code:

<?php
function helloWorld() { echo 'Hello World!'; }
hell|

does it autocomplete helloWorld?

:smiley: Cool end position of cursor :smile:

Hi,
many thanks. Sadly your suggestion did not change anything at the moment.
The autocomplete is working for the actual commands, but the problem I am having is that there are not tool tips appearing for PHP.
If I create a new document, and have not saved it, then I get tool tips for both standard PHP and my own code. However, when I am coding and I save my file into my project, I get no tooltips at all from the code completion. This means I have to keep referencing commands, including my own code, and it is driving me cray and slowing me down.
My project settings are IDENTICAL to Komodo’s settings. It just does not make sense.

Try adding the directory containing your PHP code to the Languages > PHP > PHP Directories (either on the project or global preferences) and then retry the completions.

If that still fails, check Help > Troubleshooting > View log file for errors.

The directory is already in the PHP Language settings. I am now getting no completions at all now, even for some commands, here is the log, which seems to have some information in, which usually it does not.

[2014-07-19 12:30:01,555] [WARNING] koInitService: Unable to determine the current locale settings, defaulting to mac-roman
[2014-07-19 12:30:03,948] [DEBUG] places_js: waiting for document complete
[2014-07-19 12:30:05,804] [WARNING] view.tabbed: Couldn’t re-open file: ‘/Users/leon/Desktop/cube.html’, it does not exist.
[2014-07-19 12:30:06,384] [WARNING] root: ko.findresults was already loaded, re-creating it.

[2014-07-19 12:30:53,849] [ERROR] codeintel.manager: error evaluating ‘style’ at builder-process-page.php#189
Traceback (most recent call last):
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/manager.py”, line 525, in run
eval_sess.eval(self)
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/tree.py”, line 310, in eval
self.pre_eval()
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/tree.py”, line 430, in pre_eval
self.curr_tree = self.buf.tree
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/citadel.py”, line 218, in tree
blob_from_lang = self.blob_from_lang
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/citadel.py”, line 200, in blob_from_lang
self._load_buf_data_once()
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/citadel.py”, line 141, in _load_buf_data_once
self._blob_from_lang_cache = self.mgr.db.get_buf_data(self)
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/database/database.py”, line 1065, in get_buf_data
return self._get_lang_zone(buf.lang).get_buf_data(buf)
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/database/multilanglib.py”, line 677, in get_buf_data
dbsubpath = join(dhash, blob_index[lang][blobname])
KeyError: ‘PHP’
[2014-07-19 12:30:53,870] [ERROR] codeintel.tree: Unexpected error with evaluator: ‘style’ at builder-process-page.php#189
Traceback (most recent call last):
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/tree.py”, line 328, in eval
defns = self.eval_defns()
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/tree_php.py”, line 345, in eval_defns
start_scoperef = self.get_start_scoperef()
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/tree.py”, line 296, in get_start_scoperef
blob = self.buf.blob_from_lang[self.trg.lang]
TypeError: ‘NoneType’ object has no attribute ‘getitem
[2014-07-19 12:31:30,347] [ERROR] codeintel.indexer: unexpected internal error in indexer: ignoring and continuing
Traceback (most recent call last):
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/indexer.py”, line 549, in run
self._iteration()
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/indexer.py”, line 616, in _iteration
buf.scan(mtime=request.mtime)
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/udl.py”, line 500, in scan
super(XMLParsingBufferMixin, self).scan(mtime, skip_scan_time_check)
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/citadel.py”, line 292, in scan
skip_scan_time_check=skip_scan_time_check)
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/database/database.py”, line 1079, in update_buf_data
skip_scan_time_check=skip_scan_time_check)
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/database/multilanglib.py”, line 933, in update_buf_data
dbfile = blob_index[lang][blobname]
KeyError: ‘PHP’
[2014-07-19 12:31:31,179] [ERROR] codeintel.tree: Unexpected error with evaluator: ‘fun’ at builder-process-page.php#297
Traceback (most recent call last):
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/tree.py”, line 314, in eval
cplns = self.eval_cplns()

more of the error log:

File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/tree_php.py”, line 201, in eval_cplns
start_scope = self.get_start_scoperef()
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/tree.py”, line 296, in get_start_scoperef
blob = self.buf.blob_from_lang[self.trg.lang]
TypeError: ‘NoneType’ object has no attribute ‘getitem
[2014-07-19 12:31:31,729] [ERROR] codeintel.indexer: unexpected internal error in indexer: ignoring and continuing
Traceback (most recent call last):
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/indexer.py”, line 549, in run
self._iteration()
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/indexer.py”, line 616, in _iteration
buf.scan(mtime=request.mtime)
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/udl.py”, line 500, in scan
super(XMLParsingBufferMixin, self).scan(mtime, skip_scan_time_check)
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/citadel.py”, line 293, in scan
self._load_buf_data_once(True)
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/citadel.py”, line 141, in _load_buf_data_once
self._blob_from_lang_cache = self.mgr.db.get_buf_data(self)
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/database/database.py”, line 1065, in get_buf_data
return self._get_lang_zone(buf.lang).get_buf_data(buf)
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/database/multilanglib.py”, line 677, in get_buf_data
dbsubpath = join(dhash, blob_index[lang][blobname])
KeyError: ‘PHP’

2014-07-19 12:33:45,073] [ERROR] codeintel.indexer: unexpected internal error in indexer: ignoring and continuing
Traceback (most recent call last):
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/indexer.py”, line 549, in run
self._iteration()
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/indexer.py”, line 616, in _iteration
buf.scan(mtime=request.mtime)
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/udl.py”, line 500, in scan
super(XMLParsingBufferMixin, self).scan(mtime, skip_scan_time_check)
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/citadel.py”, line 292, in scan
skip_scan_time_check=skip_scan_time_check)
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/database/database.py”, line 1079, in update_buf_data
skip_scan_time_check=skip_scan_time_check)
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/database/multilanglib.py”, line 933, in update_buf_data
dbfile = blob_index[lang][blobname]
KeyError: ‘PHP’
[2014-07-19 12:34:07,417] [ERROR] codeintel.indexer: unexpected internal error in indexer: ignoring and continuing
Traceback (most recent call last):
File “/Applications/Komodo Edit 8.app/Contents/MacOS/python/komodo/codeintel2/indexer.py”, line 549, in run
self._iteration()

Sorry for posting the entire error log, but hoping somebody can spot something, as I have this problem frequently with Komodo, and it is not limited to one setup on one machine.

I trimmed the log - as mostly the errors were repeating.

Please try resetting your code intelligence DB, as it looks like it may have been corrupted:
http://community.activestate.com/faq/codeintel-database-fix

After that, is it working properly?