xmlrpccom-ss-cvs Mailing List for PHP RPC
Brought to you by:
harryf,
simonwillison
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(50) |
Nov
|
Dec
|
---|
From: Harry F. <ha...@us...> - 2004-10-27 13:29:11
|
Update of /cvsroot/xmlrpccom/scriptserver/ScriptServer/js In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27548 Modified Files: serializer.js tophp.js Log Message: Modified to use the UTF-8 encoded strings, not just their length as before Index: serializer.js =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/ScriptServer/js/serializer.js,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** serializer.js 22 Sep 2004 14:03:28 -0000 1.3 --- serializer.js 27 Oct 2004 13:29:02 -0000 1.4 *************** *** 47,51 **** } ! return 's:'+utf8s.length+':"'+s+'";'; }, --- 47,51 ---- } ! return 's:'+utf8s.length+':"'+utf8s+'";'; }, Index: tophp.js =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/ScriptServer/js/tophp.js,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** tophp.js 22 Sep 2004 14:03:28 -0000 1.11 --- tophp.js 27 Oct 2004 13:29:02 -0000 1.12 *************** *** 42,46 **** } ! return 's:'+utf8s.length+':"'+s+'";'; }; Boolean.prototype.toPHP=function() { --- 42,46 ---- } ! return 's:'+utf8s.length+':"'+utf8s+'";'; }; Boolean.prototype.toPHP=function() { |
From: Harry F. <ha...@us...> - 2004-10-27 13:28:27
|
Update of /cvsroot/xmlrpccom/scriptserver/ScriptServer/js In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27318 Modified Files: get.js post.js rawpost.js Log Message: Add charset=UTF-8 to Content-Type headers plus switch from using escape() to encodeURIComponent() when building URLs Index: rawpost.js =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/ScriptServer/js/rawpost.js,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** rawpost.js 7 Oct 2004 08:52:16 -0000 1.11 --- rawpost.js 27 Oct 2004 13:28:18 -0000 1.12 *************** *** 79,83 **** } this.xmlhttp.setRequestHeader('Content-Length', this.post.length); ! this.xmlhttp.setRequestHeader('Content-Type','text/plain'); }, --- 79,83 ---- } this.xmlhttp.setRequestHeader('Content-Length', this.post.length); ! this.xmlhttp.setRequestHeader('Content-Type','text/plain; charset=UTF-8'); }, Index: post.js =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/ScriptServer/js/post.js,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** post.js 7 Oct 2004 08:52:16 -0000 1.11 --- post.js 27 Oct 2004 13:28:18 -0000 1.12 *************** *** 70,74 **** this.xmlhttp.setRequestHeader( 'Content-Type', ! 'application/x-www-form-urlencoded' ); this.xmlhttp.setRequestHeader('Content-Length', this.post.length); --- 70,74 ---- this.xmlhttp.setRequestHeader( 'Content-Type', ! 'application/x-www-form-urlencoded; charset=UTF-8' ); this.xmlhttp.setRequestHeader('Content-Length', this.post.length); *************** *** 92,98 **** post += sep + paramName + '='; if ( oSerializer ) { ! post += escape(oSerializer.serialize(this.params[paramName])); } else { ! post += escape(this.params[paramName].toPHP()); } } catch (e) { --- 92,98 ---- post += sep + paramName + '='; if ( oSerializer ) { ! post += encodeURIComponent(oSerializer.serialize(this.params[paramName])); } else { ! post += encodeURIComponent(this.params[paramName].toPHP()); } } catch (e) { Index: get.js =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/ScriptServer/js/get.js,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** get.js 7 Oct 2004 08:52:16 -0000 1.12 --- get.js 27 Oct 2004 13:28:18 -0000 1.13 *************** *** 86,92 **** uri += sep + paramName + '='; if ( oSerializer ) { ! uri += escape(oSerializer.serialize(this.params[paramName])); } else { ! uri += escape(this.params[paramName].toPHP()); } } catch (e) { --- 86,92 ---- uri += sep + paramName + '='; if ( oSerializer ) { ! uri += encodeURIComponent(oSerializer.serialize(this.params[paramName])); } else { ! uri += encodeURIComponent(this.params[paramName].toPHP()); } } catch (e) { |
From: Harry F. <ha...@us...> - 2004-10-27 13:25:05
|
Update of /cvsroot/xmlrpccom/scriptserver/ScriptServer/js In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26412 Modified Files: xmlhttp.js Log Message: Add Accept-Charset: UTF-8 header to all requests Index: xmlhttp.js =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/ScriptServer/js/xmlhttp.js,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** xmlhttp.js 7 Oct 2004 08:51:36 -0000 1.15 --- xmlhttp.js 27 Oct 2004 13:24:55 -0000 1.16 *************** *** 71,74 **** --- 71,75 ---- request.prepare(this.xmlhttp); request.send(); + this.xmlhttp.setRequestHeader('Accept-Charset','UTF-8'); if ( this.xmlhttp.status == 200 ) { *************** *** 109,112 **** --- 110,114 ---- request.type = 'async'; request.prepare(this.xmlhttp); + this.xmlhttp.setRequestHeader('Accept-Charset','UTF-8'); var self = this; |
From: Harry F. <ha...@us...> - 2004-10-12 13:29:22
|
Update of /cvsroot/xmlrpccom/scriptserver/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30251 Modified Files: autocomplete.php sfsearch.php Log Message: Set timeouts to give SF a chance Index: sfsearch.php =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/examples/sfsearch.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sfsearch.php 12 Oct 2004 12:50:41 -0000 1.3 --- sfsearch.php 12 Oct 2004 13:27:56 -0000 1.4 *************** *** 57,61 **** var s = new sfsearch(ProjectsHandler); ! s.timeout = 500; // Ignore timeouts s.clientErrorFunc = function(e) { --- 57,61 ---- var s = new sfsearch(ProjectsHandler); ! s.timeout = 3000; // Ignore timeouts s.clientErrorFunc = function(e) { Index: autocomplete.php =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/examples/autocomplete.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** autocomplete.php 12 Oct 2004 12:50:41 -0000 1.5 --- autocomplete.php 12 Oct 2004 13:27:56 -0000 1.6 *************** *** 65,69 **** // Set a timeout for responses which take too long ! a.timeout = 200; // Ignore timeouts --- 65,69 ---- // Set a timeout for responses which take too long ! a.timeout = 3000; // Ignore timeouts |
From: Harry F. <ha...@us...> - 2004-10-12 12:50:53
|
Update of /cvsroot/xmlrpccom/scriptserver/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22904 Modified Files: autocomplete.php sfsearch.php Log Message: Put error handling in the right place Index: sfsearch.php =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/examples/sfsearch.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sfsearch.php 12 Oct 2004 11:55:37 -0000 1.2 --- sfsearch.php 12 Oct 2004 12:50:41 -0000 1.3 *************** *** 58,71 **** var s = new sfsearch(ProjectsHandler); s.timeout = 500; - s.getprojects(input.value); - } - - var ProjectsHandler = { - getprojects: function(displayFunc) { - displayFunc(document.getElementById('results')); - }, - // Ignore timeouts ! getprojectsError: function(e) { if ( e.code == 1003 ) { // Ignore... --- 58,63 ---- var s = new sfsearch(ProjectsHandler); s.timeout = 500; // Ignore timeouts ! s.clientErrorFunc = function(e) { if ( e.code == 1003 ) { // Ignore... *************** *** 74,77 **** --- 66,76 ---- } } + s.getprojects(input.value); + } + + var ProjectsHandler = { + getprojects: function(displayFunc) { + displayFunc(document.getElementById('results')); + } } --> Index: autocomplete.php =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/examples/autocomplete.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** autocomplete.php 12 Oct 2004 11:48:45 -0000 1.4 --- autocomplete.php 12 Oct 2004 12:50:41 -0000 1.5 *************** *** 67,70 **** --- 67,79 ---- a.timeout = 200; + // Ignore timeouts + a.clientErrorFunc = function(e) { + if ( e.code == 1003 ) { + // Ignore... + } else { + alert(e); + } + } + // Call the remote method a.getword(input.value); *************** *** 84,97 **** input.value = result; input.setSelectionRange(this.lastLength, input.value.length); - }, - - // Ignore timeouts - getwordError: function(e) { - if ( e.code == 1003 ) { - // Ignore... - } else { - alert(e); - } } } --> --- 93,98 ---- input.value = result; input.setSelectionRange(this.lastLength, input.value.length); } + } --> |
From: Harry F. <ha...@us...> - 2004-10-12 12:46:45
|
Update of /cvsroot/xmlrpccom/scriptserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22238 Modified Files: README Log Message: Add link to mailing lists Index: README =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/README,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** README 12 Oct 2004 12:45:08 -0000 1.6 --- README 12 Oct 2004 12:46:34 -0000 1.7 *************** *** 5,8 **** --- 5,11 ---- Please report to http://sourceforge.net/tracker/?group_id=96178&atid=613914 + ***Mailing Lists*** + http://sourceforge.net/mail/?group_id=96178 + ***WARNING*** Note this is alpha code - APIs may change! |
From: Harry F. <ha...@us...> - 2004-10-12 12:45:22
|
Update of /cvsroot/xmlrpccom/scriptserver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21912 Modified Files: README TODO Log Message: Updates Index: README =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/README,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** README 15 Sep 2004 10:44:15 -0000 1.5 --- README 12 Oct 2004 12:45:08 -0000 1.6 *************** *** 91,93 **** ***Requirements*** PHP 4.2.0+ ! Javascript 1.2+ (?) and XmlHttpRequest (Mozilla, IE, Safari) --- 91,93 ---- ***Requirements*** PHP 4.2.0+ ! Javascript 1.5+ (?) and XmlHttpRequest (Mozilla, IE, Safari, Konqueror) Index: TODO =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/TODO,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** TODO 15 Sep 2004 10:20:37 -0000 1.7 --- TODO 12 Oct 2004 12:45:08 -0000 1.8 *************** *** 15,29 **** up when looping through properties. ! Status: partially done but not yet in use / tested - Implement mechanism for attaching loggers (and other stuff) to servers (observer?) - - Standardize error codes - - Status: partially - - - Allow for i18n error messages - - Implement alternative "network" mechanisms to XmlHttpRequest such as something using script src attribute. --- 15,24 ---- up when looping through properties. ! Status: partially done - serializer now implemented. Needs ! an equivalent for var_dump - Implement mechanism for attaching loggers (and other stuff) to servers (observer?) - Implement alternative "network" mechanisms to XmlHttpRequest such as something using script src attribute. *************** *** 35,38 **** --- 30,36 ---- - Explore / implement client/server authentication (sessions, HTTP digest) + Status: partially complete - example provided with HTTP Basic + auth + - Implement different types of server (alternatives to PostOffice) to allow different styles of RPC (REST?) *************** *** 45,48 **** --- 43,52 ---- Following things done (were TODO) + - (done 20041010) Allow for i18n error messages + + - (done 20041010) Standardize error codes + + Status: complete + - (done 20040910) Implement timeout for XmlHttpClient requests Note this is only supported for async requests - not possible for sync requests |
From: Harry F. <ha...@us...> - 2004-10-12 12:30:40
|
Update of /cvsroot/xmlrpccom/scriptserver/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19373 Modified Files: scriptserver.lyx Log Message: Remove remarks that Konqueror has XmlHttpRequest - seems to be false Index: scriptserver.lyx =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/docs/scriptserver.lyx,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** scriptserver.lyx 12 Oct 2004 12:25:38 -0000 1.4 --- scriptserver.lyx 12 Oct 2004 12:30:29 -0000 1.5 *************** *** 253,257 **** ). ! Support is also available in Safari on MAC OSX and and Konqueror \layout Standard --- 253,257 ---- ). ! Support is also available in Safari on MAC OSX. \layout Standard *************** *** 1784,1788 **** Tested with Firefox 9.x+ and Internet Explorer 6.x (should work with IE 5.x also). ! Should work with recent versions of Safari and Konqueror. Opera should be getting an XmlHttpRequest implementation any time now. \layout Subsubsection --- 1784,1788 ---- Tested with Firefox 9.x+ and Internet Explorer 6.x (should work with IE 5.x also). ! Should work with recent versions of Safari. Opera should be getting an XmlHttpRequest implementation any time now. \layout Subsubsection |
From: Harry F. <ha...@us...> - 2004-10-12 12:25:55
|
Update of /cvsroot/xmlrpccom/scriptserver/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18441 Modified Files: scriptserver.lyx Log Message: Further editing - added notes on changes to error handling Index: scriptserver.lyx =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/docs/scriptserver.lyx,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** scriptserver.lyx 25 Sep 2004 13:41:36 -0000 1.3 --- scriptserver.lyx 12 Oct 2004 12:25:38 -0000 1.4 *************** *** 37,41 **** position 1 inner_position 0 ! height "0" width "100col%" collapsed false --- 37,41 ---- position 1 inner_position 0 ! height "0pt" width "100col%" collapsed false *************** *** 143,146 **** --- 143,165 ---- the users web browser, while data can be fetched dynamically from a remote web server, in response to user events. + \layout Standard + + + \emph on + Note: + \emph default + this is not an XML-RPC implementation. + In fact it's completely XML-free. + See + \begin_inset LatexCommand \ref{sub:Hybrid} + + \end_inset + + and + \begin_inset LatexCommand \htmlurl[Keith on ScriptServer]{http://keithdevens.com/weblog/archive/2004/Oct/06/ScriptServer} + + \end_inset + + for details. \layout Subsection *************** *** 226,230 **** Firefox). This already accounts for 90%+ of browsers, based on sites publishing browser ! usage stats). Support in Opera should begin with v7.60+ and a workaround already exists, for Opera users with Java support (see --- 245,249 ---- Firefox). This already accounts for 90%+ of browsers, based on sites publishing browser ! usage stats. Support in Opera should begin with v7.60+ and a workaround already exists, for Opera users with Java support (see *************** *** 269,272 **** --- 288,294 ---- aspects of HTTP (e.g. caching, char-sets etc.). + Note: the XmlHttpRequest implementations used by Mozilla and IE are aware + of a users browser settings such as proxy servers; there's no need for + an application using XmlHttpRequest to worry about this. \layout Standard *************** *** 295,299 **** \end_inset ! : reference in the somewhere \layout Itemize --- 317,321 ---- \end_inset ! : reference in there somewhere \layout Itemize *************** *** 398,403 **** /> may also be usable, but haven't seen this done). The are differing variations on this approach but the all boil down to ! the same idea; manipulate the tag with JavaScript, varying the document ! it refers to. \layout Standard --- 420,424 ---- /> may also be usable, but haven't seen this done). The are differing variations on this approach but the all boil down to ! the same idea; manipulate the tag(s) with JavaScript to invoke remote requests. \layout Standard *************** *** 408,412 **** Most projects which have used this approach define a local, JavaScript callback ! function in the static document and have this triggered by the remote document as it loads, allowing a response to be passed asychronously to the calling client. --- 429,433 ---- Most projects which have used this approach define a local, JavaScript callback ! function in the static document and have this triggered by the remote document, as it loads, allowing a response to be passed asychronously to the calling client. *************** *** 420,424 **** \end_inset ! about the client, the content of the response it is expected to deliver. \layout Standard --- 441,446 ---- \end_inset ! about the client; the content of the response must contain Javascript which ! triggers the clients callback function. \layout Standard *************** *** 545,550 **** \layout Standard ! Breaking down the available approaches (and ignoring stuff like YAML and ! MIME-RPC) into loose categorization, they can be summarized as; \layout Subsubsection --- 567,581 ---- \layout Standard ! Breaking down the available approaches (and ignoring stuff like ! \begin_inset LatexCommand \htmlurl[YAML]{http://www.yaml.org/} ! ! \end_inset ! ! and ! \begin_inset LatexCommand \htmlurl[MIME-RPC]{http://www.mime-rpc.com/} ! ! \end_inset ! ! ) into loose categorization, they can be summarized as; \layout Subsubsection *************** *** 623,627 **** ). You could simply provide XML or even XHTML and manipulate it with DOM in ! JavaScript. This approach has been most successfully employed by \begin_inset LatexCommand \htmlurl[Amazon's REST API]{http://www.onlamp.com/pub/a/php/2003/10/30/amazon_rest.html} --- 654,663 ---- ). You could simply provide XML or even XHTML and manipulate it with DOM in ! JavaScript; XMLHttpRequest comes in very handy working this way - ! \begin_inset LatexCommand \htmlurl[Quick tip: XMLHttpRequest and innerHTML]{http://www.sitepoint.com/blog-post-view.php?id=185942} ! ! \end_inset ! ! . This approach has been most successfully employed by \begin_inset LatexCommand \htmlurl[Amazon's REST API]{http://www.onlamp.com/pub/a/php/2003/10/30/amazon_rest.html} *************** *** 629,633 **** \end_inset ! while a hybrid XHTML is used by \begin_inset LatexCommand \htmlurl[LiveSearch]{http://blog.bitflux.ch/archive/livesearch_got_keyboard_access.html} --- 665,669 ---- \end_inset ! while a hybrid form of XHTML is used by \begin_inset LatexCommand \htmlurl[LiveSearch]{http://blog.bitflux.ch/archive/livesearch_got_keyboard_access.html} *************** *** 653,659 **** \layout Standard ! In general XML is fine as a choice as a platform independent data format, ! but introduces processing overhead, particularily in some of the more complex ! encodings such as SOAP plus needs appropriate client / server implementations. \layout Standard --- 689,699 ---- \layout Standard ! In general XML is fine as a choice as a ! \emph on ! platform independent ! \emph default ! data format, but introduces processing overhead, particularily in some ! of the more complex encodings such as SOAP plus needs appropriate client ! / server implementations. \layout Standard *************** *** 671,679 **** \layout Subsubsection ! URL Encoding \layout Standard ! A more down to earth approach is to use what already works with HTTP, namely ! encoding the URL encoding (see \begin_inset LatexCommand \htmlurl[RFC 1738]{http://www.rfc-editor.org/rfc/rfc1738.txt} --- 711,720 ---- \layout Subsubsection ! URL Encoded (Requests) \layout Standard ! A more down to earth approach, when sending data from client to server, ! is to use what already works with HTTP, namely encoding the URL encoding ! (see \begin_inset LatexCommand \htmlurl[RFC 1738]{http://www.rfc-editor.org/rfc/rfc1738.txt} *************** *** 707,713 **** First this is (generally) a request-only encoding - what does the server respond with? Second, clients must be careful to escape values correctly ! (according to RFC 1738)? Finally there's the issue of how complex data ! structures, such as arrays and objects, are represented; although it's ! \emph on possible --- 748,754 ---- First this is (generally) a request-only encoding - what does the server respond with? Second, clients must be careful to escape values correctly ! (according to RFC 1738). ! Finally there's the issue of how complex data structures, such as arrays ! and objects, are represented; although it's \emph on possible *************** *** 718,721 **** --- 759,767 ---- \layout Subsubsection + + \begin_inset LatexCommand \label{sub:Hybrid} + + \end_inset + Hybrid \layout Standard *************** *** 785,789 **** \end_inset ! (for which a PHP definition exists). Future ScriptServer implementations may allow translations of JavaScript classes to PHP classes (e.g. --- 831,835 ---- \end_inset ! (for which a PHP definition is provided, server-side, by ScriptServer). Future ScriptServer implementations may allow translations of JavaScript classes to PHP classes (e.g. *************** *** 794,797 **** --- 840,847 ---- defined as JavaScript variables and wrapped in an anonymous function. The structure is provided as a string for use with JavaScripts eval() function. + For any other platform that Javascript in a web browser, exchanging data + as eval()able code would be a serious security risk but because we trust + the browser to execute Javascript securely (don't we ;)), ScriptServer + can get away with it. \layout Standard *************** *** 899,903 **** The reason for the anonymous function is to provide two stages of error ! checking. The call to eval() could fail if the server simply returned garbage (a server error). --- 949,955 ---- The reason for the anonymous function is to provide two stages of error ! checking as well as allowing the response payload to be assigned to a local ! variable (vs. ! creating new variables directly from the response). The call to eval() could fail if the server simply returned garbage (a server error). *************** *** 960,963 **** --- 1012,1026 ---- "); + \layout Standard + + In other words ScriptServer uses two encodings. + PHP byte stream format for client requests and evalable Javascript for + server responses. + At first glance it may seem strange to use two types of encoding but the + advantage is both formats have native parsers on the receiving end. + In general it's alot easier to generate some kind of encoded data than + it is to parse (consider how easy it is to generate HTML vs. + parsing HTML) it so avoiding writing custom parsers significantly reduces + coding effort (and bugs) and reduces performance overheads. \layout Subsection *************** *** 965,969 **** \layout Standard ! The remain areas of the \begin_inset Quotes sld \end_inset --- 1028,1032 ---- \layout Standard ! The remaining areas of the \begin_inset Quotes sld \end_inset *************** *** 973,977 **** \end_inset ! to consider are how a JavaScript client \begin_inset Quotes sld \end_inset --- 1036,1040 ---- \end_inset ! relate to how a JavaScript client \begin_inset Quotes sld \end_inset *************** *** 1156,1160 **** What's more, specific to PHP, is generating WSDL from a SOAP server is not as easy as it should be, WSDL being strongly typed and requiring an ! additional layer of description in PHP to translate to it. \layout Standard --- 1219,1223 ---- What's more, specific to PHP, is generating WSDL from a SOAP server is not as easy as it should be, WSDL being strongly typed and requiring an ! additional layer of (hand coded) description in PHP to translate to it. \layout Standard *************** *** 1200,1204 **** is used to generate a corresponding JavaScript client; an object providing methods with the same names / signatures as those on the server. ! The generated client primed to use the server, placing no requirement of the developer to manage the networking, data encoding etc. required to access the service. --- 1263,1267 ---- is used to generate a corresponding JavaScript client; an object providing methods with the same names / signatures as those on the server. ! The generated client primed to use the server, placing no requirement on the developer to manage the networking, data encoding etc. required to access the service. *************** *** 1300,1308 **** \end_inset ! ; not true XML but something which can be dropped directly into the user interface using minimal DOM manipulation. This certainly makes light work on the client side but requires, at least to an extent, some awareness on the server side of how the client will use the response. \layout Standard --- 1363,1375 ---- \end_inset ! ; not true XHTML but something which can be dropped directly into the user interface using minimal DOM manipulation. This certainly makes light work on the client side but requires, at least to an extent, some awareness on the server side of how the client will use the response. + That can quickly lead to violating the notions of seperation of concerns + and layering, meaning logic for the client side user interface gets mixed + up with server side application logic; in other words a mess which is difficult + to maintain. \layout Standard *************** *** 1342,1345 **** --- 1409,1416 ---- The downsides are it's Mozilla specific and RDF is, generally, not widely understood. + Also, the general sense I get of using RDF in Mozilla with an application + that's launch directly from a web site (vs. + locally installed) is it takes you into the greyer, undocumented areas + of Mozilla. \layout Standard *************** *** 1351,1355 **** \end_inset ! or DOM manipulation. While this can be painful, it should suit the \begin_inset LatexCommand \htmlurl[luddites]{http://en.wikipedia.org/wiki/Luddite} --- 1422,1426 ---- \end_inset ! ) or DOM manipulation. While this can be painful, it should suit the \begin_inset LatexCommand \htmlurl[luddites]{http://en.wikipedia.org/wiki/Luddite} *************** *** 1357,1361 **** \end_inset ! (like me). \layout Standard --- 1428,1432 ---- \end_inset ! (like me) and is well charted territory. \layout Standard *************** *** 1367,1373 **** \emph default to be contained in the response. ! This allows for some interesting possibilities (not yet explored) such ! as a response which contains a list of data as well as function definition ! which expects, say, an \begin_inset LatexCommand \htmlurl[HTMLSelectElement]{http://xulplanet.com/references/objref/HTMLSelectElement.html} --- 1438,1444 ---- \emph default to be contained in the response. ! This allows for some interesting possibilities such as a response which ! contains a list of data as well as function definition which expects, say, ! an \begin_inset LatexCommand \htmlurl[HTMLSelectElement]{http://xulplanet.com/references/objref/HTMLSelectElement.html} *************** *** 1382,1386 **** . Whether this constitutes correct seperation between client and server is ! a matter for debate. \layout Section --- 1453,1465 ---- . Whether this constitutes correct seperation between client and server is ! a matter for debate but an example is provided with ScriptServer in ! \begin_inset Quotes sld ! \end_inset ! ! sfsearch_server.php ! \begin_inset Quotes srd ! \end_inset ! ! . \layout Section *************** *** 1620,1623 **** --- 1699,1706 ---- \layout LyX-Code + <!-- Load the generated client side code... + --> + \layout LyX-Code + <script type='text/javascript' src='http://localhost/server.php?client'></script> \layout LyX-Code *************** *** 1690,1693 **** --- 1773,1791 ---- \layout Subsubsection + Requirements + \layout Itemize + + PHP: tested with PHP 4.1.2 up to 5.0.2 without problems. + No special requirements for ini settings and only needs the PCRE extension + which is usually on by default. + \layout Itemize + + Javascript: Needs a Javascript 1.5+ implementation plus XmlHttpRequest support. + Tested with Firefox 9.x+ and Internet Explorer 6.x (should work with IE 5.x + also). + Should work with recent versions of Safari and Konqueror. + Opera should be getting an XmlHttpRequest implementation any time now. + \layout Subsubsection + Loading the Library in PHP \layout Standard *************** *** 2234,2239 **** \layout Standard ! This may result is excessive numbers of objects (plus I've heard rumours ! of wierd bugs that start showing up). A smart approach might be to use a of pool clients - right now the API doesn't help you much with this unless you access --- 2332,2338 ---- \layout Standard ! This may result is excessive numbers of objects (plus I've heard stories ! of wierd bugs that start showing up when more than a certain number of ! XmlHttpRequest objects are in use). A smart approach might be to use a of pool clients - right now the API doesn't help you much with this unless you access *************** *** 2245,2249 **** \end_inset ! members but that should change later. \layout Standard --- 2344,2348 ---- \end_inset ! members but that should change in future. \layout Standard *************** *** 2553,2555 **** --- 2652,2860 ---- } + \layout Subsubsection + + Error Codes + \layout Standard + + The following error codes have been implemented in ScriptServer; + \layout LyX-Code + + [Client_Error] + \layout LyX-Code + + ; Client Errors (range 1000 - 1999) + \layout LyX-Code + + ; Range 1000 - 1199 is reserved - avoid using them in your code! + \layout LyX-Code + + 1000 = "Unable to create XmlHttpRequest: not supported" + \layout LyX-Code + + 1001 = "Call in progress. + XmlHttpClient cannot be until current request is completed" + \layout LyX-Code + + 1002 = "Invalid HTTP status code in server response: must by 200 OK" + \layout LyX-Code + + 1003 = "Request timed out: asychronous requests only" + \layout LyX-Code + + 1004 = "Invalid request parameter name: contains non-word characters - must + match [^A-Za-z0-9_]" + \layout LyX-Code + + 1005 = "Call type not defined: request.type must have value = 'async' || + 'sync'" + \layout LyX-Code + + 1006 = "Javascript to PHP serialization error e.g. + recursive references in data structure" + \layout LyX-Code + + 1007 = "Problem calling XmlHttpRequest.open() e.g. + permission denied to access URL in different domain" + \layout LyX-Code + + \layout LyX-Code + + [Server_Error] + \layout LyX-Code + + ; Server Errors (range 2000 - 2999): see ErrorHandler.php + \layout LyX-Code + + ; Range 2000 - 2199 is reserved - avoid using them in your code! + \layout LyX-Code + + 2000 = "Internal Server Error" ; Covers PHP E_NOTICE and E_WARNING messages + \layout LyX-Code + + 2001 = "Server Notice" ; Results from trigger_error() with E_USER_NOTICE + \layout LyX-Code + + 2002 = "Server Warning" ; Results from trigger_error() with E_USER_WARNING + \layout LyX-Code + + 2003 = "Server Error" ; Results from trigger_error() with E_USER_ERROR + \layout LyX-Code + + 2004 = "Internal Server Alert" ; From E_STRICT errors in PHP5 + \layout LyX-Code + + 2005 = "Internal Server Exception" ; Uncaught PHP5 exception + \layout LyX-Code + + 2006 = "Junk from server. + Response not well formed"; Javascript eval() failed - note e.response contains + what was evaled + \layout LyX-Code + + \layout LyX-Code + + [Application_Error] + \layout LyX-Code + + ;Application Errors (range 3000+) - nothing reserved + \layout Standard + + These can be found in the file ScriptServer/errors/errors.en.ini. + The codes are + \begin_inset Quotes sld + \end_inset + + attached + \begin_inset Quotes srd + \end_inset + + to exceptions using the property Error.code e.g.; + \layout LyX-Code + + var m = new math(MathHandler); + \layout LyX-Code + + m.timeout = 200; + \layout LyX-Code + + m.clientErrorFunc = function(e) { + \layout LyX-Code + + if ( e.code == 1003 ) { + \layout LyX-Code + + // Ignore this because it's a timeout + \layout LyX-Code + + } + \layout LyX-Code + + } + \layout Standard + + For some errors, further properties are used to return useful information + for troubleshooting. + For example error code 1002 (invalid HTTP status) adds the property .headers + to the exception, which contains all the HTTP response headers received + from the server. + Also error code 2006 adds a property .response which contains the text response + body from the server. + \layout Standard + + If you wish to implement your own errors codes, typically these will be + in the 3000+ range (application errors). + It's a good idea to use error codes as it allows the client side to respond + accurately to different problems it may encounter plus allows delivery + of localised error messages in languages other than English (see below). + The ranges 1000-1199 and 2000-2199 are reserved as possible future ScriptServer + error codes (avoid defining them in your own code). + \layout Subsubsection* + + Localised Error Messages + \layout Standard + + As a basic mechanism to allow localised error messages to be displayed to + users, the ScriptServer_Renderer class provides the method addErrorReader() + which generates a client side Javascript function called ScriptServer_ErrorRead + er, containing a dictionary of error codes and their messages. + The error codes are read, server side, from a file parallel to the errors.en.ini + file (currently there are no translations). + In principle this could be used like; + \layout Standard + + Server Side: + \layout LyX-Code + + <?php + \layout LyX-Code + + //... + \layout LyX-Code + + require_once SCRIPT_SERVER . + 'Renderer.php'; + \layout LyX-Code + + $R = & new ScriptServer_Renderer(); + \layout LyX-Code + + \layout LyX-Code + + // Note this function accepts a second argument; a hash + \layout LyX-Code + + // of application errors - see the source + \layout LyX-Code + + $R->addErrorReader('de'); // Load the German error messages + \layout LyX-Code + + \layout LyX-Code + + $R->render(); + \layout LyX-Code + + ?> + \layout Standard + + On the client side the generated ScriptServer_ErrorReader function could + be used like; + \layout LyX-Code + + var MathHandler = { + \layout LyX-Code + + divideError: function(e) { + \layout LyX-Code + + // Display the German error message + \layout LyX-Code + + alert( ScriptServer_ErrorReader(e.code) ); + \layout LyX-Code + + } + \layout LyX-Code + + } \the_end |
From: Harry F. <ha...@us...> - 2004-10-12 11:55:49
|
Update of /cvsroot/xmlrpccom/scriptserver/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11449 Modified Files: sfsearch.php sfsearch_server.php Log Message: More tweaking Index: sfsearch.php =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/examples/sfsearch.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sfsearch.php 9 Oct 2004 23:29:12 -0000 1.1 --- sfsearch.php 12 Oct 2004 11:55:37 -0000 1.2 *************** *** 57,60 **** --- 57,61 ---- var s = new sfsearch(ProjectsHandler); + s.timeout = 500; s.getprojects(input.value); } *************** *** 63,66 **** --- 64,76 ---- getprojects: function(displayFunc) { displayFunc(document.getElementById('results')); + }, + + // Ignore timeouts + getprojectsError: function(e) { + if ( e.code == 1003 ) { + // Ignore... + } else { + alert(e); + } } } *************** *** 71,75 **** <h1> Sourceforge Project Search </h1> <form id="projectForm"> ! Enter a Sourceforge Project Name (Unix style): <input type="text" value="" onkeyup="getProjects(this,event);"> </form> <p id="results"></p> --- 81,85 ---- <h1> Sourceforge Project Search </h1> <form id="projectForm"> ! Enter a Sourceforge Project Name (Unix style): <input type="text" value="" onkeyup="getProjects(this,event);" autocomplete="off"> </form> <p id="results"></p> Index: sfsearch_server.php =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/examples/sfsearch_server.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sfsearch_server.php 10 Oct 2004 19:14:50 -0000 1.2 --- sfsearch_server.php 12 Oct 2004 11:55:37 -0000 1.3 *************** *** 8,12 **** require_once SCRIPT_SERVER . 'Serializer.php'; require_once SCRIPT_SERVER . 'Server/PostOffice.php'; ! class ProjectList { var $projects; --- 8,13 ---- require_once SCRIPT_SERVER . 'Serializer.php'; require_once SCRIPT_SERVER . 'Server/PostOffice.php'; ! //----------------------------------------------------------------------------------- ! // Define a PHP class... class ProjectList { var $projects; *************** *** 15,23 **** } } ! class ProjectListGenerator extends ScriptServer_SerializedElement { function generate(& $code) { ! $func = "alert('in function');"; $func = "htmlElement.innerHTML = '';"; $func .="var projects = new Array();"; --- 16,26 ---- } } ! //----------------------------------------------------------------------------------- ! // Define a class which generates Javascript when instances of ProjectList are ! // encountered... class ProjectListGenerator extends ScriptServer_SerializedElement { function generate(& $code) { ! // Notice this generates client-side behaviour $func = "htmlElement.innerHTML = '';"; $func .="var projects = new Array();"; *************** *** 33,38 **** --- 36,45 ---- } + //----------------------------------------------------------------------------------- + // Register the class and it's serializer with the ScriptServer_Serializer ScriptServer_Serializer::addType('ProjectList','ProjectListGenerator'); + //----------------------------------------------------------------------------------- + // A class to publish for remote calls... class SfSearch { *************** *** 81,84 **** --- 88,92 ---- $S->addHandler(new SfSearch()); + //----------------------------------------------------------------------------------- // IE's XMLHttpRequest caching... header( "Expires: Mon, 26 Jul 1997 05:00:00 GMT" ); |
From: Harry F. <ha...@us...> - 2004-10-12 11:48:59
|
Update of /cvsroot/xmlrpccom/scriptserver/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10266 Modified Files: autocomplete.php autocomplete_server.php Log Message: Some rejigging Index: autocomplete.php =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/examples/autocomplete.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** autocomplete.php 8 Oct 2004 14:44:49 -0000 1.3 --- autocomplete.php 12 Oct 2004 11:48:45 -0000 1.4 *************** *** 6,9 **** --- 6,10 ---- header( "Pragma: no-cache" ); + // Just a utility to help the example work out where the server URL is... function path() { $basePath = explode('/',$_SERVER['SCRIPT_NAME']); *************** *** 33,37 **** //allow backspace to work in IE if (typeof input.selectionStart == 'undefined' && evt.keyCode == 8) { input.value = input.value.substr(0,input.value.length-1); } ! switch (evt.keyCode) { case 37: //left arrow --- 34,39 ---- //allow backspace to work in IE if (typeof input.selectionStart == 'undefined' && evt.keyCode == 8) { input.value = input.value.substr(0,input.value.length-1); } ! ! // Ignore the following keystrokes switch (evt.keyCode) { case 37: //left arrow *************** *** 55,78 **** break; } ! if ( !CompletionHandler.target ) { ! CompletionHandler.target = input; ! } CompletionHandler.lastLength = input.value.length; var a = new autocomplete(CompletionHandler); ! a.serverErrorFunc = function(e) { ! alert(e.var_dump()); ! } a.getword(input.value); } var CompletionHandler = { ! target: null, lastLength: 0, getword: function(result) { if (result.length < 1 ) { return; } ! this.target.value = result; ! this.target.setSelectionRange(this.lastLength, this.target.value.length); } } --- 57,96 ---- break; } ! ! // Remember the current length to allow selection CompletionHandler.lastLength = input.value.length; + + // Create the remote client var a = new autocomplete(CompletionHandler); ! ! // Set a timeout for responses which take too long ! a.timeout = 200; ! ! // Call the remote method a.getword(input.value); } + // Callback handler var CompletionHandler = { ! lastLength: 0, + + // Callback method getword: function(result) { if (result.length < 1 ) { return; } ! var input = document.getElementById('country'); ! input.value = result; ! input.setSelectionRange(this.lastLength, input.value.length); ! }, ! ! // Ignore timeouts ! getwordError: function(e) { ! if ( e.code == 1003 ) { ! // Ignore... ! } else { ! alert(e); ! } } } *************** *** 83,87 **** <h1> Server Side Autocompletion (plus HTTP authentication)</h1> <form id="autoCompleteForm"> ! Enter a Country: <input type="text" id="country" name="country" value="" onkeyup="getWord(this,event);"> </form> <p><b>Username:</b> admin, <b>Password:</b> secret</p> --- 101,109 ---- <h1> Server Side Autocompletion (plus HTTP authentication)</h1> <form id="autoCompleteForm"> ! Enter a Country: <input type="text" id="country" name="country" value="" onkeyup="getWord(this,event);" autocomplete="off"> ! <!-- Note the autocomplete="off": without it you get errors like; ! ! "Permission denied to get property XULElement.selectedIndex..." ! --!> </form> <p><b>Username:</b> admin, <b>Password:</b> secret</p> Index: autocomplete_server.php =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/examples/autocomplete_server.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** autocomplete_server.php 8 Oct 2004 14:44:49 -0000 1.2 --- autocomplete_server.php 12 Oct 2004 11:48:45 -0000 1.3 *************** *** 14,17 **** --- 14,18 ---- require_once SCRIPT_SERVER . 'Server/PostOffice.php'; + //----------------------------------------------------------------------------------- class Autocomplete { *************** *** 33,36 **** --- 34,40 ---- $S->addHandler(new Autocomplete()); + //----------------------------------------------------------------------------------- + // Generates the Javascript client by adding ?client to the server URL + //----------------------------------------------------------------------------------- if (isset($_SERVER['QUERY_STRING']) && strcasecmp($_SERVER['QUERY_STRING'], 'client')==0) { // Compress the Javascript *************** *** 48,57 **** header('Content-Type: text/javascript'); echo $script; } else { $username = 'admin'; $password = 'secret'; - // If there's no Authentication header, exit if ( !isset ( $_SERVER['PHP_AUTH_USER'] ) ) { header('HTTP/1.0 401 Unauthorized'); --- 52,65 ---- header('Content-Type: text/javascript'); echo $script; + + //----------------------------------------------------------------------------------- } else { + //----------------------------------------------------------------------------------- + // Some HTTP Basic authentication + //----------------------------------------------------------------------------------- $username = 'admin'; $password = 'secret'; if ( !isset ( $_SERVER['PHP_AUTH_USER'] ) ) { header('HTTP/1.0 401 Unauthorized'); *************** *** 60,64 **** } - // Is the username doesnt exist, exit if ( !( ($_SERVER['PHP_AUTH_USER']==$username) & ($_SERVER['PHP_AUTH_PW']==$password) ) ) { header('HTTP/1.0 401 Unauthorized'); --- 68,71 ---- *************** *** 66,69 **** --- 73,78 ---- exit('Unauthorized!'); } + //----------------------------------------------------------------------------------- + // Include error handler - PHP errors, warnings and notices serialized to JS require_once SCRIPT_SERVER . 'ErrorHandler.php'; |
From: Harry F. <ha...@us...> - 2004-10-10 19:16:21
|
Update of /cvsroot/xmlrpccom/scriptserver/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26915 Modified Files: sfsearch_server.php Log Message: Modify to link to project page Index: sfsearch_server.php =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/examples/sfsearch_server.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sfsearch_server.php 9 Oct 2004 23:29:12 -0000 1.1 --- sfsearch_server.php 10 Oct 2004 19:14:50 -0000 1.2 *************** *** 26,30 **** } $func .="for (var i=0; i < projects.length; i++ ) {"; ! $func .="htmlElement.innerHTML += projects[i]+'<br>';"; $func .="}"; $code->append('var '.$this->tmpName.' = new Function("htmlElement","'.addslashes($func).'");'); --- 26,30 ---- } $func .="for (var i=0; i < projects.length; i++ ) {"; ! $func .="htmlElement.innerHTML += '<a href=http://sf.net/projects/'+projects[i]+'>'+projects[i]+'</a><br>';"; $func .="}"; $code->append('var '.$this->tmpName.' = new Function("htmlElement","'.addslashes($func).'");'); |
From: Harry F. <ha...@us...> - 2004-10-09 23:29:24
|
Update of /cvsroot/xmlrpccom/scriptserver/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28371 Added Files: sfsearch.php sfsearch_server.php Log Message: Example where server sends behaviour to client --- NEW FILE: sfsearch.php --- <?php // $Id: sfsearch.php,v 1.1 2004/10/09 23:29:12 harryf Exp $ header( "Expires: Mon, 26 Jul 1997 05:00:00 GMT" ); header( "Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . "GMT" ); header( "Cache-Control: no-cache, must-revalidate" ); header( "Pragma: no-cache" ); function path() { $basePath = explode('/',$_SERVER['SCRIPT_NAME']); $script = array_pop($basePath); $basePath = implode('/',$basePath); if ( isset($_SERVER['HTTPS']) ) { $scheme = 'https'; } else { $scheme = 'http'; } echo $scheme.'://'.$_SERVER['SERVER_NAME'].$basePath; } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title> Sourceforge Project Search </title> <script type="text/javascript" src="<?php path(); ?>/sfsearch_server.php?client"></script> <script type="text/javascript"> function getProjects(input, evt) { if (input.value.length == 0) { return; } //allow backspace to work in IE if (typeof input.selectionStart == 'undefined' && evt.keyCode == 8) { input.value = input.value.substr(0,input.value.length-1); } switch (evt.keyCode) { case 37: //left arrow case 39: //right arrow case 33: //page up case 34: //page down case 36: //home case 35: //end case 13: //enter case 9: //tab case 27: //esc case 16: //shift case 17: //ctrl case 18: //alt case 20: //caps lock case 8: //backspace case 46: //delete case 38: //up arrow case 40: //down arrow return; break; } var s = new sfsearch(ProjectsHandler); s.getprojects(input.value); } var ProjectsHandler = { getprojects: function(displayFunc) { displayFunc(document.getElementById('results')); } } --> </script> </head> <body> <h1> Sourceforge Project Search </h1> <form id="projectForm"> Enter a Sourceforge Project Name (Unix style): <input type="text" value="" onkeyup="getProjects(this,event);"> </form> <p id="results"></p> </body> </html> --- NEW FILE: sfsearch_server.php --- <?php // $Id: sfsearch_server.php,v 1.1 2004/10/09 23:29:12 harryf Exp $ /** * This is a remote script to call from Javascript */ require_once '../ScriptServer.php'; require_once SCRIPT_SERVER . 'Serializer.php'; require_once SCRIPT_SERVER . 'Server/PostOffice.php'; class ProjectList { var $projects; function ProjectList($projects = array()) { $this->projects = $projects; } } class ProjectListGenerator extends ScriptServer_SerializedElement { function generate(& $code) { $func = "alert('in function');"; $func = "htmlElement.innerHTML = '';"; $func .="var projects = new Array();"; foreach ( $this->value->projects as $key => $project ) { $func .="projects[$key] = '$project';"; } $func .="for (var i=0; i < projects.length; i++ ) {"; $func .="htmlElement.innerHTML += projects[i]+'<br>';"; $func .="}"; $code->append('var '.$this->tmpName.' = new Function("htmlElement","'.addslashes($func).'");'); } } ScriptServer_Serializer::addType('ProjectList','ProjectListGenerator'); class SfSearch { function getProjects($fragment='') { if ( !preg_match('/^[a-z].*$/',$fragment) ) { $fragment = ''; } $base = '/home/groups/'; $fraglen = strlen($fragment); if ( $fraglen >= 2 ) { $groupDir = $base . substr($fragment,0,1).'/'.substr($fragment,0,2).'/'; } else if ( $fraglen == 1 ) { $groupDir = $base . $fragment . '/'. $fragment . 'a/'; } else { $groupDir = $base . 'a/aa/'; } $dh = opendir($groupDir); $projects = array(); while (($node = readdir($dh)) !== false) { if ( $node == '.' || $node == '..' ) { continue; } if ( is_dir($groupDir.$node) ) { $projects[] = $node; } } for ( $i = $fraglen; $i > 0; $i-- ) { $matches = preg_grep('/^'.substr($fragment,0,$i).'/i',$projects); if ( count($matches) > 0 ) { return new ProjectList(array_slice($matches,0,10)); } } return new ProjectList(); } } $S = & new ScriptServer_Server_PostOffice(); $S->addHandler(new SfSearch()); // IE's XMLHttpRequest caching... header( "Expires: Mon, 26 Jul 1997 05:00:00 GMT" ); header( "Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . "GMT" ); header( "Cache-Control: no-cache, must-revalidate" ); header( "Pragma: no-cache" ); if (isset($_SERVER['QUERY_STRING']) && strcasecmp($_SERVER['QUERY_STRING'], 'client')==0) { // Compress the Javascript // define('SCRIPT_SERVER_RENDER_FORMATTING',FALSE); require_once SCRIPT_SERVER . 'Renderer.php'; $R = & ScriptServer_Renderer::load(); $R->addSerializer(); $R->addXmlHttp(); $R->addPost(); $R->addVarDump(); $G = & $S->getGenerator(); $R->addScript($G->getClient()); $script = $R->toString(); header('Content-Length: '.strlen($script)); header('Content-Type: text/javascript'); echo $script; } else { // Include error handler - PHP errors, warnings and notices serialized to JS require_once SCRIPT_SERVER . 'ErrorHandler.php'; $S->serve(); } ?> |
From: Harry F. <ha...@us...> - 2004-10-09 19:00:57
|
Update of /cvsroot/xmlrpccom/scriptserver/ScriptServer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1995 Modified Files: Generator.php Log Message: Recommit same fix Index: Generator.php =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/ScriptServer/Generator.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Generator.php 8 Oct 2004 15:18:40 -0000 1.10 --- Generator.php 9 Oct 2004 19:00:48 -0000 1.11 *************** *** 256,260 **** e.name = 'Server_Error'; e.code = 2006; ! e.response = result; e.client = self.__responseHandler.context.phpclass; e.call = callName; --- 256,260 ---- e.name = 'Server_Error'; e.code = 2006; ! e.response = response; e.client = self.__responseHandler.context.phpclass; e.call = callName; |
From: Harry F. <ha...@us...> - 2004-10-09 18:57:11
|
Update of /cvsroot/xmlrpccom/scriptserver/ScriptServer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1134 Modified Files: ErrorHandler.php Log Message: Fix PHP syntax for PHP 4 Index: ErrorHandler.php =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/ScriptServer/ErrorHandler.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ErrorHandler.php 7 Oct 2004 09:59:04 -0000 1.4 --- ErrorHandler.php 9 Oct 2004 18:57:01 -0000 1.5 *************** *** 118,122 **** $error = "var e = new Error('$message');e.name = '$name';e.code = '$code';"; if ( SCRIPTSERVER_ERROR_DEBUG ) { ! $error .= "e.file = '$file';e.line = '{$exception->getLine()}';"; } $error .= "throw e;"; --- 118,122 ---- $error = "var e = new Error('$message');e.name = '$name';e.code = '$code';"; if ( SCRIPTSERVER_ERROR_DEBUG ) { ! $error .= "e.file = '$file';e.line = '".$exception->getLine()."';"; } $error .= "throw e;"; |
From: Harry F. <ha...@us...> - 2004-10-09 18:54:36
|
Update of /cvsroot/xmlrpccom/scriptserver/ScriptServer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv562 Modified Files: Generator.php Log Message: Update var name result to response to solve failed error reporting bug Index: Generator.php =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/ScriptServer/Generator.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Generator.php 8 Oct 2004 15:18:40 -0000 1.10 --- Generator.php 9 Oct 2004 18:54:23 -0000 1.11 *************** *** 256,260 **** e.name = 'Server_Error'; e.code = 2006; ! e.response = result; e.client = self.__responseHandler.context.phpclass; e.call = callName; --- 256,260 ---- e.name = 'Server_Error'; e.code = 2006; ! e.response = response; e.client = self.__responseHandler.context.phpclass; e.call = callName; |
From: Harry F. <ha...@us...> - 2004-10-08 15:20:36
|
Update of /cvsroot/xmlrpccom/scriptserver/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25491 Modified Files: postoffice_server.php Log Message: Modify to reflect change to ScriptServer_Error Index: postoffice_server.php =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/examples/postoffice_server.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** postoffice_server.php 10 Sep 2004 16:08:18 -0000 1.5 --- postoffice_server.php 8 Oct 2004 15:20:21 -0000 1.6 *************** *** 28,32 **** require_once SCRIPT_SERVER . 'Types.php'; $Error = & new ScriptServer_Error(); ! $Error->setError('ZeroDivisionError','Cannot divide by zero'); return $Error; } else { --- 28,32 ---- require_once SCRIPT_SERVER . 'Types.php'; $Error = & new ScriptServer_Error(); ! $Error->setError(3000,'ZeroDivisionError','Cannot divide by zero'); return $Error; } else { |
From: Harry F. <ha...@us...> - 2004-10-08 15:18:51
|
Update of /cvsroot/xmlrpccom/scriptserver/ScriptServer/errors In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24988/errors Modified Files: errors.en.ini Log Message: Further tuning of errors - attaching more properties to exceptions Index: errors.en.ini =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/ScriptServer/errors/errors.en.ini,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** errors.en.ini 7 Oct 2004 14:32:23 -0000 1.3 --- errors.en.ini 8 Oct 2004 15:18:40 -0000 1.4 *************** *** 21,25 **** 2004 = "Internal Server Alert" ; From E_STRICT errors in PHP5 2005 = "Internal Server Exception" ; Uncaught PHP5 exception ! 2006 = "Junk from server. Response not well formed"; Javascript eval() failed [Application_Error] --- 21,25 ---- 2004 = "Internal Server Alert" ; From E_STRICT errors in PHP5 2005 = "Internal Server Exception" ; Uncaught PHP5 exception ! 2006 = "Junk from server. Response not well formed"; Javascript eval() failed - note e.response contains what was evaled [Application_Error] |
From: Harry F. <ha...@us...> - 2004-10-08 15:18:51
|
Update of /cvsroot/xmlrpccom/scriptserver/ScriptServer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24988 Modified Files: Generator.php Log Message: Further tuning of errors - attaching more properties to exceptions Index: Generator.php =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/ScriptServer/Generator.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Generator.php 7 Oct 2004 14:32:22 -0000 1.9 --- Generator.php 8 Oct 2004 15:18:40 -0000 1.10 *************** *** 103,108 **** echo "};\n"; echo "{$Description->Class}.prototype = {\n"; ! ! foreach ( $Description->methods as $method ) { ?> // @access public --- 103,108 ---- echo "};\n"; echo "{$Description->Class}.prototype = {\n"; ! ! foreach ( $Description->methods as $method ) { ?> // @access public *************** *** 119,123 **** // @access public timeout: 20000, ! // Switch to asyncronous mode // @param Object user defined handler to call --- 119,128 ---- // @access public timeout: 20000, ! ! // Name of the PHP class this object was created from ! // to help error reporting ! // @access public ! phpclass: "<?php echo $Description->Class; ?>", ! // Switch to asyncronous mode // @param Object user defined handler to call *************** *** 141,148 **** // @access public clientErrorFunc: function(e) { - var callName = null; - if ( arguments[1] ) { - callName = arguments[1]; - } try { var errorMsg = '['+e.name+'] '+e.message; --- 146,149 ---- *************** *** 150,155 **** var errorMsg = '[Client_Error] '+e; } ! if ( callName ) { ! errorMsg = errorMsg + ' while calling '+callName; } alert(errorMsg); --- 151,156 ---- var errorMsg = '[Client_Error] '+e; } ! if ( e.client && e.call ) { ! errorMsg = errorMsg + ' while calling '+e.client+'.'+e.call+'()'; } alert(errorMsg); *************** *** 162,169 **** // @access public serverErrorFunc: function(e) { - var callName = null; - if ( arguments[1] ) { - callName = arguments[1]; - } try { var errorMsg = '['+e.name+'] '+e.message; --- 163,166 ---- *************** *** 171,176 **** var errorMsg = '[Server_Error] '+e; } ! if ( callName ) { ! errorMsg = errorMsg + ' while calling '+callName; } alert(errorMsg); --- 168,173 ---- var errorMsg = '[Server_Error] '+e; } ! if ( e.client && e.call ) { ! errorMsg = errorMsg + ' while calling '+e.client+ '.'+e.call+'()'; } alert(errorMsg); *************** *** 184,191 **** // @access public applicationErrorFunc: function(e) { - var callName = null; - if ( arguments[1] ) { - callName = arguments[1]; - } try { var errorMsg = '['+e.name+'] '+e.message; --- 181,184 ---- *************** *** 193,198 **** var errorMsg = '[Application_Error] '+e; } ! if ( callName ) { ! errorMsg = errorMsg + ' while calling '+callName; } alert(errorMsg); --- 186,191 ---- var errorMsg = '[Application_Error] '+e; } ! if ( e.client && e.call ) { ! errorMsg = errorMsg + ' while calling '+e.client+ '.'+e.call+'()'; } alert(errorMsg); *************** *** 233,243 **** self.__responseHandler.userHandler = userHandler; ! self.__responseHandler.onLoad = function(result, callName) { try { ! dataFunc = eval(result); try { ! result = dataFunc(); try { ! this.userHandler[callName](result); } catch (e) { // Getting a wierd situation in IE - TypeError --- 226,236 ---- self.__responseHandler.userHandler = userHandler; ! self.__responseHandler.onLoad = function(response, callName) { try { ! dataFunc = eval(response); try { ! data = dataFunc(); try { ! this.userHandler[callName](data); } catch (e) { // Getting a wierd situation in IE - TypeError *************** *** 247,252 **** } } catch (e) { if ( e.name == 'Server_Error' ) { ! this.context.serverErrorFunc(e,callName); } else { try { --- 240,247 ---- } } catch (e) { + e.client = self.__responseHandler.context.phpclass; + e.call = callName; if ( e.name == 'Server_Error' ) { ! this.context.serverErrorFunc(e); } else { try { *************** *** 254,258 **** this.userHandler[errorFunc](e); } catch (ex) { ! this.context.applicationErrorFunc(e,callName); } } --- 249,253 ---- this.userHandler[errorFunc](e); } catch (ex) { ! this.context.applicationErrorFunc(e); } } *************** *** 261,265 **** e.name = 'Server_Error'; e.code = 2006; ! this.context.serverErrorFunc(e,callName); } --- 256,263 ---- e.name = 'Server_Error'; e.code = 2006; ! e.response = result; ! e.client = self.__responseHandler.context.phpclass; ! e.call = callName; ! this.context.serverErrorFunc(e); } *************** *** 267,271 **** self.__responseHandler.onError = function(e, callName) { ! this.context.clientErrorFunc(e, callName); }; --- 265,271 ---- self.__responseHandler.onError = function(e, callName) { ! e.client = self.__responseHandler.context.phpclass; ! e.call = callName; ! this.context.clientErrorFunc(e); }; *************** *** 324,327 **** --- 324,328 ---- e.name = 'Server_Error'; e.code = 2006; + e.response = response; this.serverErrorFunc(e); } |
From: Harry F. <ha...@us...> - 2004-10-08 14:45:17
|
Update of /cvsroot/xmlrpccom/scriptserver/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16299 Modified Files: autocomplete.php autocomplete_server.php Log Message: Modified to show how HTTP basic auth works Index: autocomplete.php =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/examples/autocomplete.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** autocomplete.php 7 Oct 2004 14:33:10 -0000 1.2 --- autocomplete.php 8 Oct 2004 14:44:49 -0000 1.3 *************** *** 60,63 **** --- 60,66 ---- CompletionHandler.lastLength = input.value.length; var a = new autocomplete(CompletionHandler); + a.serverErrorFunc = function(e) { + alert(e.var_dump()); + } a.getword(input.value); } *************** *** 78,86 **** </head> <body> ! <h1> Server Side Autocompletion </h1> <form id="autoCompleteForm"> Enter a Country: <input type="text" id="country" name="country" value="" onkeyup="getWord(this,event);"> </form> ! <p>Note: the keypress handling logic could probably be improved in this example...</p> </body> </html> --- 81,90 ---- </head> <body> ! <h1> Server Side Autocompletion (plus HTTP authentication)</h1> <form id="autoCompleteForm"> Enter a Country: <input type="text" id="country" name="country" value="" onkeyup="getWord(this,event);"> </form> ! <p><b>Username:</b> admin, <b>Password:</b> secret</p> ! <p>Note: the client side keypress handling logic could probably be improved in this example. Otherwise demonstrates how coding effort on client and server side is focused purely on application logic - the "networking" between client and server is no effort - even HTTP authentication is easily done.</p> </body> </html> Index: autocomplete_server.php =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/examples/autocomplete_server.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** autocomplete_server.php 7 Oct 2004 12:13:41 -0000 1.1 --- autocomplete_server.php 8 Oct 2004 14:44:49 -0000 1.2 *************** *** 38,45 **** require_once SCRIPT_SERVER . 'Renderer.php'; $R = & ScriptServer_Renderer::load(); ! $R->addToPHP(); ! $R->addVarDump(); $R->addXmlHttp(); $R->addPost(); $G = & $S->getGenerator(); $R->addScript($G->getClient()); --- 38,45 ---- require_once SCRIPT_SERVER . 'Renderer.php'; $R = & ScriptServer_Renderer::load(); ! $R->addSerializer(); $R->addXmlHttp(); $R->addPost(); + $R->addVarDump(); $G = & $S->getGenerator(); $R->addScript($G->getClient()); *************** *** 50,56 **** --- 50,73 ---- } else { + $username = 'admin'; + $password = 'secret'; + + // If there's no Authentication header, exit + if ( !isset ( $_SERVER['PHP_AUTH_USER'] ) ) { + header('HTTP/1.0 401 Unauthorized'); + header('WWW-Authenticate: Basic realm="PHP Secured"'); + exit('This page requires authentication'); + } + + // Is the username doesnt exist, exit + if ( !( ($_SERVER['PHP_AUTH_USER']==$username) & ($_SERVER['PHP_AUTH_PW']==$password) ) ) { + header('HTTP/1.0 401 Unauthorized'); + header('WWW-Authenticate: Basic realm="PHP Secured"'); + exit('Unauthorized!'); + } // Include error handler - PHP errors, warnings and notices serialized to JS require_once SCRIPT_SERVER . 'ErrorHandler.php'; $S->serve(); + } ?> |
From: Harry F. <ha...@us...> - 2004-10-08 14:36:18
|
Update of /cvsroot/xmlrpccom/scriptserver/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14309 Modified Files: serializedresponse.php Log Message: Reflect changes to ScriptServer_Error Index: serializedresponse.php =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/examples/serializedresponse.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** serializedresponse.php 9 Sep 2004 21:07:02 -0000 1.3 --- serializedresponse.php 8 Oct 2004 14:36:08 -0000 1.4 *************** *** 33,40 **** if ( $payload->geterror == 'customerror' ) { $e = & new ScriptServer_Error(); ! $e->setError('MyCustomError','Testing custom error'); } else { $e = & new ScriptServer_Error(); ! $e->setError('Error','Test Error'); } echo ScriptServer_Serializer::serialize($e); --- 33,40 ---- if ( $payload->geterror == 'customerror' ) { $e = & new ScriptServer_Error(); ! $e->setError(3001,'MyCustomError','Testing custom error'); } else { $e = & new ScriptServer_Error(); ! $e->setError(3000,'Error','Test Error'); } echo ScriptServer_Serializer::serialize($e); |
From: Harry F. <ha...@us...> - 2004-10-08 14:34:42
|
Update of /cvsroot/xmlrpccom/scriptserver/tests/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13869 Modified Files: serializer.test.php unserializer.test.php Log Message: Modify to reflect changes to ScriptServer_Error Index: serializer.test.php =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/tests/php/serializer.test.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** serializer.test.php 4 Oct 2004 21:59:38 -0000 1.7 --- serializer.test.php 8 Oct 2004 14:34:21 -0000 1.8 *************** *** 196,202 **** function testError() { $obj = new ScriptServer_Error(); ! $obj->setError('TestError','testing'); $obj->foo = 'bar'; ! $js = 'new Function("try { throw new TestError(\\\'testing\\\'); } catch(e) { function TestError(message) { this.name = \\\'TestError\\\'; this.message = message; }; TestError.prototype = new Error(); TestError.constructor = TestError; throw new TestError(\\\'testing\\\'); };");'; $res = ScriptServer_Serializer::serialize($obj); $this->assertEqual($res,$js); --- 196,202 ---- function testError() { $obj = new ScriptServer_Error(); ! $obj->setError(3000,'TestError','testing'); $obj->foo = 'bar'; ! $js = 'new Function("var e = new Error(\\\'testing\\\');e.name = \\\'TestError\\\';e.code = \\\'3000\\\';throw e;");'; $res = ScriptServer_Serializer::serialize($obj); $this->assertEqual($res,$js); *************** *** 205,211 **** function testErrorNested() { $obj = new ScriptServer_Error(); ! $obj->setError('TestError','testing'); $array = array('a',$obj,'b'); ! $js = 'new Function("try { throw new TestError(\\\'testing\\\'); } catch(e) { function TestError(message) { this.name = \\\'TestError\\\'; this.message = message; }; TestError.prototype = new Error(); TestError.constructor = TestError; throw new TestError(\\\'testing\\\'); };");'; $res = ScriptServer_Serializer::serialize($array); $this->assertEqual($res,$js); --- 205,211 ---- function testErrorNested() { $obj = new ScriptServer_Error(); ! $obj->setError(3000,'TestError','testing'); $array = array('a',$obj,'b'); ! $js = 'new Function("var e = new Error(\\\'testing\\\');e.name = \\\'TestError\\\';e.code = \\\'3000\\\';throw e;");'; $res = ScriptServer_Serializer::serialize($array); $this->assertEqual($res,$js); Index: unserializer.test.php =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/tests/php/unserializer.test.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** unserializer.test.php 6 Sep 2004 06:37:49 -0000 1.2 --- unserializer.test.php 8 Oct 2004 14:34:21 -0000 1.3 *************** *** 54,59 **** function testUnserializeError() { $var = new ScriptServer_Error(); ! $var->setError('foo','bar'); $error = ScriptServer_Unserializer::unserialize(serialize($var)); $this->assertEqual($error->name,'foo'); $this->assertEqual($error->message,'bar'); --- 54,60 ---- function testUnserializeError() { $var = new ScriptServer_Error(); ! $var->setError(3000,'foo','bar'); $error = ScriptServer_Unserializer::unserialize(serialize($var)); + $this->assertEqual($error->code,3000); $this->assertEqual($error->name,'foo'); $this->assertEqual($error->message,'bar'); |
From: Harry F. <ha...@us...> - 2004-10-08 14:32:36
|
Update of /cvsroot/xmlrpccom/scriptserver/ScriptServer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13371 Modified Files: Types.php Serializer.php Log Message: Modify to use alternate error style and error codes Index: Serializer.php =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/ScriptServer/Serializer.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Serializer.php 6 Oct 2004 12:36:17 -0000 1.19 --- Serializer.php 8 Oct 2004 14:32:24 -0000 1.20 *************** *** 511,517 **** */ function setValue($error) { $this->name = $error->name; ! $this->message = str_replace("'",'',$error->message); ! $this->message = str_replace('"','',$error->message); } --- 511,519 ---- */ function setValue($error) { + $this->code = $error->code; $this->name = $error->name; ! $this->message = strip_tags($error->message); ! $this->message = str_replace("'",'',$this->message); ! $this->message = str_replace('"','',$this->message); } *************** *** 539,550 **** function generate(&$code) { ! $code->write("try { throw new {$this->name}('{$this->message}'); }". ! " catch(e) { function {$this->name}(message) { this.name = '{$this->name}';". ! " this.message = message; }; {$this->name}.prototype = new Error();". ! " {$this->name}.constructor = {$this->name};". ! " throw new {$this->name}('{$this->message}'); };"); ! // Wrap in anon function - violates RootElement ! $code->write('new Function("'.addSlashes($code->toString()).'");'); // Disable further code writing so only single Error returned --- 541,550 ---- function generate(&$code) { ! $error = "var e = new Error('{$this->message}');"; ! $error .= "e.name = '{$this->name}';"; ! $error .= "e.code = '{$this->code}';"; ! $error .= "throw e;"; // Wrap in anon function - violates RootElement ! $code->write('new Function("'.addSlashes($error).'");'); // Disable further code writing so only single Error returned Index: Types.php =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/ScriptServer/Types.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Types.php 6 Oct 2004 09:42:50 -0000 1.6 --- Types.php 8 Oct 2004 14:32:24 -0000 1.7 *************** *** 25,28 **** --- 25,35 ---- class ScriptServer_Error { /** + * Error code + * @var string + * @access public + */ + var $code; + + /** * Name of Javascript error class * @var string *************** *** 30,33 **** --- 37,41 ---- */ var $name; + /** * Error message *************** *** 36,41 **** --- 44,65 ---- */ var $message; + + /** + * Values can be passed optionally to the constructor + * @param int (optional) error code + * @param string (optional) name to be given to Javascript error class + * @param string (optional) error message + * @return void + * @access public + */ + function ScriptServer_Error($code=NULL,$name=NULL,$message=NULL) { + if ( $code && $name && $message ) { + $this->setError($code,$name,$message); + } + } + /** * Set the error name and message + * @param int error code * @param string name to be given to Javascript error class * @param string error message *************** *** 43,47 **** * @access public */ ! function setError($name,$message) { $this->name = $name; $this->message = $message; --- 67,72 ---- * @access public */ ! function setError($code,$name,$message) { ! $this->code = $code; $this->name = $name; $this->message = $message; |
From: Harry F. <ha...@us...> - 2004-10-07 14:34:44
|
Update of /cvsroot/xmlrpccom/scriptserver/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29745 Modified Files: autocomplete.php Log Message: Change the loaded client scripts - use serializer instead of toPHP |
From: Harry F. <ha...@us...> - 2004-10-07 14:33:55
|
Update of /cvsroot/xmlrpccom/scriptserver/ScriptServer/errors In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29561/errors Modified Files: errors.en.ini Log Message: Package eval parse errors a Server_Error Index: errors.en.ini =================================================================== RCS file: /cvsroot/xmlrpccom/scriptserver/ScriptServer/errors/errors.en.ini,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** errors.en.ini 7 Oct 2004 08:50:07 -0000 1.2 --- errors.en.ini 7 Oct 2004 14:32:23 -0000 1.3 *************** *** 21,24 **** --- 21,25 ---- 2004 = "Internal Server Alert" ; From E_STRICT errors in PHP5 2005 = "Internal Server Exception" ; Uncaught PHP5 exception + 2006 = "Junk from server. Response not well formed"; Javascript eval() failed [Application_Error] |