Validation Error For date.default_longitude Negative Values

Follow

Applies To:

Zend Server 8.0.2 (and below)

Summary

When you wish to use Sunrise / Sunset calculations in your code, it is important to configure date.default_longitude and date.default_latitude actual values for your location.

With date.default_longitude, possible values are between -180 to 180, where Zend Server default validation will only accept positive numbers for this directive. As a result, you will not be able to insert a negative value using the Zend Server Admin UI or directly editing php.ini and trying to apply the changes in the Admin UI.

Workaround

1. Backup and Edit 'zend_extensions_map.json' on the following locations:

Linux / Mac: '/usr/local/zend/share/zend_extensions_map.json'

Windows: 'C:\Program Files (x86)\Zend\ZendServer\share\zend_extensions_map.json'

IBM i: '/usr/local/zendsvr6/share/zend_extensions_map.json'

2. Locate this section and modify the directive type to 8:

"date.default_longitude":{
                                "shortDescription":"Default value for longitude parameter",
                                "type":8,

3. Verify that you can insert a valid negative Longitude value in date.default_longitude for your server location.

Future resolution

There is an open bug which we will resolve for the next version of Zend Server.

Have more questions? Submit a request

Comments

Powered by Zendesk