Re: php55 extension to use __()?

2016-04-25 Thread Jim Hu
http://docs.phpmyadmin.net/en/latest/require.html#php

php5.5.0 or newer with session support. I'm wondering if this could have 
something to do with not having session support properly set up in my php.ini?

On Apr 25, 2016, at 11:35 AM, Russell Jones  
wrote:

> Just a hunch-- could it be that PHP7 defines it, but it does something other 
> than what phpmyadmin expects?
> 
> Russell
> 
> On 22/04/16 21:57, Jim Hu wrote:
>> Thanks, I should have provided more detail. The error I get is:
>> 
>> PHP Fatal error:  Call to undefined function __() in 
>> [path_removed]/libraries/sanitizing.lib.php on line 135
>> 
>> which suggests that the sanitizing.lib.php must be loading before 
>> libraries/sql-parser/src/common.php
>> 
>> But in common.php, the function definition is a fallback wrapped inside
>> 
>> if (!function_exists('__')) {
>> /**
>>  * Translates the given string.
>>  *
>>  * @param string $str String to be translated.
>>  *
>>  * @return string
>>  */
>> function __($str)
>> {
>> return $str;
>> }
>> }
>> 
>> So it never gets defined if php can handle __() from a predefined library. 
>> Which makes me think that there are two issues. 
>> 
>> - for MacPorts php, what do I need so that the function exists.
>> - for phpmyadmin devs, why common.php isn't loading first.
>> 
>> I'll try to find some support channel for phpmyadmin to submit the second. 
>> 
>> Jim
>> 
>> On Apr 22, 2016, at 3:34 PM, Brandon Allbery  wrote:
>> 
>>> On Fri, Apr 22, 2016 at 4:18 PM, Jim Hu  wrote:
>>> From what I can find online, __() is a shortcut for a translation function 
>>> used in internationalization.
>>> 
>>> What I am seeing is that in phpMyAdmin 4.6 this is not part of gettext but 
>>> is defined in sql-parser/src/common.php.
>>> 
>>> -- 
>>> brandon s allbery kf8nh   sine nomine associates
>>> allber...@gmail.com  ballb...@sinenomine.net
>>> unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net
>> 
>> 
>> 
>> ___
>> macports-users mailing list
>> macports-users@lists.macosforge.org
>> https://lists.macosforge.org/mailman/listinfo/macports-users
> 
> ___
> macports-users mailing list
> macports-users@lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/macports-users

=
Jim Hu
Professor
Dept. of Biochemistry and Biophysics
2128 TAMU
Texas A&M Univ.
College Station, TX 77843-2128
979-862-4054

___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users


Re: php55 extension to use __()?

2016-04-25 Thread Russell Jones
Just a hunch-- could it be that PHP7 defines it, but it does something 
other than what phpmyadmin expects?


Russell

On 22/04/16 21:57, Jim Hu wrote:

Thanks, I should have provided more detail. The error I get is:

PHP Fatal error:  Call to undefined function __() in
[path_removed]/libraries/sanitizing.lib.php on line 135


which suggests that the sanitizing.lib.php must be loading before 
libraries/sql-parser/src/common.php


But in common.php, the function definition is a fallback wrapped inside

if (!function_exists('__')) {
/**
 * Translates the given string.
 *
 * @param string $str String to be translated.
 *
 * @return string
 */
function __($str)
{
return $str;
}
}


So it never gets defined if php can handle __() from a predefined 
library. Which makes me think that there are two issues.


- for MacPorts php, what do I need so that the function exists.
- for phpmyadmin devs, why common.php isn't loading first.

I'll try to find some support channel for phpmyadmin to submit the 
second.


Jim

On Apr 22, 2016, at 3:34 PM, Brandon Allbery > wrote:


On Fri, Apr 22, 2016 at 4:18 PM, Jim Hu > wrote:
From what I can find online, __() is a shortcut for a translation 
function used in internationalization.


What I am seeing is that in phpMyAdmin 4.6 this is not part of 
gettext but is defined in sql-parser/src/common.php.


--
brandon s allbery kf8nh   sine nomine 
associates

allber...@gmail.com   ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad  http://sinenomine.net




___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users


___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users


Re: php55 extension to use __()?

2016-04-22 Thread Jim Hu
Thanks, I should have provided more detail. The error I get is:

PHP Fatal error:  Call to undefined function __() in 
[path_removed]/libraries/sanitizing.lib.php on line 135

which suggests that the sanitizing.lib.php must be loading before 
libraries/sql-parser/src/common.php

But in common.php, the function definition is a fallback wrapped inside

if (!function_exists('__')) {
/**
 * Translates the given string.
 *
 * @param string $str String to be translated.
 *
 * @return string
 */
function __($str)
{
return $str;
}
}

So it never gets defined if php can handle __() from a predefined library. 
Which makes me think that there are two issues. 

- for MacPorts php, what do I need so that the function exists.
- for phpmyadmin devs, why common.php isn't loading first.

I'll try to find some support channel for phpmyadmin to submit the second. 

Jim

On Apr 22, 2016, at 3:34 PM, Brandon Allbery  wrote:

> On Fri, Apr 22, 2016 at 4:18 PM, Jim Hu  wrote:
> From what I can find online, __() is a shortcut for a translation function 
> used in internationalization.
> 
> What I am seeing is that in phpMyAdmin 4.6 this is not part of gettext but is 
> defined in sql-parser/src/common.php.
> 
> -- 
> brandon s allbery kf8nh   sine nomine associates
> allber...@gmail.com  ballb...@sinenomine.net
> unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net

___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users


Re: php55 extension to use __()?

2016-04-22 Thread Brandon Allbery
On Fri, Apr 22, 2016 at 4:18 PM, Jim Hu  wrote:

> From what I can find online, __() is a shortcut for a translation function
> used in internationalization.


What I am seeing is that in phpMyAdmin 4.6 this is not part of gettext but
is defined in sql-parser/src/common.php.

-- 
brandon s allbery kf8nh   sine nomine associates
allber...@gmail.com  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonadhttp://sinenomine.net
___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users


php55 extension to use __()?

2016-04-22 Thread Jim Hu

Not ready to use php7, so I'm trying to install phpmyadmin 4.6 from a download. 
I get an error:

PHP Fatal error:  Call to undefined function __() in 
/Library/WebServer/Documents/phpMyAdmin-4.6.0-all-languages/libraries/sanitizing.lib.php
 on line 135


I can reproduced this error by making a minimal CLI script that calls the 
function.

>From what I can find online, __() is a shortcut for a translation function 
>used in internationalization.
I'm guessing that this is due to not having the appropriate php extension to 
use this. I tried installing php55-gettext and php55-intl to no avail. gettext 
allows me to call the single underscore function _() but not the double 
underscore version.

Thanks in advance,

Jim Hu
___
macports-users mailing list
macports-users@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-users