Re: [PHP] mail() Bcc:

2003-03-24 Thread CPT John W. Holmes
How can send bcc: with mail()? From, CC and BCC are headers to be set in the fourth parameter of the mail() function. Headers must be spearated by end-of-line characters. $headers = From: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] BCC: [EMAIL PROTECTED]; mail($to, $subject, $body,

Re: [PHP] session id

2003-03-25 Thread CPT John W. Holmes
can somebody tell me why I am getting this: Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at c:\inetpub\wwwroot\search.php:8) in c:\inetpub\wwwroot\search.php on line 21 Warning: session_start()

Re: [PHP] Persistent connections with mysql_pconnect()

2003-03-25 Thread CPT John W. Holmes
no, not at all... but there is a time and a place, and i don't think you should use pconnect just because you don't want to an include at the top of every page. You still have to call pconnect() on every page if you use it. It doesn't leave it open for other requests, it leaves it open within

Re: [PHP] Checking for existence of file

2003-03-25 Thread CPT John W. Holmes
What I'd like to do is check the directory 'images' first to see if 'mast_$img_pick.jpg' exists and if it doesn't, call a different image such as 'mast_default.jpg'. I'm sure this isn't hard, I'm just not sure how to start. Maybe you can start with file_exists() or is_file() and somehow work

Re: [PHP] formatting textarea input on output

2003-03-25 Thread CPT John W. Holmes
i have a textarea in a form which gets inserted into a table in my database (mySQL). When displaying this text back to the screen, how do i retain the line breaks etc. that were in the original input? I bet if you searched for textarea and line breaks you'd of found the nl2br() function... but

Re: [PHP] formatting textarea input on output

2003-03-25 Thread CPT John W. Holmes
/** * converts line break and spaces to page break * * @access public */ function nlbr($string) { return preg_replace(/(\r\n|\n|\r)/, br\n, $string); } ummm www.php.net/nl2br() ?? Start a new thread for your question, don't hijack someone else's thread. ---John Holmes...

Re: [PHP] help with preg_replace please

2003-03-26 Thread CPT John W. Holmes
I get the following error: Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /usr/local/apache/htdocs/lib/lib_string.inc on line 218 Using this code: $str = preg_replace(!([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/=])!ei, a href=\{$1}://{$2}{$3}\{$2}{$3}/a, $str); Since

Re: [PHP] Default setting garbage

2003-03-26 Thread CPT John W. Holmes
I'll guess that you're trying to access $frequency outside of the function, after you've called it, right? If so, read up on variable scope in the manual. No, I'm trying to access it inside the function. This is what I have (or an example, since I don't have it right in front of me right

Re: [PHP] Checkbox

2003-03-26 Thread CPT John W. Holmes
is it possible to have a checkbox that if it is specified to be checked when the page is being formulated then it cannot be unchecked? No. No... No. If you already know you don't want it to be unchecked, then don't show a checkbox. That's why we have PHP, so you can create your page

Re: [PHP] Checkbox

2003-03-26 Thread CPT John W. Holmes
On Wednesday 26 March 2003 01:43 pm, CPT John W. Holmes wrote: is it possible to have a checkbox that if it is specified to be checked when the page is being formulated then it cannot be unchecked? No. No... No. If you already know you don't want it to be unchecked, then don't show

Re: [PHP] Checkbox

2003-03-26 Thread CPT John W. Holmes
But isn't it so much easier to type in that one line HTML + javascript than trying to get an image of a checked check box.. unless you have that handy, you'd have to eg. take a snapshot, or draw something, then save the file as an image file...hmm... and as you said, the effect will

Re: [PHP] php and Perl

2003-03-27 Thread CPT John W. Holmes
www.php.net/virtual ---John Holmes... - Original Message - From: Brad Wright [EMAIL PROTECTED] To: PHP General List [EMAIL PROTECTED] Sent: Thursday, March 27, 2003 8:00 AM Subject: [PHP] php and Perl Hi all, can php call perl scripts? I know nothing of perl, but have found a perl

Re: [PHP] preg split question

2003-03-27 Thread CPT John W. Holmes
i'd like to split Benutzer_CRA.php to get CRA but sometimes the files are called Benutzer_OVE_CRA.php and therefore the result schould OVE_CRA how cann i tell preg_split to split the string at the first occurence of _ and before .php preg_match(/_(.*)\.php/,$str,$matches); $matches[1]

Re: [PHP] Removing columns from a text file

2003-03-27 Thread CPT John W. Holmes
I have a text file file ready to go into a Filemaker database. It has over 5000 rows, each containing over 500 columns. If I do a straight import I can only pull in the first 442 colums, but all records. I can't take it in via Excel for the same reason - column limit stops at 'IV' - never

Re: [PHP] Anything that is changed when the browser is closed

2003-03-28 Thread CPT John W. Holmes
While your script is running, you can use connection_aborted() to see if the user has clicked the stop button or closed the window. After your script finishes, though, then you have no way of knowing unless you use a session cookie, which will be destroyed when the browser is closed. ---John

Re: [PHP] Session Theft

2003-03-28 Thread CPT John W. Holmes
i just want to figure out a way by which i can stop session theft.i thought if i can get something from user end that is unique for that user.for e.g. his/her IP .but it will not work when they are behind firewall.they will be assigned same IP.is there a way for me to get the IP

Re: [PHP] Get the HTTP Server Username

2003-03-28 Thread CPT John W. Holmes
Is there anyway to get the HTTP Server Username (something like $_SERVER['username']) I tried printing all the variables defined in a page (and looking at a phpinfo.php) and wasn't able to figure it out... Do you mean the user your web server is running as? You should already know that...

Re: [PHP] Is there a PHP for Dummies?

2003-03-28 Thread CPT John W. Holmes
I'm really tired of trying to figure out the PHP manual and need something that explains things in plain straight forward English. Like get_magic_quotes_gpc() for example - the manual says how to use it and what it returns - but nowhere can I find out what it's for. Does it count sheep, do a

Re: [PHP] Html forms to php scripts

2003-04-02 Thread CPT John W. Holmes
It's an Apache 2 / PHP bug. I think if you use $_POST['ttt'], you'll get the correct value, but I'm not sure. Try turning register globals off or using a stable version of Apache that works with PHP (the 1.3 series). ---John Holmes... - Original Message - From: VanZee, Timothy [EMAIL

Re: [PHP] Self-filling login form

2003-04-03 Thread CPT John W. Holmes
A question please: I have a login form on (PHP 4.3.1 and Apache 1.3.27). When I click inside the ID box, you can glimpse at some of the user IDs inside it for a fraction of a second (similar to a drop-down menu), which shows an unauthorized visitor some of the id values. Worst of all, when

Re: [PHP] Creating Session Variables

2003-04-03 Thread CPT John W. Holmes
Consider this: function foo() { $_SESSION['varname'] = test; . } At this point: - Can I reference $varname inside the function? If so, must it be declared global first? Or can I only reference it via $_SESSION['varname']? - Can I reference it outside the function (as $varname)

Re: [PHP] chill out

2003-04-03 Thread CPT John W. Holmes
just like to add something here, (which i recmended before) there should be a automated way to email all the new users about what php is, that explain them that php is server side and it can't do client side, just a plain email will do this will certinaly minimize the no of off topic

Re: [PHP] Re: Central authentication for multiple sites

2003-09-29 Thread CPT John W. Holmes
From: Fraser Campbell [EMAIL PROTECTED] On Monday 29 September 2003 15:33, Kevin Stone wrote: If all domains have access to the same database then there is absolutely nothing preventing you from using a Cookie. Have a normal login on Domain1.com. Once authenticated produce a random ID

Re: [PHP] Cleaning up my messy code

2003-09-29 Thread CPT John W. Holmes
From: Brent Baisley [EMAIL PROTECTED] I looked into the templating systems at first, but really wanted to try what they were doing myself. It ends up being very easy to implement using output buffering. Just look into the ob_start() command. Here is an example of how I load a template file

Re: [PHP] Re: Central authentication for multiple sites

2003-09-29 Thread CPT John W. Holmes
From: Fraser Campbell [EMAIL PROTECTED] On Monday 29 September 2003 15:58, you wrote: Like someone else mentioned, use sessions or something like them. The key is you're passing a unique id around for each person that logs in. When they go to another site, this ID must go with them, so

Re: [PHP] Session data is lost

2003-09-30 Thread CPT John W. Holmes
From: Harald Kürsten [EMAIL PROTECTED] In my script I start a session, register certain variables and redirect to the next page. The session file is written to /tmp, but contains no data ! Does a simple session example from the Manual work? Some actual code would help here, but try using

Re: [PHP] arrays and php

2003-09-30 Thread CPT John W. Holmes
From: Chris W. Parker [EMAIL PROTECTED] echo pre.print_r($chk)./pre; It will not work. You can do this though: echo pre, print_r($chk), /pre; Well heck, that makes things easier! What's the difference between using , or . for concatenation? (I thought they were the same.) Using a

Re: [PHP] arrays and php

2003-09-30 Thread CPT John W. Holmes
From: Jason Wong [EMAIL PROTECTED] On Wednesday 01 October 2003 02:14, Chris W. Parker wrote: Jason Wong mailto:[EMAIL PROTECTED] on Tuesday, September 30, 2003 11:06 AM said: echo pre.print_r($chk)./pre; It will not work. Actually, the above *does* work! It depends on how

Re: [PHP] arrays and php

2003-09-30 Thread CPT John W. Holmes
From: Chris W. Parker [EMAIL PROTECTED] CPT John W. Holmes mailto:[EMAIL PROTECTED] on Tuesday, September 30, 2003 11:32 AM said: Note that print_r() will (by default) return a 1 (TRUE) upon success, so you end up with a 1 being printed at the end of your data. [snip] That answers

Re: [PHP] Making a Session Longer

2003-09-30 Thread CPT John W. Holmes
From: Free Grafton [EMAIL PROTECTED] The problem we are experiencing is that we are starting to have so many users on at one time that they are getting bumped off faster and faster. We have increased the MaxUsers in apache up to 1000, but that doesn¹t seem to make any difference. Our

Re: [PHP] Attempt at putting greedy htmlspecialchars on a diet

2003-10-01 Thread CPT John W. Holmes
From: Eugene Lee [EMAIL PROTECTED] On Wed, Oct 01, 2003 at 01:12:16AM -0400, Gerard Samuel wrote: : : Got a problem with htmlspecialchars being too greedy, where : for example, it converts : foo; : to : amp;foo; : : Yes it displays correctly in the browser for some content, but not all.

Re: [PHP] regex/preg_replace() difficulty

2003-10-01 Thread CPT John W. Holmes
From: [EMAIL PROTECTED] Regular Expressions: How can I indicate that the contents of a term (user input*) needs to be treated as 'non-operators/control characters' (as *word* to match in that exact way)? (* Because the term is a user's input I can't escape the control characters

Re: [PHP] (another) regex difficulty

2003-10-01 Thread CPT John W. Holmes
From: [EMAIL PROTECTED] regular expressions the example below should turn any character exept \* (*= any char) into an x: $term = preg_replace('/[^(\\\)+(.){1}]/', 'x', $term); but i guess because of the [brackets] the . (period) is treated as character . instead as metacharacter (that

Re: [PHP] Variables not passed on localhost setup

2003-10-01 Thread CPT John W. Holmes
From: Greg Watson [EMAIL PROTECTED] doesn't look as though variables are being passed from page to page. Register_globals is OFF in your php.ini file, so you need to use $_GET['testvar'] instead of $testvar. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Variables not passed on localhost setup

2003-10-01 Thread CPT John W. Holmes
From: Gal [EMAIL PROTECTED] Reply - this means your php is running on php defaults configuration. you need to copy the 'php.ini-dist' file as 'php.ini' to c:\windows. edit the the file 'C:\windows\php.ini' and change register_globals = Off to register_globals = On (and restart your web

Re: [PHP] (another) regex difficulty

2003-10-01 Thread CPT John W. Holmes
From: [EMAIL PROTECTED] it's pretty simple: i need a regex that matches any character in a string except \* (* stands for any char that follows the \). example: this is \ba test should match: this a is test isn't there a way to do this? Turn that around. What you need to do is remove \*

Re: [PHP] Session_start() problem

2003-10-01 Thread CPT John W. Holmes
From: Jeff McKeon [EMAIL PROTECTED] [snip] where do I set the default location for session data? session.save_path in php.ini ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP coders spare time [OT}

2003-10-03 Thread CPT John W. Holmes
From: Curt Zirzow [EMAIL PROTECTED] Something like this: http://zirzow.dyndns.org/html/mlists/php_general/ I had to build some cache tables, grouping 141852 records on the fly just wasn't fast enough, excpecially for my 233. Looks good to me. :) I also have 8 posts under [EMAIL

Re: [PHP] PHP coders spare time [OT}

2003-10-03 Thread CPT John W. Holmes
From: Ryan A [EMAIL PROTECTED] While there I had a funny thought, if for whatever reason the php list closes downJohn Holmes is probably gonna kill himself :-D with the spare time he will suddenly find himself having! Naa... I'd just go learn ASP, since pigs would be flying and all. I

Re: [PHP] Any idea how to do this?

2003-10-06 Thread CPT John W. Holmes
From: Ryan A [EMAIL PROTECTED] Sometime back I used to visit this URL: http://www.groundbreak.com/graphics.html to make the graphics for some products as it was easy to use and give pretty decent results, but now i see that the owner has converted it into a paysite and is asking for a

Re: [PHP] copy tables

2003-10-15 Thread CPT John W. Holmes
From: Gronquist, Jim M [EMAIL PROTECTED] I've set up dev and prod webservers. Users can go into the dev webserver content and edit it. The content is in a mysql database. I have a button on the webpage that says push content live. When the button is pushed I want it to run a php script that

Re: [PHP] displaying time on the server

2003-10-15 Thread CPT John W. Holmes
From: Adam Williams [EMAIL PROTECTED] I was wondering if someone knew how to display the time on the server to a web page that resides on that server, and have it update the time each second? I was looking at javascript for this, but they all use the client PC viewing the page to get the

Re: [PHP] HTML output buffering

2003-10-16 Thread CPT John W. Holmes
From: Robin Kopetzky [EMAIL PROTECTED] Is there a simple way to have PHP buffer all HTML output via echo/print until the program flushes the output buffer?? You can buffer the output yourself using the output buffering functions. Is that what you're looking for? More info:

Re: [PHP] Login system

2003-10-17 Thread CPT John W. Holmes
From: Robert Cummings [EMAIL PROTECTED] On Fri, 2003-10-17 at 12:57, Bas wrote: I want a login system with sessions and without mysql. I have tried to make one but that one is without sessions(i don't know anything about sessions) and with mysql... InterJinn supports file based

Re: [PHP] Filemanager v1.0

2003-10-17 Thread CPT John W. Holmes
From: Ryan A [EMAIL PROTECTED] and another thing, don't ask John H for help (or sarcastic comments)... that too is reserved just for me. You have been warned This John H guy sounds like a dick. Someone should boot him. ---John Holmes... -- PHP General Mailing List

Re: [PHP] What's a good regex to validate an email address? ;)

2003-10-17 Thread CPT John W. Holmes
From: Daevid Vincent [EMAIL PROTECTED] Not PHP, but in js, I use this: Dude... read the messages before you reply. you know, the whole think before you say thing?? ;) ---John Holmes... -Original Message- From: John W. Holmes [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 15,

Re: [PHP] Rename the current page

2003-10-17 Thread CPT John W. Holmes
From: Grant Rutherford [EMAIL PROTECTED] I have tried many variations of the header command, but no luck so far. It seems to work okay on Mozilla browsers but not IE. Okay, what have you actually tried? What are you using now? Have you read through _all_ of the comments on the manual page for

Re: [PHP] Data modelling software

2003-10-20 Thread CPT John W. Holmes
From: Hardik Doshi [EMAIL PROTECTED] Can anyone tell me which data modelling software is good for the mysql database? I'm sure you're using PHP to access MySQL, but this question has nothing to do with PHP and should be asked on a MySQL website/list or you should research what Google has to

Re: [PHP] Re: $PHP_SELF

2003-10-20 Thread CPT John W. Holmes
From: Boris Sagadin [EMAIL PROTECTED] I believe the issue is where exactly is $PHP_SELF being used. $PHP_SELF isn't available inside a function, without global'ing it but $_SESSION is available all the time. Yes, but the problem in my case is that it works most of, but not all the time,

Re: [PHP] Launch Print Dialog Box with PHP?

2003-10-21 Thread CPT John W. Holmes
From: [-^-!-%- [EMAIL PROTECTED] If you must answer, to satisfy you own urges, then a simple NO would suffice. The answer is No, then. Try not to take things so personally; I'm not here to get you ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] seems like magic_quotes_gpc is turning itsself on!

2003-10-21 Thread CPT John W. Holmes
From: William Bailey [EMAIL PROTECTED] I have a strange problem with one of the sites i work on and provide support for. I the following block of code that checks to see if magic_quotes_gpc is enabled and if it is it dies with an error message: if((integer)ini_get('magic_quotes_gpc')!=0){ ~

Re: [PHP] The page cannot be displayed error

2003-10-21 Thread CPT John W. Holmes
From: Sudheer Palaparambil [EMAIL PROTECTED] I am calling insert_user.php like this form method=post name=form action=insert_user.php onsubmit=return verifyIt(this); This file and the index.php are kept in the same directory. But the browser returns The page cannot be displayed

Re: [PHP] data type conversion in mysql using php

2003-10-21 Thread CPT John W. Holmes
From: Uma Shankari T. [EMAIL PROTECTED] Is it possible to update the float value of mysql to varchar field by using php ?? mysql_query('ALTER TABLE MyTable CHANGE COLUMN old_column_name new_column_name VARCHAR(25)'); ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Destroying session if not being used from past 10 mins.

2003-10-21 Thread CPT John W. Holmes
From: Binay [EMAIL PROTECTED] How can I configure the session to get destroyed, if not being used from past 10 mins. If you're using the default session handler, the session files are cleaned up after not being used for 1440 seconds (by default), and the session is basically destroyed. You can

Re: [PHP] Destroying session if not being used from past 10 mins.

2003-10-21 Thread CPT John W. Holmes
From: Binay [EMAIL PROTECTED] Is it possible to increase the probability which is by default 1% to 99 % and make sure that session are destroyed after 10 mins by setting session.gc_maxlifetime to 600. I wouldn't recommend that, but you could. The setting to 600 is fine, but I wouldn't adjust

Re: [PHP] (ANNOUNCE) New PHP mailing list *searchable* archives

2003-10-21 Thread CPT John W. Holmes
From: Marco Tabini [EMAIL PROTECTED] This is a fully searchable archive of the PHP mailing lists with an attempt to build proper threading, keyword highlight, automatic quoted text indentation and a few other features. Everyone go check it out. The thread view and highlighting really make the

Re: [PHP] is_uploaded_file() security

2003-10-22 Thread CPT John W. Holmes
From: Alexander Mueller [EMAIL PROTECTED] AFAIK the browser only sends the content of the chosen file and cannot specify in any way a local filename which should be worked on. Furthermore PHP creates a temporary file containing the uploaded file content and passes this filename as 'tmp_name'

Re: [PHP] Random Quotes...

2003-10-22 Thread CPT John W. Holmes
From: Payne [EMAIL PROTECTED] I am working on a project and I need to see sample quote for doing random quotes. These quotes will be put from a database. Can some please share me some sample code. Thanks. If you're using MySQL, you can use SELECT quote FROM Quote ORDER BY RAND() LIMIT 1 to

Re: [PHP] is_uploaded_file() security

2003-10-22 Thread CPT John W. Holmes
From: Alexander Mueller [EMAIL PROTECTED] Cpt John W. Holmes wrote: The user can pass the name of a file on the server. If you're not doing any checks and moving or displaying the file the user sent you, you may end up moving, deleting, or displaying any file on your server. ---John

Re: [PHP] Session output question

2003-10-22 Thread CPT John W. Holmes
From: Susan Ator [EMAIL PROTECTED] 1) Is there any way to print out active sessions names? I have $_SESSION['SID'], $_SESSION['uid'], $_SESSION['msg'] can I output the literal strings: $_SESSION['SID'] $_SESSION['uid'] $_SESSION['msg'] $keys = array_keys($_SESSION); 2) Is there any way

Re: [PHP] php temp table question (for mysql)

2003-10-27 Thread CPT John W. Holmes
From: Larry Brown [EMAIL PROTECTED] Does anyone know whether the use of persistent connections with php will allow a temp table created by a script to linger around No, the table will still be removed at the end of the script whether you use persistant connections or not. and cause a problem

Re: [PHP] php temp table question (for mysql)

2003-10-27 Thread CPT John W. Holmes
From: CPT John W. Holmes [EMAIL PROTECTED] Temporary tables are unique for that specific question. I mean connection, not question... I'm working on a survey system, so I have questions on my mind. :) ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

Re: [PHP] Menu populated based on previous menu

2003-10-28 Thread CPT John W. Holmes
From: Robb Kerr [EMAIL PROTECTED] Searched all the sites I could find for this problem to no avail. I have two dropdown menus in a form. The first menu contains a list of MANUFACTURERS obtained from a database. The second contains a list of MODELS also obtained from the database. I want the

Re: [PHP] php sessions

2003-10-28 Thread CPT John W. Holmes
From: Chris Shiflett [EMAIL PROTECTED] --- Rob Adams [EMAIL PROTECTED] wrote: Test it yourself. With all due respect, it seems you should be doing the testing. Login to a PHP app using a standard browser and session cookies and see for yourself. I understand the philosophy of the web

Re: [PHP] Variables not passing to mail script

2003-10-28 Thread CPT John W. Holmes
From: Bob Rea [EMAIL PROTECTED] At 03:59 PM 10/27/2003 -0800, Jeff - Harbornet wrote: Disregard last email. I figured it out. Thanks. Care to tell the rest of us? I'm a newby and would like to know. Hmmm, that's obvious, since you can't even spell newbie. ;) ---John Holmes... -- PHP

Re: [PHP] php sessions

2003-10-28 Thread CPT John W. Holmes
From: Chris Shiflett [EMAIL PROTECTED] But I was talking about cookies anyway. Which is where different browsers have different behaviors. In IE, by default, it will not pass a cookie from a new browser window. This is very interesting. I might try to research this a bit more and see what

Re: [PHP] session_regenerate_id()

2003-10-29 Thread CPT John W. Holmes
From: Alexander Mueller [EMAIL PROTECTED] I am not entirely sure what the following paragraph at http://at2.php.net/manual/en/function.session-regenerate-id.php shall mean As of PHP 4.3.3, if session cookies are enabled, use of session_regenerate_id() will also submit a new session cookie

Re: [PHP] Performance of dynamically generated select boxes

2003-10-29 Thread CPT John W. Holmes
From: Luis Lebron [EMAIL PROTECTED] I am rebuilding a php application to handle a higher load. The previous programmer had created a series of dynamically generated select boxes using a mysql table. Would it be faster or less resource intensive to create a series of arrays to generate the

Re: [PHP] session_regenerate_id()

2003-10-29 Thread CPT John W. Holmes
From: Alexander Mueller [EMAIL PROTECTED] Cpt John W. Holmes wrote: PHP 4.3.2 created a new session ID, but it didn't resend the cookie. So the next request would include the old session ID again from the cookie. I wonder what it is then good for. Changing the id internally without

Re: [PHP] Problems with remote include

2003-10-29 Thread CPT John W. Holmes
From: Pablo Zorzoli [EMAIL PROTECTED] ?php include ('http://blabla.com/script.php?var1=a'); ? [snip] script.php should echo some text, but i don't get any output. You know you're going to get the OUTPUT of script.php, right? You'll get the same exact result as if you typed the address into

Re: [PHP] function question

2003-10-29 Thread CPT John W. Holmes
From: Brian V Bonini [EMAIL PROTECTED] function splitPageResults($query, $max_rows, $count_key = '*', $page_holder = 'page') { Am I wrong in assuming that $count_key is being explicitly set to '*' in this instance? Only if no value is passed when the function is called.

Re: [PHP] stat(), file_exists(), is_file() on Windows2000

2003-10-30 Thread CPT John W. Holmes
From: Chris Hubbard [EMAIL PROTECTED] The problem: all the code I've tried to test whether a temp (from a form post) is there before doing a filesize() on it is failing. I'm doing a filesize check so absurdly large files aren't copied from the temp folder to a permanent folder. (and no I

Re: [PHP] help with EVAL direct

2003-11-04 Thread CPT John W. Holmes
From: [EMAIL PROTECTED] OS RedHat 9 and RedHat 7.2 Apache 1.3.27 and Apache 2 I have problem with direct eval, in version PHP4.2.2 is all OK in version PHP 4.3.3 - direct eval bad here cut code $s = '$ret = ibase_execute($this-query, $arg_list[0], $arg_list[1], $arg_list[2],

Re: [PHP] Stripping Decimals

2003-11-04 Thread CPT John W. Holmes
From: Ed Curtis [EMAIL PROTECTED] I currently use number_format() and str_replace() to remove a , or $ if entered and reformat it as a price for an item. I've asked the user not to use decimals but some still do. How do I remove a decimal and anything after from a number in a varable?

Re: [PHP] split ...

2003-11-04 Thread CPT John W. Holmes
From: Dan Joseph [EMAIL PROTECTED] I'm getting the following error: [Tue Nov 4 10:01:53 2003] [error] PHP Warning: split() [a href='http://www.php.net/function.split'function.split/a]: REG_EMPTY in /usr/local/apache/htdocs-chm/import_data.php on line 26 Here is the code in question:

Re: [PHP] Sweet PHP backup / dump function for MySQL database

2003-11-04 Thread CPT John W. Holmes
From: René Fournier [EMAIL PROTECTED] Right now, I'm using phpMyAdmin to periodically backup/dump a client MySQL database to a textfile (from which one can simply restore the database if it ever got corrupted). I'm also working on a super-simple CMS for the client to use themselves. I would

Re: [PHP] Shared SessionIDs?

2003-11-05 Thread CPT John W. Holmes
From: Chris W. Parker [EMAIL PROTECTED] But seriously, why is it such a bad idea? I'd like to finally figure this out so I don't keep coming up with them (not that I've ever used any). ;) I've got to remember back to what the original thread was about... :) The suggestion, iirc, was to pass

Re: [PHP] Re: Input Validation of $_SESSION values

2003-11-06 Thread CPT John W. Holmes
From: Boyan Nedkov [EMAIL PROTECTED] [snip] ... Short of any severe bugs in PHP's core, there is no way for a user of your Web application to modify session data ... [/snip] It seems that statement is not completely correct considering the topic discussed in the paper 'Session Fixation

Re: [PHP] File creation date.

2003-11-06 Thread CPT John W. Holmes
From: Carles Xavier Munyoz Baldó [EMAIL PROTECTED] I want to write a PHP function for delete the files in a directory older than 1800 seconds. Is there any function for it ? Start here: http://us2.php.net/manual/en/ref.filesystem.php ---John Holmes... -- PHP General Mailing List

Re: [PHP] File creation date.

2003-11-06 Thread CPT John W. Holmes
From: Carles Xavier Munyoz Baldó [EMAIL PROTECTED] I want to write a PHP function for delete the files in a directory older than 1800 seconds. Is there any function for it ? Read this thread, too: http://www.phparch.com/mailinglists/msg.php?a=701737s=Mike+Migurski+findsp=1 If you can get

Re: [PHP] MySQL Password Function

2003-11-06 Thread CPT John W. Holmes
From: Raditha Dissanayake [EMAIL PROTECTED] From: Shaun I am trying to make my site more secure, can anyone suggest a tutorial on using the mySQL password function with PHP. I can't find anything through google... it's very simple intead of using insert into users set userPassword='123';

Re: [PHP] High bandwidth application tips

2003-11-06 Thread CPT John W. Holmes
From: Luis Lebron [EMAIL PROTECTED] Excellent tips. I think I'm really going to have to polish my sql skills for this task. Any good tools for benchmarking sql queries? If you've been following the Load Stress Tool thead, this program: http://jakarta.apache.org/jmeter/index.html was mentioned.

Re: [PHP] MySQL Password Function

2003-11-06 Thread CPT John W. Holmes
From: Raditha Dissanayake [EMAIL PROTECTED] Oh, and this will do almost NOTHING to make your site more secure. Why do you think it will? You are partly right about this we had a nice flame war about this very issue couple of weeks ago on the jabber lists. Anyone interested in the nitty

Re: [PHP] preg_replace ^M

2003-11-06 Thread CPT John W. Holmes
From: Torsten Rosenberger [EMAIL PROTECTED] i try to replace a string in a file but if i have linefeeds in the string the output file after the replacement has ^M carachters in in Some text editors will display \r as ^M. So, if you're file uses \r\n as the newline, you'll see these ^M at the

Re: [PHP] preg_replace ^M

2003-11-06 Thread CPT John W. Holmes
From: Torsten Rosenberger [EMAIL PROTECTED] Those are \r characters from dos newline (\r\n). Generally they are not harmful and many editors can work with them without problems (vim). You can use some utility commands to convert to or from dos or unix newlines. But i'm working under

Re: [PHP] Send data Header Response

2003-11-06 Thread CPT John W. Holmes
From: Jonathan Villa [EMAIL PROTECTED] I would like submit a form to a page, do some processing on that page, then if need be, return to the referrer but also send the submitted data along with it... and data is coming from a POST form, not a GET. I tried

Re: [PHP] restricting text fill on a text area

2003-11-06 Thread CPT John W. Holmes
From: Ian Truelsen [EMAIL PROTECTED] I want to set up a sized div on my page and be able to fill it with text from a text file. Easy enough, but I want to be able to 'sense' when the text area fills, no matter what size text the browser has set. Client side issue, not PHP. Ask on a Javascript

Re: [PHP] To format a number

2003-11-06 Thread CPT John W. Holmes
From: [EMAIL PROTECTED] I have a number for example 5 and I would it transform in 5,00. I tried with round() but it doesn't add the numbers after comma with an interger number. Does some funtion that make this exist? You mean some function that'll format a number? Hmmm... number_format()

Re: [PHP] Re: High bandwidth application tips

2003-11-07 Thread CPT John W. Holmes
From: Richard Baskett [EMAIL PROTECTED] * use recent mysql 4.x The new versions have ability to cache results of often used queries, and return the results very fast without even touching the disk. Note that this is much better for web apps than usual query cacheing that many databases

Re: [PHP] Issues with Mysql 4.0 and PHP in a production environment

2003-11-06 Thread CPT John W. Holmes
From: Luis Lebron [EMAIL PROTECTED] Are there any issues with running PHP 4.3.X and Mysql 4.0 in a production environment? Of course there is. If you write crappy code, your program will suffer. If you don't write crappy code, well, then you're fine. ---John Holmes... -- PHP General Mailing

Re: [PHP] php|cruise - do unto others...

2003-11-05 Thread CPT John W. Holmes
From: Becoming Digital [EMAIL PROTECTED] php|cruise is coming this March. Final word on this, I promise! :) I'll be on the cruise, so I'm looking forward to meeting anyone else that'll be there. Contact me offline if you want. I wanted to say think you to all of those that contributed to the

Re: [PHP] testing a variable

2003-11-12 Thread CPT John W. Holmes
From: Adam Williams [EMAIL PROTECTED] I need to test a variable to see if it contains a value or not, and if not, do something. [snip] if ( !isset($var ) { echo do something;} That's the correct way. What I am doing is checking a field in an sql table, and if the field is null, empty,

Re: [PHP] overriding string concatenation '.'

2003-11-12 Thread CPT John W. Holmes
From: tirumal b [EMAIL PROTECTED] I have an ip addr in a variable. I use 'ssh'.$ipaddr.'command' in a php file The dots in ipaddr variable are considered to be string concatenations. No they are not. Show some examples. ---John Holmes... -- PHP General Mailing List

Re: [PHP] overriding string concatenation '.'

2003-11-12 Thread CPT John W. Holmes
From: Chris W. Parker [EMAIL PROTECTED] CPT John W. Holmes mailto:[EMAIL PROTECTED] The dots in ipaddr variable are considered to be string concatenations. No they are not. Show some examples. What am I missing here? How is the dot operator not considered concatenation

Re: [PHP] Why is this code not working?

2003-11-12 Thread CPT John W. Holmes
From: Dave G [EMAIL PROTECTED] PHP Gurus, If you say so... I'm trying to put the results of a query into an array. My code looks like this: ?php $query = SELECT datecolumn FROM table WHERE MONTH(datecolumn) = . $currentMonth; $result = mysql_query($query); $numRows =

Re: [PHP] Getting an uploaded picture

2003-11-12 Thread CPT John W. Holmes
From: Mike R [EMAIL PROTECTED] I thought about that, but figured I'd ask first - particularly since I wasn't sure which code to send: the code for uploading the pictures or the code that displays the pictures/links to them? Show the code that displays the links to them and some of the

[PHP] Re: Need a nicer way to escape single/double quotes....

2003-11-12 Thread CPT John W. Holmes
Scott Fletcher [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... I haven't found a more efficient way to better escape the quote characters for the javascript right from PHP because I only get The kid in the javascript alert message, so I'm wondering if anyone of you know of

Re: [PHP] validate names with regex

2003-11-12 Thread CPT John W. Holmes
From: Chris W. Parker [EMAIL PROTECTED] Can someone post a function or regex that can validate names (first and last)? The most important bit is that names like O'Malley and Hope-Jones are not barred. I use this: //allow a possible ', -, or space in name. ' will //be replaced

Re: [PHP] Changing case

2003-11-12 Thread CPT John W. Holmes
From: Robert Sossomon [EMAIL PROTECTED] I have a form that allows for an item to be entered, the other pieces have been fixed so far that were bogging me down, but now I am looking for a way to convert any entry in the form to be UPPER case so that when the quote is listed, they are

Re: [PHP] keyword searching

2003-11-12 Thread CPT John W. Holmes
From: Adam Williams [EMAIL PROTECTED] I'm using Informix SQL. Could have saved some bandwidth by mentioning that in the first place and only posting to either php-general or php-db (which is more appropriate), not both. :) Ignore what my other posts said, as I don't know how Informix works.

<    1   2   3   4   5   >