[PHP] imagettfbbox returning screwy values
I'm having this really bizarre problem with imagettfbbox. The values it is returning seem to be way off the scale. I have gd and ttf support compiled into php, (running on latest stable apache 1, gentoo linux, latest stable php) When I call imagettfbbox I get very very large numbers back. They don't seem to make any sense at all. Here's my code: And here's the output: Array ( [0] => 1076630208 [1] => 137911840 [2] => -1073777096 [3] => 1073930763 [4] => 1076630224 [5] => 1076625940 [6] => -1073777064 [7] => 1075882071 ) Has anyone seen something like this before? Suggestions? It's not a dodgy font. Switching fonts makes the numbers change but only slightly. For reference, my phpinfo is here: http://www.sympages.com/info.php Help! Thanks, Simon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SOAP: xsd:choice maxOccurs=unbounded, and element order
Hi, I'm trying to make PHP5's soap implementation play nice with my web service, and I'm having a problem. Part of my schema contains a complexType, containing an xsd:choice of several different element types, which can be repeated many times (maxOccurs=unbounded) e.g.: The problem is that the order of element here is important. I want the results returned in the same order that they appear in the XML. Unfortunately, what I end up with, is an object containing an array of all the e1 elements, followed by an array of all the e2 elements. Take the following example... If there following were in my soap result: some_stuff different_stuff some_other_stuff different_other_stuff What I actually end up seeing is something like: [container] => stdClass Object ( [e1] Array ( [0] => some_stuff [1] => some_other_stuff ) [e2] Array ( [0] => different_stuff [1] => different_other_stuff ) } Note that this is somewhat simplified from my real-world example. In reality, "e1" and "e2" are complexTypes themselves. But I really do need to see the resulting elements in the same order that they were supplied. I'm able to do this in dotnet and gsoap clients, so far. (I haven't tried any others.) Incidentally, I'm using a basic unmodified skeleton generated by wsdl2php as my classmap. The object describing the 'container' type looks simply like: class container { } Perhaps it's possible to add something to this to help sort the order out?? Any suggestions are appreciated. Could this be a bug? Incidentally, the full-blown (and rather complicated I'm afraid) schema/wsdl for what I'm *actually* trying to do is at http://www.widgit.com/cml/symgate.wsdl if that helps. Thanks, Simon -- Simon Detheridge SEN Developer, Widgit Software CONFIDENTIALITY NOTICE: This email and any attachments are for the exclusive and confidential use of the intended recipient. If you are not the intended recipient, please do not read, distribute or take action in reliance upon this message. If you have received this in error, please notify us immediately by return email and promptly delete this message and its attachments from your computer system. Logotron is a limited company registered in England, number 04113866. The registered office is Logotron Ltd, 124 Cambridge Science Park, Milton Road, Cambridge, CB4 0ZS. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Php5 SOAP WSDL parsing
I'm trying to get PHP5 to talk to a web service that I am developing. I have created a wsdl for the service (http://www.symgate.com/symgate/symgate.wsdl) and am trying to get PHP to parse it. (The wsdl validates in a number of tools I've pointed at it, including mindreef soapscope and the wsdl analyser on xmethods.net) When I try and get PHP5 to read the file, I get an error that it not very helpful. My code says: try { $client = new SoapClient ( "http://www.symgate.com/symgate/symgate.wsdl"; ) ; } catch ( SoapFault $fault ) { echo $fault ; exit ; } The output says: SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: unexpected in complexType in /var/www/localhost/htdocs/soap1.php:5 Stack trace: #0 /var/www/localhost/htdocs/soap1.php(5): SoapClient->__construct('http://www.symg...') #1 {main} This is obviously truncated. I've tried looking at the apache2 error_log but I can't see any further detail. I'd really like to know what PHP's problem is with my wsdl. How can I see the full output of this error? Thanks, Simon -- Simon Detheridge SEN Developer, Widgit Software This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Php5 SOAP WSDL parsing
Thanks for your response. Quoting Jochem Maas <[EMAIL PROTECTED]>: Simon Detheridge wrote: I'm trying to get PHP5 to talk to a web service that I am developing. is php choking on the comment?: "" I've removed the comments from the file. No luck. or maybe it's choking on the 'included' cml.xsd whihc doesn't define a charset in its 'header'? just thinking out loud there... Fixed, and no dice there either. try { $client = new SoapClient ( "http://www.symgate.com/symgate/symgate.wsdl"; ) ; } catch ( SoapFault $fault ) { echo $fault ; try this instead: echo ''; var_dump($fault); exit; doubt that it will tell you anymore though. It provides more data about where it failed in the PHP, but the internal error string is still: "SOAP-ERROR: Parsing Schema: unexpected in complexType" Actaully, it turns out that in the original message I posted, the message wasn't truncated - just insuffucently verbose to derive any meaningful reason as to why it failed. All I currently know is that php found an unexpected nothing in a complexType. It doesn't tell me which complexType, or anything that might enable me to debug this usefully. I am at a loss. Simon This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Php5 SOAP WSDL parsing
Quoting David Grant <[EMAIL PROTECTED]>: It would appear you've not included the full message. Please look at the source of the message in your web browser. The space between unexpected and "in complexType" probably contains an XML tag. Uh, indeed I was. It was an unexpected that was causing the problem. I should know better than that... Guess I need some more coffee. Quoting Rob <[EMAIL PROTECTED]>: attribute definitions have to come after a sequence. See the symbol element definition in cml.xsd The symset attribute must be defined after the sequence. Thankyou very much indeed, That fixed it. So much for my wsdl validator, then. :-/ -- Simon Detheridge SEN Developer, Widgit Software This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP5, Soap, WSDL, and unbounded xsd:choice types.
I have a problem with PHP talking to my non-php webservice. The problem arises because I have a list of elements in an umbounded xsd:choice type, which are supposed to be parsed in the correct order. Unfortunately, PHP groups them together per-type instead of in the order they appear in the document. ** warning: the example below is not taken from real data... I've created a simple example based on what my more complex project is actually doing. It may not be 100% accurate, but serves to show the problem behaviour. For example, let's say I have the following element: Now, let's assume that this comes as a soap response, encoded document/literal, with the following data: One Two Three Four For an element of this type, when php parses my WSDL, it generates the following type (according to SoapClient->__getTypes() ): struct foo { string bar; string baz; } Now... Upon parsing the result of the transaction, I get the following: [foo] => stdClass Object ( [bar] => Array ( [0] => One [1] => Three ) [baz] => Array ( [0] => Two [1] => Four ) ) --- end of example --- What I want PHP to do, is enable me to access my 'bar' and 'baz' elements in the order in which they appear in the document, instead of having it glob them together for each type. However, I am unable to modify the output of the webservice itself as it interoperates nicely with other things already. Can I get There from Here with PHP's own SoapClient, or do I have to parse the xml by hand? Thanks, Simon -- Simon Detheridge SEN Developer, Widgit Software This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php