[PHP] Re: php reference behavior

2002-12-17 Thread Peter Clarke
22 Manopohuji wrote: hi, i'm running into some weird behavior with php references. i distilled it down to some test code below: 'dean' ); $var1['arrayref'] = & $array; $var2 = $var1; echo "var1:\n"; print_r( $var1 ); echo "var2:\n"; print_r( $var2 ); $var1['arrayref'] = NULL; echo

[PHP] Re: Security

2003-01-20 Thread Peter Clarke
each VirtualHost in apache's httpd.conf php_admin_value open_basedir /path/to/accessable/files Peter Clarke -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: chown() despiration

2003-01-23 Thread Peter Clarke
Urb Lejeune wrote: I could do this in perl but I'm being stubborn :-) When I run the following code as a regular user, everything fails. When I run it as root the directory is created and the chmod works. However, chown reports: chown failed: Operation not permitted Here is the code.

[PHP] Re: google-apis

2003-03-10 Thread Peter Clarke
Jens Lehmann wrote: James wrote: LWP is a perl thing. Curl is probably the best thing to use. Have you tried using googles php api which they provide free? http://www.google.com/apis/ I had a look at the API, but I'm not sure if it's appropriate and easy to use with PHP. It's still beta and mi

[PHP] Re: Need Help: Please click on Test Link

2003-07-17 Thread Peter Clarke
Suhas Pharkute wrote: http://sspsoft.com/test/ip2ll.php (in case if you cannot get it, please click on http://ns1.webhostdns.us and then click on the website link.) which should identify your Country, State, City. Please click on one of the buttons to provide feedback. I'm in London, England and go

[PHP] Re: scoring/sorting db search results based on score

2003-07-17 Thread Peter Clarke
Dave wrote: looking for code snippets or links to examples of the following; - Have a database with multiple fields that will be searched against (happens to be PostgreSQL in this instance, but we can migrate any MySQL based examples/code) - We wish to score search results - ie: a match in "keywo

[PHP] Re: Hi All

2003-07-23 Thread Peter Clarke
Shishir Kumar Mishra wrote: Hi All, I am reading one XML which has some german characters. I am sending this data to PHP script but when try to echo ;it prints some other character. eg. XML has "für" but output is coming like " für "; My script is like following: $loc = "UTF-8"; puten

Re: [PHP] REVISED: PHP timeout doing fread from Apache Coyote

2003-07-24 Thread Peter Clarke
Robert Fitzpatrick wrote: Sorry, the correct request and response is below, the one I copied before was from the browser: Request: Request:POST /XMLCommunicationServlet HTTP/1.0 Content-Type: application/x-www-form-urlencoded User-Agent: PHP XMLRPC Host: api.newedgenetworks.com:80 Connection: keep

[PHP] Re: help please was: openssl php 4.3.1

2003-03-27 Thread Peter Clarke
Kalin Mintchev wrote: here is a real example: $fp = fopen ("http://store.el.net/index.html";, "r"); while (!feof($fp)) { echo fgets ($fp,4096); } this works fine... if you try it with https you'll get an error - file not found from php I've just tried with https and it works fine. Are y

[PHP] Re: php4isapi.dll and header("Location: ...")

2003-06-06 Thread Peter Clarke
Eric Tonicello wrote: Hi ! Have somebody successed with the function < header("Location: http://...";) using the php4isapi.dll ??? My code works well with PHP using the CGI php.exe, but impossible to make it work with the ISAPI module !!! Configuration: -Windows 2000 server - PHP 4.3.2 "php.in

[PHP] Re: Applying XSL to XML with PHP

2002-07-25 Thread Peter Clarke
Ctan wrote: > I'm trying to apply XSL to XML stored in a MySQL database with PHP. How do I > go about doing this? I've tried following the example on php.net but I seem > to run into a lot of trouble. Here's how the code looks like (BTW aml is XML > stored in the argument Table): > > > if (! emp

[PHP] Re: Applying XSL to XML with PHP

2002-07-25 Thread Peter Clarke
); Peter > > Hope this helps... > > chia > > -Original Message- > From: Peter Clarke [mailto:[EMAIL PROTECTED]] > Sent: 25 July 2002 13:06 > To: Ctan > Cc: [EMAIL PROTECTED] > Subject: Re: Applying XSL to XML with PHP > > > Ctan wrote: > >

[PHP] Re: $this in an XML data handler ... in a class

2002-07-03 Thread Peter Clarke
"Clay Loveless" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Here's a brain-bender ... At least it is for me at the moment. : ) > > When I use an XML parser inside a class, the xml_*_handler functions aren't > recognizing "$this->" variables. I can kind of s

Re: [PHP] Re: $this in an XML data handler ... in a class

2002-07-04 Thread Peter Clarke
Warning: Call-time pass-by-reference has been deprecated - argument > passed by value; If you would like to pass it by reference, modify the > declaration of xml_set_object(). If you would like to enable call-time > pass-by-reference, you can set allow_call_time_pass_reference to true in > your

[PHP] Re: xslt_process

2002-07-22 Thread Peter Clarke
Ctan wrote: > Hi all, > > I'm trying to use xslt_process() to transform a variable containing XML data > with an xsl file into a result using PHP. Incidentally the XML is from an > external source, i.e. a database. However despite following the examples in > www.php.net I am unable to do so. Th

[PHP] Re: xslt_process

2002-07-22 Thread Peter Clarke
Ctan wrote: > Hi all, > > I'm trying to use xslt_process() to transform a variable containing XML data > with an xsl file into a result using PHP. Incidentally the XML is from an > external source, i.e. a database. However despite following the examples in > www.php.net I am unable to do

[PHP] Re: Securing PHP code..

2003-11-25 Thread Peter Clarke
Video Populares Et Optimates wrote: Hi! I'm pondering on a problem here. Being a C/C++, Java and Visual Basic developer, the aspect of reverse engineering code from (compiled) programs, hasn't occupied my mind that much. Now, developing PHP scripts on large scale I have started to think otherwi

[PHP] Re: php 4.1 and DOMXML question.

2002-01-16 Thread Peter Clarke
function getNodeContent ($node) { $content = ''; $nodechild = $node->children(); if ( is_array( $nodechild ) ) { reset ($nodechild); while (list (, $val) = each ($nodechild)) { if ( $val->type == XML_TEXT_NODE ) { $content .= $val->content;

Re: [PHP] Re: php 4.1 and DOMXML question.

2002-01-17 Thread Peter Clarke
: html line 1html line 2 The children of are: 'html line 1' AND '' AND 'html line 2' Peter > Peter Clarke wrote: > > >function getNodeContent ($node) { > >$content = ''; > >$nodechild = $node->children(); >

[PHP] Re: XML / XSLT parsing using PHP

2002-01-24 Thread Peter Clarke
rward to your replies :) > > > Yours > -- > Lasse Laursen <[EMAIL PROTECTED]> - Systems Developer > NetGroup A/S, St. Kongensgade 40H, DK-1264 København K, Denmark > Phone: +45 3370 1526 - Fax: +45 3313 0066 - Web: www.netgroup.dk Peter Clarke -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

[PHP] Re: Execing problems

2002-02-08 Thread Peter Clarke
Make sure that exec() will not get any kind of response from the script if you want it in the background. This works for me: $command = "funky script stuff here"; exec ("$command >/dev/null 2>&1 &"); Peter Clarke "Jason Rennie" <[EMAIL PROTE

[PHP] fsockopen timeout

2002-02-15 Thread Peter Clarke
According to the manual; http://www.php.net/manual/en/function.fsockopen.php Depending on the environment, optional connect timeout may not be available. Does anyone know what environment is needed for it to be available? I have Redhat Linux 7.1 - and the timeout doen't seem to work. Any ideas?

[PHP] Re: fsockopen timeout

2002-02-15 Thread Peter Clarke
OK I've found it... The time out value is a FLOAT. So a timeout of 1 second is 1.0. Strange since the examples in the manual are integers. Anyway this works: $socket = fsockopen($urlArray["host"], $urlArray["port"], &$errnum, &$errstr, 1.0); "Peter Clarke

[PHP] Re: sms to web

2002-05-30 Thread Peter Clarke
Basically you'll need to have a mobile number set up with an SMSC who will extract the data from the message and send it on to the url that you provide them with. Peter "Deniz" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > can anybody advice me some source a

[PHP] Re: file upload problem (files > 7.5mb)

2002-03-05 Thread Peter Clarke
"Stefan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED].; > i wrote a php uploadscript and it works fine till the file is not larger > then 7.5mb. > is set the max upload file size in the upladfrom as well as in php.ini to > 100mb. but it still doesn't work! > system is linux red hat

[PHP] Re: register_globals and E_ALL error reporting

2002-03-13 Thread Peter Clarke
"Richard Ellerbrock" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > The following code generates a warning when register_globals=off and > error reporting is set to E_ALL. How do I define the constant in another > way not to generate a warning? This is with ph

[PHP] how to close an http connection BUT carry on processing

2002-03-27 Thread Peter Clarke
I'm looking for a way to close the connection with the browser yet have the script carry on doing some processing. Any ideas? Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: PHP and DOM XML

2002-04-05 Thread Peter Clarke
"Rarmin" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I have one question about operations that can be done with XML. > What I need to do is build a web site which stores some data in XML > files and retrieve that data. It's basically the system that allows

[PHP] Re: HELP XML XML XML HELP

2001-12-06 Thread Peter Clarke
yes, echo the xml but send a header telling the browser it's xml: header("Content-Type: text/xml"); "Olivier Masudi" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > > http://www.test.com/test.php?orderid=xyz > > > test.php has to make a request to DB mys

[PHP] Re: URGENT: IIS doesn't like GET or POST

2001-12-06 Thread Peter Clarke
Check 'register_globals' in php.ini It sounds like it's off which is much more secure Instead of getting: $var you'll have: $HTTP_GET_VARS['var'] It stops people sending any variables in the script. Peter "Ron Newman" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTE

[PHP] Re: Xml Parse Extended Chars

2001-12-06 Thread Peter Clarke
The only predefine entities in XML are < > & all others need to be defined in the dtd. Best thing to do is leave the charatef as is in the xml and only run htmlentites on the contents when sending the contents to an html web browser. The xml will happily hold the character as it is. If you're usi

[PHP] Re: arrays

2001-12-24 Thread Peter Clarke
The best thing for converting XML to HTML is XSLT (that's what it was made for). PHP can do the convertion using the XSLT functions (which require Sablotron): http://www.php.net/manual/ref.xslt.php Peter "Php Dood" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

[PHP] Re: Can i get the full HTTP-Header without patching PHP?

2001-07-12 Thread Peter Clarke
"Rainer Kohnen" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > > is there a way to get the full HTTP Header > without patching PHP? > > I use a debugger coded in PHP a lot. Now i need > to debug some intershop enfinity pages. However, > enfinity uses a l

[PHP] Re: php/apache question(probably stupid)

2001-07-13 Thread Peter Clarke
"Conor McTernan" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > hey all, > > I've been using apache, php and mysql on win32 for a while now, and I have > recently decided to move over to linux *yay*, so i got myself a copy of > Suse 7.1 personal edition. > >

[PHP] Re: postgres and php

2001-07-13 Thread Peter Clarke
"Derek" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > anyone know how I force a case insensitive search through a postgres > database. > > I've got a search looking for 'something like '%something%' but this won't > find 'SOMETHING'...if you know what I mean!

[PHP] Re: More upload Problems

2001-07-19 Thread Peter Clarke
"Jason Rennie" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi all, > > It appears when i try to upload a file in a form, and pass it to php, it > never arrives. > > I'm doing a POST from a form, and i all but copied the example straight > from the php manu

Re: [PHP] Re: More upload Problems

2001-07-19 Thread Peter Clarke
"Jason Rennie" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Check your php.ini file to see if "file_uploads = on" - it is often turned > > off for security. > > Yep it is turned on. > > And php.ini is in /usr/local/php/lib/php.ini > > Any other ideas ? > >

Re: [PHP] Re: More upload Problems

2001-07-20 Thread Peter Clarke
"Jason Rennie" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Here is the total chunk of code to date. > > It does currently work, except for the file submission complaining about > the no file uploaded. > > the current fragment of code to do with file subm

Re: [PHP] Re: More upload Problems

2001-07-20 Thread Peter Clarke
"Peter Clarke" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > "Jason Rennie" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > > > Here is the

[PHP] Re: xsl:include doesn't work from php, it works with sabcmd

2001-08-07 Thread Peter Clarke
"Marius Andreiana" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi > > I try to keep some common xsl templates in separate files and > use > > It works fine if I process them from cmd line with sabcmd, > but the same files don't work in php, I get > Fatal e

[PHP] Re: security check - virtual host and mod php setup

2001-08-20 Thread Peter Clarke
"Dave" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > please hack apart this solution and point out the error/insecure nature of the > setup. > > goal, provide php access to name based virtual hosts on FreeBSD boxes > > problem, security of PHP access to base

[PHP] Re: Whacky WGET issue...

2001-08-31 Thread Peter Clarke
"Sondra Russell" <[EMAIL PROTECTED]> wrote in message news:p05100303b7b4263f844e@[212.43.200.227]... > Hello everyone! > > Crazy question: > > I've created a little script that reads in .txt files and, with the > help of phplib templates, matches them up with a collection of > templates and spits

[PHP] Re: [PHP-INST] PHP4 and Apache 1.3.20 DSO mode not working?

2001-09-03 Thread Peter Clarke
> > My question is simple. Have you downloaded, compiled, and integrated > the most recent versions of Apache and PHP and made them work? Not > previous versions. I've seen several people have problems with doing > this in the newsgroups dating from late 2000. Someone please wipe > out your apache

Re: [PHP] avi to wmv convert

2004-08-20 Thread Peter Clarke
John Nichel wrote: Jay Blanchard wrote: [snip] In what manual? [/snip] TFM! I'm sorry, I didn't quite catch that. Could you hold my hand, and point it out to me? If you were a real pal, you would write the code for me too. ;) The only manual I know of is at www.php.net It provides a tool for s

Re: [PHP] avi to wmv convert

2004-08-21 Thread Peter Clarke
John Nichel wrote: Peter Clarke wrote: John Nichel wrote: Jay Blanchard wrote: [snip] In what manual? [/snip] TFM! I'm sorry, I didn't quite catch that. Could you hold my hand, and point it out to me? If you were a real pal, you would write the code for me too. ;) The only manual I

[PHP] Re: crazy readdir bug

2004-06-18 Thread Peter Clarke
Matt Richards wrote: Imagine the following: 362>class someClass { 363> function someFunction() { 364>if($rDirectory = opendir("/templates")) { 365> while(false != ($strFile = readdir($srDirectory))) { 366>print $strFile.""; 367> } 368> } 369> } 370>} line 364 $rDirectory li

[PHP] Worried about PECL

2004-07-08 Thread Peter Clarke
Currently the online manual for php is great. My concern is that the documentation for PECL extensions is almost non-existent. Since some php extensions are being moved/replaced by PECL extensions are we going to get non-existent documentation? For example: www.php.net/mime-magic "This extension

[PHP] Re: Copyrighting PHP, MySql, Apache,perl etc...

2004-01-29 Thread Peter Clarke
Ryan A wrote: Which brings up a little question, any idea of whats ZEND's (or anybody else that matters) opinion of using PHP in a domain name? eg: my-lovely-php-and-apache-website.com Have a look at http://www.php.net/license/ "We cannot really stop you from using PHP in the name of your project