Re: [PHP-DEV] singleton feature
I would like to know too, Purushotham Komaravolu [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Singleton means only one instance.. i.e. instance of a class per webserver... all application scripts should talk only to that same instance irrespective of the request. p - Original Message - From: Alexander Skwar [EMAIL PROTECTED] To: Purushotham Komaravolu [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, June 24, 2002 2:53 PM Subject: Re: [PHP-DEV] singleton feature So sprach Purushotham Komaravolu am 2002-06-24 um 11:39:36 -0700 : Hi , I have a small suggestion. I guess it is a good feature to have a provision to have a Singleton class per webserver instance. This is especially useful for maintain user defined connection pools, loggers etc. Uhm, what's a Singleton class? Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.iso-top.de |Jabber: [EMAIL PROTECTED] iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 1 day 11 hours 5 minutes -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: Small CGI Serve
Does no-one know how I can get the POST vars in there? If I get this done, then my server will be complete and ready to be re-written to be half decent :oP Bb [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Get vars are working now! Just gotta do post and i'm virtually done! Anyone got a guide? James Cox [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have found if you set the environment var REDIRECT_STATUS to FALSE then it works Someone explain? Having finally found out how to pass the Environment vars onto PHP, I am stumpted to find that PHP wasn't reading them and putting them in their place (GET vars). I tried changing the exe from the php-cli to just php. This now brings up a security error and I cannot find a solution Can anyone help? the REDIRECT_STATUS env var is for cgi security, and is a workaround given some webservers don't set it properly. That php wasn't showing env vars sounds to me like a register globals problem, and you having it set to off. -- james -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: Small CGI Serve
I have found if you set the environment var REDIRECT_STATUS to FALSE then it works Someone explain? Bb [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am trying to write a small CGI webserver. Having finally found out how to pass the Environment vars onto PHP, I am stumpted to find that PHP wasn't reading them and putting them in their place (GET vars). I tried changing the exe from the php-cli to just php. This now brings up a security error and I cannot find a solution Can anyone help? -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: Small CGI Serve
Get vars are working now! Just gotta do post and i'm virtually done! Anyone got a guide? James Cox [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have found if you set the environment var REDIRECT_STATUS to FALSE then it works Someone explain? Having finally found out how to pass the Environment vars onto PHP, I am stumpted to find that PHP wasn't reading them and putting them in their place (GET vars). I tried changing the exe from the php-cli to just php. This now brings up a security error and I cannot find a solution Can anyone help? the REDIRECT_STATUS env var is for cgi security, and is a workaround given some webservers don't set it properly. That php wasn't showing env vars sounds to me like a register globals problem, and you having it set to off. -- james -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: getting form variables without posting
script var winImg = window.open('','myDoc','scrollbars=no,resizable=no,width=600,height=350'); document.forms[1].target = myDoc; document.forms[1].submit(); /script Dan Rossi [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... adding to my last question i'm needing to send the variables to a popup without actually sending the form how can i do this ? -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Small CGI Serve
I am trying to write a small CGI webserver. Having finally found out how to pass the Environment vars onto PHP, I am stumpted to find that PHP wasn't reading them and putting them in their place (GET vars). I tried changing the exe from the php-cli to just php. This now brings up a security error and I cannot find a solution Can anyone help? -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: Recommended XML parser?
I wrote something that did things to huge XML files (2meg+) and it took a long time! (around 10 mins) I used this code to read and process the XML into a arrays function GetChildren($vals, $i) { $children = array(); if ($vals[$i]['value']) array_push($children, $vals[$i]['value']); while (++$i count($vals)) { switch ($vals[$i]['type']) { case 'cdata': array_push($children, $vals[$i]['value']); break; case 'complete': $children[$vals[$i]['tag']] = $vals[$i]['value']; break; case 'open': $children[] = GetChildren($vals,$i); break; case 'close': return $children; break; } } } function GetXMLTree($XML) { $p = xml_parser_create(UTF-8); xml_parser_set_option($p, XML_OPTION_SKIP_WHITE, 1); xml_parse_into_struct($p, $XML, $vals, $index) OR DIE(Invalid XML file!); xml_parser_free($p); $i = 0; return GetChildren($vals, $i); } Hope that helps :P Blake Barnett [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... What is the recommended XML parser for use with PHP 4.2.1? (and also 4.1.0 if anyone is willing to answer that as well?) From reading the list archives I'm seeing a lot of people bash expat and lean toward libxml2, I just wanted to get the consensus before I commit a project to using one or the other. Thanks, -- Blake Barnett (bdb) [EMAIL PROTECTED] Sr. Unix Administrator DevelopOnline.com office: 480-377-6816 Learning is a skill, you get better at it with practice. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: ImageCreateFromGif
I have also had problems loading ANY dll in the new version (I was using mssql). A bug maybe? Andrew Milne [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi there! I'm having problems with the GD extension on the latest Win32 download from php.net - when I try to use the above function, it says it is undefined (as iwth the JPG alternative), even though I have uncommented the line 'extension=php_gd.dll'. Any suggestions? Thanks! Andrew -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: Session duplicated in url
Then turn it off? Marcus Boerger [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... When i have someone deactivating the cookies i get multiple PHPSESSIONID queries. What i do: I have a site that propageates some data with query strings. These i read from $_SERVER['QUERY_STRING'], modify and write them back as href. Everything is working fine but when cookies are disabled i have the PHPSESSIONID repeated. Example from logfile: 137.226.156.172 - - [17/Jun/2002:22:03:24 +0200] GET /?4PHPSESSID=8db991d1a3b1ee1a7a497b7644956085PHPSESSID=8db991d1a3b1ee1a7a4 97b7644956085PHPSESSID=8db991d1a3b1ee1a7a497b7644956085PHPSESSID=8db991d1a 3b1ee1a7a497b7644956085PHPSESSID=8db991d1a3b1ee1a7a497b7644956085PHPSESSID =8db991d1a3b1ee1a7a49 7b7644956085PHPSESSID=8db991d1a3b1ee1a7a497b7644956085PHPSESSID=8db991d1a3 b1ee1a7a497b7644956085 HTTP/1.1 200 2675 /?3PHPSESSID=8db991d1a3b1ee1a7a497b7644956085PHPSESSID=8db991d1a3b1ee1a7a 497b7644956085PHPSESSID=8db991d1a3b1ee1a7a497b7644956085PHPSESSID=8db991d1 a3b1ee1a7a49 Example code snippet: $server_query = $_SERVER['QUERY_STRING']; $pos = strpos($server_query,''); $q_ext = ''; if ($pos !== false) { $extern_query = substr($server_query,$pos); } else { $extern_query = ''; } $idx_href = './?-'.$extern_query; echo a href='$idx_href' .. What i do is cutting the first query entry which i allways have. Setting a new one and adding rest of original query. Suppose i have /?4 this would be rewritten with session id to /?4PHPSESSID=xxx The snipped above sees '' present and sets $extern_query to PHPSESSID=xxx. Then it sets $idx_ref to ./?-PHPSESSID=xxx So i suggest there could be something wrong with detection of query strings that have entries without an equal sign? Any hints what i am doing wrong or what is wrong? marcus - mailto:[EMAIL PROTECTED] Wir sind allzumal Tiere unter Tieren, Kinder der Materie wie sie, nur wehrloser. Doch da wir im Unterschied zu den Tieren wissen, dass wir sterben muessen, wollen wir uns auf jenen Augenblick vorbereiten, indem wir das Leben geniessen, das uns durch Zufall und vom Zufall gegeben ist. Umberto Eco, Die Insel des vorigen Tages --- http://www.marcus-boerger.de --- -- Tel. 0241 / 874 09-7 ### 0179 / 29 14 980 -- -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: getting form variables without posting (note)
This method submits the form to the newly opened page, the original page remains intact, hope this is what you wanted Bb [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... script var winImg = window.open('','myDoc','scrollbars=no,resizable=no,width=600,height=350'); document.forms[1].target = myDoc; document.forms[1].submit(); /script Dan Rossi [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... adding to my last question i'm needing to send the variables to a popup without actually sending the form how can i do this ? -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Small CGI Serve
It is exactly that. Content-type: text/html Security Alert! The PHP CGI cannot be accessed directly. This PHP CGI binary was compiled with force-cgi-redirect enabled. This means that a page will only be served up if the REDIRECT_STATUS CGI variable is set, e.g. via an Apache Action directive. For more information as to why this behaviour exists, see the manual page for CGI security. For more information about changing this behaviour or re-enabling this webserver, consult the installation file that came with this distribution, or visit the manual page. I've tried changing the PHP.ini setting cgi.force_redirect to off, 0, no and any other negative thing I could think of to no avail Stig S. Bakken [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Tue, 2002-06-18 at 13:25, BB wrote: I am trying to write a small CGI webserver. Having finally found out how to pass the Environment vars onto PHP, I am stumpted to find that PHP wasn't reading them and putting them in their place (GET vars). I tried changing the exe from the php-cli to just php. This now brings up a security error and I cannot find a solution The CLI version of PHP is not designed to be run from a web server like this. If anything, you can write CGI scripts with it, where you have to import the environment variables yourself (sounds silly doesn't it? :). The security error you're getting is probably related to force-redirect, could you provide the error message? - Stig -- Stig Sæther Bakken, Fast Search Transfer ASA, Trondheim, Norway http://pear.php.net/wishlist.php/ssb -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php