Coder Social home page Coder Social logo

serialized-php-parser's People

Contributors

khartnjava avatar

Watchers

 avatar

serialized-php-parser's Issues

Problem with integer and defect serialized strings.

What steps will reproduce the problem?
First Problem:
1. Using php 64bit to generate the serialized String.
2. Any Integer have the range of Java Long
Secound Problem:
1. If the serialized String is corrupted (undefined end).
2. The parser throws a java.lang.NumberFormatException or 
java.lang.StringIndexOutOfBoundsException


I made a patch with an extra exception SerializedPhpParserException. This 
exception will be thrown.
Also for the first case i change the integer scanner to return an long if the 
integer is out of integer range.

I hope the Patch can help you to improve the very nice parser :-)

Bye Michele


Original issue reported on code.google.com by [email protected] on 23 Nov 2011 at 5:10

Attachments:

Add maven-skript

Hi, the source works great for me.
What about adding a short maven build skript?
I´ve attached mine...

Original issue reported on code.google.com by [email protected] on 9 Jul 2012 at 9:53

Attachments:

NumberFormatException for large integers

What steps will reproduce the problem?
1. PHP seem to allow integers larger than 2,147,483,647, e.g.
"i:100010001804" (machine-dependend)
2. This will cause SerializedPhpParser.parseInt(SerializedPhpParser.java:196)
to throw a NumberFormatException.
3. Using a Long instead of Integer will solve this.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?
0.3

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 19 Jan 2009 at 4:18

Newline character isn't handled properly

This could be a problem with my application because the serialized string gets 
passed through a few steps before it gets to the parser itself, but I've got a 
string that has a newline characters in it. The character is (apparently) 2 
bytes long, but it's being treated as 1, so the parser fails to suck up the 
final X number of characters, which of course throws off the rest of the 
parser. My solution is to replace any newlines with a unused character before 
passing it to my application, then changing it back to a newline once it gets 
to the application, but this is not exactly the ideal solution. 

As far as I can tell, to reproduce the behavior, simply serialize a newline 
character. I'm not much help beyond that, because I'm not that familiar with 
character handling at such a low level.

Original issue reported on code.google.com by [email protected] on 8 Nov 2010 at 8:34

Error: java.lang.IllegalStateException: Encountered unknown type [}]

Hi, sorry for my english.))
I'am usinng serialized-php-parser-0.3 and have error when i am trying to parse 
the file in attach(3_Ser.txt).

this is the code


FileReader fr = new FileReader("C:\\3_Ser.txt");
            BufferedReader br  =new BufferedReader(fr);
            String str_Buffer= new String();
            String str_ForParse = new String();
            while((str_Buffer=br.readLine())!=null){
                str_ForParse+=str_Buffer;
            }

            Map results = (Map)new SerializedPhpParser(
                    str_ForParse, false).parse();

Original issue reported on code.google.com by [email protected] on 23 Jan 2011 at 9:15

Attachments:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.