Re: [PHP] unexpected '@' in preg_replace???

2007-10-29 Thread Zoltán Németh
2007. 10. 29, hétfő keltezéssel 11.17-kor Daniel Brown ezt írta: > On 10/29/07, Zoltán Németh <[EMAIL PROTECTED]> wrote: > > hi list, > > > > I have this code: > [snip!] > > Parse error: syntax error, unexpected '@' > > in /home/znemeth/public_html/test/pregreplacetest1.php(94) : regexp code > > on

Re: [PHP] Newline

2007-10-29 Thread Nathan Nobbe
On 10/30/07, Crayon Shin Chan <[EMAIL PROTECTED]> wrote: > > On Monday 29 October 2007, Nathan Nobbe wrote: > > if you were going to do that you may as well use PHP_EOL > > its cross-platform and doesnt require an define directive. > > (php5 only) > > It's available in 4.3.10 as well, youre right

Re: [PHP] Newline

2007-10-29 Thread Crayon Shin Chan
On Monday 29 October 2007, Nathan Nobbe wrote: > if you were going to do that you may as well use PHP_EOL > its cross-platform and doesnt require an define directive. > (php5 only) It's available in 4.3.10 as well, but manual doesn't specify what it defines - I suppose I can echo or vardump it to

[PHP] Configuring 5.2.4 for Mac OSX and Webstar

2007-10-29 Thread Steve Meredith
I'm having difficulty compiling and upgrading to version 5.2.4. Also using WebSTAR. Here's the steps I took and the resulting errors. Any help would be appreciated! 1. Download the latest copy of PHP source code from [ http://www.php.net/ ]http://www.php.net 2. Open the Terminal application (in

Re: [PHP] moving over to php 5

2007-10-29 Thread Larry Garfield
On Monday 29 October 2007, Philip Thompson wrote: > I think the real question is will listservs (like this one) stop > supporting people running applications on PHP4 in 98 days ( > http://gophp5.org/)? I'm not saying we should outcast *those people* who > haven't transitioned, but will the pr

Re: [PHP] moving over to php 5

2007-10-29 Thread Larry Garfield
On Monday 29 October 2007, Per Jessen wrote: > Cristian Vrabie wrote: > > Hmm 117,223 hosts with php4 only support. Did you actually checked how > > many have php5 support? Many more. > > There are 178.112 hosters that have PHP5 support. I checked. Where and how did you check? Compiling such sta

Re: [PHP] what is the point of prepare?

2007-10-29 Thread mlists
On Mon, 2007-10-29 at 10:06 +, Hulf wrote: > Hi, > > Begining using the php5 mysql functions and want to know what is the point of > preparing/binding the data before I insert it? > > $prep = $mysqli->prepare ("INSERT INTO cd (cdid,title,artist) VALUES > ('0',?,?)"); > $prep->bind_param ('2

Re: [PHP] unexpected '@' in preg_replace???

2007-10-29 Thread Jim Lucas
Daniel Brown wrote: On 10/29/07, Zoltán Németh <[EMAIL PROTECTED]> wrote: hi list, I have this code: [snip!] Parse error: syntax error, unexpected '@' in /home/znemeth/public_html/test/pregreplacetest1.php(94) : regexp code on line 1 Fatal error: preg_replace() [function.preg-replace]: Faile

Re: [PHP] problem with bind_param

2007-10-29 Thread Jeremy Mcentire
The PHP docs show: $stmt = $mysqli->prepare("INSERT INTO CountryLanguage VALUES (?, ?, ?, ?)"); $stmt->bind_param('sssd', $code, $language, $official, $percent); for usage. Your $prep->bind_param() doesn't seem to include the definitions. 'sssd' in the above example, string, string, string

Re: [PHP] SPL

2007-10-29 Thread Jim Lucas
Børge Holen wrote: On Sunday 28 October 2007 07:27:53 you wrote: Børge Holen wrote: I found this code at php.net witch needs very little modifications and can do so much, but I can't figure out how to make it read alphabeticly as mentioned $it = new RecursiveDirectoryIterator($

Re: [PHP] moving over to php 5

2007-10-29 Thread Per Jessen
Cristian Vrabie wrote: > Hmm 117,223 hosts with php4 only support. Did you actually checked how > many have php5 support? Many more. There are 178.112 hosters that have PHP5 support. I checked. > You have hundreds of thousands of choices. And the pricing has quite > leveled in the last period

Re: [PHP] unexpected '@' in preg_replace???

2007-10-29 Thread Daniel Brown
On 10/29/07, Zoltán Németh <[EMAIL PROTECTED]> wrote: > hi list, > > I have this code: [snip!] > Parse error: syntax error, unexpected '@' > in /home/znemeth/public_html/test/pregreplacetest1.php(94) : regexp code > on line 1 > > Fatal error: preg_replace() [ href='function.preg-replace'>function.p

Re: [PHP] moving over to php 5

2007-10-29 Thread Robert Cummings
On Mon, 2007-10-29 at 09:42 -0500, Philip Thompson wrote: > > I think the real question is will listservs (like this one) stop > supporting people running applications on PHP4 in 98 days ( > http://gophp5.org/)? I'm not saying we should outcast *those people* who > haven't transitioned, but wi

Re: [PHP] moving over to php 5

2007-10-29 Thread Robert Cummings
On Mon, 2007-10-29 at 08:52 +, Hulf wrote: > Hi, > > > It is about time I made the jump to 5, however the only thing that is > holding me back is the problem with hosts. How many hosts still run php 4 > and am I going to have to spend hours and hours persuading them to upgrade > before I c

Re: [PHP] moving over to php 5

2007-10-29 Thread Philip Thompson
On 10/29/07, Per Jessen <[EMAIL PROTECTED]> wrote: > > Hulf wrote: > > > It is about time I made the jump to 5, however the only thing that is > > holding me back is the problem with hosts. How many hosts still run > > php 4 and am I going to have to spend hours and hours persuading them > > to upg

[PHP] unexpected '@' in preg_replace???

2007-10-29 Thread Zoltán Németh
hi list, I have this code: ]*>.*?<\/script>/i', //

Re: [PHP] moving over to php 5

2007-10-29 Thread Cristian Vrabie
Per Jessen wrote: Hulf wrote: It is about time I made the jump to 5, however the only thing that is holding me back is the problem with hosts. How many hosts still run php 4 and am I going to have to spend hours and hours persuading them to upgrade before I can run my code? There are

Re: [PHP] returning an array from a function?

2007-10-29 Thread Philip Thompson
On 10/26/07, tedd <[EMAIL PROTECTED]> wrote: > > Rob: > > Why use a global? > > Plus, your function is returning an array, but you're not catching it. > > $mve_array = convert( $latitude, $longitude ); > > Example: > > http://www.webbytedd.com/bbb/array-function/ > > Cheers, > > tedd So... do you

[PHP] problem with bind_param

2007-10-29 Thread Hulf
Hi, I am still having poblems with the php5 functions. I have 4 variables in each. What is the problem? Warning: mysqli_stmt::bind_param() [function.mysqli-stmt-bind-param]: Number of elements in type definition string doesn't match number of bind variables in on line 21 $prep = $mysqli

Re: [PHP] sessions (version 5.1 to 5.2 )

2007-10-29 Thread tedd
strange. i must be missing something simple. Fritz I would guess that you did make the first line of your code: http://www.php.net/session_start Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] moving over to php 5

2007-10-29 Thread Per Jessen
Hulf wrote: > It is about time I made the jump to 5, however the only thing that is > holding me back is the problem with hosts. How many hosts still run > php 4 and am I going to have to spend hours and hours persuading them > to upgrade before I can run my code? There are at least 117,223 hosti

Re: [PHP] what is the point of prepare?

2007-10-29 Thread Jeremy Mcentire
If you're making just one insert; it's probably not the best approach. However, if you're inserting multiple rows, benchmarks have shown that preparing a statement and binding the params is faster. Also, with mysqli, you can strictly define types for fields and remove the step of validati

Re: [PHP] what is the point of prepare?

2007-10-29 Thread Per Jessen
Hulf wrote: > Begining using the php5 mysql functions and want to know what is the > point of preparing/binding the data before I insert it? > > $prep = $mysqli->prepare ("INSERT INTO cd (cdid,title,artist) VALUES > ('0',?,?)"); $prep->bind_param ('22',$title,$artist); It's a performance measure

Re: [PHP] Newline

2007-10-29 Thread Jeremy Mcentire
In general, I try to think of single quotes as being literal and double quotes as being interpreted. In that case, we expect 'some line\t with a tab, a variable {$obj- >member}, and a newline\n' to produce exactly: some line\t with a tab, a variable {$obj->member}, and a newline\n Yet, the s

Re: [PHP] Newline

2007-10-29 Thread Nathan Nobbe
On 10/29/07, Crayon Shin Chan <[EMAIL PROTECTED]> wrote: > > On Sunday 28 October 2007, magoo wrote: > > > I have switched to using single quotes, and found out that newline (\n) > > only works in double quotes. It looks kind of stupid using > > 'someString'."\n"; and it`s kind of inconsistent usin

[PHP] what is the point of prepare?

2007-10-29 Thread Hulf
Hi, Begining using the php5 mysql functions and want to know what is the point of preparing/binding the data before I insert it? $prep = $mysqli->prepare ("INSERT INTO cd (cdid,title,artist) VALUES ('0',?,?)"); $prep->bind_param ('22',$title,$artist); Ta, R.

Re: [PHP] Newline

2007-10-29 Thread Crayon Shin Chan
On Sunday 28 October 2007, magoo wrote: > I have switched to using single quotes, and found out that newline (\n) > only works in double quotes. It looks kind of stupid using > 'someString'."\n"; and it`s kind of inconsistent using double quotes > for some lines like "someString\n";. You can:

Re: [PHP] moving over to php 5

2007-10-29 Thread Dave Goodchild
Support for php4 will be dropped at the end of the year so hosts will be forced to make the upgrade at some point. On 10/29/07, Hulf <[EMAIL PROTECTED]> wrote: > > Hi, > > > It is about time I made the jump to 5, however the only thing that is > holding me back is the problem with hosts. How many

[PHP] moving over to php 5

2007-10-29 Thread Hulf
Hi, It is about time I made the jump to 5, however the only thing that is holding me back is the problem with hosts. How many hosts still run php 4 and am I going to have to spend hours and hours persuading them to upgrade before I can run my code? I have very little time as it is and am anxi