Project

General

Profile

DeveloperEnvironmentSetup » History » Version 9

Andreas Kohlbecker, 04/15/2010 10:24 AM

1 1 Andreas Müller
This page wants to give help while setting up different development environments.
2
3
There may be other places in the wiki with this kind of information. If you find some please move them here.
4
5
6 5 Niels Hoffmann
If you are looking for instructions on how to set up a development and test environment for OS X, see wiki:DeveloperEnvironmentSetupOsX
7 4 Niels Hoffmann
8
9 3 Andreas Müller
{{>toc}}
10
11
12
13
14
# Eclipse
15
16
17 1 Andreas Müller
18
## Local dataportal development and test environment
19 5 Niels Hoffmann
20 1 Andreas Müller
21
22
1) Install Apache Server 2.2.x
23
24
25
2) Install PHP
26
27
28
2a) Include the path to libmysql.dll (e.g.: C:\Programme\php-5.2.6) into your Path 
29
30
31
2b) Try to run Apache server
32
33
34
35
36
3) Insert the following into the appache conf\httpd.conf file(below the LoadModule part at about Line 120) and adapt them accordingly:
37
38
39
      1. PHP modules
40
41
42
  1. php5
43
44
45
LoadModule php5_module "c:/Programme/php-5.2.6/php5apache2_2.dll"
46
47
48
1. configure the path to php.ini
49
50
51
PHPIniDir "c:/Programme/php-5.2.6/"
52
53
54
55
56 7 Francisco Revilla
4) Install PDT (PHP) plugin in elcipse from http://www.eclipse.org/pdt/ (I made it with the update http://download.eclipse.org/tools/pdt/updates/2.0/ because the version 2.2 does not work at 18.09.09)
57 1 Andreas Müller
58
59
60
5)Give the according rights to the eclipse project within  appache ..\conf\httpd.conf. E.g.:
61
62
 
63
<Directory "D:/eclipse_workspace/Drupal5">
64
65
66
	AllowOverride All
67
68
69
	Options Indexes
70
71
72
	Order allow,deny
73
74
75
	Allow from all
76
77
78
</Directory>
79
80
81
82
or use apache only localy by adding:
83
84
85
86
DocumentRoot "D:/eclipse_workspace/"
87
88
89 6 Andreas Kohlbecker
6)Add aliases for different projects to appache ..\conf\httpd.conf. E.g.:
90 1 Andreas Müller
91
92
93
    Alias "/drupal_test"     "D:/eclipse_workspace/Drupal5"
94
95
96
    Alias "/expertsdb"       "D:/eclipse_workspace/Drupal5"
97
98
99
    Alias "/drupal_demo"     "D:/eclipse_workspace/Drupal5"
100
101
102
    Alias "/cdm_dataportal"  "D:/eclipse_workspace/Drupal5"
103
104
105
    Alias "/drupal6"         "D:/eclipse_workspace/Drupal6"
106
107
108
109
110 6 Andreas Kohlbecker
7) Install run-jetty-run eclipse plugin from http://code.google.com/p/run-jetty-run/ ( includes Jetty server; compatible with eclipse 3.4.1 ) 
111 1 Andreas Müller
112
113
114
8) Download php_xdebug-xxx.dll from http://xdebug.org
115
116
117
Move php_xdebug-xxx.dll into your ..\PHP\ext folder
118
119
120
121
9) Add the following to your php.ini and adapt accordingly:
122
123
124
[xdebug]
125
126
127
zend_extension_ts=C:\Program Files\php-5.2.1\ext\php_xdebug-2.0.1-5.2.1.dll
128
129
130
xdebug.remote_enable=1
131
132
133
xdebug.remote_handler=dbgp
134
135
136
xdebug.remote_mode=req
137
138
139
xdebug.remote_port=9000
140
141
142
xdebug.remote_host=127.0.0.1
143
144
145
xdebug.remote_log=C:\Program Files\Apache Software Foundation\Apache2.2\logs\xdebug_remote.log
146
147
148
xdebug.profiler_enable = 0
149
150
151
xdebug.profiler_enable_trigger = 0
152
153
154
;     Type: integer, Default value: 0
155
156
157
;     When this setting is set to 1, you can trigger the generation of profiler files by using the XDEBUG_PROFILE GET/POST parameter. This will then write the profiler data to defined directory.
158
159
160
xdebug.profiler_output_dir = D:\tmp
161
162
163
; xdebug.profiler_output_name
164
165
166
;     Type: string, Default value: cachegrind.out.%p
167
168
169
;     This setting determines the name of the file that is used to dump traces into. The setting specifies the format with format specifiers, very similar to sprintf() and strftime(). There are several format specifiers that can be used to format the file name.
170 8 Andreas Kohlbecker
171
172
173
174
### Problems and Solutions
175
176
177 9 Andreas Kohlbecker
178
#### xdebug does not work within Eclipse/PDT. Starting the debug session is stuck at 57% with the message "waiting for XDebug session"
179 8 Andreas Kohlbecker
180
181
This as been observed under WinXP, where the Checkpoint VPN-1 SecureClient, is also using port 9000. Therefore Eclipse/PDT could never open port 9000 for communication with the xdebug server. Change the port of xdebug in your php.ini and in the eclipse settings