php-general Digest 29 Sep 2005 08:44:59 -0000 Issue 3709

2005-09-29 Thread php-general-digest-help
php-general Digest 29 Sep 2005 08:44:59 - Issue 3709 Topics (messages 223384 through 223391): Re: Strange behaviour overriding methods in 5.0.4 223384 by: mail 223388 by: Jochem Maas 223389 by: Rob Agar 223391 by: mail Re: bad use of foreach() when building

php-general Digest 29 Sep 2005 21:45:41 -0000 Issue 3710

2005-09-29 Thread php-general-digest-help
php-general Digest 29 Sep 2005 21:45:41 - Issue 3710 Topics (messages 223392 through 223430): Re: Array Select from database 223392 by: Robin Vickery Functions Returning large strings 223393 by: zzapper 223397 by: Andy Pieters 223402 by: zzapper imap_mail

Re: [PHP] mail function-new line-security

2005-09-29 Thread Torgny Bjers
Peppy wrote: AJ, So what your reply means is that I should not have a new line character in any variable on my page??? Of course you can have newlines in your email message, just make sure that any user input is received through POST, and that you run a regular expression to validate that

Re: [PHP] Strange behaviour overriding methods in 5.0.4

2005-09-29 Thread Norbert Wenzel
I have to say thank you to you both. In fact I still don't know what exactly was wrong or may have caused this error (output buffering was off, and there was no @ in the whole file) but after a night of sleep I tried again before reinstalling the server and everything worked as fine as it

Re: [PHP] Array Select from database

2005-09-29 Thread Robin Vickery
On 9/28/05, Silvio Porcellana [EMAIL PROTECTED] wrote: In addiction, I would (SQL)escape the values joined: supposing you are using MySQL, I'd do: $values = join(', ', array_map('mysql_real_escape_string', $array)); I agree entirely; I was just trying to keep things simple for the OP.

[PHP] Functions Returning large strings

2005-09-29 Thread zzapper
Hi, I have a series of nested functions which return a large string (as apposed to working on global string) , is this inefficient? Or is PHP clever enough to just pass a pointer? to simplify $large_string=fn_one(fn_two(fn_three(; your advice pls -- zzapper Success for Techies and

[PHP] imap_mail and outgoing mailserver configurations

2005-09-29 Thread Lars Demel
hi, i have a problem with imap_mail. the mails i always send with this function contents in the header field 'from' always the server where php is installed. in our system php and the mail server are installed on different machines. so i think that might be the problem. but we configured in

Re: [PHP] Error with DOMDocument-saveXML()

2005-09-29 Thread Andy Pieters
Hi bFatal error/b: Method Document::__toString() must return a string value in b/srv/www/localhost/htdocs/db/index.php/b on line b140/bbr / That's just what it says, check your program flow. You overrided the tostring function and somewhere in that new function you jump out of it because

Re: [PHP] Strange behaviour overriding methods in 5.0.4

2005-09-29 Thread Jochem Maas
Norbert Wenzel wrote: I have to say thank you to you both. In fact I still don't know what exactly was wrong or may have caused this error (output buffering was off, and there was no @ in the whole file) but after a night of sleep I tried again before reinstalling the server and everything

Re: [PHP] Functions Returning large strings

2005-09-29 Thread Andy Pieters
Hi I have a series of nested functions which return a large string (as apposed to working on global string) , is this inefficient? Or is PHP clever enough to just pass a pointer? $large_string=fn_one(fn_two(fn_three(; PHP is by no means cleaver enough to read your mind as to what you

[PHP] Re: Object Function-call handling in PHP5

2005-09-29 Thread DarkX
Thats what im looking for pretty much, Ill keep my eye on that bug. Thanks! On 9/28/05, Ondrej Ivanič [EMAIL PROTECTED] wrote: Dmitry committed a path for improved __toString() support. However, im not sure if it will be PHP6 only... I know about this patch. I think, it will be PHP6 only.

[PHP] updating forms

2005-09-29 Thread hope
i have a text area on my page. As page is uploaded it displays certain text in it. It has also has a text area with same text that is being displayed above in the page . If user changes this text of text area n presses submit button the page needs to display updated text in the text area and

[PHP] Re: updating forms

2005-09-29 Thread Norbert Wenzel
(hope) wrote: i have a text area on my page. As page is uploaded it displays certain text in it. It has also has a text area with same text that is being displayed above in the page . If user changes this text of text area n presses submit button the page needs to display updated text in the

[PHP] Re: Functions Returning large strings

2005-09-29 Thread zzapper
On Thu, 29 Sep 2005 11:48:10 +0200, wrote: Hi I have a series of nested functions which recursively return a large string (as apposed to working on global string) , is this inefficient? Or is PHP clever enough to just pass a pointer?

[PHP] Problems with new PHP install

2005-09-29 Thread Chris Boget
Since I was having so much difficulty getting PHP (with libxml2) installed on RH9, I decided to take the advice given by several people and use Fedora Core 4 instead, which I get installed w/o difficulty. So next is Apache/PHP and I download Apache version 2.0.54 and PHP version 5.0.5.

RE: [PHP] Problems with new PHP install

2005-09-29 Thread Jay Blanchard
[snip] Then I modify the httpd.conf file as instructed at the above page by adding the LoadModule and AddType and then create a 'hello world' php script to make sure php is working. [/snip] Did you restart the Apache server after making the changes to httpd.conf ? I know it is basic, I just have

Re: [PHP] Array - partical path to the array's path (part 2)

2005-09-29 Thread Scott Fletcher
the xml above is not structurally the same as the array below I'll bet your output has just one message element right? or you have gone completely offtrack. might be time you went here: http://php.net/xml http://php.net/dom http://php.net/domxml might be something there to help

Re: [PHP] Problems with new PHP install

2005-09-29 Thread Chris Boget
[snip] Then I modify the httpd.conf file as instructed at the above page by adding the LoadModule and AddType and then create a 'hello world' php script to make sure php is working. [/snip] Did you restart the Apache server after making the changes to httpd.conf ? I know it is basic, I just

Re: [PHP] Problems with new PHP install

2005-09-29 Thread John Nichel
Chris Boget wrote: Since I was having so much difficulty getting PHP (with libxml2) installed on RH9, I decided to take the advice given by several people and use Fedora Core 4 instead, which I get installed w/o difficulty. So next is Apache/PHP and I download Apache version 2.0.54 and PHP

Re: [PHP] Problems with new PHP install

2005-09-29 Thread John Nichel
Chris Boget wrote: snip My test script looks like this: script language=php echo PHP Works!!; /script br ? echo PHP Works??; And that is exactly what is getting output by the browser. The br isn't even getting interpreted as a break...? Yeah, looks like you need the AddType entry.

Re: [PHP] Problems with new PHP install

2005-09-29 Thread Chris Boget
And that is exactly what is getting output by the browser. The br isn't even getting interpreted as a break...? Is there a line like this in your httpd.conf...? AddType application/x-httpd-php .php [snip] Yeah, looks like you need the AddType entry. Apache doesn't know what *.php is, so

Re: [PHP] Error with DOMDocument-saveXML()

2005-09-29 Thread Stephen Leaf
On Thursday 29 September 2005 04:20 am, Andy Pieters wrote: Hi bFatal error/b: Method Document::__toString() must return a string value in b/srv/www/localhost/htdocs/db/index.php/b on line b140/bbr / That's just what it says, check your program flow. You overrided the tostring

[PHP] Array: how to find a parent key when using a child key?

2005-09-29 Thread Scott Fletcher
I'm using the recursive function and it use the foreach() loop. I can figure out how to use the current key but I could not figure out how to use the parent's key. Can anyone point out to what I'm missing here? Just look at the //Parent Key - How?? comment in the script...I'm not sure what

RE: [PHP] Problems with new PHP install

2005-09-29 Thread Jay Blanchard
[snip] Step 15 of the php installation (as listed in the link in my OP) has you add the following to the httpd.conf: AddType application/x-httpd-php .php .phtml I also went ahead and added the following as well AddType application/x-httpd-php-source .phps The filename of my test script,

Re: [PHP] Problems with new PHP install

2005-09-29 Thread Chris Boget
Step 15 of the php installation (as listed in the link in my OP) has you add the following to the httpd.conf: Ok, color me retarded. Pretty please. :) It turns out I modified the wrong httpd.conf file. duh. Sorry about that. Everyone can move along. Nothing to see here but some blathering

Re: [PHP] Problems with new PHP install

2005-09-29 Thread John Nichel
Chris Boget wrote: Step 15 of the php installation (as listed in the link in my OP) has you add the following to the httpd.conf: Ok, color me retarded. That happens when Jay gets involved. ;) -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing

RE: [PHP] Problems with new PHP install

2005-09-29 Thread Jay Blanchard
[snip] duh. [/snip] You have now officially obtained a lifetime membership to the club. Your t-shirt should arrive in the mail soon. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Error with DOMDocument-saveXML()

2005-09-29 Thread Scott Fletcher
It is just that not many work with XML often enough to know well enough how to use it. I noticed many folks have different way of using XML that doesn't best fit our need. I have this same problem as well. So, you're not the only one here as I have this same problem as well. Stephen Leaf

[PHP] decrypting query string back into $_GET['var']

2005-09-29 Thread Graham Anderson
What is the best way to decrypt a query string back into variables ? $root = http://www.myserver.com/script.php;; $queryString = ?test=mytestcolor=red; myEncrypt($queryString); //add mCrypt encryption $finalURL = $root.$encryptedQueryString; what is the proper what to decrypt the GET

Re: [PHP] decrypting query string back into $_GET['var']

2005-09-29 Thread Jochem Maas
Graham Anderson wrote: What is the best way to decrypt a query string back into variables ? $root = http://www.myserver.com/script.php;; $queryString = ?test=mytestcolor=red; myEncrypt($queryString); //add mCrypt encryption $finalURL = $root.$encryptedQueryString; what is the proper what

Re: [PHP] decrypting query string back into $_GET['var']

2005-09-29 Thread Graham Anderson
thanks :) that was exactly what I needed g On Sep 29, 2005, at 9:33 AM, Jochem Maas wrote: Graham Anderson wrote: What is the best way to decrypt a query string back into variables ? $root = http://www.myserver.com/script.php;; $queryString = ?test=mytestcolor=red; myEncrypt($queryString);

Re: [PHP] Error with DOMDocument-saveXML()

2005-09-29 Thread Stephen Leaf
On Thursday 29 September 2005 09:37 am, Scott Fletcher wrote: It is just that not many work with XML often enough to know well enough how to use it. I noticed many folks have different way of using XML that doesn't best fit our need. It is a newer idea of how to do things. I have this same

Re: [PHP] Error with DOMDocument-saveXML()

2005-09-29 Thread Stephen Leaf
On Thursday 29 September 2005 12:26 pm, Stephen Leaf wrote: I have figured it out! My guess couldn't have been more _wrong_. Here is all you need to recreate the Error. There is only 1 value that is off. in the DOMDocument I gave it the wrong encoding type. uft-8 .. it should read utf-8.

[PHP] Mixing PHP VBSCript

2005-09-29 Thread Jay Blanchard
I have a situation where I have to fix an app interface that was constructed with hundreds of lines of VBScript. The quickest way for me to do this would be to replace the offending VBScipt with PHP. Does anyone see any potential problems with doing this? I did a diagram on paper and see no

RE: [PHP] Mixing PHP VBSCript

2005-09-29 Thread Chris W. Parker
Jay Blanchard mailto:[EMAIL PROTECTED] on Thursday, September 29, 2005 11:03 AM said: I have a situation where I have to fix an app interface that was constructed with hundreds of lines of VBScript. The quickest way for me to do this would be to replace the offending VBScipt with PHP.

[PHP] php search engine

2005-09-29 Thread Ross
I am looking to install a php site search on one of my sites. Looking at http://www.site-search-pro.com/ has anyoner used this? what do I need to do to get it working? do the files reside on my server? Any alternatives free or paid let me know.. R. -- PHP General Mailing List

[PHP] PHP and Active Directory

2005-09-29 Thread Miretsky, Anya
Hi, How do I connect a php script running on linux with Active Directory on a windows machine? I would like to have my php script autmotatically read email addresses from the AD server. Can this be done? I've found a bunch of ldap functions for php but they seem to require ldap to be installed

Re: [PHP] PDF Thumbnails

2005-09-29 Thread Matt Darby
I wrote a script for this; it's designed to run from the command line in *nix, but can be triggered via exec(): Usage: ./pdf2thumb.php source_dir out_dir [code] #!/usr/local/bin/php ? function getDirFiles($dirPath){ $filesArr=array(); if ($handle = opendir($dirPath)){ while

Re: [PHP] php search engine

2005-09-29 Thread John Nichel
Ross wrote: I am looking to install a php site search on one of my sites. Looking at http://www.site-search-pro.com/ has anyoner used this? what do I need to do to get it working? do the files reside on my server? Any alternatives free or paid let me know.. I'm partial to mnogoSearch

Re: [PHP] Mixing PHP VBSCript

2005-09-29 Thread Miles Thompson
At 03:02 PM 9/29/2005, Jay Blanchard wrote: I have a situation where I have to fix an app interface that was constructed with hundreds of lines of VBScript. The quickest way for me to do this would be to replace the offending VBScipt with PHP. Does anyone see any potential problems with doing

RE: [PHP] Mixing PHP VBSCript

2005-09-29 Thread Jay Blanchard
[snip] Your new job is getting real interesting! Did you try it on a test file? If it works then the parsing in the web server can be overloaded, for lack of a better term. So whether the extension is .asp or .php, watch for the tags and treat them appropriately, that it? [/snip] Darn right

Re: [PHP] Mixing PHP VBSCript

2005-09-29 Thread Satyam
A real interesting challenge and when I first read it I thought the same thing, instead of using the short form of tags, using a more extended form such as script language= and so on, it should work, but then, Irealized that there is a lot going on outside of the code, such as parsing the

RE: [PHP] Mixing PHP VBSCript

2005-09-29 Thread Chris W. Parker
Jay Blanchard mailto:[EMAIL PROTECTED] on Thursday, September 29, 2005 1:34 PM said: Darn right 'wow'! I can keep the ASP seperate from the PHP by use of the proper tags for this instance. So... % stuff here gets executed by ASP % ?php stuff here gets executed by PHP ? Wow. I didn't

[suspicious - maybe spam] [PHP] [suspicious - maybe spam] RE: [PHP] php search engine

2005-09-29 Thread Rob Agar
hi Ross Any alternatives free or paid let me know.. http://www.isearchthenet.com/isearch/ is a good 'un, so long as you don't have thousands of pages. R -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHP 5 Hosting

2005-09-29 Thread Ed Lazor
Any recommendations on good host providers for PHP 5? Bonus points if they support SSH access and a PHP compiler like Zend. Thanks, Ed

[PHP] Question about Rasmus' 30 second AJAX Tutorial

2005-09-29 Thread xfedex
Hi, I did the Rasmus' 30 second AJAX Tutorial just for testing and everything works fine, by the way... thanks Rasmus, for this and for all !!. My little script have a single input and for every keystroke (calling the javascript function with onkeyup) the value of the input is parsed by another

Re: [PHP] Question about Rasmus' 30 second AJAX Tutorial

2005-09-29 Thread Robert Cummings
On Thu, 2005-09-29 at 22:46, xfedex wrote: Hi, I did the Rasmus' 30 second AJAX Tutorial just for testing and everything works fine, by the way... thanks Rasmus, for this and for all !!. My little script have a single input and for every keystroke (calling the javascript function with

Re: [PHP] Question about Rasmus' 30 second AJAX Tutorial

2005-09-29 Thread xfedex
On 9/29/05, Robert Cummings [EMAIL PROTECTED] wrote: Aside from using ajax to clean the toilet once in a while I'm not really into it. But I do wrangle out some javascript from time to time :) Why are you using onsubmit? Wouldn't onclick work better? Cheers, Rob. Hi Robert, I also try

[PHP] if string contains

2005-09-29 Thread John Taylor-Johnston
Humour me. I knew how to do this. I want to parse $searchenquiry and see if it contains searchenquiry=. Good grief, sorry. John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] if string contains

2005-09-29 Thread Jasper Bryant-Greene
John Taylor-Johnston wrote: Humour me. I knew how to do this. I want to parse $searchenquiry and see if it contains searchenquiry=. $yourAnswer = ( strpos( $searchenquiry, 'searchenquiry=' ) !== false ); -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- PHP

Re: [PHP] if string contains

2005-09-29 Thread John Taylor-Johnston
Jasper Bryant-Greene wrote: John Taylor-Johnston wrote: Humour me. I knew how to do this. I want to parse $searchenquiry and see if it contains searchenquiry=. $yourAnswer = ( strpos( $searchenquiry, 'searchenquiry=' ) !== false ); Thanks, John -- PHP General Mailing List

Re: [PHP] if string contains

2005-09-29 Thread John Taylor-Johnston
Me thinks that was what I used. http://ca.php.net/strstr http://ca.php.net/stristr http://ca.php.net/strpos What's the difference? Other than *Note: * If you only want to determine if a particular needle occurs within haystack, use the faster and less memory intensive function

RE: [PHP] if string contains

2005-09-29 Thread Rob Agar
hi John Me thinks that was what I used. http://ca.php.net/strstr http://ca.php.net/stristr http://ca.php.net/strpos What's the difference? the ones ending 'pos' just return an integer position. The 'i' in these string manipulation functions generally means that the function is

[PHP] Re: FTP Chmod problem

2005-09-29 Thread Matt Palermo
I'm using 5.0.something. Al [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Matt Palermo wrote: Hello everyone. I have a script where I am using FTP functions to chmod files/folders. I'm running into a problem with the ftp_chmod() function when trying to change the permissions

[PHP] File Upload Max Size

2005-09-29 Thread Matt Palermo
Hello everyone. I'm basically building a PHP FTP client app. This app connects to an FTP server and allows the user to edit/delete files/permissions, etc. I've gotten to the point where I have started to create a file upload feature. The problem I have is that PHP only allows a 2mb maximum

Re: [PHP] PHP 5 Hosting

2005-09-29 Thread Joe Wollard
The first two results both seem pretty good at a glance: http://www.google.com/search?hl=enq=php5+ssh+hostingbtnG=Google+Search On Sep 29, 2005, at 8:29 PM, Ed Lazor wrote: Any recommendations on good host providers for PHP 5? Bonus points if they support SSH access and a PHP compiler

[PHP] is there any open source project of php like swik.net?

2005-09-29 Thread ynzheng (sent by Nabble.com)
Hi,All, Swik is good for us to set one site of ourself open database! is there any open source project of php like swik.net? Anyone Can Edit SWiK is a project to create a useful free-content directory for open source software. SWiK was inspired by the wiki concept used by

Re: [PHP] working with xml from a php file for xsl transformations

2005-09-29 Thread Jasper Bryant-Greene
jonathan wrote: //neither of these work //$menu=file_get_contents(urlencode('menu_render.php? menu_id=4format=xml')); $xml-load('menu_render.php?menu_id=4format=xml'); You need to pass those get variables through a web server, otherwise you're looking for a file called