Re: [PHP] php, fastcgi, mpm-worker and apache bottlenecks
Source is fine, i never install php with binaries, lets see how i go. On 13/03/2006, at 1:12 PM, Chris wrote: Dan Rossi wrote: Hi there, im am planning to spec the software install for one of our machines that gets an insane ammount of hits and traffic from referring sites. Im looking into if running the php for this server under fastcgi instead of as a php apache module will help reduce and apache bottlenecks ? Most of the scripting is done via perl and fastcgi, but there is some third party apps which run on php, there is also minimal mysql activity. Being more specific here, my question is will php running under fastcgi, being able to work in a multi-threaded apache environment running mpm-worker ? I know its not compatible as im aware, but under the standard apache module install. Its a long shot but if anyone has any recommendations let me know, or else ill have to stick to installing apache2 in pre-fork mode and tweak the settings as much as possible ? Don't know about the rest but php will compile fine as a fastcgi module. Add --enable-fastcgi to your configure command (I don't think there are any packages that do this by default so you'll have to compile it from source - but I could be wrong). -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php, fastcgi, mpm-worker and apache bottlenecks
Hi there, im am planning to spec the software install for one of our machines that gets an insane ammount of hits and traffic from referring sites. Im looking into if running the php for this server under fastcgi instead of as a php apache module will help reduce and apache bottlenecks ? Most of the scripting is done via perl and fastcgi, but there is some third party apps which run on php, there is also minimal mysql activity. Being more specific here, my question is will php running under fastcgi, being able to work in a multi-threaded apache environment running mpm-worker ? I know its not compatible as im aware, but under the standard apache module install. Its a long shot but if anyone has any recommendations let me know, or else ill have to stick to installing apache2 in pre-fork mode and tweak the settings as much as possible ? Let me know thanks. Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] base64_encode, forward slashes and mod_rewrite
sorry Ive done it again, for anyones interest, you might have to urlencode the string twice for mod_rewrite to accept encrypted and base64_encoded strings which add slashes and ampersands into their strings. It is confirmed there is a bug in mod_rewrite and doesnt like the urlencoded %2F characters. On 24/02/2006, at 10:31 AM, Dan Rossi wrote: Continueing on my prior problem, Ive discovered that base64_encode adds forward slashes in its encoded string, when its urlencoded it becomes something like /feeds/UmFuZG9tSVZd%2FMChU7sMQqdUi%2FrgYHD7 mod_rewrite doesnt seem to like the %2F in the string and fails with a 404 as it doesnt get a match using RewriteRule ^feeds/(.*)$ /refer.php?$1 [L,NE] What should i do ? Should i replace the / with a different character then convert it back later ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] base64_encode, forward slashes and mod_rewrite
Continueing on my prior problem, Ive discovered that base64_encode adds forward slashes in its encoded string, when its urlencoded it becomes something like /feeds/UmFuZG9tSVZd%2FMChU7sMQqdUi%2FrgYHD7 mod_rewrite doesnt seem to like the %2F in the string and fails with a 404 as it doesnt get a match using RewriteRule ^feeds/(.*)$ /refer.php?$1 [L,NE] What should i do ? Should i replace the / with a different character then convert it back later ?
Re: [PHP] encrypted urls, mcrypt and mod_rewrite
Yes somehow in this case apache is treating the urlencoded string of a forward slash as a forward slash and so isnt matching the rule properly. On 23/02/2006, at 9:58 PM, Jared Williams wrote: Subject: Re: [PHP] encrypted urls, mcrypt and mod_rewrite Somehow this part of the string is a problem, it has underscores, but there is probably other things in this. _%E5%D4%13%82%C9%DFN%5EFs%5E47%B2v%2F%D7%A4%0C%C6%9EnJ I'd base64 encode that first then urlencode :) On 23/02/2006, at 6:01 PM, Dan Rossi wrote: Hi ive been trying to find answers with no luck. I am sending a urlencoded encrypted string made with mcrypt. what is happening is there is somehow special characters that mod_rewrite doesnt like so it wont find a regex match properly with this rule RewriteRule ^feeds/(.*)$ refer.php?$1 [L,QSA] Any ideas what it could be doing ? The strings are also quite random, so it will work sometimes for a particular url then other times not ? Jared -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] encrypted urls, mcrypt and mod_rewrite
Ahh thanks heaps, its working more nicely However, trying to add more data into the encrypted string which is then base64_encoded I get a slash in the string which is breaking the rewriterule like the other cases. UmFuZG9tSVYljfOW15UlfzVJV8zBtaEXPh0mPku64cowVrHo%2Fgno9LeTfwejwsmG The requested URL /feeds/UmFuZG9tSVYljfOW15UlfzVJV8zBtaEXPh0mPku64cowVrHo/gno9LeTfwejwsmG was not found on this server. The rewrite rule RewriteEngine On RewriteRule ^feeds/(.*)$ /refer.php?$1 [L,NE] On 23/02/2006, at 9:58 PM, Jared Williams wrote: Subject: Re: [PHP] encrypted urls, mcrypt and mod_rewrite Somehow this part of the string is a problem, it has underscores, but there is probably other things in this. _%E5%D4%13%82%C9%DFN%5EFs%5E47%B2v%2F%D7%A4%0C%C6%9EnJ I'd base64 encode that first then urlencode :) On 23/02/2006, at 6:01 PM, Dan Rossi wrote: Hi ive been trying to find answers with no luck. I am sending a urlencoded encrypted string made with mcrypt. what is happening is there is somehow special characters that mod_rewrite doesnt like so it wont find a regex match properly with this rule RewriteRule ^feeds/(.*)$ refer.php?$1 [L,QSA] Any ideas what it could be doing ? The strings are also quite random, so it will work sometimes for a particular url then other times not ? Jared -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] parse_url not parsing hosts with www properly in php 5.1.2
On 23/02/2006, at 8:45 PM, Jochem Maas wrote: Dan Rossi wrote: Ok it looks like when i exploded the urls by a comma, one has space exploding the urls??? - this list is not called 'php-psychics' for a reason. i.e. don't assume we know that you happen to have a string which contains 'urls' that you seem to explode on a comma before going on to run parse_url() on each item in the ensuing array. ;-) PHP slang == explode() padding, i had to trim it first, the array was coming out like host=>__http path=>//www.thedomain.com :\ that 'array' is clear as mud. next time maybe post some code and show (copy+paste) the actual output not some handtyped approximation. And before doing even that I recommend you always do some simple debugging with var_dump() to examine the actual contents of the variables in the code that seems to be broken (once you see what in a variable it is quite often obvious what is going wrong). The previous part was from the var_dump ,as explained the url needed trimming as it had a space before the http://. anyway you got it fixed on your own steam - that's a good thing :-) rgds, Jochem On 23/02/2006, at 1:05 PM, Chris wrote: Dan Rossi wrote: Ive just discovered a strange issue where parse_url is not splitting up the url properly. in the host key its returning like //www.php.net where the url is http://www.php.net. any ideas ? If the behaviour changed between versions without it being documented or noted somewhere, post a bug report - http://bugs.php.net. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] encrypted urls, mcrypt and mod_rewrite
Somehow this part of the string is a problem, it has underscores, but there is probably other things in this. _%E5%D4%13%82%C9%DFN%5EFs%5E47%B2v%2F%D7%A4%0C%C6%9EnJ On 23/02/2006, at 6:01 PM, Dan Rossi wrote: Hi ive been trying to find answers with no luck. I am sending a urlencoded encrypted string made with mcrypt. what is happening is there is somehow special characters that mod_rewrite doesnt like so it wont find a regex match properly with this rule RewriteRule ^feeds/(.*)$ refer.php?$1 [L,QSA] Any ideas what it could be doing ? The strings are also quite random, so it will work sometimes for a particular url then other times not ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] encrypted urls, mcrypt and mod_rewrite
Hi ive been trying to find answers with no luck. I am sending a urlencoded encrypted string made with mcrypt. what is happening is there is somehow special characters that mod_rewrite doesnt like so it wont find a regex match properly with this rule RewriteRule ^feeds/(.*)$ refer.php?$1 [L,QSA] Any ideas what it could be doing ? The strings are also quite random, so it will work sometimes for a particular url then other times not ?
Re: [PHP] Issue with encrypted string created with Crypt_CBC and urls and mod_rewrite
It also seems that any forward slash being encoded if it encodes, mod_rewrite doesnt like, therefore I have to split up the urls using parse_url, but it seems it still doesnt like the query part and some special characters like ampersands and equals ? On 23/02/2006, at 12:30 PM, Dan Rossi wrote: hi there im having issue decoding an encoded string created with a pear package Crypt_CBC which i am encoding a uri into the string and sending to a rewrite url. The query string is not returning the encoded part of the url properly for some reason and not decoding properly. I have already sent this to the pear list, but maybe someone here has experienced issues with encoded strings and mod_rewrite not relocating with a url encoded string ? The encoded string without mod_rewrite rules is RandomIVQ%83%80%E6%0F%E7%E4%7CdY%E7%BA%9B%14%5B%60%98%A1%1D%04%94L_%16% E4%19%EF%F1%FE%5C%D6%CE%09%C8DI%A7%1F%04%25%A8%7B%FA%19%B51%1D%7C%0D%04 %13%E3%21%F1%60f%C6%91%A8b%82%11YK%21l+%C5%D0W%D9%9A%2B%CD3%C3%FA%82LE% D8%1EA%07%25%F5%BB%22%EA%B7%B8%82%F0WZ%40 With rewritten urls its from viewing source. RandomIVQƒ€æçä|dY纛[`˜¡”L_äïñþ\ÖÎÈDI§%¨{úµ1| ã!ñ`fÆ‘¨b‚YK!l+ÅÐWÙš+Í3Ãú‚LEØA%õ»"ê·¸‚ðWZ@ The rewrite rule is RewriteEngine on RewriteBase / RewriteRule ^feeds/(.*) refer.php?$1 [L] Any ideas why its not urlencoding the urlencoded string in the rewrite url ? I may have to use the request_uri instead of sending it as a query string if this is a flaw in mod_rewrite ?? I think however if i use the request_uri things could break a little. Let me know. Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] parse_url not parsing hosts with www properly in php 5.1.2
Ok it looks like when i exploded the urls by a comma, one has space padding, i had to trim it first, the array was coming out like host=>__http path=>//www.thedomain.com :\ On 23/02/2006, at 1:05 PM, Chris wrote: Dan Rossi wrote: Ive just discovered a strange issue where parse_url is not splitting up the url properly. in the host key its returning like //www.php.net where the url is http://www.php.net. any ideas ? If the behaviour changed between versions without it being documented or noted somewhere, post a bug report - http://bugs.php.net. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] parse_url not parsing hosts with www properly in php 5.1.2
Ive just discovered a strange issue where parse_url is not splitting up the url properly. in the host key its returning like //www.php.net where the url is http://www.php.net. any ideas ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Issue with encrypted string created with Crypt_CBC and urls and mod_rewrite
hi there im having issue decoding an encoded string created with a pear package Crypt_CBC which i am encoding a uri into the string and sending to a rewrite url. The query string is not returning the encoded part of the url properly for some reason and not decoding properly. I have already sent this to the pear list, but maybe someone here has experienced issues with encoded strings and mod_rewrite not relocating with a url encoded string ? The encoded string without mod_rewrite rules is RandomIVQ%83%80%E6%0F%E7%E4%7CdY%E7%BA%9B%14%5B%60%98%A1%1D%04%94L_%16%E 4%19%EF%F1%FE%5C%D6%CE%09%C8DI%A7%1F%04%25%A8%7B%FA%19%B51%1D%7C%0D%04%1 3%E3%21%F1%60f%C6%91%A8b%82%11YK%21l+%C5%D0W%D9%9A%2B%CD3%C3%FA%82LE%D8% 1EA%07%25%F5%BB%22%EA%B7%B8%82%F0WZ%40 With rewritten urls its from viewing source. RandomIVQƒ€æçä|dY纛[`˜¡”L_äïñþ\ÖÎÈDI§%¨{úµ1| ã!ñ`fÆ‘¨b‚YK!l+ÅÐWÙš+Í3Ãú‚LEØA%õ»"ê·¸‚ðWZ@ The rewrite rule is RewriteEngine on RewriteBase / RewriteRule ^feeds/(.*) refer.php?$1 [L] Any ideas why its not urlencoding the urlencoded string in the rewrite url ? I may have to use the request_uri instead of sending it as a query string if this is a flaw in mod_rewrite ?? I think however if i use the request_uri things could break a little. Let me know. Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Hardened patch and Zend optimizer
hi there i was wondering if anyone has an update to if the zend optimizer will work with the hardened patch installed ? From my understanding "closed" source extensions arent possible, but maybe they fix this ? Let me know. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Suggested product for ticket support and project management
Hi there, please dont bite, but we are looking for an open source or commercial php product for ticket support and another for project managent. I have already googled a bit and what ive seen isnt so good. For our ticketing we mostly require a hosting style ticket system for server support and website problems with a tiny area for a bugzilla style code bug system. For the project management, possibly the most important thing is project logging, file sharing, reporting, calendar syndication and a possible integration with publishing and subscribing via ical. Its always possible to build it yourself but there is no time allocated to do so. Let me know thanks. Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Preparing site content for RSS XML feed
would enclosing in the cdata work ? On 02/02/2006, at 7:11 PM, Murray @ PlanetThoughtful wrote: Hi All, I currently generate a simple rss.xml file for syndication from my site, containing nothing more than the subject of the post and a link to the article on my site. I'd like to syndicate the the actual content of each of the posts, but as I understand it RSS / XML is somewhat demanding in what it expects of how various html entities are treated etc? I don't suppose, by any chance, that there are any PHP tools that can be easily factored in to a process to take content that would include normal HTML (ie DIV and SPAN tags, links, TABLEs etc)? Failing that, does anyone know of a good guide on what steps need to be taken to create a valid RSS feed where the content contains HTML? Any help appreciated! Much warmth, Murray -- "Lost in thought" :- http://www.planetthoughtful.org "A blog devoted to urban legends, superstitions, ghost stories, and all things folkloric." :- http://www.ulblog.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP5 Soap extension and generate wsdl
Hi there, im just wondering if its possible to setup your web service and let it generate a wsdl file for clients when u request the script with a wsdl flag like with nusoap ? Im rather not having to code an entire wsdl document for the web service if possible :\ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] memory leaks with 5.1 and osx
Ive discovered these errors in the apache error logs, is this anything serious ? Is there hardlinks to the source ? /usr/share/sources/php/php-5.1.1/Zend/zend_compile.c(1862) : Freeing 0x021B4E78 (140 bytes), script=thescript.php /usr/share/sources/php/php-5.1.1/Zend/zend_hash.c(248) : Actual location (location was relayed) === Total 5027 memory leaks detected === -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Zend + Eclipse + Standized Framework
Just found this article via phpeclipse.de stating Zend will be including Eclipse framework in their development schedules :) http://www.zend.com/news/zendpr.php?id=109 Id like to know more about this standardized application framework. I wonder if it includes the pear framework, or compiled OO based extensions ? Personally, i am trying to avoid all these frameworks until everyones ideas are collabroated into one as i think they only work for some or for the developers purposes only. I use phpeclipse and find it a nice app to use. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mod_rewrite, apache2, php5RC1 and osx bsd
On 11/11/2005, at 1:21 PM, Curt Zirzow wrote: Of course i dont get what your trying to do, the rewriterule doesn't match your description of what you said. Ok i am vague at most times, i wasnt going to give an exact example as it will give away some of the systems secret and not so good when it goes into the archive :\ From your other discusions it is kind of unclear exactly what version of apache you are using, as well as are you using perfork, perchild, worker, etc.. Its a prefork setup, worker would be nice though :D Also You mention fink but then you mention bsd, does it happen on both systems? Errm live system is running php 4.4.1 / Apache 1.3 and its ok. Im looking at upgrading it to php 5.1 when its out. As far it trying to download the faked url, what exactly is it trying to download and what are the headers for the request as well. The hanging could be a loop of some sort, have you looked at the output of the rewrite log to see exactly what is going on? Where can i find the log for that, i get a heap of errors like this though [Thu Nov 10 15:26:06 2005] [error] Optional hook test said: GET /videos/dir/42288faa3649e8a66b28871ba9d7e77b/457867517/ 713ced53f69d16f48072c2d13705e91b/95/180/video.stream HTTP/1.0 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mod_rewrite, apache2, php5RC1 and osx bsd
On 11/11/2005, at 8:53 AM, Max Belushkin wrote: I've been having a problem with PHP 4.4.1 and mod_rewrite, which, as Geert Booster kindly pointed out, has been reported on http://lists.freebsd.org/pipermail/freebsd-ports/2005-November/ 027038.html, which also has a link to the PHP bug report in the thread. Not sure if this is relevant to PHP5, but thought I'd mention that something similar exist(ed?) in the 4.4.1 version. There is also a bug report which is now closed for my problem !! This bug still exists in the latest PHP 5.1 in snaps.php.net. Mind you my apache is a fink binary, not bsd ports. There is huge issues compiling apache under osx bsd, hence why i had to go with the binary. Mind you osx is my dev environment coz its also my laptop,it is not production lol, our production machine however is also BSD. To prove it wasnt thee rewrite rule, i made it [L] to a standard html file and it was fine, so there is something up with it in php obviouslly in the module. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mod_rewrite, apache2, php5RC1 and osx bsd
On 11/11/2005, at 8:36 AM, Richard Lynch wrote: On Wed, November 9, 2005 10:36 pm, Dan Rossi wrote: Hi there, ive been having issues with mod_rewrite and apache2 with PHP 5.1RC1. I have googled the php bugs and people have been experiencing the same issue however the php people cant see to reproduce the bug. Its most definately doing it for me, here is a rewrite rule i have setup, if i [L] to a php script, it either tries to download the faked url file or hangs. I reverted back to 5.1.0b2 and it works fine ?? What do i do ? RewriteRule ^(.*)/(.*)/(.*)/(.*)/(.*)/(.+\.(video))$ ../../phpscript.php I should think all those .* should be .+ instead... Ill try that thanks ! I guess i could also use [A-z] or whatever lol I mean, if somebody surfs to this URL: http://example.com//example.video Do you really want that to hit ../../phpscript.php No not at all, this file is actually called from a windows media player embedded plugin , ie /videos/somethingtoaddtogetquery/anotherthingtoaddtogetquery passed to the script as ?somequery=$1&anotherquery=$2 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mod_rewrite, apache2, php5RC1 and osx bsd
On 10/11/2005, at 4:18 PM, Curt Zirzow wrote: On Thu, Nov 10, 2005 at 03:36:07PM +1100, Dan Rossi wrote: Hi there, ive been having issues with mod_rewrite and apache2 with PHP 5.1RC1. I have googled the php bugs and people have been experiencing the same issue however the php people cant see to reproduce the bug. Its most definately doing it for me, here is a rewrite rule i have setup, if i [L] to a php script, it either tries to download the faked url file or hangs. I reverted back to 5.1.0b2 and it works fine ?? What do i do ? RewriteRule ^(.*)/(.*)/(.*)/(.*)/(.*)/(.+\.(video))$ ../../phpscript.php Well this is a really ugly Rewrite, i must say. Say what you like however it had been working, and for the application it works, i dont think you get what its trying to do but anyway , im faking a url with session id's and ecrypted keys and sending the matches to the get request of that file so its hidden. One thing to note is well 5.1RC4 has been available in Oct: http://downloads.php.net/ilia/ Thats not available from the main site downloads. I also forgot to meantion i had downloaded the latest from php snaps and still the same problem, so obviouslly it has been overlooked. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mod_rewrite, apache2, php5RC1 and osx bsd
Hi there, ive been having issues with mod_rewrite and apache2 with PHP 5.1RC1. I have googled the php bugs and people have been experiencing the same issue however the php people cant see to reproduce the bug. Its most definately doing it for me, here is a rewrite rule i have setup, if i [L] to a php script, it either tries to download the faked url file or hangs. I reverted back to 5.1.0b2 and it works fine ?? What do i do ? RewriteRule ^(.*)/(.*)/(.*)/(.*)/(.*)/(.+\.(video))$ ../../phpscript.php
[PHP] PHP 5.1 release ?
Hi there just wondering when there may be a php 5.1 release ? I just went into the downloads on the php site and the link to RC1 has been removed ?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Issue with curl and ssl
Yes there somehow seems to be an issue with ssl. Does the curl extension rely on any ssl module in apache to work ? On 04/11/2005, at 12:34 AM, Jochem Maas wrote: can you get it to work without SSL? Dan Rossi wrote: Here is my code i am using, ive tried and tried, im still getting a no data sent error in the browser. https://mydomain/Default.asmx";); curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_FAILONERROR, 1); curl_setopt($ch, CURLOPT_SSLCERT, '/path/to/certs/cert.pem'); curl_setopt($ch, CURLOPT_SSLCERTPASSWD, 'thepass'); curl_setopt($ch, CURLOPT_SSLKEYTYPE, 'PEM'); curl_setopt($ch, CURLOPT_SSLKEY, '/path/to/certs/key.pem'); curl_setopt($ch, CURLOPT_USERPWD, 'user:pass'); ob_start(); curl_exec($ch); ob_end_flush(); if(curl_error($ch)) { printf("error: [%s] %s", curl_errno($ch), curl_error($ch)); } curl_close($ch); ?> On 03/11/2005, at 7:31 PM, Dan Rossi wrote: Just a standard php 4.3.11 and apache 1.3 ?? It works via php cli wierdly enough but not the apache module ? On 03/11/2005, at 7:17 PM, Jochem Maas wrote: Dan Rossi wrote: Hi there, I am trying to test out the new installed curl extension to connect to a site via ssl and auth basic. However everytime i try to connect with the browser , in ie it says cannot find server and in mac safari is says could not load any data etc. If i run the same script via php cli it works fine and is accepting the ssl certificate we setup on the IIs server we are connecting to. What could be cauasing this, there is no way to get php debug errors because it doesnt let the page load. Its around the curl_exec call. I also found that its causing an issue with apache in the logs * About to connect() to ourserver port 443 * Trying ip... * connected * Connected to ourserver (ip) port 443 * successfully set certificate verify locations: * CAfile: /usr/local/share/curl/curl-ca-bundle.crt CApath: none [Thu Nov 3 02:46:38 2005] [notice] child pid 49681 exit signal Segmentation fault (11) any ideas ? it helps when you tell us what versions of softwar eyou have. are you running apache2? is it running using a threaded worker module? is the curl extension thread safe? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Issue with curl and ssl
Here is my code i am using, ive tried and tried, im still getting a no data sent error in the browser. https://mydomain/Default.asmx";); curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_FAILONERROR, 1); curl_setopt($ch, CURLOPT_SSLCERT, '/path/to/certs/cert.pem'); curl_setopt($ch, CURLOPT_SSLCERTPASSWD, 'thepass'); curl_setopt($ch, CURLOPT_SSLKEYTYPE, 'PEM'); curl_setopt($ch, CURLOPT_SSLKEY, '/path/to/certs/key.pem'); curl_setopt($ch, CURLOPT_USERPWD, 'user:pass'); ob_start(); curl_exec($ch); ob_end_flush(); if(curl_error($ch)) { printf("error: [%s] %s", curl_errno($ch), curl_error($ch)); } curl_close($ch); ?> On 03/11/2005, at 7:31 PM, Dan Rossi wrote: Just a standard php 4.3.11 and apache 1.3 ?? It works via php cli wierdly enough but not the apache module ? On 03/11/2005, at 7:17 PM, Jochem Maas wrote: Dan Rossi wrote: Hi there, I am trying to test out the new installed curl extension to connect to a site via ssl and auth basic. However everytime i try to connect with the browser , in ie it says cannot find server and in mac safari is says could not load any data etc. If i run the same script via php cli it works fine and is accepting the ssl certificate we setup on the IIs server we are connecting to. What could be cauasing this, there is no way to get php debug errors because it doesnt let the page load. Its around the curl_exec call. I also found that its causing an issue with apache in the logs * About to connect() to ourserver port 443 * Trying ip... * connected * Connected to ourserver (ip) port 443 * successfully set certificate verify locations: * CAfile: /usr/local/share/curl/curl-ca-bundle.crt CApath: none [Thu Nov 3 02:46:38 2005] [notice] child pid 49681 exit signal Segmentation fault (11) any ideas ? it helps when you tell us what versions of softwar eyou have. are you running apache2? is it running using a threaded worker module? is the curl extension thread safe? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Issue with curl and ssl
Just a standard php 4.3.11 and apache 1.3 ?? It works via php cli wierdly enough but not the apache module ? On 03/11/2005, at 7:17 PM, Jochem Maas wrote: Dan Rossi wrote: Hi there, I am trying to test out the new installed curl extension to connect to a site via ssl and auth basic. However everytime i try to connect with the browser , in ie it says cannot find server and in mac safari is says could not load any data etc. If i run the same script via php cli it works fine and is accepting the ssl certificate we setup on the IIs server we are connecting to. What could be cauasing this, there is no way to get php debug errors because it doesnt let the page load. Its around the curl_exec call. I also found that its causing an issue with apache in the logs * About to connect() to ourserver port 443 * Trying ip... * connected * Connected to ourserver (ip) port 443 * successfully set certificate verify locations: * CAfile: /usr/local/share/curl/curl-ca-bundle.crt CApath: none [Thu Nov 3 02:46:38 2005] [notice] child pid 49681 exit signal Segmentation fault (11) any ideas ? it helps when you tell us what versions of softwar eyou have. are you running apache2? is it running using a threaded worker module? is the curl extension thread safe? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Issue with curl and ssl
Hi there, I am trying to test out the new installed curl extension to connect to a site via ssl and auth basic. However everytime i try to connect with the browser , in ie it says cannot find server and in mac safari is says could not load any data etc. If i run the same script via php cli it works fine and is accepting the ssl certificate we setup on the IIs server we are connecting to. What could be cauasing this, there is no way to get php debug errors because it doesnt let the page load. Its around the curl_exec call. I also found that its causing an issue with apache in the logs * About to connect() to ourserver port 443 * Trying ip... * connected * Connected to ourserver (ip) port 443 * successfully set certificate verify locations: * CAfile: /usr/local/share/curl/curl-ca-bundle.crt CApath: none [Thu Nov 3 02:46:38 2005] [notice] child pid 49681 exit signal Segmentation fault (11) any ideas ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_destroy(): Session object destruction failed
All standard apache/php4 stuff. The first session is a non cookie session ini_set('session.use_cookies', 0); session_name('sID'); session_start(); ini_set('session.gc_maxlifetime', 14440); ill attempt the sleep(1) i guess On 05/10/2005, at 6:36 PM, [EMAIL PROTECTED] wrote: Hi there! Are you running IIS? It seems to be a IIS-specific program when googling... Here is My thoughts: Can the problem be that session_use_cookies initate before all sessions are totally destroyed? Does the code work with only session_destroy() ? I would try to set a sleep - statement after session_destroy() and see if it is any difference.. /G :| The php compile error was the subject thats what keeps being triggered and i get emails from my system about. Session object destruction failed. I have googled about this yes it was something to do with the session_set_cookie after session destroy which triggers this but no fix. On 05/10/2005, at 5:14 PM, [EMAIL PROTECTED] wrote: hi there, i had asked this one a while ago but no replies. I am having this issue calling session_destroy on a non cookie session before creating a cookie based one. Here is the code @session_destroy(); ini_set('session.use_cookies', 1); session_name('thename'); session_cache_limiter('no_cache'); session_cache_expire(172800); session_set_cookie_params (172800, '/', 'thedomain',0); session_start(); ini_set('session.gc_maxlifetime',172800); lemme know thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Hi there! What is the question / problem? /G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session_destroy(): Session object destruction failed
:| The php compile error was the subject thats what keeps being triggered and i get emails from my system about. Session object destruction failed. I have googled about this yes it was something to do with the session_set_cookie after session destroy which triggers this but no fix. On 05/10/2005, at 5:14 PM, [EMAIL PROTECTED] wrote: hi there, i had asked this one a while ago but no replies. I am having this issue calling session_destroy on a non cookie session before creating a cookie based one. Here is the code @session_destroy(); ini_set('session.use_cookies', 1); session_name('thename'); session_cache_limiter('no_cache'); session_cache_expire(172800); session_set_cookie_params (172800, '/', 'thedomain',0); session_start(); ini_set('session.gc_maxlifetime',172800); lemme know thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Hi there! What is the question / problem? /G -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] session_destroy(): Session object destruction failed
hi there, i had asked this one a while ago but no replies. I am having this issue calling session_destroy on a non cookie session before creating a cookie based one. Here is the code @session_destroy(); ini_set('session.use_cookies', 1); session_name('thename'); session_cache_limiter('no_cache'); session_cache_expire(172800); session_set_cookie_params (172800, '/', 'thedomain',0); session_start(); ini_set('session.gc_maxlifetime',172800); lemme know thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Session object destruction failed
Hi there, I am using a pear session package to handle my sessions. However I am trying to destroy a url based non cookie session and then start a cookie based session however i am trying to set the session cookie with an expiry date, as ive been having complications with sessions expiring to wanted the cookie to expire in 2 days. I have googled and some ppl have had issues with session a session cookie after session_destroy ?? Any ideas? Here is how i set it up HTTP_Session::destroy(); HTTP_Session::useCookies(true); session_cache_expire(time()+60*60*24*24); HTTP_Session::start('FeedPlayer'); setcookie(session_name(),session_id(),time()+3600*24*2); HTTP_Session::setExpire(time()+60*60*24*24); HTTP_Session::setIdle(time()+60*60*24*24); Sep 07 06:38:28 ident [warning] session_destroy(): Session object destruction failed in /usr/local/lib/php/HTTP/Session.php at line 204 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sessions , expiry times and different time zones
client cookie expires hence no more session ... On 07/09/2005, at 1:57 AM, Jordan Miller wrote: Hi Dan, Couldn't you store an expiration time directly in the $_SESSION variable, rather than relying on cookie expiration (if I understand your question correctly)? Each time a page is loaded, update the expiration time in this variable to +24hr from the current time (all times relative to the server's time). Then, it shouldn't matter from which time zone the user is browsing. Jordan On Sep 6, 2005, at 10:37 AM, Dan Rossi wrote: hi there I have run into problems with sessions , cookies and expiryt times with different time zones. Ie our server is in the States however I am browsing from Koala land downunder. I have been trying to get the session to expire in a day, however for ppl in the states this is ok, but for me its already expired so i have been experiencing issues. How do i solve this ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sessions , expiry times and different time zones
hi there I have run into problems with sessions , cookies and expiryt times with different time zones. Ie our server is in the States however I am browsing from Koala land downunder. I have been trying to get the session to expire in a day, however for ppl in the states this is ok, but for me its already expired so i have been experiencing issues. How do i solve this ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Allowing access to only one host/referer
Hi there, i was wondering how I could allow access to a script from another server/host only ? Its prob a silly question but i guess get their host ip ? The thing with that is one server which is a webpage has a javascript popup to load the script on the other server, and i believe that in this scenario it doesnt send referer info. Let me know. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Issue with generating asx playlist with php
Just an update i've changed to use non cookie based sessions using pear's HTTP_Session so sending it in the filename string which loads in the query string of the php script within the plugin's file source. However the session isnt expiring now lol. On 30/08/2005, at 10:32 AM, Dan Rossi wrote: Thanks andy, I'll give this a shot however I am already doing this in the constructor of my class. However its just after calling the constructor of the base class. What I have noticed is really freaky. The plugin is loading my php script 4 times when loading to play a file, for the 3 times the session variable is there, then on the 4th time a new session is created but the session variable is empty :| On 30/08/2005, at 2:43 AM, Andy Pieters wrote: On Monday 29 August 2005 16:09, Dan Rossi wrote: ? I logged two different sess id's being created. Hi I have seen this behaviour as well, although in another context. The solution was to have the session_start instruction be one of the very first. In fact, in my software, the session_start is the second instruction on ALL pages. And globals.inc.php is like Hope this helps With kind regards Andy -- Registered Linux User Number 379093 Now listening to Blank and Jones and Friends (2005 week 34) - guest DJ Jochen Miller amaroK::the Coolest Media Player in the known Universe! Cockroaches and socialites are the only things that can stay up all night and eat anything. Herb Caen -- -- --BEGIN GEEK CODE BLOCK- Version: 3.1 GAT/O/>E$ d-(---)>+ s:(+)>: a--(-)>? C$(+++) UL>$ P-(+)>++ L+++>$ E---(-)@ W+++>+++$ !N@ o? !K? W--(---) !O !M- V-- PS++(+++) PE--(-) Y+ PGP++(+++) t+(++) 5-- X++ R*(+)@ !tv b-() DI(+) D+(+++) G(+) e>$@ h++(*) r-->++ y--()> -- ---END GEEK CODE BLOCK-- -- Check out these few php utilities that I released under the GPL2 and that are meant for use with a php cli binary: http://www.vlaamse-kern.com/sas/ -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Issue with generating asx playlist with php
Thanks andy, I'll give this a shot however I am already doing this in the constructor of my class. However its just after calling the constructor of the base class. What I have noticed is really freaky. The plugin is loading my php script 4 times when loading to play a file, for the 3 times the session variable is there, then on the 4th time a new session is created but the session variable is empty :| On 30/08/2005, at 2:43 AM, Andy Pieters wrote: On Monday 29 August 2005 16:09, Dan Rossi wrote: ? I logged two different sess id's being created. Hi I have seen this behaviour as well, although in another context. The solution was to have the session_start instruction be one of the very first. In fact, in my software, the session_start is the second instruction on ALL pages. And globals.inc.php is like Hope this helps With kind regards Andy -- Registered Linux User Number 379093 Now listening to Blank and Jones and Friends (2005 week 34) - guest DJ Jochen Miller amaroK::the Coolest Media Player in the known Universe! Cockroaches and socialites are the only things that can stay up all night and eat anything. Herb Caen -- -- --BEGIN GEEK CODE BLOCK- Version: 3.1 GAT/O/>E$ d-(---)>+ s:(+)>: a--(-)>? C$(+++) UL>$ P-(+)>++ L+++>$ E---(-)@ W+++>+++$ !N@ o? !K? W--(---) !O !M- V-- PS++(+++) PE--(-) Y+ PGP++(+++) t+(++) 5-- X++ R*(+)@ !tv b-() DI(+) D+(+++) G(+) e>$@ h++(*) r-->++ y--()> -- ---END GEEK CODE BLOCK-- -- Check out these few php utilities that I released under the GPL2 and that are meant for use with a php cli binary: http://www.vlaamse-kern.com/sas/ -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Issue with generating asx playlist with php
On 29/08/2005, at 10:00 PM, Dan Rossi wrote: I have just discovered on closer debugging, the windows media plugin is loading the file twice, i can see the stop button flicker twice and i made an error log and the word loaded shows up twice, would this be causing an issue with the session ? Ok its quite obvious I just discovered the session is being created again when the file is loaded from the windows media plugin therefore token variable is not there. Any ideas what could have been doing this ? I logged two different sess id's being created. On 29/08/2005, at 5:20 PM, Dan Rossi wrote: Hi there I am trying to use php to output an asx playlist but depends on a special hash in the url to prevent hotlinking. I am using a session to store a generated token when generating the url to display in an embedded player. The token is added in the filename and I am using rewrite rules to load another php script which does a check of the hash in the querystring with the token stored in the session. However its having unexpected results. When i add the check for the session token the media player either doesnt player in PC or outputs playlist format not recognised in Mac. If i do a check for the hash only its ok. Here is an example if ($_GET['h'] && $_GET['filename'] && $this->hash) { $file = WMSERVER.Feeds_Hotlink_Check::strip_paths($_GET['filename']); $this->filename = preg_replace('/stream/','wmv',$file); $this->tpl->compile('playlist.html'); header("Content-Type: video/x-ms-wmv"); die(trim($this->tpl->outputObject($this))); } breaks with this if ($_GET['h'] && $_GET['filename'] && $this->token) { $file = WMSERVER.Feeds_Hotlink_Check::strip_paths($_GET['filename']); $this->filename = preg_replace('/stream/','wmv',$file); $this->tpl->compile('playlist.html'); header("Content-Type: video/x-ms-wmv"); die(trim($this->tpl->outputObject($this))); } ideally i want it to look like if ($_GET['h'] && $_GET['filename'] && (strcmp($this->token,$this->hash)==0)) { $file = WMSERVER.Feeds_Hotlink_Check::strip_paths($_GET['filename']); $this->filename = preg_replace('/stream/','wmv',$file); $this->tpl->compile('playlist.html'); header("Content-Type: video/x-ms-wmv"); die(trim($this->tpl->outputObject($this))); } they are being set earlier in the script like so $this->token = trim($_SESSION['token']); $this->hash = trim($_GET['h']); any ideas ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Issue with generating asx playlist with php
I have just discovered on closer debugging, the windows media plugin is loading the file twice, i can see the stop button flicker twice and i made an error log and the word loaded shows up twice, would this be causing an issue with the session ? On 29/08/2005, at 5:20 PM, Dan Rossi wrote: Hi there I am trying to use php to output an asx playlist but depends on a special hash in the url to prevent hotlinking. I am using a session to store a generated token when generating the url to display in an embedded player. The token is added in the filename and I am using rewrite rules to load another php script which does a check of the hash in the querystring with the token stored in the session. However its having unexpected results. When i add the check for the session token the media player either doesnt player in PC or outputs playlist format not recognised in Mac. If i do a check for the hash only its ok. Here is an example if ($_GET['h'] && $_GET['filename'] && $this->hash) { $file = WMSERVER.Feeds_Hotlink_Check::strip_paths($_GET['filename']); $this->filename = preg_replace('/stream/','wmv',$file); $this->tpl->compile('playlist.html'); header("Content-Type: video/x-ms-wmv"); die(trim($this->tpl->outputObject($this))); } breaks with this if ($_GET['h'] && $_GET['filename'] && $this->token) { $file = WMSERVER.Feeds_Hotlink_Check::strip_paths($_GET['filename']); $this->filename = preg_replace('/stream/','wmv',$file); $this->tpl->compile('playlist.html'); header("Content-Type: video/x-ms-wmv"); die(trim($this->tpl->outputObject($this))); } ideally i want it to look like if ($_GET['h'] && $_GET['filename'] && (strcmp($this->token,$this->hash)==0)) { $file = WMSERVER.Feeds_Hotlink_Check::strip_paths($_GET['filename']); $this->filename = preg_replace('/stream/','wmv',$file); $this->tpl->compile('playlist.html'); header("Content-Type: video/x-ms-wmv"); die(trim($this->tpl->outputObject($this))); } they are being set earlier in the script like so $this->token = trim($_SESSION['token']); $this->hash = trim($_GET['h']); any ideas ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Issue with generating asx playlist with php
Hi there I am trying to use php to output an asx playlist but depends on a special hash in the url to prevent hotlinking. I am using a session to store a generated token when generating the url to display in an embedded player. The token is added in the filename and I am using rewrite rules to load another php script which does a check of the hash in the querystring with the token stored in the session. However its having unexpected results. When i add the check for the session token the media player either doesnt player in PC or outputs playlist format not recognised in Mac. If i do a check for the hash only its ok. Here is an example if ($_GET['h'] && $_GET['filename'] && $this->hash) { $file = WMSERVER.Feeds_Hotlink_Check::strip_paths($_GET['filename']); $this->filename = preg_replace('/stream/','wmv',$file); $this->tpl->compile('playlist.html'); header("Content-Type: video/x-ms-wmv"); die(trim($this->tpl->outputObject($this))); } breaks with this if ($_GET['h'] && $_GET['filename'] && $this->token) { $file = WMSERVER.Feeds_Hotlink_Check::strip_paths($_GET['filename']); $this->filename = preg_replace('/stream/','wmv',$file); $this->tpl->compile('playlist.html'); header("Content-Type: video/x-ms-wmv"); die(trim($this->tpl->outputObject($this))); } ideally i want it to look like if ($_GET['h'] && $_GET['filename'] && (strcmp($this->token,$this->hash)==0)) { $file = WMSERVER.Feeds_Hotlink_Check::strip_paths($_GET['filename']); $this->filename = preg_replace('/stream/','wmv',$file); $this->tpl->compile('playlist.html'); header("Content-Type: video/x-ms-wmv"); die(trim($this->tpl->outputObject($this))); } they are being set earlier in the script like so $this->token = trim($_SESSION['token']); $this->hash = trim($_GET['h']); any ideas ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Compiling the example hello world extension on OSX with PHP 5.1
On 07/07/2005, at 12:29 PM, Rasmus Lerdorf wrote: Well, where is it? Probably in a libs or .libs directory. -Rasmus You aint the Demigod for nothing you know :P iElectro:/usr/share/php-5.1.0b2/ext/hello root# gcc -dynamic -flat_namespace -bundle -undefined suppress -DPHP_ATOM_INC -I/usr/share/php-5.1.0b2/ext/hello/include -I/usr/share/php-5.1.0b2/ext/hello/main -I/usr/share/php-5.1.0b2/ext/hello -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/sw/include -DHAVE_CONFIG_H -I/sw/include -L/sw/lib -o hello.so .libs/hello.o This worked ;) Ok I feel great pain trying to do things like this on the mac, ie apache2 wont compile so fink is the only option, I know, i'm gonna get my noisy Sun rack going again however development on the powerbook rocks :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Compiling the example hello world extension on OSX with PHP 5.1
On 07/07/2005, at 11:43 AM, Rasmus Lerdorf wrote: Yeah, the OSX build is a bit messed up right now. You can fix it manually by doing a copy-paste of the final link line and replace hello.lo with hello.o -Rasmus thanks mate however I get file cannot be found, i even tried to symlink it sneakily no luck iElectro:/usr/share/php-5.1.0b2/ext/hello root# gcc -dynamic -flat_namespace -bundle -undefined suppress -DPHP_ATOM_INC -I/usr/share/php-5.1.0b2/ext/hello/include -I/usr/share/php-5.1.0b2/ext/hello/main -I/usr/share/php-5.1.0b2/ext/hello -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/sw/include -DHAVE_CONFIG_H -I/sw/include -L/sw/lib -o hello.so hello.o gcc: hello.o: No such file or directory gcc: no input files with symlink ld: hello.o bad magic number (not a Mach-O file) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Compiling the example hello world extension on OSX with PHP 5.1
Hi there I am trying to compile the demo example hello world extension on OSX with no luck I keep getting errors when trying to compile. iElectro:/usr/share/php-5.1.0b2/ext/hello electroteque$ make gcc -dynamic -flat_namespace -bundle -undefined suppress -DPHP_ATOM_INC -I/usr/share/php-5.1.0b2/ext/hello/include -I/usr/share/php-5.1.0b2/ext/hello/main -I/usr/share/php-5.1.0b2/ext/hello -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/sw/include -DHAVE_CONFIG_H -I/sw/include -L/sw/lib -o hello.so hello.lo ld: hello.lo bad magic number (not a Mach-O file) Extension link is http://www.zend.com/php/internals/extension-writing1.php#Heading5 Any ideas what the issue is ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5.1 vm
On 07/07/2005, at 10:26 AM, Richard Lynch wrote: "slow" switch You're a funny man Richard. So how is there overhead using callbacks if you dont mind me asking ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] alternative to empty
On 06/07/2005, at 10:47 PM, André Medeiros wrote: If ($string == '') ?? or if (isset($string)) ?? $string may be defined and still be empty ;) Hence my first example :P -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] alternative to empty
On 06/07/2005, at 7:55 PM, Ross wrote: I have been using empty in forms for some time now. but have just discovered that PHP 4 As of PHP 4, The string value "0" is considered empty. If ($string == '') ?? or if (isset($string)) ?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5.1 vm
On 06/07/2005, at 3:43 PM, Rasmus Lerdorf wrote: The GOTO mechanism uses a bit of a compiler trick known as "computed gotos" to try to make each one a very simple branch at the assembly level. It looks like this in C: That is, we can dynamically create a list of labels and then use a GOTO to jump directly to one of these dynamic labels. Not instead of jumping to ptr[1] as in the above example, imagine making that a variable, say the opcode number, and doing the goto directly to the code defined for each opcode. That's the GOTO VM. And it should theoretically be the fastest assuming the compiler does the right thing. Very interesting, I am not a C man however I am getting my head down into extension building coz I am familiar with it, even though how low level down to the registries it is, there are helper functions in the Zend core to do some work for you :) I would presume GOTO to be quick as its using labeled references. The SWITCH vm was originally just a big switch(opcode) { case 1: ...; case 2: ...' } It's a bit different now, but you can think of it in those terms. Decent compilers should theoretically be able to optimize a clean set of cases to something close to simple branches, just like the computed goto case, but it can be hit and miss. With the computed goto way of doing it, we are trying to send a stronger hint to the compiler. Well i do find a performance issue running a heap of switches in PHP so I could presume the same here. And finally the CALL vm basically just uses a function pointer to call the handling code. Think of it as something alone the lines of ${"handler_$i"}(); in PHP terms. That is, you would have handler_1(), handler_2(), handler_3() functions defined and you dynamically determine which one to call based on the opcode. Ahh like a dynamic callback interesting, I would prob find this the quickest then ? I do find it more efficient to run callback functions than switches in the php code which I have been doing for a while now. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5.1 vm
On 06/07/2005, at 5:05 AM, Jochem Maas wrote: well I hadn't got a clue about this vm stuff but I read that there are CALL, GOTO and SWITCH [vm?] models implemented. according to 'Seb' CALL goes fastest. But I would assume that offering different vm models meant that raw speed is not the only factor (otherwise why not concentrate all efforts on just the CALL code) - could someone** give a hint (or a link :-) as to what the VMs mean for people who have the choice? (i.e. in full control of the server running their code) I could imagine that the different VMs are tuned to different styles of code (e.g. OO & procedural) or different tasks? (web, cmdline, deamon) ...is this anyway near the truth? Wow interesting, tuned for different tasks ey ? If i must of read wrong, Seb's benches said GOTO was the better compile option ? I am still curious what all 3 mean :D -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5.1 vm
On 06/07/2005, at 12:08 AM, Rasmus Lerdorf wrote: Dan Rossi wrote: Continouing from my previous email I have been reading further on Seb's blogs regarding bechmarks with PHP5.1 and the different vm's that it compiles with. I dont particularly understand what the virtual machine is for, but he does meantion threading. Does this mean PHP5.1 will be able to run with Apache2 ? The vm's have nothing to do with Apache2 and PHP has worked with Apache2 for years. No I know it works in Apache2 (but not thread safe). What I was asking then what it this compile option, I am just looking into it thats all --with-vm-kind=GOTO . It meantioned threading in the article and different benchmarks of the vm compile options.
[PHP] PHP 5.1 vm
Continouing from my previous email I have been reading further on Seb's blogs regarding bechmarks with PHP5.1 and the different vm's that it compiles with. I dont particularly understand what the virtual machine is for, but he does meantion threading. Does this mean PHP5.1 will be able to run with Apache2 ? http://frassle.rura.org/Directory/index?cat=11169 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Aspect PHP
In my research in finding ways to load classes automatically, I have stumbled across Aspect PHP. Does anyone know what it does and why it was developed ? http://frassle.rura.org/Directory/index?cat=11169 It looks like the guy here has done what I am looking for, using __autoload to do classloading . However the final trick I would like to possibly achieve is a servlet style url to automatically load a page class and execute is constructor. I am sure people here have also had a similar idea, if you have any advise in this area ? I am looking at building a PHP5 pet project for a project management application. As sadly the ones I have seen are limited in some ways in terms some dont have good time tracking and invoicing features and obviouslly invoice creation. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Dynamic pspell module, and adding new words to the list
Hi there, an internal client of ours requires spell checking in their textarea forms on names of people for searching thousands of records properly. What it needs to be able to do is add new names to the dictionary. The server its on is a few years old, it already has the pspell and aspell libraries and command line tools, its running php4.3.0 urrggh, what i am needing to do is load it as a dynamic module and then use an Ajax service to do the spell checking. The spell checker needs to be able to add names to the dictionary is any of this possible ? Let me know thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Persistant Connections and max_connections on mysql
On 21/06/2005, at 7:47 PM, Catalin Trifu wrote: I presume you mean whether it's interactive_timeout or wait_timeout, or ? Actually they both are important. Read the mysql at dev.mysql.com C. We should be sweet now, still use persistant connections on a high traffice server, but reduce the timeout for the threads before they drop off, hence why they stay open for so long and then run into the max_connection issues. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Persistant Connections and max_connections on mysql
On 21/06/2005, at 6:06 PM, Catalin Trifu wrote: Hi, This is a database issue and has to do with the following mysql variables: interactive_timeout wait_timeout By default these variables are set to 28800 and they represent the time for which the server waits on "persistent" connection. If you have a busy site that number is way too big; so try to decrease those variables and you should be fine: mysql> set global interactive_timeout = 120; mysql> set global wait_timeout = 120; This makes the timeout on connections 2 minutes after which mysql disconects the user and so freeing usable space for new connections. You can also add them in my.cnf so that the server gets them when started: set-variable = intercative_timeout=120 Cheers its one or the other :O , I work most with intranet apps so dont have these kind of issues. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Persistant Connections and max_connections on mysql
Hi there, I have run into issues on a public production server where I keep running into max connection issues on mysql if I am using peristant connections. Sometimes the machine gets high traffic and I was wondering if there are good reasons to leave them on or off. After turning them off its been ok for one of the sites/projects. The mysql setting was originally 100 I got the bumped up to 500 but still the same issue ? Let me know. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Apple software updater kills php cli ?
Hi, I had made a feedback complaint to Apple without any reply, I was wondering if anyone has had any issues with their php cli crapping out whenever an apple update occurs under OSX ? It seems to revert back to php 4.3 or whatever is the default in the base system. I run a php5 system. Here is the output running the php cli that randomly occurs after an update until i recompile ! dyld: php Undefined symbols: _OnUpdateLong _OnUpdateString _compiler_globals _executor_globals _sapi_globals _sapi_module _zend_error_cb _zend_extensions _zend_ini_boolean_displayer_cb Trace/BPT trap -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Flexy help
On 10/06/2005, at 7:46 PM, Thomas wrote: Hi there, I would like to find out about the usage of custom tags in Flexy. I would like to do something like , or similar. The documentation is very scarce about this. It would be great if you could help me, otherwise refer me to a good documentation page (the one in the pear manual is not sufficient). Thanks Thomas You might want to move this to the pear-general list. I have spoken to alan about a special custom tag like this, would be nice. I think it could possibly be via the plugin modules ? I was thinking of building such a tag, and render the dynarch calaneder http://www.dynarch.com/projects/calendar/ However it only returns values to a textfield, where it should be to a pulldown, but can be done without much effort. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Advise needed on moderated threaded chat
I've been given the bombed task of coming up with a pre-moderated threaded chat solution. I had implemented a moderated flash chat however with 100 users all making bulky comments to the chat guests, it became unbearable for the moderator to check them all off in time to make them cohesive to the discussion, as it was a java xml socket based flash chat therefore had no threading capabilities. Now I dont particularly want to have to write something like this in php, I can just see the Apache 1.3 server with a Mysql backend grinding as there is no threading. What could be the best solution here ? I use special tricks these days to prevent page state changing when posting using XMLHTTP , well I am using a package called Aframe which uses Sajax but allows for OO based services, so this could be a solution for the posting mechanism. However I would need to find the best solution which will use the less resources when posting, and refreshing, and adding moderated comments back into the chat thread in the position when it was posted possibly by the database primary key. If there is better ways either using sockets to another mechanism let me know. Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Voting Polls and preventing multiple votes
Hi there I am mocking up a quick voting poll system, however I would like to put hooks in place to prevent users posting more than once, voting bots etc. Is there a way to prevent them, obviously sessions, cookies, host ips cant be used as they can be removed, and especially with host ips , ppl are usually behind a proxy ip that doesnt forwarding the referring ip. Let me know if anyone has cooked up something like this thanks. I have the voting mechanism and result displaying fine, just the special checks to prevent the form being displayed. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5.0. Save classes in a session. Need help now
I've done this by serializing and unserializing the the object. Its been discussed however using shared memory, shm is a better way to do it ? Sadly sh doesnt compile as default. On 12/05/2005, at 10:19 AM, Oscar Andersson wrote: Is it possibele to save a class in a session ex. $cl = new Class(); $SESSION['this_class'] = cl; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Generating a php file
On 12/05/2005, at 8:01 AM, Rory Browne wrote: I'm still not sure I understand, although I'm getting there. This might be useful. $dynamicly_generated_script = "somevalue}'; ?>"; As might this: $dyn_gen_script = sprintf( '' , $this->somevar ); \ Ahh it looks like i have to addslashes to dollar signs ! I'll try tonight cheers. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Generating a php file
On 12/05/2005, at 6:03 AM, Rory Browne wrote: You can start by clarifying. I had to read your message three times before I got a vague understanding. What I'm hearing is that you want to put something like into a string? You are having difficulty doing this because you are finding that your string contains the value of $msg, instead of a doller sign, followed by 'msg'? If so, then you can: Use Single Quotes: $code = '' or Escape your $-signs, by placing a backslash(\) in front of the $-sign $code = ""; I've had a habit of this of late ! Let me clarify for you then ;) I have a php file say i need to dynamically generate some values in the script and output a new file to download from it ie somevalue; ?> becomes where $this->somevalue is from my generator class ;) However if I do $buffer = ""; I get all sorts of errors around $_SERVER. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] include remote class
im doing include('http://www.mysite.com/class.php'); and then i create new instance but i get error - cannot instantiate non-existant class how can i get this remotely hosted class file to be defined? If you surf to that URL, do you see PHP source, or do you see HTML/nothing? You may want to use .phps to get source, or .inc if mysite.com is configured to serve those up as PHP. You also have to make sure class.php is actually valid code... You also maybe want to use a SOAP service maybe ? nusoap works well. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Generating a php file
Hi there I am trying to generate a php file, which has variables that i need to have in it ie $_SERVER but not actually be parsed as they need to be in the actual script. I also need to send some variables to assign values to other variables in the script. How is this possible ? I have tried placing the contents of the script within a string, but all the variables gets parsed, and the super globals cause an error. Let me know . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] using sockets to load a streaming windows media file
Hi there, is there anyway possible to load a streaming windows media file via a socket connecting to output its contents to the browser or a windows media object. My issue is I am spitting out an asx playlist file however for some freak reason, whenever i put control logic around where i am outputting the playlist the player craps out saying playlist file format not recognised. Which is why I want to try out this way execpt socket transport doesnt understand mms :) Ie the file would look like mms://thefile -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] compiling dynamic extensions without root access
On 08/05/2005, at 1:03 AM, Rory Browne wrote: I believe(although I stand to be corrected, that there is a threading MLM on apache 2 - this would rule out dl() AFAIK We're not using Apache2 yet coz of the thread issue with php however i am setting up a prefork setup for development. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Java in PHP5
Ok So I am looking at two possibilities of java integration, one via command line and one using the extension. I dont particularly want the experimental pecl extensions in my php therefore I want it dynamically loaded. I cant for the life of me find the Java extension, would anyone know where to find it ? Its not on the pecl site ? Let me know thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] compiling dynamic extensions without root access
On 07/05/2005, at 3:16 AM, Rory Browne wrote: It depends: What webserver are you using? PHP/Apache will let you load extensions using .htaccess, which can be your own extensions, located in a directory that you have write access to. I've never tried it but something like php_extension_dir /home/yourname/php_extensions php_extension your_php_extension.so should do the trick. If you don't mind modding your php code, to take account of the fact that these extensions aren't available by default, you can create a function to load dynamic modules, using the extension_loaded() and dl() functions (see the examples on www.php.net/dl ). Bare in mind that this will not run in certain webservers, noteably Zeus, and IIS. Its apache 1.3, 2.0 is not a goer until threading support is available unless it is already ? What I was asking is, are we able to run say phpize as a non root user and build a module that can be dynamically loaded ? I wouldnt mind checking out the PHP5 soap extension , but getting an admin to install it will take forever. Lemme know thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] compiling dynamic extensions without root access
I was going to ask, without the need of requesting our admins to recompile php all the time is there a way in the meantime to compile extensions and load them dynamically without the need for root access to some of the php libraries ? I have always compiled in personally so have never tried it. But there a few things i'd like which would take forever to get requested. Let me know. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XSL:FO + PHP
Have you tried this? It seems HTMLDoc is still free... I've used that tool also... pretty satisfied. http://www.htmldoc.org/software.php I have used htmldoc in the past for this, but feel its a workaround, htmldoc is purely for generating manuals, which is what it does best, i wonder if it handles docbook files itself ? However it doesnt render so well. FOP is dedicated for this and is cross platform. Htmldoc is commercial software now therefore I am the only one with the licence. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XSL:FO + PHP
On 05/05/2005, at 1:47 AM, Kristen G. Thorson wrote: Dan, I have done this before, but it was only a proof-of concept excercise for me, so my procedure may not work for you. My test was against an Amazon web service and generating a PDF from the XML returned to me. This method used Apache's FOP. Before executing the following code, I saved the XML returned from Amazon as a temp file ($xmlfile). $PDFfile = "$xmlfile.pdf"; $callstring = "$FOPpath/fop.sh -xsl $xslforoot/$xslfofile -xml $xmlfile -pdf $PDFfile"; $answer = shell_exec( $callstring ); header( "Content-type: $ctype" ); $pieces = explode( "/", $xmlfile ); header( "Content-Disposition: attachment; filename=".$pieces[ count( $pieces )-1 ] ); readfile( "$xmlfile.pdf" ); I hope this is helpful to you, kgt Hi yes this is exactly what i may have to do. I have tried all the usual outlets in terms of subclasses of FPDF , all are limited and crappy, it just cant do tables properly. The closest I got was with PDML however it was still tedious to build a table with ! Now I think processing for such a command line would take forever this is what I need to do, a print button displays on the header of a form entry. What i need to do is collect the data from that database entry and display it as a view with the data rather than the form and make it printable in a pdf. This ideally means generate xml from the db entry, save it as a file, execute commandline with temp xml file, readfile the pdf. I dont think it should take too long to output to the browser right ? I think a step i'd like to skip is the readfile, and work out how to send to standard output and use passthru ? In the past I have used an app called HTMLDoc, its the bomb for making pdf manuals with chapters and table of contents. It also requires saving a temp html file and then sends the pdf as standard output. However HTMLDoc is not free anymore, I only have one licence for that to make docs only. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XSL:FO + PHP
On 05/05/2005, at 8:28 AM, Dan Rossi wrote: For any interested parties, there is a tool called html2fo which will convert html to a formatted object file which can then be sent to FOP. I also found another example where any xhtml file can be transformed with a global xsl stylesheet to transform the html firstly to fo. More shortly. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XSL:FO + PHP
On 05/05/2005, at 7:14 AM, Kristen G. Thorson wrote: Dan Rossi wrote: On 05/05/2005, at 5:57 AM, Kristen G. Thorson wrote: especially since this wasn't to be our final approach. I'd be interested if you find out more information on the subject. What did you decide on ? LOL. That part got beyond me. I don't understand how all the PDF forms stuff works, and I wasn't a part of the implementation of it. Something like XML + FDF = PDF. We decided against using the XSL:FO because we needed to create a form, but this form had an exact layout that we would need to emulate, and the other way was the path of least resistance. kgt a form in a pdf ? Eek ok FDF , do you mean FPDF ? Frankly i find XSL:FO easier to code than native FPDF :) Anyway I have started on the FOP examples on the apache site and cooking up a java app that can spit out the byteArray to the screen as standard out :) It'll do similar to how the servlet does it and how php does readfile, dont know of any memory issues as I am totally java green :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XSL:FO + PHP
On 05/05/2005, at 5:57 AM, Kristen G. Thorson wrote: especially since this wasn't to be our final approach. I'd be interested if you find out more information on the subject. What did you decide on ? On using passthru: I do not think FOP has the option to passthru the PDF output from the command line call. It was necessary to save the generated PDF and then serve it. (I haven't double checked, but I think I saved the file because I had to.) Of course FOP is open source so you have the opportunity to make it work with you. Yeh I want to avoid readfile, my only option is to build my own embedded java app which sends the out.byteArray :) This should be a fun pet project as i've been wanting to get into java for a while :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] XSL:FO + PHP
Hi there, I am looking at integrating XSL:FO and PHP to convert html templated data into pdf's using xml and xsl. I was wondering if anyone has had success with this ? I have seen the pear package which does this but requires the experimental java extension. Let me know, it looks easy executing the bits of the commandline apart from giving the parameter an xml string of data from the database rather than a file and outputting to the browser rather than saving to a pdf file. Let me know thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] FPDF, HTML and PDML
Hi there I am trying out the PDML class which interfaces the FPDF code for generating PDF's with markup language. The issue its I cant put straight html tables into it. Is there such an interface to FPDF that can be used to convert html to pdf. I have tried alot of them and none worked out of the box. Let me know cheers. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] __autoLoad php5 callback is being triggered for every class ?
Its DB_Error which is the error callback for the PEAR DB. I dont know where its being references but its triggering my php error handler and i cant supress the errors for require. There is no such file DB/Error.php however i may have to create one just to make it go away :) On 29/04/2005, at 9:32 PM, Jochem Maas wrote: [EMAIL PROTECTED] wrote: I'm experiencing some issues with autoLoad with pear packages. DB_Error is contained within the DB.php, but my autoload method is trying to split the underscores with forward slashes and then load. Supressing errors with @ still doesnt work, its triggering a php error. Any ideas ? __autoload() gets called whenever you reference a class that has not been defined. additionally its called if you call class_exists() and the class doesn't ... unless you call class_exists() with the second parameter to false. if your __autoload() is being called then the class is not loaded and from what you say its seems your autoload function can't find the relevant file - whats the function look like? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and Ajax?
hmm isnt the intention of httprequest is that u can send post data without leaving the page ? It has worked for me, except u have to build the post data yourself to send. On other similar circumstances i've had to post certain data from a post to the current database but also executr a script and insert data into another system, i used nusoap for this as i wanted the logic to be in the same system not duplicate it. The issue is I wouldnt know if posting the form building post array on the other reuqest , sending to the other system via httprequest returning the insert id, insert post data into current database would work. It looks like u are trying to build the serializes array in the current request, i'll do some tests though. On 29/04/2005, at 6:25 PM, Zac Barton wrote: You should also look at JSON (JavaScript Object Notation - is a lightweight data-interchange format) http://pear.php.net/pepr/pepr-proposal-show.php?id=198 http://mike.teczno.com/json.html Zac -Original Message- From: Hidayet Dogan [mailto:[EMAIL PROTECTED] Sent: 29 April 2005 07:41 To: Jeremiah Johnson Cc: php-general@lists.php.net Subject: Re: [PHP] PHP and Ajax? Try SAJAX at http://www.modernmethod.com/sajax Hidayet Dogan [EMAIL PROTECTED] Pleksus Bilisim Teknolojileri D.T.O. A.S. -- caldiran sok. 14/6 06420 kolej ankara * www.pleksus.com.tr tel : +90 312 4355343 * faks: +90 312 4354006 On Thu, 28 Apr 2005, Jeremiah Johnson wrote: Does anyone have any references on using PHP and Ajax? I caught the news on PHP Architect about the webcast they are doing in May and it sounds like an interesting technology, but I can't wait, of course :)... and I wanted to learn as much as I could before their presentation. Any pointers? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and Ajax?
its using the standard toolkit available in most browsers, what i find a pain in the ass is having to build the post data into a string before it can be sent, it should do it for u On 29/04/2005, at 4:40 PM, Hidayet Dogan wrote: Try SAJAX at http://www.modernmethod.com/sajax Hidayet Dogan [EMAIL PROTECTED] Pleksus Bilisim Teknolojileri D.T.O. A.S. -- caldiran sok. 14/6 06420 kolej ankara * www.pleksus.com.tr tel : +90 312 4355343 * faks: +90 312 4354006 On Thu, 28 Apr 2005, Jeremiah Johnson wrote: Does anyone have any references on using PHP and Ajax? I caught the news on PHP Architect about the webcast they are doing in May and it sounds like an interesting technology, but I can't wait, of course :)... and I wanted to learn as much as I could before their presentation. Any pointers? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Athentication with defined users in linux
On 28/04/2005, at 7:16 PM, Hesam Montazeri wrote: Dear Friends, I am just subscribe to this interesting list. I have a question about authenticating mechanisms. I want to implement login page which authenticate users against defined users on Linux Redhat 9.0 on the server machine. I don't want to define the users(in plain text or ...). If possible ,please provide me with sample codes or any references. Correct me if I am wrong here you should check out either using htaccess htpasswd which uses a PAM link or LDAP. Or trying using pear's Auth package which connects to ldap. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Global Variables
session_start(); $_SESSION['somevar'] = "foo"; u could also check out pear's HTTP_Session package. On 28/04/2005, at 7:06 PM, Dan wrote: Hi all. I taught myself PHP before the frenzy over register_globals. After a reasonable break from the language, I'm back for more. I'm building a site where I'll be holding a lot of variables in memory for each session. How do I do that? Apparently I can't use session_register() if register_globals is turned off. I've read a little about the consequences of writing bad scripts with register_globals on ... I'm fine with this explanation. I agree that I don't want people injecting variables into my session. What I want is for ME to be able to set variables and remember them throughout the session. How do I do that? Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Flash integration with PHP
Its been in active freeze for two years ? Besides PHPObject is AS2 compatible now. On 25/04/2005, at 8:41 PM, Evert | Rooftop wrote: I'm sure they would tell something about that on the mailing list or website. From what I know it is still active and there's almost a 1.0 coming out grt, Evert Dan Rossi wrote: From my knowledge amfphp is now vapourware, I am assuming lawsuits etc . PHPObject is the alternative, it however doesnt use the flash remoting component but has its own, it streams serialized data as an array from php classes. the sucky thing is you cant use the remoting monitor in flash for debugging. http://ghostwire.com/go/28 On 25/04/2005, at 7:27 PM, Evert | Rooftop wrote: khuram noman wrote: I want to develop a shopping car in flash using php so there any good tutorial or sample code that explain the flash integration with php Check out amfphp (http://www.amfphp.org). Flash people tend to love it =) grt, Evert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Flash integration with PHP
From my knowledge amfphp is now vapourware, I am assuming lawsuits etc . PHPObject is the alternative, it however doesnt use the flash remoting component but has its own, it streams serialized data as an array from php classes. the sucky thing is you cant use the remoting monitor in flash for debugging. http://ghostwire.com/go/28 On 25/04/2005, at 7:27 PM, Evert | Rooftop wrote: khuram noman wrote: I want to develop a shopping car in flash using php so there any good tutorial or sample code that explain the flash integration with php Check out amfphp (http://www.amfphp.org). Flash people tend to love it =) grt, Evert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Dynamic Generating reports to print
On 24/04/2005, at 12:43 AM, Steve Brown wrote: I used to encounter the same problems with reporting in our business software. You can generate reports and spit out HTML in a new window and have the user print the report from the browser, but that has many drawbacks. It only works with simple data sets, its difficult (or impossible) to control page breaks, lack of precision placing, etc. Now I use FPDF to generate PDF reports (http://www.fpdf.org/). Its free, easy to use, and pretty flexible. It allows you to do precision placement on a page, add headers, footers, etc, etc, etc. Be sure to check out the "Scripts" section, its got a bunch of useful tips for expanding functionality of the classes. There is another commerical product out there (can't thin of the name right now) that is supposed to be faster, but FPDF is pretty fast in our applications. I find doing it this way a total pain in the ass, I have in the past used htmldoc , to generate html to pdf , it has special tags to do certain things in the pdf's. Seriously drawing it like this is time consuming. I would suggest report designers like report manager and jasper reports. Currently for Excel I have built a subclass to the PEAr structures datagrid which uses the excel spreadsheet renderer, and i give it a database resultset, currently the dataobject, and then it will generate the columns dynamically from the query. I have given it extra methods to display extra stuff in the header and footer ie for formulas , and special formatting on the cells. But pdf's are nice if the user doesnt need to collate the data just print it. The funky thing with Jasper reports is, you can maniuplate the xml based files, say build a web frontend to build a report builder, so the user doesnt need to use gui tools like iReport to create report templates. So you let them select the fields you want, and u do the sql and xml generating in the backend. To do it currently, the fields have to be statically setup , it also however requires a Jsp to run a servlet to compile the reports. Reportman however runs a cgi report server, but cant do excel on unix. I also use the JPGraph package for generating graphs (http://www.aditus.nu/jpgraph/). This is *really* slick. Its free for personal use, about $125 for commercial use. You need to install some additional PHP libraries (JPEG, PNG, GD at least), but its fast and easy. I love playing around with this product because the possibilities for what you can do are almost endless. This is really sweet however it doesnt have PHP5 support ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: reverse MD5 ???
I don't think that's right. Collisions allow certain kinds of cryptographic attacks against things like MD5-based signatures but that is not at all the same as being able to simply determine the original message content from the digest. Rather, they allow you to substitute the original message with a different one which generates the same MD5 hash. This may or may not be useful as an attack, depending on how MD5 is being used. Anyone ever tried using ENCODE and DECODE functions in mysql ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: dynamic class loaders
Thanks this seemed to work except say you had a class Packagename_Classname its trying to load the file like that Packagename_Classname.php On 20/04/2005, at 4:23 PM, Markus Fischer wrote: [EMAIL PROTECTED] wrote: Hi there i was wondering if there is such an extension available or possbility to have a dynamicclass loader extension which would use the request_uri as loading the class constructors ? I justthink building such a thing in php which is what i am doing too slow for each request and think itshould happen in the internals ? Let me know if its an insane idea. PHP5 provides autoload, see http://at2.php.net/manual/en/language.oop5.autoload.php for details. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] dynamic class loaders
On 20/04/2005, at 2:52 PM, Richard Lynch wrote: I don't quite see how: can be sped up much... The problem isn't in the require function, but in the Class source bloat... But maybe I'm just being stoopid. First thing first, I am sure you are not new to the list and so arent I but dont try and reply unless you have something useful to say. Ok let me explain myself, I store my classes in classes/ , I use a request_uri of thepackage/theclass/thesubclass will load currently the class in question thepackage_theclass_thesubclass. I am just testing things atm and asking if something has already been achieved in the extension layer, as i'd prefer to reduce the ammount of interface scripts. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to ignore E_STRICT and E_NOTICE with error_handler callback
already have i was hoping to avoid the if's. E_STRICT was throwing a heap of suggestions for pear packages code ;) On 18/04/2005, at 6:44 PM, Marek Kilimajer wrote: [EMAIL PROTECTED] wrote: Hi there i have an error handler callback within an error class which is also being used for pear errors. E_NOTICE and E_STRICT are still triggering this callback method, so i have to make a check that the code is not one of these. I have error_reporting to ignore both of these and still no luck, any ideas ? put this at the top of the error handling function: if($errno == E_STRICT || $errno == E_NOTICE) return; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Tomcat and php in Suse 9.2
I noticed you never had a reply for this, its probably because this is non standard, or totally not heard of. What I would do, (even though I have yet to try this), is run php standard as a module in apache, but then run the tomcat connector jk or jk2 into apache, so it will run seamlessly. There is prob alot of settings to configure to do it though. Tomcat has a nice easy to understand xml descriptor, i actually prefer them than .conf files ;) On 14/04/2005, at 7:30 PM, Andreas Persson wrote: I have installed tomcat and added php-support with help of the php-servlet but it seem like php cant find any of the extensions installed. Like mysql. I have the php4-mysql package installed. If i run php -i from the commandline its telling me that I have mysql-support and a small php-script runned from the commandline verifies this. But if i run phpinfo() from a php-page under tomcat there is no support for mysql (or anyother extension). It tells me that its using /etc/php.ini and I have enabled the mysql extension in it. Anyone who knows why tomcat failes to find the php-extensions? /Andreas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Alternative control structure syntax
Does anyone use it, is it more efficient on the compiler and coding to do this switch($i): case 0: break; endswitch; instead of this ? switch($i) { case 0: break; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to call a static class and method dynamically
I was wonderiing how I would go about something like this $class = 'classname'; return $class::staticMethod(); , not happy isnt working. Any ideas lemme know. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Connection to Two databases simultaneously
both db's on the same host ? I would try select * from second_db2.theothertable :) On 02/04/2005, at 6:53 PM, Jochem Maas wrote: HarryG wrote: Hi, I am connecting to two database in my index.php. Here is how: @ $db = mysql_connect("localhost", USERLOGIN, USERDBPASS); if (!$db) { print "Error: Could not connect to database. Please try again later."; exit; } mysql_select_db(DATABASE); @ $userdb = mysql_connect("localhost", USERLOGIN, USERDBPASS); if (!$userdb) { print "Error: Could not connect to database. Please try again later."; exit; } mysql_select_db(USERDB); $getaccount = "SELECT * FROM account WHERE visible=1"; //Account table is present in USERDB. $result = mysql_query($getaccount); $get = "SELECT * FROM useraccount"; //UserAccount table is present in DATABASE. $result = mysql_query($get); There is no problem with the connection. but I need to query tables in both databases. I know you need to use link identifiers, but have had no luck in getting it to work. Appreciate your help. er, you are not actually using the link identifiers try like this: @ $db = mysql_connect("localhost", USERLOGIN, USERDBPASS); if (!$db) { print "Error: Could not connect to database. Please try again later."; exit; } mysql_select_db(DATABASE, $db); } @ $userdb = mysql_connect("localhost", USERLOGIN, USERDBPASS); if (!$userdb) { print "Error: Could not connect to database. Please try again later."; exit; } mysql_select_db(USERDB, $userdb); } $getaccount = "SELECT * FROM account WHERE visible=1"; //Account table is present in USERDB. $result = mysql_query($getaccount, $userdb); $get = "SELECT * FROM useraccount"; //UserAccount table is present in DATABASE. $result = mysql_query($get, $db); Thanks. HarryG -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Recommendation for a MySql wrapper class
I have nothing to do with these but I would check out PEAR DB, MDB,MDB2 and ADODB. On 02/04/2005, at 10:41 PM, Ryan A wrote: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP logo is freaked in phpinfo();
Is someone playing games with me I have a rabbit photo which has taken over the php logo in my phpinfo(), I also saw a dog in a logo on a mirror for the php manual :) Its kinda cute, interested how its done. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Cli gets screwed after OSX update :)
I think I have meantioned this before, but now I have noticed it. Whenever OSX runs an update it screws the PHP5 cli sidewways i got this error again pear install HTTP_Session dyld: /usr/bin/php Undefined symbols: _OnUpdateLong _OnUpdateString _compiler_globals _executor_globals _sapi_globals _sapi_module _zend_error_cb _zend_extensions _zend_ini_boolean_displayer_cb Trace/BPT trap Any ideas ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHPXref is awesome!
Shit this looks intense, i'll definately be having a go at this. Does it support phpdoc tags ? On 29/03/2005, at 12:31 PM, Daevid Vincent wrote: I just have to call out mad props to this project that one of our new hires pointed me at... http://phpxref.sourceforge.net/ This project is sooo sweet. For starters, it doesn't shit the bed when documenting large projects like 'PHPDoc' does. It cross references database tables. The view-source feature is amazing. Dynamically highlighting variables, telling you how many times they're used and where! It is easy as pie to setup and the output is very clean. We have it run at the end of our hourly builds from CVS, and "it just works". Thank you Gareth (and the rest of the phpxref team) :-) BTW, October 26th was my birthday! ;-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHPXref is awesome!
There is no end user docs for this, its a bit bollox. I do like the idea of @table tags though. Sorry have no time to start reading perl source code. On 29/03/2005, at 12:31 PM, Daevid Vincent wrote: I just have to call out mad props to this project that one of our new hires pointed me at... http://phpxref.sourceforge.net/ This project is sooo sweet. For starters, it doesn't shit the bed when documenting large projects like 'PHPDoc' does. It cross references database tables. The view-source feature is amazing. Dynamically highlighting variables, telling you how many times they're used and where! It is easy as pie to setup and the output is very clean. We have it run at the end of our hourly builds from CVS, and "it just works". Thank you Gareth (and the rest of the phpxref team) :-) BTW, October 26th was my birthday! ;-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Nusoap , wsdl and class methods
Hi there, I am trying to work out how to use the Nusoap package, its pretty cool but a tedious one to configure. What I am attempting to achieve is executing a class method either via standard soap or wsdl and return it as an array or xml. I have attempted to setup a service as classname.method but it keeps returning service is not setup. Any ideas ? There was no documentation with the zip file. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Referer checking is able to be referer spoofed
On 20/03/2005, at 5:40 AM, Marek Kilimajer wrote: If you need only hotlink protection then the current referer checking is just enough. Most users will not install referer spoofing software. But if you need to be 100% sure the videos are streamed through affiliate server, you can use tokens - a script at the affiliate server will request a token from the streaming server (with username/password/clip id etc.). This token will be sent with the link to the streaming server. Hope this is clear. Hi there sorry to return back to this, but we are somehow needing to create a token url that will be generated on the customer's webpage before the link is redirected to an access script of our clients video feeds site. What would be the most safest credentials to use to create a token with and how could the access script decrypt this information to validate access ? Let me know if this is too vague of a question thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php