Strange Error when pass variable to PHP

I am passing the following variable from java to a php variable but I am getting an extra character. For example:
char c= ' " ';
String s1 = "Hello World";
String s2 = c+s1+c;When I pass s2 to a php varibale using URLEncoder.encode(s2) php prints out /"Hello World/" instead of "Hello World". Any idea why is that happening? I am using jdk 1.1 for Virtual Machine compatability reasons so the URLEncoder.encode get only one parameter .

Hello.
This could very well be a PHP related matter. Could you PLEASE include some of the PHP code that interact with this java code? It is pretty hard to guess how that goes.
If the PHP code were to contain backward slashes, like \"Hello world\" then the string might be just slash quoted. Printing out the string using (PHP code) stripslashes() will remove them.
.

Similar Messages

  • Getting error when passing variable to Matlab script

    Hi
    I am using LabVIEW 2013 Version 13.0f2 (32bit) and MATLAB R2014b (Version: 8.4.0.150421) in Windows 7 Professional  Version 6.1 (Build 7601: Service Pack 1).
    I am trying to pass measured data to a matlab script to plot but I get errors.
    I have made a small program to make the problem easyer to solve and I get this error
    Error 1050 occurred at LabVIEW:  Error occurred while executing script. Error message from server: ??? Reference to a cleared variable A.
    . in MatlabTest.vi
    I tried the solution mentioned in http://digital.ni.com/public.nsf/allkb/4475BC3CEB062C9586256D750058F14B though it was intended for an older version. This gave me this error instead
    Error 1048 occurred at LabVIEW:  LabVIEW failed to get variable from the script server. Server:"??? Undefined function or variable 'num'.
    " in MatlabTest.vi
    The problem occures when I try to access the input, in other words I can have inputs to my script as long as I do not use them.
    How can I solve this?
    Attachments:
    MatlabTest.vi ‏7 KB

    Thank you so very much.
    I shold of cours have realised that that was what happened but I always use the three clearing lines (close all, clear all, clc) in the beginning of a script to make sure that no old and irrelevant data corrupts my script and did not think about when the inputs were generated.
    Again, Thank you!

  • Strange error when Bootcamp attempts to create partition for Windows

    I get a strange error when I tell Bootcamp to create a partition for Windows. I get to the Create a Partition stage. I select 20GB for Windows leaving 91GB (39GB free) for OS X. I then click Partition and it gives me the following error
    *The disk cannot be partitioned because some files cannot be moved.*
    Back up the disk and use Disk Utility to format it as a single Mac OS Extended (Journaled) volume. Restore your information to the disk and try using Boot Camp Assistant again.
    My disk is formatted in Mac OS Extended (Journaled), I have closed all applications (besides Bootcamp Assistant) and I have even restarted and tried again to see if that might help. Nothing. I can't get it to partition. Any thoughts? Can I partition my disk manually through disk utility and then select it in Bootcamp?

    Hi,
    this gets asked at least a thousand times by now.
    Have a look at this thread for solution http://discussions.apple.com/thread.jspa?messageID=10540273&#10540273
    Regards
    Stefan

  • Error when passing URL from OLAP Universe to WebI

    Hi Experts,
    I am getting 'The Supplier XML is not valid' WebI error when passing a URL from OLAP Universe.
    URL example:
    '<a href="http://www.sap.com">web link</a>'
    I follow Universe Designer Guide:
    - typing above URL into Dimension Select statement
    - selecting Read As Hyperlink in Object Format.
    When I drop this dimension into Result Objects panel in WebI Query and run refresh  'The Supplier XML is not valid' pops up.
    What i am trying to achive is to create a pre-formatted as Hyperlink object (dimension) in WebI to make it available for a user to design ad-hoc reports.
    Please help
    Thanks

    Hi,
    Refer the below forum link for more information:
    Universe object format in Web Intelligence
    I guess you can do some changes in the format of Universe object and use it in Webi.
    -Noor.

  • I have a strange error when I close  a combobox:

    I have a strange error when I close a combobox:
    <mx:ComboBox
    id="currencyComboBox"
    prompt="Select Currency" dropdownStyleName="dropdown"
    labelField="currencyName"
    >
    <mx:close>
    <![CDATA[
    selectedItem = ComboBox(event.target).selectedItem;
    calculateCustomerData();
    ]]>
    </mx:close>
    <mx:change>
    <![CDATA[
    selectedItem = ComboBox(event.target).selectedItem;
    calculateCustomerData();
    ]]>
    </mx:change>
    </mx:ComboBox>
    RangeError: Index '7' specified is out of bounds.
    at
    mx.collections::ListCollectionView/getItemAt()[E:\dev\3.0.x\frameworks\projects\framework \src\mx\collections\ListCollectionView.as:422]
    This only occurs when its dataprovider is from a result event
    rather than its dataprovider from a predifined arraycollection.
    private function handleGetBanks(event:ResultEvent):void{
    bankResult = new ArrayCollection((event.result as
    ArrayCollection).source);
    currencyComboBox.dataProvider = event.result as
    ArrayCollection;
    rather than using the following as a dataprovider:
    <mx:ArrayCollection id="currencies">
    <mx:Object label="AED" />
    <mx:Object label="AUD" />
    <mx:Object label="CAD" />
    <mx:Object label="EUR" />
    <mx:Object label="NZD" />
    <mx:Object label="USD" />
    <mx:Object label="ZAR" />
    </mx:ArrayCollection>
    Can anyone see what the problem might be?

    Sorry my mistake, the change event was being called before
    the close event. Then I could debug and find the problem

  • Strange Error when previewing or publishing

    Hi Muse Family
    I am getting a very strange error when I publish to BC or when I go to preview in browser:
    "Adobe Muse has encountered an error.. blah blah"
    and then a very confusing:
    "There should not be such ID exists in the mapping"
    It forces Muse to close.
    I can't think of any significant step I took to cause this problem from when it was working.

    To enable the frequent release of new features within Muse, the team is always simultaneously working on many different improvements only some of which are completed and exposed in any given release. In the 2014.1 update some of the underlying code related to SVG support was unintentionally enabled. When copying and pasting from some versions of Adobe Illustrator (and other sources) the result may be an SVG vector graphic in Muse, rather than an image. While the SVG may appear to work in Design view, it can cause failures when exporting or publishing from Muse. This functionality will be disabled in an imminent dot release, 2014.1.1. We advise users to remove SVG content from their sites. Until 2014.1.1 is available, the graphics will need to be brought into Muse as .png, .jpg, .gif or .psd images using File > Place or Import, rather than Copy/Paste.
    Sorry for the inconvenience. SVG support will be fully implemented, tested and included in a future major update of Muse.
    Additional discussion in this thread <Re: I can paste vectors in muse now, it shows up in preview, and even in a browser preview, but not when I upload.>.

  • Strange error when trying to validate a business rule

    I get this strange error when I try to validate a business rule:
    Detail:Cannot calculate. Essbase Error(1200369): Error optimizing formula for [69972] (line 38): can not cross members from the same dimension
    The rule is:
    FIX (@RELATIVE("SG&A", 0))
    "69972" = (("60001" -> "C1130" -> "All Projects" -> "All Employees") + ("69971" -> "C1130" -> "All Projects" -> "All Employees")) * "SG&A % of C1130" -> "No Cost Center" -> "PNULL" -> "No Employee" * (("Headcount" -> "All Projects" -> "All Employees") - ("C1130"->"Headcount" -> "All Projects" -> "All Employees")) / (("Headcount" -> "SG&A" -> "All Projects" -> "All Employees") - ( "C1130"->"Headcount" -> "SG&A" -> "All Projects" -> "All Employees")) ;
    ENDFIX

    Error msg states that you have used crossdim operator with the member of same dim. Cross check again.
    EX:
    "C1130"->"Headcount" -> "SG&A" -> "All Projects" -> "All Employees"
    Are all of these members belong to different dimesions?

  • Cannot pass variables from PHP to actionscript 3.0

    I am using CS3 and I write the following code as to pass variable to flash from PHP
    Actionscript
    var myLoader:URLLoader = new URLLoader();
    myLoader.dataFormat = URLLoaderDataFormat.TEXT;
    var myRequest:URLRequest=new URLRequest("http://localhost/moodle/value.php");
    myLoader.load(myRequest);
    myLoader.addEventListener(Event.COMPLETE,onCompleteHandler);
    var myValue: String;
    function onCompleteHandler(e:Event):void{
              var myvariable: URLVariables = new URLVariables(e.target.data);
              myValue = myvariable.values;
                      trace(myValue);
    PHP file
    <?php
       echo ('values = 8');
    ?>
    But I always get the error and cannot get the values by using trace();
    Before i try to use "myLoader.dataFormat = URLLoaderDataFormat.VARIABLES;" I still get the same error.
    Error: Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs
              at Error$/throwError()
              at flash.net::URLVariables/decode()
              at flash.net::URLVariables$iinit()
              at flash.net::URLLoader/flash.net:URLLoader::onComplete()
    Can anyone help me?

    The error is fixed.The new version is like that
    Actionscript
    var myLoader:URLLoader = new URLLoader();
    myLoader.dataFormat = URLLoaderDataFormat.TEXT;
    var myRequest:URLRequest=new URLRequest("http://localhost/moodle/value.php");
    myLoader.load(myRequest);
    myLoader.addEventListener(Event.COMPLETE,onCompleteHandler);
    var myValue: String;
    function onCompleteHandler(e:Event):void{
              var myvariable: URLVariables = new URLVariables(e.target.data);
              myValue = myvariable.values;
                      trace(myValue);
    php file
    <?php
       echo "values=8";
    ?>
    The output finally is "null" in flash file. Why does it happen? It should give me 8 when I input trace(myValue);

  • A strange error when starting up Oracle database

    When I was starting up an Oracle DB instance on HP-UX B.11.23 U ia64 host, a strange error message was encountered as follows:
    ======================================================
    SQL*Plus: Release 9.2.0.8.0 - Production on Sat Sep 1 21:50:05 2007
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    SQL> Connected to an idle instance.
    SQL> ORACLE instance started.
    Total System Global Area 320290568 bytes
    Fixed Size 724744 bytes
    Variable Size 285212672 bytes
    Database Buffers 33554432 bytes
    Redo Buffers 798720 bytes
    Database mounted.
    ORA-01122: database file 11 failed verification check
    ORA-01110: data file 11: '/u01/CADDB/data/cwmlite01.dbf'
    ORA-01251: Unknown File Header Version read for file number 11
    SQL> Disconnected from Oracle9i Release 9.2.0.8.0 - 64bit Production
    JServer Release 9.2.0.8.0 - Production
    Database "GPRS" warm started.
    ======================================================
    To my surprise, the file /u01/CADDB/data/cwmlite01.dbf is a data file of the tablespace CWMLITE from another Oracle DB instance named "CADDB". Who can tell me why that? What is the purpose of the tablespace CWMLITE in a DB?

    Hm, what does this have to do with "Community Feedback and Suggestions"?
    Please move your post to a more apropriate forum such as General Database Discussions

  • Syntax error when adding variables in recordset (query)

    MySql,PHP,Dreamweaver,WindowsVista
    Hi I am receiving a syntax error: invalid quantifier ++ $orderNum;s*?> when adding two variables in the recordset (query) dialog box. I get the error when clicking OK.
    Here is what is entered:
    name: fieldname
    type: text
    default: -1
    runtime value: $_GET['Field']
    name: searchvalue
    type:text
    default: -1
    runtime value: $_GET['Search']
    Can anyone help with this?

    That's a completely separate issue. The error message is telling you that you have not defined the testing server correctly in the Site Definition dialog box.
    The Host directory field and URL prefix should both point to the same place, in other words, the root of your website. Host directory is the physical path, while URL prefix is the address you would put in a browser address bar.
    Select Site > Manage Sites. Select the name of the site, and click the Edit button. In the Site Definition dialog box, select the Advanced tab, and then choose Testing server from the Category list on the left.
    Depending on how your remote login works, Host directory should probably be public_html or just /. Use the same value as in the Remote server part of the Site Definition dialog box. The URL prefix should be http://gaylehansen.aisites.com/.

  • Sub Query Error When Passing Dynamic Parameter.

    Dear All, I need help for below query problem.
    I have try below query run no problem when pass a static Parameter into the query but it throw error once i have add in the dynamic parameter:-
    --Sales BatchNum Transaction
    SELECT T0.[ItemCode], T0.[ItemName], T0.[WhsCode], T0.[BatchNum], ISNULL(T4.[AvgPrice],0) AS 'Avg Price', SUM(T0.[Quantity]) AS 'Sales Quantity',
    (SELECT [Quantity] FROM [OIBT] T1 WHERE T1.[ItemCode] = T0.[ItemCode] AND T1.[WhsCode] = T0.[WhsCode] AND T1.[BatchNum]=T0.[BatchNum]) AS 'Stock OnHand'
    FROM [IBT1] T0 INNER JOIN [OITM] T2 ON T0.[ItemCode] = T2.[ItemCode]
                      INNER JOIN [OITB] T3 ON T2.[ItmsGrpCod] = T3.[ItmsGrpCod]
                      INNER JOIN [OITW] T4 ON T0.[ItemCode] = T4.[ItemCode] AND T0.[WhsCode] = T4.[WhsCode]
    WHERE T0.[BaseType] = [%0] AND T0.[DocDate] BETWEEN [%1] AND [%2] AND T3.[ItmsGrpNam] = [%3]
    GROUP BY T0.[ItemCode], T0.[ItemName], T0.[WhsCode], T0.[BatchNum], T4.[AvgPrice]
    --ORDER BY T0.[ItemCode]
    UNION ALL
    --No Sales Batch Transaction
    SELECT T4.[ItemCode], T4.[ItemName],T4.[WhsCode], T4.[BatchNum], ISNULL(T7.[AvgPrice],0) AS 'Avg Price', 0 AS 'Sales Quantity' ,SUM(T4.[Quantity])
    FROM [OIBT] T4 INNER JOIN [OITM] T5 ON T4.[ItemCode] = T5.[ItemCode]
                      INNER JOIN [OITB] T6 ON T5.[ItmsGrpCod] = T6.[ItmsGrpCod]
                      INNER JOIN [OITW] T7 ON T4.[ItemCode] = T7.[ItemCode] AND T4.[WhsCode] = T7.[WhsCode]
    WHERE NOT EXISTS
    ( SELECT T0.[ItemCode], T0.[ItemName], T0.[WhsCode], T0.[BatchNum], ISNULL(T5.[AvgPrice],0) AS 'Avg Price', SUM(T0.[Quantity]) AS 'Sales Quantity'
      FROM [IBT1] T0 INNER JOIN [OITM] T2 ON T0.[ItemCode] = T2.[ItemCode]
                        INNER JOIN [OITB] T3 ON T2.[ItmsGrpCod] = T3.[ItmsGrpCod]
                         INNER JOIN [OITW] T5 ON T0.[ItemCode] = T5.[ItemCode] AND T0.[WhsCode] = T5.[WhsCode]
      WHERE T0.[BaseType] = [%1] AND T0.[DocDate] BETWEEN [%1] AND [%2] AND T4.[ItemCode]=T0.[ItemCode] AND T4.[WhsCode]=T0.[WhsCode] AND T4.[BatchNum]=t0.[BatchNum] AND T3.[ItmsGrpNam] = [%3]
      GROUP BY T0.[ItemCode], T0.[ItemName], T0.[WhsCode], T0.[BatchNum],T5.[AvgPrice]
    AND T6.[ItmsGrpNam] = [%3]
    GROUP BY T4.[ItemCode], T4.[ItemName], T4.[WhsCode], T4.[BatchNum], T7.[AvgPrice]
    HAVING SUM(T4.[Quantity]) > 0
    ORDER BY 1, 2, 3, 5 DESC
    I think SAP Query Manager can support the sub-query, kindly advise how to solve or other alternative way to solve this issue.
    Thanks a lot.

    Dear  Thanga Raj K,
    From your solution i can get my expected result, only within your solution you miss out the @ in line 32 for ToDate variable.
    After i have added it, it working perfectly.
    Thanks once again.
    For other user References code(Corrected):-
    Declare @basetype as int
    Declare @FromDate as Datetime
    Declare @ToDate as Datetime
    Declare @ItemGroup as nvarchar(30)
    set @basetype = (select max(s0.BaseType) from IBT1 S0 where s0.BaseType = '[%0]')
    set @FromDate = (select min(S1.DocDate) from IBT1 S1 where S1.DocDate >= '[%1]')
    set @ToDate = (select max(S2.DocDate) from IBT1 S2 where S2.DocDate <= '[%2]')
    set @ItemGroup = (select max(S3.ItmsGrpNam) from OITB s3 where S3.ItmsGrpNam = '[%3]')
    --Sales BatchNum Transaction
    SELECT T0.ItemCode, T0.ItemName, T0.WhsCode, T0.BatchNum, ISNULL(T4.AvgPrice,0) AS 'Avg Price', SUM(T0.Quantity) AS 'Sales Quantity',
    (SELECT Quantity FROM OIBT T1 WHERE T1.ItemCode = T0.ItemCode AND T1.WhsCode = T0.WhsCode AND T1.BatchNum=T0.BatchNum) AS 'Stock OnHand'
    FROM IBT1 T0 INNER JOIN OITM T2 ON T0.ItemCode = T2.ItemCode
    INNER JOIN OITB T3 ON T2.ItmsGrpCod = T3.ItmsGrpCod
    INNER JOIN OITW T4 ON T0.ItemCode = T4.ItemCode AND T0.WhsCode = T4.WhsCode
    WHERE T0.BaseType = @basetype AND T0.DocDate BETWEEN @FromDate AND @ToDate AND T3.ItmsGrpNam = @ItemGroup
    GROUP BY T0.ItemCode, T0.ItemName, T0.WhsCode, T0.BatchNum, T4.AvgPrice
    --ORDER BY T0.ItemCode
    UNION ALL
    --No Sales Batch Transaction
    SELECT T4.ItemCode, T4.ItemName,T4.WhsCode, T4.BatchNum, ISNULL(T7.AvgPrice,0) AS 'Avg Price', 0 AS 'Sales Quantity' ,SUM(T4.Quantity)
    FROM OIBT T4 INNER JOIN OITM T5 ON T4.ItemCode = T5.ItemCode
    INNER JOIN OITB T6 ON T5.ItmsGrpCod = T6.ItmsGrpCod
    INNER JOIN OITW T7 ON T4.ItemCode = T7.ItemCode AND T4.WhsCode = T7.WhsCode
    WHERE NOT EXISTS
    (SELECT T0.ItemCode, T0.ItemName, T0.WhsCode, T0.BatchNum, ISNULL(T5.AvgPrice,0) AS 'Avg Price', SUM(T0.Quantity) AS 'Sales Quantity'
    FROM IBT1 T0 INNER JOIN OITM T2 ON T0.ItemCode = T2.ItemCode
    INNER JOIN OITB T3 ON T2.ItmsGrpCod = T3.ItmsGrpCod
    INNER JOIN OITW T5 ON T0.ItemCode = T5.ItemCode AND T0.WhsCode = T5.WhsCode
    WHERE T0.BaseType = @basetype AND T0.DocDate BETWEEN @FromDate AND @ToDate AND T4.ItemCode=T0.ItemCode AND T4.WhsCode=T0.WhsCode AND T4.BatchNum=t0.BatchNum AND T3.ItmsGrpNam = @ItemGroup
    GROUP BY T0.ItemCode, T0.ItemName, T0.WhsCode, T0.BatchNum,T5.AvgPrice
    AND T6.ItmsGrpNam = @ItemGroup
    GROUP BY T4.ItemCode, T4.ItemName, T4.WhsCode, T4.BatchNum, T7.AvgPrice
    HAVING SUM(T4.Quantity) > 0
    ORDER BY 1, 2, 3, 5 DESC

  • Meet with a strange error when starting up an Oracle DB instance

    When I was starting up an Oracle DB instance on HP-UX B.11.23 U ia64 host, a strange error message was encountered as follows:
    ======================================================
    SQL*Plus: Release 9.2.0.8.0 - Production on Sat Sep 1 21:50:05 2007
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    SQL> Connected to an idle instance.
    SQL> ORACLE instance started.
    Total System Global Area 320290568 bytes
    Fixed Size 724744 bytes
    Variable Size 285212672 bytes
    Database Buffers 33554432 bytes
    Redo Buffers 798720 bytes
    Database mounted.
    ORA-01122: database file 11 failed verification check
    ORA-01110: data file 11: '/u01/CADDB/data/cwmlite01.dbf'
    ORA-01251: Unknown File Header Version read for file number 11
    SQL> Disconnected from Oracle9i Release 9.2.0.8.0 - 64bit Production
    JServer Release 9.2.0.8.0 - Production
    Database "GPRS" warm started.
    ======================================================
    To my surprise, the file /u01/CADDB/data/cwmlite01.dbf is a data file of the tablespace CWMLITE from another Oracle DB instance named "CADDB". Who can tell me why that? What is the purpose of the tablespace CWMLITE in a DB?

    What I know is that CWMLITE is to do with OLAP. This tablespace is used to store OLAPSYS schema.
    <<To my surprise, the file /u01/CADDB/data/cwmlite01.dbf is a data file of the tablespace CWMLITE from another Oracle DB instance named "CADDB">>
    If the file doesn't belong to your database then it could be that you are using a wrong controlfile.

  • Strange behaviour when passing many input parameters to web service

    Hello!!!
    I developed a web service with 52 input parameters using tomcat+axis!
    While testing it in my development enviroment everything was working fine
    (LAN consisted of three windows 2000 server machines!!!)
    When i deployed it in my customer enviroment (VPN with 200 isdn connections) i get a very strange error:
    AxisFault
    faultCode: {http://xml.apache.org/axis/}HTTP
    faultSubcode:
    faultString: (0)null
    faultActor:
    faultNode:
    faultDetail:
    {}string: return code: 0
    (0)null
    when i used tcptracer in order to understand what is going on,
    I realised that the error occurs when the http request is more than 1350 bytes.
    Can someone explain this behaviour?
    thanks in advance!
    sarantos

    Hi Sarantos,
    I think, there is nothing wrong in the axis engine nor the http request limits as you said. I tried the same passing a 60 kb String as an argument to an operation , getting the results perfectly.
    So problem could be with the method capacity size of your implementation. (I think default it is 64kb)
    bye
    Charlie

  • Strange error when adding book on another book (LibraryEntitlementHelper?!)

    Hi,
    when I try to add book to another book with PortalCustomizationManager I get this strange error:
    java.lang.IllegalArgumentException: Argument [webAppName] to method [createResource] in class [com.bea.netuix.application.manager.entitlement
    s.LibraryEntitlementHelper] cannot have error/be [null].
    What the hell is LibraryEntitlementHelper and why google, bea edocs and bea portal javadoc knows nothing about it?

    How did you create the CustomizationContext when calling the method on the EJB.
    you need to make sure you pass in the ServletRequest. If you are calling this from outside a web container. you wil need to use a mock request or take a look at ExportImportManager.
    Chris Jolley
    Portal Architect

  • Passing variables from PHP to AS3

    I am trying to get variables retrieved from a MySQL database
    by a PHP script into my ActionScript 3.0. script. To test I have
    created a simple instance of dynamic text called date_txt, and put
    the AS3 code below into the actions layer:
    All I want to do now is replace the hardcoded date values
    with variables passed from the PHP script (also shown below).
    Can anyone suggest a VERY simple way of passing the PHP
    variables $tgt_year, $tgt_month and $tgt_day into the AS3 code and
    let me know what modifications I need to make to the PHP to make
    the variables available to Flash?
    Thanks, Will

    Hi dzedward,
    I tried the code you posted at
    http://forums.flashgods.org/viewtopic.php?f=41&t=98
    with a little problem. Why is it that the value from event.data
    after complete loading has the value of the entire script of PHP
    script?
    At first, I have this error:
    The markup in the document following the root element must be
    well-formed.
    I replace the following codes: ########
    XML.ignoreWhitespace = true;
    var theResult:XML = new XML(event.target.data);
    var lastName = theResult.client.lname;
    With this one: ########
    trace(event.target.data);
    and has this output: #########
    <?Php
    echo "<?xml version=\"1.0\"?><clients>";
    echo "<client><lname>test
    sdfsaf</lname></client>"
    echo "</clients>";
    ?>
    instead of this output: #########
    <client><lname>test
    sdfsaf</lname></client>
    Please help me out.
    Thank you

Maybe you are looking for