You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've found these issues after trying to run the guestbook example with a different set of containers. The issues are located at the file kubernetes/examples/guestbook/php-redis/guestbook.php, on the following lines:
<?
set_include_path('.:/usr/local/lib/php');
Although the Guestbook example works on the container referenced in the example (gcr.io/google_samples/gb-frontend:v3), it exposes some bad practices that binds that code to the specific configuration of that particular container. If you try to run the same code with a different configuration, it will fail because of that.
Also, it sets a new include_path which binds the code to a specific directory configuration, and it's not required by default. Its default value will point to the PEAR packages directory, so it should be left untouched and everything should continue to work.
The text was updated successfully, but these errors were encountered:
We've found these issues after trying to run the guestbook example with a different set of containers. The issues are located at the file
kubernetes/examples/guestbook/php-redis/guestbook.php
, on the following lines:Although the Guestbook example works on the container referenced in the example (
gcr.io/google_samples/gb-frontend:v3
), it exposes some bad practices that binds that code to the specific configuration of that particular container. If you try to run the same code with a different configuration, it will fail because of that.First, it is using PHP short tags, which won't work if the short_tags is disabled on PHP's configuration. It should use
<?php
instead, which is the recommended approach. Some references at http://www.php-fig.org/psr/psr-1/ or http://pear.php.net/manual/en/standards.tags.phpAlso, it sets a new
include_path
which binds the code to a specific directory configuration, and it's not required by default. Its default value will point to the PEAR packages directory, so it should be left untouched and everything should continue to work.The text was updated successfully, but these errors were encountered: