Skip to content
This repository has been archived by the owner on Oct 23, 2019. It is now read-only.

a lot of bugfixes #19

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

a lot of bugfixes #19

wants to merge 5 commits into from

Conversation

proff
Copy link
Contributor

@proff proff commented Sep 12, 2013

is_file: ArgumentException if path contains invalid chars
invalid encoding in urlencode/urldecode and dependenced functions
some ScriptContext survived if web.config contains handlers or async
code used (directly or indirectly)
ReferenceNull is error instead of warning
User error handler called when error reporting is disabled
wrong print_r output of the PhpBytes type
curl: support for CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST in
.net 4.5
curl_setopt: bug with int values
gd: imagecolorresolve, imagecolorsforindex implementation
gd: transparent gif color changed to black when load and save image
soap: many bugfixes and simple SoapServer implementation
xml_parse_into_struct: wrong result and bug with encoding
gzcompress NullReferenceException when data is null

is_file: ArgumentException if path contains invalid chars
invalid encoding in urlencode/urldecode and dependenced functions
some ScriptContext survived if web.config contains handlers or async
code used (directly or indirectly)
ReferenceNull is error instead of warning
User error handler called when error reporting is disabled
wrong print_r output of the PhpBytes type
curl: support for CURLOPT_SSL_VERIFYPEER and CURLOPT_SSL_VERIFYHOST in
.net 4.5
curl_setopt: bug with int values
gd: imagecolorresolve, imagecolorsforindex implementation
gd: transparent gif color changed to black when load and save image
soap: many bugfixes and simple SoapServer implementation
xml_parse_into_struct: wrong result and bug with encoding
gzcompress NullReferenceException when data is null
@proff
Copy link
Contributor Author

proff commented Sep 12, 2013

is CallContext is really needed in ScriptContext or this is legacy code? All CallContext data copied in another thread when async code is called (even safe at first sight HttpWebRequest.ServicePoint property using async code)

@proff
Copy link
Contributor Author

proff commented Sep 12, 2013

P.S. my implementation of a mcrypt functions using bouncycastle. Can Phalanger project use this library without any licensing or any other problems?

@jakubmisek
Copy link
Member

CallContext is used because of native extensions in "remote" mode (so e.g., Phalanger would run 64bit, and PHP extensions 32bit). This is very old stuff, and will be removed. We are aware of that (since ScriptContext.CurrentContext can be 100-times faster if we remove CallContext). Anyway on current thread, there is no copying, still it is slow.

The other thing is, ScriptContext should be "Fork"ed to be used on another thread! Otherwise you are going to manipulate with non-thread safe structures asynchronously. (ScriptContext is not thread safe, and locks{} would slow down runtime rapidly)

@jakubmisek
Copy link
Member

bouncycastle is released under an adaptation of MIT X11 license, Phalanger is released under GPLv2. This combination should be checked. All the components released in Phalanger package (not used during compiling of Phalanger project) must be compatible with GPLv2.

@@ -708,6 +708,9 @@ public static bool IsFile(string path)
{
StreamWrapper wrapper;

if (path.IndexOfAny(Path.GetInvalidPathChars()) >= 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this causes cloning of the array :-( maybe clone it for the first time into some private static property, and use that so we avoid cloning every time?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

change timestamp type to long
is_file/dir/readable/writable/executable: check for invalid path chars
and add chars caching
add pdb-only debug info mode
change configurations DeepCopy like Jakub suggested
revert memory leak fix from ScriptContext
wrong encoding in ScriptContext.RunApplication
add information about file and line in timeout error
curl: bug with password in url
soap: getLastRequestHeaders, getLastRequestHeaders and bugfixes
xml_parse_into_struct: accept xml in all types without conversions
iconv: bug when string converted from not PageEncoding
iconv/mbstring: support for encoding names in cp* format
@proff
Copy link
Contributor Author

proff commented Oct 31, 2013

i'm suggesting breaking change: change "debug" configuration parameter type to DebugMode (None, Pdb, Full)

TrackClientDisconnection
ScriptContext leak in previous execution_timed_out line info fix
Unbuffered output is not flushed when ScriptContext disposed
xml: hardcoded encoding
xml: Exception with invalid DTD
Exception thrown when flushing disconnected response with disabled
TrackClientDisconnection
ScriptContext leak in previous execution_timed_out line info fix
Unbuffered output is not flushed when ScriptContext disposed
xml: hardcoded encoding
xml: Exception with invalid DTD
iconv: bug when string converted from not PageEncoding
gd2: support for streams that don't support seek (http)
soap: bugs with yet another wsdl
@jakubmisek
Copy link
Member

Sorry this merge request is too big to be merged automatically. I can only subsequently reimplement some of your changes.

jakubmisek added a commit to peachpiecompiler/peachpie that referenced this pull request Mar 14, 2017
jakubmisek added a commit to peachpiecompiler/peachpie that referenced this pull request Mar 14, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants