Results 1 to 4 of 4

Thread: PHP in Eclipse - Include Path

  1. #1

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    PHP in Eclipse - Include Path

    I got Apache, MySQL, PHP, PEAR and PHPUnit working on my local machine (I wanted to do things without xampp or wampserver). All fine (It seems!)

    Before all this I had xampp, and coded PHP in Eclipse (installed PDT).

    When I create a php page, and include "PHPUnit/Framework.php'" it finally work (because I never bothered with PEAR, I never bothered with include paths..that's working now).

    Running this file in my localhost works fine. No errors, and the whole include_path thing seems to work out fine as the files above can be found without error.

    But with the file open in Eclipse, doing a "Run As->PHP Script" return an error complaining the include cannot be found (and it state the path to be the path to the folder this script is in!).
    So I got a feeling the php eclipse pdt or whatever have it's own include path or something like that?
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

  2. #2

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: PHP in Eclipse - Include Path

    Oh wait, I got it.
    In PHP Perspective, right click the project->Include Path->Configure Include Path->Libraries->Add External Source Folder and add your include folder (in my case "D:\Apps\PHP\PEAR\pear" .. yeah I know, I made a mistake during installing and configuring things and got a pear folder inside a PEAR folder)

    That is the "normal" and only way?
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

  3. #3
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    Re: PHP in Eclipse - Include Path

    I've never used Eclipse, so I can't help you. however, after looking at their website, I may consider giving them a try, as I'm somewhat unhappy with my current editor. we'll see!

  4. #4

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: PHP in Eclipse - Include Path

    Bit of a hassle if you are new to it, but by now I use eclipse for java, php, html, css and the lot.
    Miss some minor things one take for granted (like Ctrl+Tab doing nothing) but it's pretty good though. (Coming from someone having used nearly every editor / ide out there I guess that means I vouch for it)
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width