Re: PHP extension 'gettext' doesn't work?


Hiroaki Ukaji <dt3snow.w@...>
 

Hi.
Thanks for your reply.

Yes, I also think the extension is loading in application container,
however, the function (which was able to be activated properly in a local
machine) perhaps doesn't work.
Anyway, I'm sorry about my less information. I'm trying to write details
again.

- what version of PHP are you using?
>>> we're using PHP-5.5.23
(php-buildpack version is v3.2.1, which is default in cf-release
v211. we're operating them on bosh-lite (tree:552dc68696), and using cf-cli
v6.12.0.).

- how are you enabling the extension: options.json or composer.json?
>>> by "PHP_EXTENSION" in .bp-config/options.json.

- what's the full output of `cf push`?
- what's the output of `cf logs` when you try to access a page that uses
`gettext`?
>>> please observe the following.

********** `cf push` **********
$ git clone https://github.com/nota-ja/php-gettext-example
$ cd php-gettext-example/
php-gettext-example$ cf push php-gettext-example
Creating app php-gettext-example in org ukaji / space default as ukaji...
OK

Creating route php-gettext-example.10.244.0.34.xip.io...
OK

Binding php-gettext-example.10.244.0.34.xip.io to php-gettext-example...
OK

Uploading php-gettext-example...
Uploading app files from: /home/ukaji/workspace/php-gettext-example
Uploading 2.8K, 9 files
Done uploading
OK

Starting app php-gettext-example in org ukaji / space default as ukaji...
-----> Downloaded app package (4.0K)
-------> Buildpack version 3.2.1
Installing HTTPD
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 1534k 100 1534k 0 0 226M 0 --:--:-- --:--:-- --:--:--
226M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/httpd/2.4.12/httpd-2.4.12.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 14682 100 14682 0 0 127M 0 --:--:-- --:--:-- --:--:--
127M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/httpd/2.4.12/httpd-mod_unixd-2.4.12.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 19969 100 19969 0 0 247M 0 --:--:-- --:--:-- --:--:--
247M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/httpd/2.4.12/httpd-mod_setenvif-2.4.12.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 137k 100 137k 0 0 514M 0 --:--:-- --:--:-- --:--:--
514M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/httpd/2.4.12/httpd-mod_proxy-2.4.12.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 16787 100 16787 0 0 70.5M 0 --:--:-- --:--:-- --:--:--
70.5M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/httpd/2.4.12/httpd-mod_dir-2.4.12.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 20550 100 20550 0 0 153M 0 --:--:-- --:--:-- --:--:--
153M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/httpd/2.4.12/httpd-mod_reqtimeout-2.4.12.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 42000 100 42000 0 0 157M 0 --:--:-- --:--:-- --:--:--
157M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/httpd/2.4.12/httpd-mod_log_config-2.4.12.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 28927 100 28927 0 0 153M 0 --:--:-- --:--:-- --:--:--
153M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/httpd/2.4.12/httpd-mod_authz_core-2.4.12.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 25276 100 25276 0 0 197M 0 --:--:-- --:--:-- --:--:--
197M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/httpd/2.4.12/httpd-mod_mime-2.4.12.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 31561 100 31561 0 0 202M 0 --:--:-- --:--:-- --:--:--
202M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/httpd/2.4.12/httpd-mod_proxy_fcgi-2.4.12.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 17805 100 17805 0 0 106M 0 --:--:-- --:--:-- --:--:--
106M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/httpd/2.4.12/httpd-mod_remoteip-2.4.12.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 13323 100 13323 0 0 186M 0 --:--:-- --:--:-- --:--:--
186M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/httpd/2.4.12/httpd-mod_env-2.4.12.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 72297 100 72297 0 0 341M 0 --:--:-- --:--:-- --:--:--
341M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/httpd/2.4.12/httpd-mod_mpm_event-2.4.12.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 82878 100 82878 0 0 429M 0 --:--:-- --:--:-- --:--:--
429M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/httpd/2.4.12/httpd-mod_rewrite-2.4.12.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 16145 100 16145 0 0 57.4M 0 --:--:-- --:--:-- --:--:--
57.4M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/httpd/2.4.12/httpd-mod_authz_host-2.4.12.tar.gz]
to [/tmp]
Installing PHP
PHP 5.5.23
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 5000k 100 5000k 0 0 449M 0 --:--:-- --:--:-- --:--:--
449M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/php/5.5.23/php-5.5.23.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 8640k 100 8640k 0 0 341M 0 --:--:-- --:--:-- --:--:--
341M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/php/5.5.23/php-fpm-5.5.23.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 18857 100 18857 0 0 105M 0 --:--:-- --:--:-- --:--:--
105M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/php/5.5.23/php-gettext-5.5.23.tar.gz]
to [/tmp]
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed
100 1046k 100 1046k 0 0 297M 0 --:--:-- --:--:-- --:--:--
427M
Downloaded
[https://pivotal-buildpacks.s3.amazonaws.com/php/binaries/trusty/php/5.5.23/php-mbstring-5.5.23.tar.gz]
to [/tmp]
Finished: [2015-09-30 02:14:06.118672]
-----> Uploading droplet (17M)

1 of 1 instances running

App started


OK

App php-gettext-example was started using this command `$HOME/.bp/bin/start`

Showing health and status for app php-gettext-example in org ukaji / space
default as ukaji...
OK

requested state: started
instances: 1/1
usage: 256M x 1 instances
urls: php-gettext-example.10.244.0.34.xip.io
last uploaded: Wed Sep 30 02:13:59 UTC 2015
stack: cflinuxfs2
buildpack: PHP

state since cpu memory disk
details
#0 running 2015-09-30 11:14:12 AM 0.0% 22.6M of 256M 0 of 1G
php-gettext-example$ curl php-gettext-example.10.244.0.34.xip.io
/home/vcap/app/htdocs/locale: hello-world
********************

********** `cf logs` when I access a page **********
curl
2015-09-30T11:15:28.79+0900 [RTR/0] OUT
php-gettext-example.10.244.0.34.xip.io - [30/09/2015:02:15:28 +0000] "GET /
HTTP/1.1" 200 0 46 "-" "curl/7.35.0" 10.0.2.15:56004
x_forwarded_for:"192.168.50.1, 10.0.2.15"
vcap_request_id:62553a95-d90f-462c-5059-5f66ea826e70
response_time:0.007372778 app_id:d3ec3374-9460-4206-b2e0-159ce37686a8
2015-09-30T11:15:28.79+0900 [App/0] OUT 02:15:28 httpd | 192.168.50.1
- - [30/Sep/2015:02:15:28 +0000] "GET / HTTP/1.1" 200 46
vcap_request_id=62553a95-d90f-462c-5059-5f66ea826e70 peer_addr=10.0.2.15

accessing from a browser(google chrome)
2015-09-30T11:16:40.76+0900 [RTR/0] OUT
php-gettext-example.10.244.0.34.xip.io - [30/09/2015:02:16:40 +0000] "GET /
HTTP/1.1" 200 0 46 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.42 Safari/537.36"
10.0.2.15:56760 x_forwarded_for:"192.168.50.1, 10.0.2.15"
vcap_request_id:96c67b24-dfb1-4dfe-7b23-e850ccc75e4b
response_time:0.008837383 app_id:d3ec3374-9460-4206-b2e0-159ce37686a8
2015-09-30T11:16:40.78+0900 [App/0] OUT 02:16:40 httpd | 192.168.50.1
- - [30/Sep/2015:02:16:40 +0000] "GET / HTTP/1.1" 200 46
vcap_request_id=96c67b24-dfb1-4dfe-7b23-e850ccc75e4b peer_addr=10.0.2.15
2015-09-30T11:16:40.87+0900 [RTR/0] OUT
php-gettext-example.10.244.0.34.xip.io - [30/09/2015:02:16:40 +0000] "GET
/favicon.ico HTTP/1.1" 404 0 209
"http://php-gettext-example.10.244.0.34.xip.io/" "Mozilla/5.0 (Macintosh;
Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/46.0.2490.42 Safari/537.36" 10.0.2.15:56760
x_forwarded_for:"192.168.50.1, 10.0.2.15"
vcap_request_id:34075545-f921-4597-6564-9249f7586a1b
response_time:0.004353567 app_id:d3ec3374-9460-4206-b2e0-159ce37686a8
2015-09-30T11:16:40.88+0900 [App/0] OUT 02:16:40 httpd | [Wed Sep 30
02:16:40.873592 2015] [core:info] [pid 46:tid 139946828056320] [client
192.168.50.1:41285] AH00128: File does not exist:
/home/vcap/app/htdocs/favicon.ico, referer:
http://php-gettext-example.10.244.0.34.xip.io/
2015-09-30T11:16:40.88+0900 [App/0] OUT 02:16:40 httpd | 192.168.50.1
- - [30/Sep/2015:02:16:40 +0000] "GET /favicon.ico HTTP/1.1" 404 209
vcap_request_id=34075545-f921-4597-6564-9249f7586a1b peer_addr=10.0.2.15
********************


I hope these answer your questions.

Thanks.

Hiroaki UKAJI




--
View this message in context: http://cf-dev.70369.x6.nabble.com/cf-dev-PHP-extension-gettext-doesn-t-work-tp1984p2000.html
Sent from the CF Dev mailing list archive at Nabble.com.

Join cf-dev@lists.cloudfoundry.org to automatically receive all group messages.