sobota, 18 lipca 2009

Eclipse PDT "No completions available"

At the beginning make sure you have successfully added appropriate libraries directory in Project Properties (right click on project root -> Properties -> PHP Include Path (Libraries)). Eg. in case of Zend Framework assuming you extract archive to zf directory, the actual libraries(those in Zend directory) are in "library" subdirectory, thus that is exactly what we need to add to Libraries pane (should be displayed as follows: [path_toextracted_archive]/zf/library).

Sometimes even though you have properly added all libraries, auto-completion still seems does not work. What is the reason? I found that auto-completion tool is quite smart, and basically analyse the context the cursor is in. Context describes where precisely we are (inside class, inside method, just inside tags, etc. The completion engine works in computed context delivered to the user only available in that very context proposals.

Another important issue is that PHP as dynamic language is taught to deliver completion mechanism, especially for code written in "more dynamic" way. In many cases type of the expression can be known at runtime, thus not possible for IDE to know the type without deep analysis of entire application. PDT comes with support from PHPDoc blocks, where user can be told of the this particular method return type.

wtorek, 14 lipca 2009

home.pl - zakładanie skrzynki pocztowej w posiadanej domenie

Czynność wydałoby się banalna, a jednak w przypadku hostingu na home.pl okazało sie nie trywilne. A więc opiszmy na początek co tak właściwie chcemy uzykać:

Załóżmy, że posiadamy domenę mojawymazonadomena.pl. Ponadto posiadamy konto hostingowe na home.pl o nazwie mojekontohostingowe. No to skoro juz to mamy to chcili byśmy mieć adres pocztowy w naszej domenie, np. ja@mojawymazonadomena.pl.

Oto co należy zrobić:

  1. Zalogować sie na konto hostingowe, kliknąć zakładke "Dostępne usługi" -> konta pocztowe i ftp. Po czym na dole "Nowe konto".

  2. Wpisujemy nazwe konta(w naszym przypadku "ja") i dwukrotnie hasło.

  3. Następnie wylogowujemy się z konta hostingowego i logujemy do nowoutworzonego konta ja.mojekontohostingowe, z hasłem jakie podaliśmy uprzednio.

  4. Trafiamy na strone inicjalnej konfiguracji poczty - tu wybieramy Nazwe konta (Imie i Nazwisko) oraz pod jakim adresem ma funkcjonować (ja@mojawymazonadomena.pl)

  5. OK, teraz mozemy kliknąć ikonke poczty i cieszyc sie naszym nowym kontem.