Re: [PHP] fsocketopen not returning data properly

2007-06-19 Thread Tijnema
On 6/19/07, Dan [EMAIL PROTECTED] wrote: I'm having trouble with sockets in PHP, if anyone has the time to help out that would be awesome. I am trying to get the result of a post There are a lot of people that are probably willing to help, but what is your exact problem? echo

Re: [PHP] Re: php framework, large site

2007-06-19 Thread Sancar Saran
Hi, as a creator of the one of those half baked's I want to say someting about this issue. People wants own Php framework etc. Because 1-) Documentation. For my point of view most of unix documentation style was too complex. After more than 10 years of linux experience I still hate man

Re: [PHP] PHP calling an ISAPI Extension

2007-06-19 Thread Tijnema
On 6/19/07, Jim Lucas [EMAIL PROTECTED] wrote: Dan wrote: I wish I could, I can't count on the script being on a linux machine. I also can't expect people to rebuild PHP with the curl library just to use my script. Is there any other way to do a post to a page from a php function? -

[PHP] Re: generate images of register definitions

2007-06-19 Thread Colin Guthrie
Mike Frysinger wrote: On 6/9/07, Richard Lynch [EMAIL PROTECTED] wrote: On Sat, June 9, 2007 4:27 pm, Mike Frysinger wrote: anyone know of some software to generate images like this: http://wh0rd.org/register.png idea is i have a list of registers and their bit meanings, and i want to

Re: [PHP] PHP calling an ISAPI Extension

2007-06-19 Thread Jochem Maas
Dan wrote: For example, I could use function fsockopen but that seems like it would probably be pretty slow doing all that, and if there's a php function or small script that would be preferable over the 50/60 lines you would need to do it properly with fsockopen. with the caveat that it'll

Re[2]: [PHP] Comparing string to array

2007-06-19 Thread Richard Davey
Hi Larry, Tuesday, June 19, 2007, 2:55:07 AM, you wrote: Perhaps you're looking for in_array()? If only it was that simple! But pray tell how an in_array search is going to find: $userparam = test['bob'][]; within: Array ( [test] = Array ( ['bob'] = Array

Re: [PHP] Comparing string to array

2007-06-19 Thread Stut
Richard Davey wrote: Hi all, Ok it's 2am, my brain has gone to mush and I am having trouble figuring out an easy way to do this, can anyone shed some light? Take a peek at the following code: // START pre ?php print_r($_POST); $userparam = test['sam'][]; // How to check if

Re: [PHP] Date

2007-06-19 Thread Richard Heyes
Larry Garfield wrote: (Note: strtotime() is probably not the fastest to execute way of doing it, but it's the fastest to write. Choose wisely.) Is it? How about: $timestamp = strtotime($expiry_date) + (86400 * 7); -- Richard Heyes 0844 801 1072 http://www.websupportsolutions.co.uk Knowledge

[PHP] Keeping sessions

2007-06-19 Thread Jorge González
Hi all ! In a web server cluster, how do you do guys keep the php sessions? I mean, with Apache and mod_proxy_balanced you could have a cluster with apache backend webservers but If a user is logged into an php app then this user goes always to the same backend server and if that server goes

Re: [PHP] Keeping sessions

2007-06-19 Thread Stut
Jorge González wrote: In a web server cluster, how do you do guys keep the php sessions? I mean, with Apache and mod_proxy_balanced you could have a cluster with apache backend webservers but If a user is logged into an php app then this user goes always to the same backend server and if that

Re[2]: [PHP] Comparing string to array

2007-06-19 Thread Richard Davey
Hi Stut, Tuesday, June 19, 2007, 10:16:02 AM, you wrote: If you can't control $userparam and it has to look like you have it then you're parsing of it is a little more involved, but still fairly simple. What are you actually trying to do? Where will $userparam actually come from? There is

Re: [PHP] Comparing string to array

2007-06-19 Thread Stut
Richard Davey wrote: Hi Stut, Tuesday, June 19, 2007, 10:16:02 AM, you wrote: If you can't control $userparam and it has to look like you have it then you're parsing of it is a little more involved, but still fairly simple. What are you actually trying to do? Where will $userparam actually

Re: [PHP] Keeping sessions

2007-06-19 Thread Richard Heyes
Stut wrote: Jorge González wrote: In a web server cluster, how do you do guys keep the php sessions? I mean, with Apache and mod_proxy_balanced you could have a cluster with apache backend webservers but If a user is logged into an php app then this user goes always to the same backend

Re: [PHP] Keeping sessions

2007-06-19 Thread Stut
Richard Heyes wrote: Stut wrote: Jorge González wrote: In a web server cluster, how do you do guys keep the php sessions? I mean, with Apache and mod_proxy_balanced you could have a cluster with apache backend webservers but If a user is logged into an php app then this user goes always to

Re[2]: [PHP] Comparing string to array

2007-06-19 Thread Richard Davey
Hi Stut, Tuesday, June 19, 2007, 12:09:12 PM, you wrote: If you have no control over what the fields in the form will be, what are you doing with the data? Surely if you're writing logic that requires you to know what the fields are called, you need to have control over it. Here, this

Re: [PHP] Keeping sessions

2007-06-19 Thread Richard Heyes
What do you mean by session server? I server dedicated (or it can also act as a web server, or the main web server) to storing sessions. How are you accessing the session data on another server? Usually by way of a database. -- Richard Heyes 0844 801 1072

Re: [PHP] Keeping sessions

2007-06-19 Thread Sancar Saran
On Tuesday 19 June 2007 14:15:00 Stut wrote: Richard Heyes wrote: Stut wrote: Jorge González wrote: In a web server cluster, how do you do guys keep the php sessions? I mean, with Apache and mod_proxy_balanced you could have a cluster with apache backend webservers but If a user is

Re: [PHP] Keeping sessions

2007-06-19 Thread Jorge González
Ok, you both are right but not what I need because web servers is for shared hosting with PHP then each user choose the way to develop their apps. Then one user maybe store sessions in DB but another one not. This should be on Apache or OS side. It's because I talk about ldirector, LVS and so

Re: [PHP] Comparing string to array

2007-06-19 Thread Stut
Richard Davey wrote: Hi Stut, Tuesday, June 19, 2007, 12:09:12 PM, you wrote: If you have no control over what the fields in the form will be, what are you doing with the data? Surely if you're writing logic that requires you to know what the fields are called, you need to have control over

Re: [PHP] Keeping sessions

2007-06-19 Thread Stut
Richard Heyes wrote: What do you mean by session server? I server dedicated (or it can also act as a web server, or the main web server) to storing sessions. How are you accessing the session data on another server? Usually by way of a database. Ok, that's basically what I suggested.

Re: [PHP] Date

2007-06-19 Thread Shafiq Rehman
Hello, There's another way out there using mysql SELECT DATE_ADD('$expiry_date', INTERVAL 7 DAY) as fDate but off course not a recommended way. In fact you can use it update query (update tbl_name set expiry_date = date_add('$expiry_date', INTERVAL 7 DAY) where user ='$user') -- Shafiq Rehman

Re[2]: [PHP] Comparing string to array

2007-06-19 Thread Richard Davey
Hi Stut, Tuesday, June 19, 2007, 1:16:54 PM, you wrote: The problem is finding a way to expand the input name (which is a string) into a format that $_POST can be searched for. Or do the reverse, iterate through $_POST to find a match for the input name and get that value. Try this overly

Re: [PHP] Date

2007-06-19 Thread Richard Heyes
Shafiq Rehman wrote: Hello, There's another way out there using mysql SELECT DATE_ADD('$expiry_date', INTERVAL 7 DAY) as fDate but of course not a recommended way. So why suggest it? In fact you can use it update query (update tbl_name set expiry_date = date_add('$expiry_date', INTERVAL 7

[PHP] Re: Comparing string to array

2007-06-19 Thread Al
preg_grep() or foreach($_POST as $value){ if(empty($value)) continue; $good_stuff[] = $value; } Richard Davey wrote: Hi all, Ok it's 2am, my brain has gone to mush and I am having trouble figuring out an easy way to do this, can anyone shed some light? Take a peek at the

Re: [PHP] Comparing string to array

2007-06-19 Thread Stut
Richard Davey wrote: Hi Stut, Tuesday, June 19, 2007, 1:16:54 PM, you wrote: The problem is finding a way to expand the input name (which is a string) into a format that $_POST can be searched for. Or do the reverse, iterate through $_POST to find a match for the input name and get that

Re: [PHP] Keeping sessions

2007-06-19 Thread Stut
Jorge González wrote: Ok, you both are right but not what I need because web servers is for shared hosting with PHP then each user choose the way to develop their apps. Then one user maybe store sessions in DB but another one not. This should be on Apache or OS side. It's because I talk about

Re: [PHP] Date

2007-06-19 Thread Shafiq Rehman
On 6/19/07, Richard Heyes [EMAIL PROTECTED] wrote: Shafiq Rehman wrote: Hello, There's another way out there using mysql SELECT DATE_ADD('$expiry_date', INTERVAL 7 DAY) as fDate but of course not a recommended way. So why suggest it? just to share the knowledge In fact you can use

Re: [PHP] Re: Comparing string to array

2007-06-19 Thread Richard Davey
Hi Al, Tuesday, June 19, 2007, 1:46:47 PM, you wrote: preg_grep() or foreach($_POST as $value){ if(empty($value)) continue; $good_stuff[] = $value; } A classic case of not reading the post fully methinks. Cheers, Rich -- Zend Certified Engineer http://www.corephp.co.uk

Re[2]: [PHP] Comparing string to array

2007-06-19 Thread Richard Davey
Hi Stut, Tuesday, June 19, 2007, 1:49:53 PM, you wrote: Very nice, thank you. I was hoping there would be a way to do it without resorting to eval(), but if even you can't figure out how, I'm not going to waste any more time trying to either :) You probably could by breaking it into each

Re: [PHP] Re: php framework, large site

2007-06-19 Thread tedd
At 9:35 PM -0400 6/18/07, Robert Cummings wrote: Some of the greatest science comes from those unaware of established rules and theories. There's the quote of the day. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List

Re: [PHP] Comparing string to array

2007-06-19 Thread Stut
Richard Davey wrote: Hi Stut, Tuesday, June 19, 2007, 1:49:53 PM, you wrote: Very nice, thank you. I was hoping there would be a way to do it without resorting to eval(), but if even you can't figure out how, I'm not going to waste any more time trying to either :) You probably could by

Re: [PHP] Keeping sessions

2007-06-19 Thread Jorge González
Stut escribió: Jorge González wrote: Ok, you both are right but not what I need because web servers is for shared hosting with PHP then each user choose the way to develop their apps. Then one user maybe store sessions in DB but another one not. This should be on Apache or OS side. It's

Re: [PHP] if test

2007-06-19 Thread Kostas Papadimitriou
Jochem Maas wrote: please keep posts on list. jekillen wrote: On Jun 17, 2007, at 12:18 PM, Jochem Maas wrote: jekillen wrote: Hello again; does the following test pass if the file is successfully included: if( include( some file ) ) or does it pass with: if( ! include( some file ) ) have

Re: [PHP] Re: php framework, large site

2007-06-19 Thread tedd
At 1:41 PM +0800 6/19/07, Crayon Shin Chan wrote: On Tuesday 19 June 2007 09:35, Robert Cummings wrote: Some of the greatest science comes from those unaware of established rules and theories. I'm sure most people on the list aren't looking to make revolutionary advances in php

Re: [PHP] Keeping sessions

2007-06-19 Thread Stut
Jorge González wrote: Stut escribió: Jorge González wrote: Ok, you both are right but not what I need because web servers is for shared hosting with PHP then each user choose the way to develop their apps. Then one user maybe store sessions in DB but another one not. This should be on Apache

RE: [PHP] if test

2007-06-19 Thread Chris
I am not sure what you are trying to accomplish, but maybe require( some file ) will be of more use to you. -Original Message- From: Kostas Papadimitriou [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 19, 2007 9:31 AM To: php-general@lists.php.net Subject: Re: [PHP] if test Jochem Maas

Re: [PHP] Re: php framework, large site

2007-06-19 Thread Daniel Brown
On 6/19/07, tedd [EMAIL PROTECTED] wrote: At 9:35 PM -0400 6/18/07, Robert Cummings wrote: Some of the greatest science comes from those unaware of established rules and theories. There's the quote of the day. Second. -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-)

Re: [PHP] Keeping sessions

2007-06-19 Thread Jochem Maas
Stut wrote: Jorge González wrote: Stut escribió: Jorge González wrote: Ok, you both are right but not what I need because web servers is for shared hosting with PHP then each user choose the way to develop their apps. Then one user maybe store sessions in DB but another one not. This should

Re: [PHP] Re: php framework, large site

2007-06-19 Thread Jochem Maas
Robert Cummings wrote: Some of the greatest science comes from those unaware of established rules and theories. Third. not that my complete lack of knowledge theory and complete lack of respect for rules has come to any kind of fruition :-P PS - the troll seems to been subdued? -- PHP

[PHP] Novice Question - Viewing Errors

2007-06-19 Thread revDAVE
I am just beginning to learn about PHP. It seems as though if I make a code error... The PHP page will simply come up blank. ( Not too helpful for error checking) - I would like to see some kind of report on the page as to what went wrong. I have tried adding various lines of code to my page -

Re: [PHP] Novice Question - Viewing Errors

2007-06-19 Thread Daniel Brown
On 6/19/07, revDAVE [EMAIL PROTECTED] wrote: I am just beginning to learn about PHP. It seems as though if I make a code error... The PHP page will simply come up blank. ( Not too helpful for error checking) - I would like to see some kind of report on the page as to what went wrong. I have

Re: [PHP] Novice Question - Viewing Errors

2007-06-19 Thread Daniel Brown
On 6/19/07, Daniel Brown [EMAIL PROTECTED] wrote: On 6/19/07, revDAVE [EMAIL PROTECTED] wrote: I am just beginning to learn about PHP. It seems as though if I make a code error... The PHP page will simply come up blank. ( Not too helpful for error checking) - I would like to see some kind

Re: [PHP] Novice Question - Viewing Errors

2007-06-19 Thread Jochem Maas
revDAVE wrote: I am just beginning to learn about PHP. It seems as though if I make a code error... The PHP page will simply come up blank. ( Not too helpful for error checking) - I would like to see some kind of report on the page as to what went wrong. I have tried adding various

[PHP] Wiki lib?

2007-06-19 Thread Emil Edeholt
Hi, Do any of you guys know of a good php library to use as a base if one wants to develop a simple wiki? I don't want a complete system like MediaWiki, I want a library that can compare different versions of text, and so on. I first thought of using subversion, but it seems a bit overkill.

Re: [PHP] Wiki lib?

2007-06-19 Thread Greg Donald
On 6/19/07, Emil Edeholt [EMAIL PROTECTED] wrote: I want a library that can compare different versions of text, Command line diff wrapped in exec() calls should work fine. -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] unlink before imagepng?

2007-06-19 Thread Greg Donald
On 6/17/07, Brian Dunning [EMAIL PROTECTED] wrote: If I write an edited image back to disk using imagepng, is it desirable to first unlink the existing image? It's not required. I notice that it works fine if I don't. Just wondering if there are any pros or cons. Just be sure and call

Re: [PHP] New htmlentities() '$double_enocde' Param Question

2007-06-19 Thread Greg Donald
On 6/17/07, Chris [EMAIL PROTECTED] wrote: I just need a clarification about the new $double_encode param for htmlentities() and htmlspecialchars(). Is it supposed to do as I expect it to do in the code below or am I misuderstanding its use? // Output: lt; echo htmlentities('', ENT_QUOTES,

Re: [PHP] file charset: something like file -i

2007-06-19 Thread Greg Donald
On 6/14/07, Martin Marques [EMAIL PROTECTED] wrote: Is there something like the UNIX command file -i to know the charset of a file? I don't want to use a system call, so I was wondering if there was some predefined function in PHP. P.D.: I'm using PHP 5.2.0

Re: [PHP] PHP calling an ISAPI Extension

2007-06-19 Thread Jim Lucas
Tijnema wrote: On 6/19/07, Jim Lucas [EMAIL PROTECTED] wrote: Dan wrote: I wish I could, I can't count on the script being on a linux machine. I also can't expect people to rebuild PHP with the curl library just to use my script. Is there any other way to do a post to a page from a php

Re: [PHP] Comparing string to array

2007-06-19 Thread Jim Lucas
Richard Davey wrote: Hi all, Ok it's 2am, my brain has gone to mush and I am having trouble figuring out an easy way to do this, can anyone shed some light? Take a peek at the following code: // START pre ?php print_r($_POST); $userparam = test['sam'][]; // How to check if

Re[2]: [PHP] Comparing string to array

2007-06-19 Thread Richard Davey
Hi Jim, Tuesday, June 19, 2007, 5:06:47 PM, you wrote: DON'T USE SINGLE QUOTES IN YOUR NAME= ATTRIBUTE Hate to piss on your bonfire but a single quote is a perfectly valid (if somewhat stupid choice of) character for inclusion in an array key. Cheers, Rich -- Zend Certified Engineer

Re: [PHP] Comparing string to array

2007-06-19 Thread Jim Lucas
Richard Davey wrote: Hi Jim, Tuesday, June 19, 2007, 5:06:47 PM, you wrote: DON'T USE SINGLE QUOTES IN YOUR NAME= ATTRIBUTE Hate to piss on your bonfire but a single quote is a perfectly valid (if somewhat stupid choice of) character for inclusion in an array key. Cheers, Rich in this

Re: [PHP] Comparing string to array

2007-06-19 Thread Jim Lucas
Richard Davey wrote: Hi Jim, Tuesday, June 19, 2007, 5:06:47 PM, you wrote: DON'T USE SINGLE QUOTES IN YOUR NAME= ATTRIBUTE Hate to piss on your bonfire but a single quote is a perfectly valid (if somewhat stupid choice of) character for inclusion in an array key. Cheers, Rich if you

Re: [PHP] Comparing string to array

2007-06-19 Thread Jim Lucas
Richard Davey wrote: Hi Jim, Tuesday, June 19, 2007, 5:06:47 PM, you wrote: DON'T USE SINGLE QUOTES IN YOUR NAME= ATTRIBUTE where in this sentence did I say that it was invalid? just told you not to use them, because it is going to mess with your output Hate to piss on your bonfire but

Re[2]: [PHP] Comparing string to array

2007-06-19 Thread Richard Davey
Hi Jim, Tuesday, June 19, 2007, 5:29:55 PM, you wrote: Richard Davey wrote: Hi Jim, Tuesday, June 19, 2007, 5:06:47 PM, you wrote: DON'T USE SINGLE QUOTES IN YOUR NAME= ATTRIBUTE Hate to piss on your bonfire but a single quote is a perfectly valid (if somewhat stupid choice of)

[PHP] Force zero numbers on a integer

2007-06-19 Thread listas
Hello, I have a integer that is submitted by the user and i need it to always contain 5 digits. If the user submitted 45, i need it to be 00045. If the user submitted 4595, i need it to be 04595. How can i do this? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] PHP calling an ISAPI Extension

2007-06-19 Thread Dan
You meant imply, infer is when you draw a conclusion based on what one already knows. Imply on the other hand means something you expressed or stated indirectly. Sorry, that's just one thing I can't pass up correcting people on :(. Jim Lucas [EMAIL PROTECTED] wrote in message news:[EMAIL

Re: [PHP] fsocketopen not returning data properly

2007-06-19 Thread Dan
I got the function from the web, the implementation I did myself, echo httpSoc... Maybe I'm not using the function right because I keep getting a fatal error of: Fatal error: Call to undefined function logEventToTextFile() on line 79 Does it look like I'm implementing the code correctly?

Re: [PHP] PHP calling an ISAPI Extension

2007-06-19 Thread Dan
Yes, the ISAPI would be on the same machine, sorry I didn't mention that earlier. I'll go take a look at COM. - Daniel Jochem Maas [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Dan wrote: For example, I could use function fsockopen but that seems like it would probably be

Re: [PHP] Comparing string to array

2007-06-19 Thread Stut
Jim Lucas wrote: Richard Davey wrote: Hi Jim, Tuesday, June 19, 2007, 5:06:47 PM, you wrote: DON'T USE SINGLE QUOTES IN YOUR NAME= ATTRIBUTE Hate to piss on your bonfire but a single quote is a perfectly valid (if somewhat stupid choice of) character for inclusion in an array key.

Re: [PHP] PHP calling an ISAPI Extension

2007-06-19 Thread Dan
I've looked arround and I can't find any mention of ISAPI COM, it's a pretty low level way of making applications, you used to be able to install PHP itself as a COM application on IIS to do PHP stuff. Is there any sort of compatiblity list for com? - Daniel Jochem Maas [EMAIL PROTECTED]

Re: [PHP] Comparing string to array

2007-06-19 Thread Jim Lucas
Stut wrote: Jim Lucas wrote: Richard Davey wrote: Hi Jim, Tuesday, June 19, 2007, 5:06:47 PM, you wrote: DON'T USE SINGLE QUOTES IN YOUR NAME= ATTRIBUTE Hate to piss on your bonfire but a single quote is a perfectly valid (if somewhat stupid choice of) character for inclusion in an array

Re: [PHP] Comparing string to array

2007-06-19 Thread Jim Lucas
Jim Lucas wrote: $userparam = test['sam'][]; then what you are saying it that this HAS to be your search string? -- Jim Lucas Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them. Twelfth Night, Act II, Scene V by William

Re[2]: [PHP] Comparing string to array

2007-06-19 Thread Richard Davey
Hi Jim, Tuesday, June 19, 2007, 5:47:29 PM, you wrote: Jim Lucas wrote: $userparam = test['sam'][]; then what you are saying it that this HAS to be your search string? Heck no, it doesn't *have* to be. Feel free to remove the quotes from it and then attempt my original question

Re: [PHP] PHP calling an ISAPI Extension

2007-06-19 Thread Dan
I modified your code to work with what I'm doing and this is what I got: $post_data = name=wowlikes=true; $fp = fsockopen(localhost,8080); fwrite($fp,POST /Project1.dll HTTP/1.1\r\nHost: localhost\r\nContent-Length: .strlen($post_data).\r\n\r\n.$post_data); $result = fread($fp,102400); // Reads

Re: [PHP] Force zero numbers on a integer

2007-06-19 Thread Paul Scott
On Tue, 2007-06-19 at 13:17 -0300, [EMAIL PROTECTED] wrote: I have a integer that is submitted by the user and i need it to always contain 5 digits. str_pad($userSubmittedNumber, 5, 0, 0); --Paul All Email originating from UWC is covered by disclaimer

Re: [PHP] Comparing string to array

2007-06-19 Thread Stut
Jim Lucas wrote: Stut wrote: Jim Lucas wrote: Richard Davey wrote: Hi Jim, Tuesday, June 19, 2007, 5:06:47 PM, you wrote: DON'T USE SINGLE QUOTES IN YOUR NAME= ATTRIBUTE Hate to piss on your bonfire but a single quote is a perfectly valid (if somewhat stupid choice of) character for

Re: [PHP] Comparing string to array

2007-06-19 Thread Jim Lucas
Richard Davey wrote: Hi Jim, Tuesday, June 19, 2007, 5:47:29 PM, you wrote: Jim Lucas wrote: $userparam = test['sam'][]; then what you are saying it that this HAS to be your search string? Heck no, it doesn't *have* to be. Feel free to remove the quotes from it and then attempt

Re: [PHP] Force zero numbers on a integer

2007-06-19 Thread Richard Davey
Hi, Tuesday, June 19, 2007, 5:17:29 PM, you wrote: I have a integer that is submitted by the user and i need it to always contain 5 digits. If the user submitted 45, i need it to be 00045. If the user submitted 4595, i need it to be 04595. How can i do this? Given PHPs type switching

RE: [PHP] Force zero numbers on a integer

2007-06-19 Thread Chris Boget
I have a integer that is submitted by the user and i need it to always contain 5 digits. If the user submitted 45, i need it to be 00045. If the user submitted 4595, i need it to be 04595. How can i do this? Check out printf(); http://us.php.net/manual/en/function.printf.php thnx, Chris

Re: [PHP] Comparing string to array

2007-06-19 Thread Jim Lucas
Richard Davey wrote: Hi Jim, Tuesday, June 19, 2007, 5:47:29 PM, you wrote: Jim Lucas wrote: $userparam = test['sam'][]; then what you are saying it that this HAS to be your search string? Heck no, it doesn't *have* to be. Feel free to remove the quotes from it and then attempt

[PHP] apache file paths

2007-06-19 Thread Ross
how do apache filepaths match the directories? This is my document root acording to $_SERVER /usr/local/apache/htdocs/ but I also sometimes see this /home/mysitename/public_html/ public_html is where I put my files via ftp so can someone explain where the 'home' folder is in relation to the

Re: [PHP] Comparing string to array

2007-06-19 Thread Stut
Jim Lucas wrote: Richard Davey wrote: Hi Jim, Tuesday, June 19, 2007, 5:47:29 PM, you wrote: Jim Lucas wrote: $userparam = test['sam'][]; then what you are saying it that this HAS to be your search string? Heck no, it doesn't *have* to be. Feel free to remove the quotes from it

Re: [PHP] Force zero numbers on a integer

2007-06-19 Thread Stut
[EMAIL PROTECTED] wrote: I have a integer that is submitted by the user and i need it to always contain 5 digits. If the user submitted 45, i need it to be 00045. If the user submitted 4595, i need it to be 04595. How can i do this? $val = str_pad(intval($val), 5, '0', STR_PAD_LEFT); -Stut

Re[2]: [PHP] Comparing string to array

2007-06-19 Thread Richard Davey
Hi Jim, Tuesday, June 19, 2007, 6:21:25 PM, you wrote: let me try this again. in the submitted $_POST array, you are looking for a key (test) that contains a given $username that may or may not have any values set? Correct? Sorry not even close. Here, let me try again... $param =

Re: [PHP] Comparing string to array

2007-06-19 Thread Jim Lucas
Stut wrote: Jim Lucas wrote: Richard Davey wrote: Hi Jim, Tuesday, June 19, 2007, 5:47:29 PM, you wrote: Jim Lucas wrote: $userparam = test['sam'][]; then what you are saying it that this HAS to be your search string? Heck no, it doesn't *have* to be. Feel free to remove the

Re: [PHP] Re: php framework, large site

2007-06-19 Thread Crayon Shin Chan
On Tuesday 19 June 2007 09:26, Robert Cummings wrote: Making up phrases and passing them off as though they are common adages only goes towards showing that you have no steam to your argument. I really wish you would make up your mind. On the one hand you value individuality and originality

Re: [PHP] Re: php framework, large site

2007-06-19 Thread Crayon Shin Chan
On Tuesday 19 June 2007 13:47, Robert Cummings wrote: No, it's simple probability. So it's probability now? Which has the greater probability: 1) study a selection of frameworks and learn from their strengths and weaknesses then go on to create a kickass framework based on what you've learnt

Re: [PHP] Re: php framework, large site

2007-06-19 Thread Crayon Shin Chan
On Tuesday 19 June 2007 06:58, tedd wrote: Yes, but the fact still remains, for the exception of drug companies passing DNA sequences off as patents, In the bad old U S of A you can patent your own grandmother (or at least someone somewhere thinks you ought be able to). the *majority* of

Re: [PHP] Comparing string to array

2007-06-19 Thread Jim Lucas
Richard Davey wrote: Hi all, Ok it's 2am, my brain has gone to mush and I am having trouble figuring out an easy way to do this, can anyone shed some light? Take a peek at the following code: // START pre ?php print_r($_POST); $userparam = test['sam'][]; // How to check if

Re: [PHP] apache file paths

2007-06-19 Thread Stephen
Ross [EMAIL PROTECTED] wrote: how do apache filepaths match the directories? The answer you don't want is however they were configured. :) You have seen some conventions. This is my document root acording to $_SERVER /usr/local/apache/htdocs/ The /usr/local/apache/ path is

Re: [PHP] Re: php framework, large site

2007-06-19 Thread Robert Cummings
On Wed, 2007-06-20 at 02:20 +0800, Crayon Shin Chan wrote: On Tuesday 19 June 2007 09:26, Robert Cummings wrote: Making up phrases and passing them off as though they are common adages only goes towards showing that you have no steam to your argument. I really wish you would make up your

[PHP] passing sessions with header()

2007-06-19 Thread John
The php.net manual states: quote Session ID is not passed with Location header even if session.use_trans_sid is enabled. It must by passed manually using SID constant. /quote How should the SID be passed manually? I'd like to keep the SID out of the uri, so is a POST variable the best

Re: [PHP] passing sessions with header()

2007-06-19 Thread Stut
John wrote: The php.net manual states: quote Session ID is not passed with Location header even if session.use_trans_sid is enabled. It must by passed manually using SID constant. /quote How should the SID be passed manually? I'd like to keep the SID out of the uri, so is a POST variable the

Re: [PHP] Re: php framework, large site

2007-06-19 Thread Robert Cummings
On Wed, 2007-06-20 at 02:20 +0800, Crayon Shin Chan wrote: On Tuesday 19 June 2007 13:47, Robert Cummings wrote: No, it's simple probability. So it's probability now? Which has the greater probability: 1) study a selection of frameworks and learn from their strengths and weaknesses

Re: [PHP] Comparing string to array

2007-06-19 Thread Robin Vickery
On 19/06/07, Richard Davey [EMAIL PROTECTED] wrote: $userparam = test['sam'][]; // How to check if $userparam exists in the $_POST array // and get all the values from it? full_key_exists(test['sam'][], $_POST) // returns true if key is set full_find_key(test['sam'][], $_POST)

Re: [PHP] fsocketopen not returning data properly

2007-06-19 Thread Tijnema
On 6/19/07, Dan [EMAIL PROTECTED] wrote: I got the function from the web, the implementation I did myself, echo httpSoc... Maybe I'm not using the function right because I keep getting a fatal error of: Fatal error: Call to undefined function logEventToTextFile() on line 79 Does it look like

RE: [PHP] passing sessions with header()

2007-06-19 Thread John
Just stick it on the end of the URL... I'd like to keep it out of the URL if possible... J -Original Message- From: Stut [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 19, 2007 1:45 PM To: John Cc: php-general@lists.php.net Subject: Re: [PHP] passing sessions with header()

[PHP] If statement duplicating mysql records?

2007-06-19 Thread Jason Pruim
Okay, so I have a question... Probably pretty easy, but why would my if statement show more records then what are in the database? if($row[5] =='Level4'){ // White Highlight echo TRTD bgcolor=.$Level4.$row[0] /td; echo td bgcolor=.$Level4.$row[1]

[PHP] Chat system

2007-06-19 Thread robert mena
Hi, I am looking for a simple php chat system (no registration, no private channels). Unfortunately the ones I've found (phpopenchat, phpfreechat) are too complicate, requiring the user to register or fail to work properly in IE6 or IE7. Any tips? -- PHP General Mailing List

Re: [PHP] passing sessions with header()

2007-06-19 Thread Stut
John wrote: Just stick it on the end of the URL... I'd like to keep it out of the URL if possible... In that case you don't have a problem. If the session ID is being passed in a cookie then it will survive redirects. -Stut -- http://stut.net/ -Original Message- From: Stut

Re: [PHP] If statement duplicating mysql records?

2007-06-19 Thread Jim Lucas
Jason Pruim wrote: Okay, so I have a question... Probably pretty easy, but why would my if statement show more records then what are in the database? if($row[5] =='Level4'){ // White Highlight echo TRTD bgcolor=.$Level4.$row[0] /td; echo td bgcolor=.$Level4.$row[1]

[PHP] pdf and send to printer question

2007-06-19 Thread Mike Ryan
I am trying to get a query to run and outputed to a pdf file I get the following error Fatal error: Call to undefined function pdf_begin_document() in my php.ini I have php_cpdf.dll and php_pdf.dll enabled am I missing something.? also is there a way to send the document I create to the printer

[PHP] Re: If statement duplicating mysql records?

2007-06-19 Thread Roberto Mansfield
Jason Pruim wrote: Okay, so I have a question... Probably pretty easy, but why would my if statement show more records then what are in the database? if($row[5] =='Level4'){ // White Highlight }// End of Level 4 else {// Green Highlight }// End of

Re[2]: [PHP] Comparing string to array

2007-06-19 Thread Richard Davey
Hi Robin, Tuesday, June 19, 2007, 8:28:50 PM, you wrote: On 19/06/07, Richard Davey [EMAIL PROTECTED] wrote: $userparam = test['sam'][]; // How to check if $userparam exists in the $_POST array // and get all the values from it? full_key_exists(test['sam'][], $_POST) //

Re: [PHP] Chat system

2007-06-19 Thread Daniel Brown
On 6/19/07, robert mena [EMAIL PROTECTED] wrote: Hi, I am looking for a simple php chat system (no registration, no private channels). Unfortunately the ones I've found (phpopenchat, phpfreechat) are too complicate, requiring the user to register or fail to work properly in IE6 or IE7. Any

Re: [PHP] Chat system

2007-06-19 Thread robert mena
Hi Daniel, Thanks. How can the user chooses the nickname? How about the list of connected users? On 6/19/07, Daniel Brown [EMAIL PROTECTED] wrote: On 6/19/07, robert mena [EMAIL PROTECTED] wrote: Hi, I am looking for a simple php chat system (no registration, no private channels).

Re: [PHP] Re: php framework, large site

2007-06-19 Thread tedd
At 2:20 AM +0800 6/20/07, Crayon Shin Chan wrote: On Tuesday 19 June 2007 06:58, tedd wrote: the *majority* of patents for inventions are due to the efforts of a lone risk taker putting his money, time, and effort on the line trying to invent something. I've no idea what the figures are

Re: [PHP] Re: php framework, large site

2007-06-19 Thread tedd
At 4:05 PM +0200 6/19/07, Jochem Maas wrote: Robert Cummings wrote: Some of the greatest science comes from those unaware of established rules and theories. Third. not that my complete lack of knowledge theory and complete lack of respect for rules has come to any kind of fruition :-P PS

Re: [PHP] Persistent MySQL Connection

2007-06-19 Thread Feris
Richard Lynch wrote: On Wed, June 13, 2007 8:53 am, PHP Mailing List wrote: I currently running my php as cgi as it is more controllable in shared hosting, the drawback is I cannot use mysql persistent connection so mysql_pconnect() function is not an option. Is there any mysql connection

  1   2   >