Moved projects to NAS and testing server to virtual machine, now PhpStorm 7 stopped highlighting PHP internal functions

Hello everybody,

because I wanted to clean up my PC and improve my development environment, I have set up a virtual machine running Ubuntu Server as a LAMP server to replace my local XAMPP installation.
In the same act I moved my projects from a (stationary) USB hard drive to my NAS running a RAID setup, so I can acces my projects from my desktop PC and my laptop without having to manually copy them all the time and even more importantly for backup reasons.

In the virtual machine I mounted the network project folder to a folder inside /var/www, so the Apache server has direct access to the projects on the NAS. This is working like a charm, for example opening the URL "http://192.168.1.200/nas/myproject" in my browser does exactly the same as "http://localhost/myproject" has done before.

So to that point I was very happy with my restructuring. No local Apache server is consuming resources on my computer anymore when I'm not working, I have a Linux server running my scripts which is way closer to the actual production environment and my files reside safely on the RAID in my network.

But... the first drawback is that even though I have a high speed network with pretty much no difference in data access speed compared to the USB2.0 hard drive the projects have been stored on before, PhpStorm complains about the network drive. As I have already seen in the forums, thats a common issue and I just ignore that message, because I can't feel any difference.

The more important problem is, that PhpStorm (version 7 point something, the newest one, with pretty much default settings concerning GUI and code highlighting) now stopped highlighting PHP internal functions like for example strpos().
When pressing Ctrl whilst hovering over a function name, PhpStorm still displays that function's parameters and return value and by clicking on it PhpStorm still opens its internal declaration. Even code completion/hinting is still working for internal and also for user defined functions and classes, so it can't be a problem about PhpStorm not knowing about either the internal or the user defined objects.

But despite that, all internal functions are displayed in plain white. If I'm not mistaking they have been displayed in some sort of purple color and italic font before my restructuring (as I said, default code highlighting settings of the Darcula theme).
I also noticed that for example global variables in JavaScript that were highlighted the way described above are now plain white too. And yet, when clicking on one of those variables PhpStorm still knows where the variable has been declared.

So now I'm wondering why PhpStorm doesn't highlight the code anymore the way it did before my restructuring. Is it because of the files residing on a network drive? Or do I have to reconfigure some server/deployment settings in PhpStorm because of the new virtual machine instead of localhost? If it's because of the NAS, is there really no way to get the same functionality with remote files as there is with locally stored ones?

6 comments

It shouldn't be a problem. Can you provide the sample code to reproduce the issue?
Also try File | invalidate caches.

0

This is a good example for PHP, a hotfix right in our index.php to remove magic quotes:

<?php
if(get_magic_quotes_gpc())
{
    $process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST);
    while(list($key, $val) = each($process)) {
        foreach ($val as $k => $v) {
            unset($process[$key][$k]);
            if (is_array($v)) {
                $process[$key][stripslashes($k)] = $v;
                $process[] = &$process[$key][stripslashes($k)];
            } else {
                $process[$key][stripslashes($k)] = stripslashes($v);
            }
        }
    }
    unset($process);
}


If I am not mistaking, all PHP functions like get_magic_quotes_gpc(), is_array() etc. used to be highlighted before I moved the project files, but now they are all plain white.

0

Please show the screenshot of this fragment in your PhpStorm using Default color cheme.

0

I reopened my old local project just to compare it with the copy on the NAS and they are highlighted the same X-( So I checked the highlighting settings again, which indeed display "Predefined objects" in white... I am pretty sure though that the default PHP functions were not displayed in white before I moved the testing server from localhost to the virtual machine. May some deployment/server/environment settings have caused this? Or am I just wrong and it has always been white? ?:|
In the default color scheme the internal functions are indeed highlighted by italic font.

Also, in the js-screenshot (this time JavaScript), the global variable "dataTableConfig" is plain white (line 11) whereas the global variable "jQuery" (last line) is displayed differently. And if my brain is not totally messing with me, "dataTableConfig" has been displayed the same as "jQuery" before moving the files and server environment.



Attachment(s):
js.jpg
php.jpg
default.jpg
0

So .. it is just your editor color scheme and has nothing to do with moving projects.

I see exactly the same colors (using bundled Darcula color scheme) in both PhpStorm v7.1.3 and v8 EAP build 136.1768.

If you are unhappy with default colors just modify them yourself: "Settings | Editor | Colors & Fonts | PHP"

I'm not using Darcula myself so cannot comment if this was always like that or not (i.e. if scheme was recently modified and when it happened).

0

Bazzik schrieb:

[...]


I'm not using Darcula myself so cannot comment if this was always like that or not (i.e. if scheme was recently modified and when it happened).

Maybe it changed in an update and I just didnt notice before... and my brain played tricks on me. I guess we can nevermind this topic :8}

0

Please sign in to leave a comment.