This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 141236 - I18N - doing php/saas sample - it does not run ok in some asian locales
Summary: I18N - doing php/saas sample - it does not run ok in some asian locales
Status: RESOLVED INVALID
Alias: None
Product: php
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: Sun All
: P2 blocker (vote)
Assignee: Tomas Mysik
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2008-07-22 22:30 UTC by Ken Frank
Modified: 2008-09-25 08:33 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
php.ini (2.08 KB, text/plain)
2008-07-31 19:12 UTC, Ken Frank
Details
list of some /opt/coolstack dirs (4.37 KB, text/plain)
2008-08-01 15:26 UTC, Ken Frank
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ken Frank 2008-07-22 22:30:10 UTC
following the php/saas tutorial
on solaris, when in ja or zh locale (not the utf-8 versions of them) -
the project does not run, browser says it can't find a certain file
whereas in fr non utf-8 locale and en locale, it runs ok.

I realize at this point, I don't know if issue is one of web services
or php, but filing in php at this time since thats context of tutorial.



problem is:
> Have followed steps in tutorial;  am on solaris.
>> http://wiki.netbeans.org/SaaSPHPTutorial
>>
>> and the Http_Request and other pkgs are installed or were installed
>> and have restarted netbeans also.
>>
>> but on running the project get this in browser:
>>
>> Fatal error: Class 'HTTP_Request' not found in
/opt/coolstack/apache2/htdocs/PhpProject88/org_netbeans_saas/RestConnection.php on line 36
>>
>> line 36 of that file has
>> $this->req =& new HTTP_Request($this->url);
>>

below is email thread about it - as mentioned there, there is no project or file
name or path using multibyte, nor is nb installed where there is nor is project
dir nor htdocs dir have it in path.

and when using zh locale, I am using a non pseudo localized nb, so its not a matter
of some message translated that should not be.

I reviewed my entries of php.ini and even copied the HTTP dir to be under
php5/lib/php/PEAR (on coolstack solaris its capitalized)

but then found out the problem seems to happen in at least
solaris ja and zh locales (zh is not pseudo localized, so its not a pseudo
localization problem)

however does not happen in fr locale or even zh_CN.UTF-8 locale.

the project encoding is default utf-8 always.

but even when have project encoding of gb2312 and in zh locale,
for which gb2312 is default encoding, the problem happens.

There are no use of multibyte in project name, project path,
path to coolstack apache or php.


---> seems like some problem in at least asian locales - what code
is looking for the Request.php - is it the yahoo code, our nb code,
php or pear or apache ? maybe there is some clue there to see why
in certain locales it show the error ?

Ken


Ayub Khan wrote:
> Hi Ken,
>
> There could be 2 reasons
>
> 1. php.ini do not have pear in its include_path
>
> For example (on Mac OSX 10.5)
>
> Macintosh:etc ayubkhan$ pwd
> /Applications/xampp/etc
> Macintosh:etc ayubkhan$ grep pear php.ini
> ; A warning appears if the specified function is not defined, or if the
> ;***** Added by go-pear
> include_path=".:/Applications/xampp/xamppfiles/lib/php:/Applications/xampp/xamppfiles/lib/php/pear"
>
> 2. HTTP/Request.php not found
>
> Macintosh:pear ayubkhan$ pwd
> /Applications/xampp/xamppfiles/lib/php/pear
> Macintosh:pear ayubkhan$ ls HTTP/
> Request        Request.php
>
> Thanks
> Ayub
>
> Ken Frank wrote:
>> Have followed steps in tutorial;  am on solaris.
>> http://wiki.netbeans.org/SaaSPHPTutorial
>>
>> and the Http_Request and other pkgs are installed or were installed
>> and have restarted netbeans also.
>>
>> but on running the project get this in browser:
>>
>> Fatal error: Class 'HTTP_Request' not found in
/opt/coolstack/apache2/htdocs/PhpProject88/org_netbeans_saas/RestConnection.php on line 36
>>
>> line 36 of that file has
>> $this->req =& new HTTP_Request($this->url);
>>
>>
>> Are there some steps that might not have been done ok ?
>> won't be able to try on other platforms right now however but assuming
>> it would need to work on solaris also.
>>
>> Thanks - Ken
>>
>
Comment 1 Tomas Mysik 2008-07-25 10:41:26 UTC
>> Fatal error: Class 'HTTP_Request' not found in
/opt/coolstack/apache2/htdocs/PhpProject88/org_netbeans_saas/RestConnection.php on line 36
>>
>> line 36 of that file has
>> $this->req =& new HTTP_Request($this->url);

The error is clear - you don't include HTTP_Request class in your PHP script or do not have it on your PHP include 
path. If you exactly followed the tutorial, the bug is probably there.
Comment 2 Ken Frank 2008-07-25 18:22:22 UTC
reopening until can understand more about why closed as its not clear at all.

below mentions - The error is clear - you don't include HTTP_Request class in your PHP script or do not have it on your
PHP include 
path. If you exactly followed the tutorial, the bug is probably there.

but it is mentioned in script and on include path, and as mentioned in issue, it only happened
on some locales (one of them being not a pseudo localized situation)
thus if problem happens only in some situations, that does not seem like problem with what is mentioned above.

are you saying that there is a bug in tutorial if its followed exactly ?

ken.frank@sun.com
Comment 3 Tomas Mysik 2008-07-25 19:16:25 UTC
I will look at the tutorial but probably not now because it will be quite time-consuming (going through the tutorial, 
investigating why the error could happen).

But first - Ken, have you tried the tutorial on the same PC just somehow switching locale? If no, I would say that 
there's very like bug in your PHP/PEAR setup (as I wrote, the error clearly says that you are missing some file - it 
would be the same like in Java file with missing import - not related to IDE). But I will investigate more.

Marking as INCOMPLETE till the questions are answered. Thanks.
Comment 4 Ken Frank 2008-07-25 19:58:53 UTC
as mentioned in issue, am not on pc for this, on solaris 10.
Comment 5 Tomas Mysik 2008-07-25 20:30:43 UTC
Clarified - you have only one PHP environment and you are somehow changing locale in it - I will look at it.
Comment 6 Tomas Mysik 2008-07-28 08:56:10 UTC
Adding Marek to CC, he will look at the tutorial. Thanks a lot.
Comment 7 polan 2008-07-28 14:03:03 UTC
Before I start evaluating this, please confirm that you have php_http extension enabled in all cases.
Comment 8 Ken Frank 2008-07-28 14:58:19 UTC
what is php_http extension ? is it mentioned in tutorial or in php
docs about setup ?

in any case, what are the steps to enable it ?

ken.frank@sun.com
Comment 9 polan 2008-07-28 15:17:26 UTC
Sorry, my mistake - it seems that you should have Http_Request enabled through PEAR from the tutorial steps.
Could you please attach the output of the following command?:

pear list

There should be the Http_Request there.

We still don't know if you are running this on one machine and one OS, or using different machines and/or OSs for 
different locales.
Comment 10 Ken Frank 2008-07-28 15:41:31 UTC
here's the list from pear list

Installed packages, channel pear.php.net:
=========================================
Package          Version State
Archive_Tar      1.3.2   stable
Console_Getopt   1.2.3   stable
HTTP_Request     1.4.2   stable
Net_Socket       1.0.9   stable
Net_URL          1.0.15  stable
PEAR             1.7.1   stable
Structures_Graph 1.0.2   stable


as mentioned in this issue, am running on solaris 10 and under the locales
mentioned below.

ken.frank@sun.com


ken.frank@sun.com
Comment 11 Tomas Mysik 2008-07-31 15:22:12 UTC
Ken, could you please attach your php.ini file? The one which is used by Apache server. Thanks.
Comment 12 Tomas Mysik 2008-07-31 15:29:45 UTC
Ken, I went through the tutorial and - it _cannot_ be related to locale changes. Please, provide _exact_ steps to 
reproduce, otherwise I will close it as INVALID (look at my first comment to find out the reason). Thanks.
Comment 13 Ken Frank 2008-07-31 19:09:46 UTC
attached is php.ini file on solaris.
the include path has multiple entries since wanted to make sure things were covered.
the spelling of PEAR in all caps is correct since that is how it is on solaris.

I do need to do this on windows to compare.

ken.frank@sun.com
Comment 14 Ken Frank 2008-07-31 19:12:05 UTC
Created attachment 66209 [details]
php.ini
Comment 15 Ken Frank 2008-07-31 19:38:42 UTC
on pc its ok, using xamplite pkg

even though I don't see any output in the browser, there are no error msgs
like on some locales of solaris.

I have not added the new code to index.php to display it nicely since pasting
it in led to syntax errors, but the original code should work ok since it did on
solaris - its just that its not showing anything, or that using 0710 on windows
so perhaps that is it.

I still need to provide detailed steps on solaris.

ken.frank@sun.com
Comment 16 Tomas Mysik 2008-08-01 08:45:28 UTC
Ken, could you please attach output of the following commands? Thanks.

ls -l /opt/coolstack/php5/lib/php

ls -l /opt/coolstack/php5/bin/pear

ls -l /opt/coolstack/php5/lib/php/PEAR

ls -l /opt/coolstack/php5/lib/php/HTTP

ls -l /opt/coolstack/php5/lib/php/PEAR/HTTP
Comment 17 Ken Frank 2008-08-01 15:26:52 UTC
Created attachment 66322 [details]
list of some /opt/coolstack dirs
Comment 18 Ken Frank 2008-08-01 15:27:51 UTC
attached is solaris dir listing of certain php dirs as requested.

ken.frank@sun.com
Comment 19 Tomas Mysik 2008-08-03 22:16:28 UTC
Ken, could you please try this code (somewhere in the top of your script):

include_once("HTTP/Request.php");

Then try to run it and let me know whether there is some error on not. Thanks.
Comment 20 Ken Frank 2008-08-18 21:49:45 UTC
Ken, could you please try this code (somewhere in the top of your script):

include_once("HTTP/Request.php");

Then try to run it and let me know whether there is some error on not. Thanks.

==> yes, adding that line, it runs ok in ja locale
will remove the incomplete keywd.

ken.frank@sun.com
Comment 21 Tomas Mysik 2008-08-19 09:36:30 UTC
> ==> yes, adding that line, it runs ok in ja locale
> will remove the incomplete keywd.

That means that this issue has no relation to NetBeans so my very first comment in this issue was right.
Comment 22 Ken Frank 2008-09-24 17:18:41 UTC
does the line then need to be added to the sample code ? 
the include once ( ...) statement disucssed below since
only when that was included did it work when in other locale.

ken.frank@sun.com
Comment 23 Tomas Mysik 2008-09-24 21:05:37 UTC
No idea - you probably have to contact the author of the tutorial.
Comment 24 Ken Frank 2008-09-24 21:13:32 UTC
maybe I'm missing something here, but I assume since the bug seems to be  about that line being
needed ion code, but its not in the tutorial,  but yet its marked as invalid - am confused ---
is it that
the line is really not needed when running in other locales and I was doing
something else not correctly ?

but if the line is needed, then why is the issue invalid ?
Comment 25 Tomas Mysik 2008-09-24 22:15:53 UTC
This issue is invalid because there's nothing NB could help you with. I guess that:
- something wrong is in your PHP setup, or/and
- something wrong is in the code of the tutorial?
Comment 26 Ken Frank 2008-09-25 00:22:28 UTC
Tomas, I agree with you that it could be either of those 2 reasons.

 the reason I filed the issue under php category is that I viewed php sample project as a part of php overall -
if that is incorrect then can someone on php team let me know under what category this should be filed.

But if other things about php sample project would be viewed as being under php
category, then I think this one would be also.

ken.frank@sun.com
Comment 27 Ken Frank 2008-09-25 00:25:55 UTC
What I said in last comment is not correct; I was confusing the php sample project, air alliance,
which has its own issue related to i18n under php category, with this one - am sorry.

thus my question for this one, is the php/saas sample an official kind of sample for netbeans.org
and if so, what category should I change this issue to or is an issue even appropriate for
tutorials like this if from netbeans.org ?

ken.frank@sun.com
Comment 28 Tomas Mysik 2008-09-25 08:33:19 UTC
Aha, I understand now - I don't think that this tutorial belongs to the PHP component at all - I would guess Web 
Services? But as I wrote already, I don't know anything about it. You should probably ask Ayub Khan (you mentioned him 
in your first description).