|
1 |
# Development of the EDIT Data Portal
|
|
2 |
|
|
3 |
*Mainly information on setting up the development environment for working with phpStorm.*
|
|
4 |
|
|
5 |
## Installing the drupal cdm_dataportal package
|
|
6 |
|
|
7 |
**NOTE**: Before starting with the installation, it is highly recommended that you read this chapter to the end. Since
|
|
8 |
the installation method for development environment differs in some details.
|
|
9 |
|
|
10 |
Follow the instructions in the [README.md](README.md) and make sure you are using the
|
|
11 |
Update - method 2](README.md##update---method-2), but respect the below recommended **2** deviations:
|
|
12 |
|
|
13 |
**1.**
|
|
14 |
|
|
15 |
For development you may want to choose different folder for installing the cdm-dataportal Drupal 7 project,
|
|
16 |
than suggested in the [README.md](README.md). You could, for example, replace the commands given in the
|
|
17 |
[Download & extract](README.md#download--extract) chapter by:
|
|
18 |
|
|
19 |
~~~
|
|
20 |
mkdir -p ~/workspace
|
|
21 |
cd ~/workspace
|
|
22 |
wget https://cybertaxonomy.eu/download/dataportal/stable/drupal-7-cdm-dataportal-5.23.0.tar.gz
|
|
23 |
~~~
|
|
24 |
|
|
25 |
... and continue in the README.md at the corresponding position.
|
|
26 |
Now, you will of course need to replace all `cd /var/www` commands by `cd ~/workspace` !!!
|
|
27 |
|
|
28 |
**2.**
|
|
29 |
|
|
30 |
In the chapter [Apache2 configuration](README.md#apache2-configuration) you will need to change the
|
|
31 |
`/etc/apache2/sites-available/` to adapt it to the different installation folder, and you also want to enable the
|
|
32 |
`AliasMatch` directive to be able to work with multiple sites in parallel:
|
|
33 |
|
|
34 |
Assuming your user-name is `andreas` and you have installed the cdm-dataportal Drupal 7 project in `/home/andreas/workspace/`
|
|
35 |
you will need to change three lines int the apache config file to. (Last line in no longer commented!).
|
|
36 |
|
|
37 |
~~~
|
|
38 |
DocumentRoot /home/andreas/workspace/drupal-7-cdm-dataportal/web
|
|
39 |
<Directory "/home/andreas/workspace/drupal-7-cdm-dataportal/web/">
|
|
40 |
AliasMatch ^/([^/]+)(.*) /home/andreas/workspace/drupal-7-cdm-dataportal/web/$2
|
|
41 |
~~~~
|
|
42 |
|
|
43 |
Once you have completed the installation, you might have created a new dataportal site to start with, or you have cloned
|
|
44 |
a site according to the instructions in developer wiki page
|
|
45 |
[On migrating Data Portal sites between servers](https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/CdmDataportalSiteMigration)
|
|
46 |
|
|
47 |
In case you have **problems** to get your dataportal site running please read the hints in the
|
|
48 |
[**troubleshooting**](https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/CdmDataportalSiteMigration##Troubleshooting)
|
|
49 |
section of above linked page.
|
|
50 |
|
|
51 |
## Install Xdebug
|
|
52 |
|
|
53 |
install Xdebug:
|
|
54 |
|
|
55 |
~~~
|
|
56 |
pecl install xdebug
|
|
57 |
~~~
|
|
58 |
|
|
59 |
at the end of the install-log, pecl shows something like:
|
|
60 |
|
|
61 |
~~~
|
|
62 |
Build process completed successfully
|
|
63 |
Installing '/usr/lib/php/20151012/xdebug.so'
|
|
64 |
install ok: channel://pecl.php.net/xdebug-2.6.0
|
|
65 |
configuration option "php_ini" is not set to php.ini location
|
|
66 |
You should add "zend_extension=/usr/lib/php/20151012/xdebug.so" to php.ini
|
|
67 |
~~~
|
|
68 |
|
|
69 |
add xdebug to the `php.ini`, e.g.: `/etc/php/7.4/apache2/php.ini` Use the `xdebug.so` installation location printed out
|
|
70 |
in by pecl.
|
|
71 |
|
|
72 |
~~~
|
|
73 |
zend_extension=/usr/lib/php/20151012/xdebug.so
|
|
74 |
xdebug.idekey=PHPSTORM
|
|
75 |
xdebug.remote_enable=1
|
|
76 |
xdebug.remote_port=9008
|
|
77 |
~~~
|
|
78 |
|
|
79 |
Restart apache to apply the settings
|
|
80 |
|
|
81 |
~~~
|
|
82 |
systemctl restart apache2
|
|
83 |
~~~
|
|
84 |
|
|
85 |
## PhpStorm
|
|
86 |
|
|
87 |
Workspace setup
|
documentation on developement