10000 Update PHP file paths. Small fixes. (#153) · github-cloud/circleci-docs@a84c712 · GitHub
[go: up one dir, main page]

Skip to content

Commit a84c712

Browse files
committed
Update PHP file paths. Small fixes. (circleci#153)
* Update PHP file paths. Small fixes. * Add clarification for Ubuntu 12.04.
1 parent 375ad0e commit a84c712

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

jekyll/_docs/language-php.md

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ categories: [languages]
66
description: Continuous Integration and Continuous Deployment with PHP
77
---
88

9-
Circle works seamlessly with all the tools and package managersthat
9+
CircleCI works seamlessly with all the tools and package managers that
1010
help PHP developers test and deploy their code. We can generally infer
1111
most of your dependencies and test commands, but we also provide custom
12-
configuration via a `circle.yml` checked into your repo's root directory.
12+
configuration via a `circle.yml` file checked into your repo's root directory.
13+
The examples here referring to PHP filepaths are for the Ubuntu 14.04 and newer
14+
images. This image is not default but can be choosen in Project Settings ->
15+
Build Environment. For Ubuntu 12.04, replace `/opt/circleci/php` with
16+
`~/.phpenv/versions` in the examples.
1317

14-
### Version
18+
## Version
1519

1620
We have many versions of PHP pre-installed on [Ubuntu 12.04]({{ site.baseurl }}/build-image-precise/#php) and [Ubuntu 14.04]({{ site.baseurl }}/build-image-trusty/#php) build images.
1721

@@ -20,13 +24,13 @@ If you don't want to use the default, you can specify your version in `circle.ym
2024
```
2125
machine:
2226
php:
23-
version: 5.5.11
27+
version: 7.0.4
2428
```
2529

2630
Please [contact us](mailto:sayhi@circleci.com)
2731
if you need a different version; we'll be happy to install it for you.
2832

29-
### Dependencies
33+
## Dependencies
3034

3135
Circle has the composer, pear, and pecl package managers installed.
3236
If we find a composer.json file, then we'll automatically run `composer install`.
@@ -47,7 +51,7 @@ You can also edit your PHP configuration from your `circle.yml`. For example, if
4751
```
4852
dependencies:
4953
pre:
50-
- cp config/custom.ini ~/.phpenv/versions/$(phpenv global)/etc/conf.d/
54+
- cp config/custom.ini /opt/circleci/php/$(phpenv global)/etc/conf.d/
5155
```
5256

5357
<span class='label label-info'>Note:</span>
@@ -60,7 +64,7 @@ a `.ini` file.
6064
```
6165
dependencies:
6266
pre:
63-
- echo "memory_limit = 64M" > ~/.phpenv/versions/$(phpenv global)/etc/conf.d/memory.ini
67+
- echo "memory_limit = 64M" > /opt/circleci/php/$(phpenv global)/etc/conf.d/memory.ini
6468
```
6569

6670
<span class='label label-info'>Note:</span>
@@ -72,7 +76,7 @@ We have pre-installed more than a dozen databases and queues,
7276
including PostgreSQL and MySQL. If needed, you have the option of
7377
[manually setting up your test database]({{site.baseurl}}/manually/#dependencies).
7478

75-
<h3 id="php-apache">Using the Apache Webserver</h3>
79+
## Using the Apache Webserver {#php-apache}
7680

7781
Apache2 is already installed on CircleCI containers but it needs to be
7882
configured to host your PHP application.
@@ -89,7 +93,7 @@ An example configuration that sets up Apache to serve the PHP site from
8993
Listen 8080
9094
9195
<VirtualHost *:8080>
92-
LoadModule php5_module /home/ubuntu/.phpenv/versions/PHP_VERSION/libexec/apache2/libphp5.so
96+
LoadModule php5_module /opt/circleci/php/PHP_VERSION/libexec/apache2/libphp5.so
9397
9498
DocumentRoot /home/ubuntu/MY-PROJECT/server-root
9599
ServerName host.example.com
@@ -113,7 +117,7 @@ dependencies:
113117
- sudo service apache2 restart
114118
```
115119

116-
### Testing
120+
## Testing
117121

118122
Circle always runs your tests on a fresh machine. If we find a `phpunit.xml` file in your repo, then we'll run `phpunit` for you. You can add custom test commands to the test section of your `circle.yml`:
119123

@@ -126,7 +130,7 @@ test:
126130
If you want CircleCI to show a test summary of your build see
127131
[Metadata collection in custom test steps for PHPUnit]({{ site.baseurl }}/test-metadata/#phpunit).
128132

129-
<h3 id="xdebug">Enable Xdebug</h3>
133+
## Enable Xdebug {#xdebug}
130134

131135
Xdebug is installed for all versions of PHP, but is disabled (for performance reasons) by
132136
default. It is simple to enable this tool by adding the following to your
@@ -135,17 +139,17 @@ default. It is simple to enable this tool by adding the following to your
135139
```
136140
dependencies:
137141
pre:
138-
- sed -i 's/^;//' ~/.phpenv/versions/$(phpenv global)/etc/conf.d/xdebug.ini
142+
- sed -i 's/^;//' /opt/circleci/php/$(phpenv global)/etc/conf.d/xdebug.ini
139143
```
140144

141-
### Deployment
145+
## Deployment
142146

143147
Circle offers first-class support for [deployment]({{site.baseurl}}/configuration/#deployment).
144148
When a build is green, Circle will deploy your project as directed
145149
in your `circle.yml` file. We can deploy to PaaS providers as well as to
146150
physical servers under your control.
147151

148-
### Troubleshooting for PHP
152+
## Troubleshooting for PHP
149153

150154
If you run into problems, check out our [PHP troubleshooting]({{site.baseurl}}/troubleshooting-php/)
151155
write-ups about these issues:

0 commit comments

Comments
 (0)
0