Re: [PHP] String searching

2008-05-16 Thread Daniel Brown
On Sat, May 17, 2008 at 2:17 AM, Chris W <[EMAIL PROTECTED]> wrote: > I need to find the position of the first character in the string > (searching from the end) that is not one of the characters in a set. In > this case the set is [0-9a-zA-z-_] To find the position of a specific character, R

[PHP] String searching

2008-05-16 Thread Chris W
I need to find the position of the first character in the string (searching from the end) that is not one of the characters in a set. In this case the set is [0-9a-zA-z-_] I guess to be even more specific, I want to split a string into to parts the first part can contain anything and the second

[PHP] problem with htmlspecialchars in version5.2.5

2008-05-16 Thread It flance
Hi, this statement: echo nl2br(htmlspecialchars($row['jobdescription'], ENT_QUOTES, 'UTF-8')); works for php4.3.10 but not for php5.2.5 I am wondering if i am missing something. Thank you -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/uns

Re: [PHP] SetEnv directives in VirtualHost configuration not accessible in PHP

2008-05-16 Thread Dietrich Bollmann
Hi Iv and Dmitri, Thanks for your help! The solution to my problem came under the shower - as usual :) I have to admit that I would prefer to not tell you the truth ... but: I did all my configuration in the httpd.conf of another project ... ... :) :( :) :) ...sometimes it is wiser to sleep

RE: [PHP] JavaScript and PHP

2008-05-16 Thread tedd
At 4:01 PM +0100 5/16/08, Ford, Mike wrote: On 14 May 2008 21:21, tedd advised: At 7:31 PM +0100 5/14/08, Mário Gamito wrote: Hi, I have this HTML/JS page that switches images clicking on the radio buttons and call template.php with the image ID as parameter: http://portulan-online.net/

Re: [PHP] PHP-reference

2008-05-16 Thread Daniel Kressler
"Daniel Brown" <[EMAIL PROTECTED]> wrote: On Fri, May 16, 2008 at 5:24 PM, Daniel Kressler <[EMAIL PROTECTED]> wrote: Hi! I want to know, if it's allowed to write an own online reference for PHP, with own examples and so on? Hello, fellow Daniel. ;-P Absolutely! In fact, you're enco

Re: [PHP] PHP-reference

2008-05-16 Thread Daniel Brown
On Fri, May 16, 2008 at 5:24 PM, Daniel Kressler <[EMAIL PROTECTED]> wrote: > Hi! > > I want to know, if it's allowed to write an own online reference for PHP, > with own examples and so on? Hello, fellow Daniel. ;-P Absolutely! In fact, you're encouraged to write references and example

Re: [PHP] Threads PHP

2008-05-16 Thread steve
> The word "experimental" makes me shudder. If you can (ie you're using *nix), > you could also investigate the pcntl extension - http://php.net/pcntl And it should. I used the ssh lib for php a long time ago, and now it is nothing more than a set of problems... -- PHP General Mailing List (http

[PHP] PHP-reference

2008-05-16 Thread Daniel Kressler
Hi! I want to know, if it's allowed to write an own online reference for PHP, with own examples and so on? I'm looking forward to hearing from you. Greetings from Germany Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Problems with includes

2008-05-16 Thread Tyson Vanover
Jim Lucas wrote: > Possibly that apache is chroot'ed. I know you said LAMP. But which OS/etc... Sometimes you can see from the cli if httpd is rooted. run 'ps aux | grep httpd' and see if httpd says anything about chroot I don't see anything here root 1937 0.0 5.2 25600 13456 ?

Re: [PHP] Problems with includes

2008-05-16 Thread Tyson Vanover
Dan Joseph wrote: Ok, I have changed my php.ini and restarted apache. My include_path is set to include_path = ".:/srv/www/html" but when I try from /srv/www/html/library/index.php: require '/Tools/dbtools/dbtool.php'; or require 'Tools/dbtools/dbtool.php'; or require '../Tools/dbtools/dbtool.

Re: [PHP] Problems with includes

2008-05-16 Thread Jim Lucas
Tyson Vanover wrote: Jim Lucas wrote: Their are two ways that come to mind. 1. Like Dan suggested, use the full path. 2. (I prefer this way), change your include_path setting either in your php.ini file, virtual host, .htaccess or in your script to include the base path for your web site "/s

Re: [PHP] Problems with includes

2008-05-16 Thread Dan Joseph
On Fri, May 16, 2008 at 4:36 PM, Tyson Vanover <[EMAIL PROTECTED]> wrote: > Jim Lucas wrote: > >> Their are two ways that come to mind. >> >> 1. Like Dan suggested, use the full path. >> >> 2. (I prefer this way), change your include_path setting either in your >> php.ini file, virtual host, .htac

Re: [PHP] Problems with includes

2008-05-16 Thread Tyson Vanover
Jim Lucas wrote: Their are two ways that come to mind. 1. Like Dan suggested, use the full path. 2. (I prefer this way), change your include_path setting either in your php.ini file, virtual host, .htaccess or in your script to include the base path for your web site "/srv/www/html/" and then

Re: [PHP] HELP !!!!! PHP SOAP Not building objects correctly

2008-05-16 Thread Tim Traver
Nathan Nobbe wrote: On Fri, May 16, 2008 at 1:04 PM, Tim Traver <[EMAIL PROTECTED] > wrote: Hi all, sorry for the cross post to the general PHP list as well as the SOAP PHP list, but I'm a little bit desperate... Ok, for some reason when I am sending

Re: [PHP] Threads PHP

2008-05-16 Thread Richard Heyes
Check out: http://pecl.php.net/package/threads That might help you out. > Summary: experimental implementation of threads The word "experimental" makes me shudder. If you can (ie you're using *nix), you could also investigate the pcntl extension - http://php.net/pcntl -- Richard Heyes +--

Re: [PHP] Problems with includes

2008-05-16 Thread Dan Joseph
On Fri, May 16, 2008 at 3:41 PM, Jim Lucas <[EMAIL PROTECTED]> wrote: > Tyson Vanover wrote: > >> Jim Lucas wrote: >> >> Their are two ways that come to mind. >>> >>> 1. Like Dan suggested, use the full path. >>> >>> 2. (I prefer this way), change your include_path setting either in your >>> php.

Re: [PHP] Problems with includes

2008-05-16 Thread Andrew Ballard
On Fri, May 16, 2008 at 3:31 PM, Tyson Vanover <[EMAIL PROTECTED]> wrote: > Dan Joseph wrote: > >> I'm pretty sure you're gonna need to include the entire path: >> >> require( "/srv/www/html/Tools/tool2/tool2.php" ); >> >> for both of your tools. >> > > So when php runs it's paths are drawn from th

Re: [PHP] Problems with includes

2008-05-16 Thread Jim Lucas
Tyson Vanover wrote: Jim Lucas wrote: Their are two ways that come to mind. 1. Like Dan suggested, use the full path. 2. (I prefer this way), change your include_path setting either in your php.ini file, virtual host, .htaccess or in your script to include the base path for your web site "/

Re: [PHP] Problems with includes

2008-05-16 Thread Jim Lucas
Tyson Vanover wrote: Dan Joseph wrote: I'm pretty sure you're gonna need to include the entire path: require( "/srv/www/html/Tools/tool2/tool2.php" ); for both of your tools. So when php runs it's paths are drawn from the OS's structure and not apache's? hun. thanks! Only if apache

Re: [PHP] HELP !!!!! PHP SOAP Not building objects correctly

2008-05-16 Thread Nathan Nobbe
On Fri, May 16, 2008 at 1:04 PM, Tim Traver <[EMAIL PROTECTED]> wrote: > Hi all, > > sorry for the cross post to the general PHP list as well as the SOAP PHP > list, but I'm a little bit desperate... > > Ok, for some reason when I am sending the proper objects to the __soapCall > method, it is not

Re: [PHP] Threads PHP

2008-05-16 Thread Brice
On Fri, May 16, 2008 at 9:10 PM, Cesar D. Rodas <[EMAIL PROTECTED]> wrote: > Hello, > > Is there a way to have threads in PHP? > Hi, Look at this tutorial : http://www.ibuildings.com/blog/archives/811-Multithreading-in-PHP-with-CURL.html. Copix framework provide some classes which use socket. ht

Re: [PHP] Problems with includes

2008-05-16 Thread Tyson Vanover
Jim Lucas wrote: Their are two ways that come to mind. 1. Like Dan suggested, use the full path. 2. (I prefer this way), change your include_path setting either in your php.ini file, virtual host, .htaccess or in your script to include the base path for your web site "/srv/www/html/" and the

Re: [PHP] Problems with includes

2008-05-16 Thread Tyson Vanover
Dan Joseph wrote: I'm pretty sure you're gonna need to include the entire path: require( "/srv/www/html/Tools/tool2/tool2.php" ); for both of your tools. So when php runs it's paths are drawn from the OS's structure and not apache's? hun. thanks! -- PHP General Mailing List (http://www

Re: [PHP] Problems with includes

2008-05-16 Thread Jim Lucas
Tyson Vanover wrote: I am trying to keep my tools and pages segregated for a variety of reasons (organization, security, etc). And I am having problems with my includes on my LAMP box. My user facing tools are not including my utility classes and files. The root directory of my web server (

Re: [PHP] Threads PHP

2008-05-16 Thread Dan Joseph
On Fri, May 16, 2008 at 3:10 PM, Cesar D. Rodas <[EMAIL PROTECTED]> wrote: > Hello, > > Is there a way to have threads in PHP? > > > -- > Best Regards > > Cesar D. Rodas > http://www.cesarodas.com > http://www.thyphp.com > http://www.phpajax.org > Phone: +595-961-974165 > Check out: http://pecl.p

Re: [PHP] Problems with includes

2008-05-16 Thread Dan Joseph
On Fri, May 16, 2008 at 2:25 PM, Tyson Vanover <[EMAIL PROTECTED]> wrote: > I am trying to keep my tools and pages segregated for a variety of reasons > (organization, security, etc). And I am having problems with my includes on > my LAMP box. My user facing tools are not including my utility cl

[PHP] Threads PHP

2008-05-16 Thread Cesar D. Rodas
Hello, Is there a way to have threads in PHP? -- Best Regards Cesar D. Rodas http://www.cesarodas.com http://www.thyphp.com http://www.phpajax.org Phone: +595-961-974165

[PHP] HELP !!!!! PHP SOAP Not building objects correctly

2008-05-16 Thread Tim Traver
Hi all, sorry for the cross post to the general PHP list as well as the SOAP PHP list, but I'm a little bit desperate... Ok, for some reason when I am sending the proper objects to the __soapCall method, it is not including those objects in the XML call itself... I am using PHP 5.2.6 now a

[PHP] Problems with includes

2008-05-16 Thread Tyson Vanover
I am trying to keep my tools and pages segregated for a variety of reasons (organization, security, etc). And I am having problems with my includes on my LAMP box. My user facing tools are not including my utility classes and files. The root directory of my web server (www.hostname.com/) is:

Re: [PHP] php4 -> php5 session problem

2008-05-16 Thread Juergen Falb
I've already tried adding session_write_close(); It didn't help. The session file gets saved and contains data after the first request, making the request from another machine resets everything. It even doesn't work if you make the request manually from different machines with the same sess

RE: [PHP] JavaScript and PHP

2008-05-16 Thread Ford, Mike
On 16 May 2008 16:12, Boyd, Todd M. advised: >> -Original Message- > > 8< snip! > >> That's incorrect. A form will function perfectly well with only name= >> attributes, and no ids, and it's quite possible for JavaScript to >> address the form elements using only the names (in fact, it'

[PHP] Re: OT - Question about nested sortable lists

2008-05-16 Thread Eric Butera
On Fri, May 16, 2008 at 11:07 AM, Jim Lucas <[EMAIL PROTECTED]> wrote: > I notice in a previous thread, people are suggesting using these two tools. > > http://developer.yahoo.com/yui/examples/dragdrop/dd-reorder.html > > and > > http://tool-man.org/examples/ > > Now, my question is, does anybody k

Re: [PHP] OT - Question about nested sortable lists

2008-05-16 Thread Bastien Koert
On Fri, May 16, 2008 at 11:09 AM, Jim Lucas <[EMAIL PROTECTED]> wrote: > I notice in a previous thread, people are suggesting using these two tools. > > http://developer.yahoo.com/yui/examples/dragdrop/dd-reorder.html > > and > > http://tool-man.org/examples/ > > Now, my question is, does anybody

RE: [PHP] JavaScript and PHP

2008-05-16 Thread Boyd, Todd M.
> -Original Message- 8< snip! > That's incorrect. A form will function perfectly well with only name= > attributes, and no ids, and it's quite possible for JavaScript to > address the form elements using only the names (in fact, it's easier > than via the ids as there's a short syntax fo

[PHP] OT - Question about nested sortable lists

2008-05-16 Thread Jim Lucas
I notice in a previous thread, people are suggesting using these two tools. http://developer.yahoo.com/yui/examples/dragdrop/dd-reorder.html and http://tool-man.org/examples/ Now, my question is, does anybody know if these, or similar tools, would allow you to manipulate nested lists and move

RE: [PHP] JavaScript and PHP

2008-05-16 Thread Ford, Mike
On 14 May 2008 21:21, tedd advised: > At 7:31 PM +0100 5/14/08, Mário Gamito wrote: >> Hi, >> >> I have this HTML/JS page that switches images >> clicking on the radio buttons and call >> template.php with the image ID as parameter: >> http://portulan-online.net/einstein.html >> >> Now, I need t

Re: [PHP] $_SESSION lost

2008-05-16 Thread Daniel Brown
On Fri, May 16, 2008 at 12:36 AM, hce <[EMAIL PROTECTED]> wrote: > Hi, > > I've just installed PHP 5.2.4 on a FC 7 with a web server. > > $ php -v > PHP 5.2.4 (cli) (built: Sep 18 2007 08:50:58) > Copyright (c) 1997-2007 The PHP Group > Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

RE: [PHP] question about validation and sql injection

2008-05-16 Thread Boyd, Todd M.
Sudhakar, Bundling your parameters and using "prepared statements" will prevent any and all SQL Injection from taking place, as the parameters themselves will NEVER (repeat, NEVER) be considered a "part" of the query. They are considered only to be data to be used in the query. Example: [code] $

Re: [PHP] Plugins... (like wordpress?)

2008-05-16 Thread Eric Butera
On Fri, May 16, 2008 at 1:46 AM, Ryan S <[EMAIL PROTECTED]> wrote: > Hey, > > Have just started screwing around with wordpress and I must say... it has a > lot of really really nice bits and pieces... two of my favourites are widgets > and plugins... not a hundred percent certain exactly what the

Re: [PHP] SetEnv directives in VirtualHost configuration not accessible in PHP

2008-05-16 Thread Dmitri
If you are on apache2 server, try |$myvar = apache_getenv("|APP_CONFIG_SECTION|"); echo $myvar and see if it has value that you expect | Dietrich Bollmann wrote: Hi, I have the following directive in my virtual host configuration: SetEnv APP_CONFIG_SECTION "development" and would like to

[PHP] encoding to a file

2008-05-16 Thread J. Manuel Velasco - UBILIBET
Hello. When I create a file I need to specify the encoding to ISO-8859-1, how can i do this please ? I have read about stream:default:encoding() but I am not sure how to use it. Thanks in advance. --

Re: [PHP] Plugins... (like wordpress?)

2008-05-16 Thread Larry Garfield
I can't speak for WordPress's implementation, but in Drupal we have pluggable modules by way of magically named functions. A sort of over-simplified version would be: /modules/foo/foo.module /modules/bar/bar.module Core system scans the modules directory (only when asked, not every page load)

Re: [PHP] SetEnv directives in VirtualHost configuration not accessible in PHP

2008-05-16 Thread Iv Ray
I had similar problem some time ago, and there was some solution, which I can't remember now. Do you still have the problem? I'll can have a look, if still needed. Iv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Scripts slowing down?

2008-05-16 Thread René Leboeuf
Per Jessen a écrit : They _all_ slow down after a while? How many emails are you sending in this way? Some of our mailing are +100.000 emails... There is a possibility that your filesystem is having difficulties dealing with that many files, escpecially if they are all in one directory. Whi

Re: [PHP] question about validation and sql injection

2008-05-16 Thread Iv Ray
Hej Sudhakar, what a long e-mail ;) ! I would suggest you use e-mail address as user name. There are many good reasons why to do so, I will give you some, if you wish. Iv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] changing order of items

2008-05-16 Thread Iv Ray
Jason Murray wrote: I am assuming that each time you click the up or down arrow you are re-loading the page (via a GET request). A simple solution to this, would be to adjust the URLs assigned to the up and down arrows to carry an extra variable, the item either directly above or directly below

Re: [PHP] changing order of items

2008-05-16 Thread Iv Ray
afan pasalic wrote: > But, actually, I need something more simple. Nothing "fancy" :D. I thought so from the beginning, just thought - it does not hurt to show different possibilities. May be you will not implement it now, but when you know about it, it might give you ideas in future. -- --

Re: [PHP] changing order of items

2008-05-16 Thread Iv Ray
Eric Butera wrote: I use this: http://developer.yahoo.com/yui/examples/dragdrop/dd-reorder.html Looks good. I still can't decide for one of these "big" libraries, prefer to use "small" things which I can fix/change, if the author does not have time or desire. -- -- PHP General Mailing Li

Re: [PHP] php4 -> php5 session problem

2008-05-16 Thread paragasu
On Fri, May 16, 2008 at 6:40 PM, Juergen Falb <[EMAIL PROTECTED]> wrote: > Dear all, > since upgrading to php5 I've a problem with session handling. In php4 a > user initiated a session, the session id gets afterwards handed over to a > payment provider. When the payment provider calls a script wi

Re: [PHP] Re: Plugins... (like wordpress?)

2008-05-16 Thread paragasu
there is two way you can do this (there is more). using the function include() to include files based on query string or using call_user_func() you can keep all the files/modules in one folder. pass the module reference using GET. from the GET we can determine which function we want to call using

Re: [PHP] fsockopen + fputs

2008-05-16 Thread Nathan Rixham
debussy007 wrote: Hello, I use fsockopen and fputs to call a distant URL, but I have the following error : The requested URL /registration/test was not found on this server. This is my code: $req = 'username=' . $usr . '&password=' . $pass . '&date_of_birth=' . $year . "-" . $month . "-"

[PHP] Re: Plugins... (like wordpress?)

2008-05-16 Thread Nathan Rixham
Ryan S wrote: Hey, Have just started screwing around with wordpress and I must say... it has a lot of really really nice bits and pieces... two of my favourites are widgets and plugins... not a hundred percent certain exactly what the diff is though! :) Anyway, was thinking it would be a grea

Re: [PHP] fsockopen + fputs

2008-05-16 Thread Per Jessen
debussy007 wrote: > However the path www.example.com/registration/test exists > so why does it says it cannot find the requested url ? > > Any idea ? Thank you for any help !! Take a look at the accesslog on www.example.com - that'll tell you what's happening. /Per Jessen, Zürich -- PHP Gene

[PHP] SetEnv directives in VirtualHost configuration not accessible in PHP

2008-05-16 Thread Dietrich Bollmann
Hi, I have the following directive in my virtual host configuration: SetEnv APP_CONFIG_SECTION "development" and would like to access the value from PHP with getenv('APP_CONFIG_SECTION') or $_SERVER['APP_CONFIG_SECTION'] or whatever. But none of them work. Is there any PHP / Zend / Apache2