Komodo Edit 8.x - PHP function arguments calltips not working

Hello there,

I am using Komodo Edit 8.5.3 and the arguments calltip for any PHP functions is not working at all. You can see my “Language -> PHP” settings in the attached screenshot. I’ve tried “/usr/bin/php” as well as the MAMP directory as interpreter.

I also checked the logs:

[2014-03-20 14:05:45,229] [WARNING] koInitService: Unable to determine the current locale settings, defaulting to mac-roman
[2014-03-20 14:05:47,022] [DEBUG] places_js: waiting for document complete
[2014-03-20 14:05:47,101] [WARNING] root: ko.findresults was already loaded, re-creating it.

I also enabled the “Enable automatic autocomplete […]” setting in the “Code intelligence” settings.

Screenshot of my settings: screenshot

I have tried everything I could find on the forums but I have hit a dead end now :confused:
I have tried Komodo 8.0, 8.5.3 and a nightly 8.5.4

What am I missing? What else can I try?

Please help… :confused:

Best regards
Eike

Can you clarify whether you are talking about native php functions or your own custom php functions?

From your screenshot I can tell there is at least one thing wrong - you are including your “bin” folder under “PHP directories”, whereas this setting is intended for folders that hold your PHP files, eg. a vendor folder with commonly used PHP libraries.

Another thing you should make sure of is that you are using your files from within a project context, so that Komodo knows the scope of your files. Have a look at the Projects screencast which better explains this topic.

Thank you for your reply.

The tooltips are working fine for my own custom functions. Its just not working for native php functions such as strpos(), array_sum() or whatever.

I have changed the settings to this now: screenshot

A very weird thing happens now… When i change the “Use the interpreter” settings from (for example) “Find on Path” to “/usr/bin/php” the tooltips are working for the currently running komodo application. After i close Komodo and re-open it, the tooltips arent working anymore. I then have to switch back to “Find on Path” and the tooltips are working again. And this is even -very- unreliable… Sometimes the tooltips are working after changing the settings - and sometimes they dont. I can say just one thing for sure: the tooltips are never shown when I launch komodo (before i change the settings).

I know this information is hard to work with :confused: But what else can I do / try?!

I also tried to replicate this within a project and the problem is the same.

Best regards
Eike

Have you tried defining your php.ini path, as the settings suggest?

Additionally, note that you can override these settings from a file or Project context (Projects > Properties). Make sure you don’t have different settings in there.

Finally, can you tell us what method you used to install PHP? Note that Mac OS comes bundled with PHP, which may be the version you are using. Though I am not aware of there being any issues with this version it may be worth trying to install and use PHP via homebrew or macports.

So… I have had some more time resolving my problem.

I have tried:

  • defining my php.ini path as the setting suggest
  • override the settings for the project
  • installing MAMP with different PHP versions (5.2.17, 5.3.28, 5.4.25, 5.5.10)

I am not using the built in php but rather the software “MAMP”. Its something like “XAMPP” (which you might know) but its for Mac OSX.

Whats also interesting: the tooltips arent even working for my own methods:
When im within a class and typing “$this->” then Komodo does show me the class methods and properties. After selecting a method “$this->myMethod(” it doesnt even show the tooltips for this method. Im getting no tooltips whatsoever. Not for the internal php functions and neither for my own functions.

What else can I try? :confused:

I’m a bit confused, you said earlier that tooltips “are” working for your own custom methods and are now saying they aren’t? Am I miss-understanding or did something change?

Are you using any overloading functionality from within your classes? (__call, __get, etc).

You are right - this seems to have changed while I tried to fix the problem.
And at the moment Komodo doesnt even show me the methods and properties when I type “$this->”

I have made a few screenshots:
Error message when typing “$this->”: http://www.directupload.net/file/d/3591/na8hfoan_png.htm
Error message when typing “$this->method(”: http://www.directupload.net/file/d/3591/lobjnxwu_png.htm

This also happens for an “empty” class with just one method. For example:

class MyClass
{
    public function myMethod( $myParam ) {}
}

Thank you for your continuing help.

Could you post your log file when this happens? Help > Troubleshooting > View Log File.

I have posted the complete log file (from yesterday till now) here: http://pastebin.com/r7nq04Wa

You can find one of the errors at line 1215.

Thank you

I just installed a fresh new Komodo IDE (have been using Komdo Edit since), created a project and I am facing the same problems: no calltips whatsoever.
Here is a fresh log file: http://pastebin.com/DJhUqPEf

Thank you

No news I guess? The log files dont help?

Best regards

@toddw could you have a look? I’m suspecting MAMP might not be playing nice with Komodo.

I didn’t see any significant errors in the log files.

Eiki, could you try resetting your codeintel database, as described here:
http://community.activestate.com/faq/codeintel-database-fix

and see if completions/calltips work after that - note that Komodo will take a minute or two after startup, to reset code intelligence and scan files.

Cheers,
Todd