Most PHP developers find it easiest to work with a running web server of their local machine. This allows you to test your work as you go, without having to upload it to a hosting environment. Therefore, it's suggested that at this point you install Apache, PHP, and (if you are using it), MySQL. This step is required if you plan to use the php debugger. Together this tools are often referred to as AMP (or AMPP if you include Perl as well as PHP).
XAMPP is a software bundle which includes everything you need to install Apache/MySQL/PHP/Perl in one go. It's available for Windows, Linux and Solaris. Particularly on a Windows machine, this is definitely the fastest way to get up and running with these tools, as someone else has done the integration and configuration work for you. Under linux, it may be a quick solution to set up, but will not be as easy to automatically maintain (or integrate with other packages) as if you installed these tools separately with your distribution's package management system (such as: apt, YaST, emerge, or up2date). This is covered in the next section.
To install XAMPP, visit Apachefriends. Select your operating system:
and then follow the simple installation instructions found on that page.
There are two different methods of installing XAMPP for Windows:
Method A: Installation with installer
Method B: “Installation” without installer
The advantage of method B is, that it doesn't do anything with the Windows registry, and you can have different versions of XAMPP (and so different versions of PHP) in parallel. This can be important if you have to test your PHP files with different versions of PHP 4 (or different versions of PHP 5).
![]() | Tip |
|---|---|
You can switch between PHP 4 and PHP 5 with php-switch.bat. | |
Assuming that you have installed XAMPP for Windows under C:\Program Files the default path of the “document root” is C:\Program Files\apachefriends\xampp\htdocs.
Per default this folder contains help and demo files from the XAMPP maintainers. That's what you see if you have started XAMPP and type “http://localhost” within your web browser.
So, when you want to write your own files (That's what we suppose, when you use PHPeclipse), you can either delete everything what is within C:\Program Files\apachefriends\xampp\htdocs, or you can set the “document root” to any other path by opening C:\Program Files\apachefriends\xampp\apache\conf\httpd.conf with an editor, search the line which starts with DocumentRoot and change the path to what you need.
The next section shows an additional way to point the webserver to different locations without changing the “document root”.
An additional way to let the web server know where to look for files is with the help of “Alias”. Just open the file C:\Program Files\apachefriends\xampp\apache\conf\httpd.conf with an editor and append for example[1]:
Alias /my_php_workspace "C:/Documents and Settings/Robert/workspace"
Assuming we have PHP files within the folder C:/Documents and Settings/Robert/workspace/MyFirstPHPProject e.g. index.php the URL to access this file would be http://localhost/my_php_workspace/MyFirstPHPProject/index.php.
![]() | Note |
|---|---|
The knowledge of where the “document root” is, or how we can change the “document root” or add aliases is a prerequisite when we want to successfully set up and work with PHPeclipse. | |
| Poster | Thread |
|---|---|
| dalong | Posted: 2006-11-16 08:00 Updated: 2006-11-16 08:00 |
Just popping in ![]() ![]() Joined: 2006-11-16 From: Posts: 2 |
very good!
I like here! ![]() |
|
|
|
| Poster | Thread |
|---|---|
| Mark_1900 | Posted: 2006-11-18 11:05 Updated: 2006-11-18 11:09 |
Just popping in ![]() ![]() Joined: 2006-11-18 From: Posts: 2 |
For an Alias I also had to add a Directory tag to the httpd.conf, otherwise I had permission problems accessing the files...
<br />
[code]
Alias /wiki "C:/Documents and Settings/Me/wiki"<br />
<Directory "C:/Documents and Settings/Me/wiki"><br />
Options Indexes MultiViews<br />
AllowOverride None<br />
Order allow,deny<br />
Allow from all<br />
</Directory><br />
[/code]<br />
Oh and all these editing tags seem broken!!
![]() |
| Poster | Thread |
|---|---|
| Mark_1900 | Posted: 2006-11-18 11:21 Updated: 2006-11-18 11:32 |
Just popping in ![]() ![]() Joined: 2006-11-18 From: Posts: 2 |
I want a debugger. I downloaded the latest XAMPP 1.5.4a and noticed that it comes with PHP 5.1.6 & PHP 4.4.4, and neither are supported. The debugger module only supports a subset of these major versions from 5.1.0 to 5.1.2 and 4.4.0 to 4.4.2 (http://dd.cron.ru/dbg/downloads.php). I think right at the beginning you should specify which versions to download to get a debugger Version "XAMPP 1.5.2" would be fine.
|
| Poster | Thread |
|---|---|
| huqilong | Posted: 2006-11-30 06:28 Updated: 2006-11-30 06:28 |
Just popping in ![]() ![]() Joined: 2006-11-16 From: Posts: 3 |
I want to know how to use phpeclipse with eclipse detailly!
|
| Poster | Thread |
|---|---|
| thierrybo | Posted: 2007-02-03 16:19 Updated: 2007-02-03 16:21 |
Just popping in ![]() ![]() Joined: 2007-02-03 From: Posts: 1 |
I do not agree with the suggested method 2:
Quote:
For example you have set up XAMPP and your “document root†path is the XAMPP default: ,then your appropriate workspace path should be one level less: |
| Poster | Thread |
|---|---|
| dafydd | Posted: 2007-04-03 06:01 Updated: 2007-04-03 06:01 |
Just popping in ![]() ![]() Joined: 2007-04-03 From: Posts: 2 |
Trying this out on a Mac. J2SE 1.5.0_07-164 installed. 1.5.0_06 is what's available on the download site. However, it would almost certainly be updated with Software Update.
|
| Poster | Thread |
|---|---|
| dafydd | Posted: 2007-04-06 01:00 Updated: 2007-04-06 01:00 |
Just popping in ![]() ![]() Joined: 2007-04-03 From: Posts: 2 |
Second question: How do we point the XAMPP start/stop buttons in the Eclipse toobar to where we put XAMPP?
dafydd |
| Poster | Thread |
|---|---|
| dysmas | Posted: 2007-08-04 14:18 Updated: 2007-08-04 14:18 |
Just popping in ![]() ![]() Joined: 2007-08-04 From: Posts: 1 |
Thanks hundred times for all the detailed explanations here !!
And especially for the note which explains why debugging a CLI application does not work in 1.1.8 version and only in 1.1.9. (wrong port, as I guessed, but I have been looking for this information for some hours before coming here). Unfortunately this 1.1.9 CVS version does not work in the last 3.2.0 Eclipse version I just got. Let us hope the stable version is going quickly. |
| Poster | Thread |
|---|---|
| Mercyful | Posted: 2007-09-10 14:46 Updated: 2007-09-10 14:46 |
Just popping in ![]() ![]() Joined: 2007-09-10 From: Posts: 1 |
I want using eclipse3.2 with php-plugin and for debugging i want using dbg.
I'm using xampp 1.6.3a with php 4.4.7. and php_dbg.dll-4.4.x After step by step installation http://docs.schuetzengau-freising.de/ ... =xo-002&file=ch01s05.html the debugger dbg will not work. When i called phpinfo() there is no section dbg shown. Who have any ideas? Thanks a lot! Regards Mercyful |
| Poster | Thread |
|---|---|
| keryx | Posted: 2007-09-26 22:59 Updated: 2007-09-26 22:59 |
Just popping in ![]() ![]() Joined: 2007-09-26 From: Posts: 1 |
A section about verrors should be nice. I get the following:
<terminated, exit value: 0>PHP C:\Program\PHP\php.exe : <path>/<fil>.php I've googled like crazy but to no avail. And yes - it does not stop at breakpoints and "variables" are empty. DBG is working: if (function_exists ("DebugBreak")) { DebugBreak (); echo "debugging started!<br />\n"; } Outputs "debugging started!" And DBG is reported on phpinfo(). |
| Poster | Thread |
|---|---|
| koski | Posted: 2007-10-19 03:55 Updated: 2007-10-19 03:55 |
Just popping in ![]() ![]() Joined: 2007-10-19 From: Posts: 1 |
Hi,
Seems that the mentioned link for cvs: http://phpeclipse.sourceforge.net/update/cvs is out of date or wrong. |
| Poster | Thread |
|---|---|
| andybruk | Posted: 2007-11-18 01:11 Updated: 2007-11-18 01:11 |
Just popping in ![]() ![]() Joined: 2007-11-18 From: Posts: 1 |
I've been searching for a PHP debugger for ages. This is the only one I can find that works perfectly, thanks very much for providing this documentation.<br /><br />I doubt if I could ever get it to work on Windows, but it works so well with Ubuntu Linux and Eclipse 3.1.<br />
|





![[Tip]](docs/en/xo-002/img/admon/tip.png)
![[Note]](docs/en/xo-002/img/admon/note.png)



