Re: [PHP] Re: Using register_globals

2003-06-08 Thread Philip Olson
[snip] rant register_globals=off won't make good code any better --it's just a safety net for the sloppy coders. [snip] In some sense, register_globals = off makes both bad and good code better, because it means less pollution. So many unused variables get defined with register_globals on

[PHP] HARDWARE ID WITH PHP

2003-06-08 Thread nabil
Can anyone tell me if i can get the Hardisk serial number, by php code? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] popen() in 4.3.2

2003-06-08 Thread Jeff Harris
My webhost just upgraded to php 4.3.2, and now I have a problem with popen. I'm opening an output buffer then piping it through htmltidy to make nice looking output. ?php ob_start(); // Other unimportant coding goes here $str=addslashes(ob_get_contents()); $fp=popen(echo \ . $str . \ |

Re: [PHP] popen() in 4.3.2

2003-06-08 Thread Philip Olson
PHP 4.3.0-1 has a bug that made your previous code work, have a look at the fread() docs for why, here's a quote: Note: When reading from network streams or pipes, such as those returned when reading remote files or from popen() and proc_open(), reading will stop after a packet is

Re: [PHP] TIMESTAMP - Y-m-d

2003-06-08 Thread Don Read
On 05-Jun-2003 nabil wrote: Please help me how to print a timestamp string retrived from the database, and print it as -MM-DD MySQL ? http://www.mysql.com/doc/en/Date_and_time_functions.html -- Don Read [EMAIL PROTECTED] -- It's always darkest

Re: [PHP] popen() in 4.3.2

2003-06-08 Thread Jeff Harris
Wow. 6 minutes for a response. Of course, I thought my error was in the popen(), not fread(), so I didn't even check there. I've just fixed the code, and it works! Thanks, Philip. On Jun 8, 2003, Philip Olson claimed that: | |PHP 4.3.0-1 has a bug that made your previous code work, |have a look

Re: [PHP] Newman's Problem with Images.

2003-06-08 Thread Don Read
On 05-Jun-2003 Philip J. Newman wrote: My problem is this: I have a site that has 3 levels of access. 1,2,3 when i upload files to say $unixtimestamp/image1.jpg anyone can list the images in this directory $unixtimestamp/. I would like to hide the images out side the doc root

[PHP] FILE UPLOAD Q

2003-06-08 Thread nabil
Please help me , I want to make any user on my website to submit his CV , or any file to a temp folder, the following script create a fupload file , and I don't want to dump the original in it, I want to upload the file as it is, with its extension... by example html head titleListing 9.14

Re: [PHP] FILE UPLOAD Q

2003-06-08 Thread Philip Olson
That article is pretty old, and the code sucks. Read this instead: http://www.php.net/features.file-upload It will explain everything. Regards, Philip On Sun, 8 Jun 2003, nabil wrote: Please help me , I want to make any user on my website to submit his CV , or any file to a temp

[PHP] remote file moddatetime

2003-06-08 Thread Warren Vail
I am trying to upload a file using php's ftp functions between two RedHat 7.3 systems. I'd like to make sure the destination file has the same modification date as the source file, so that I can later compare to see if it has been modified on the remote machine, but not sure how to approach this.

[PHP] Newman Asks, Changeing to CAPS?

2003-06-08 Thread Philip J. Newman
Is there a way of changing only the 1st letter of a string to caps and the rest to lower? eg: foo bar to Foo Bar ?? / Phil PhilipNZ.com [EMAIL PROTECTED]

[PHP] Re: Newman Isn't trying very hard

2003-06-08 Thread Jean-Christian Imbeault
Philip J. Newman wrote: Is there a way of changing only the 1st letter of a string to caps and the rest to lower? eg: foo bar to Foo Bar Newman, search the PHP documentation before posting will you? What you want is the function called ucwords()

Re: [PHP] Re: Using register_globals

2003-06-08 Thread Don Read
On 08-Jun-2003 Philip Olson wrote: [snip] rant register_globals=off won't make good code any better --it's just a safety net for the sloppy coders. [snip] In some sense, register_globals = off makes both bad and good code better, because it means less pollution. So many unused

[PHP] Checking for Valid Charactors.

2003-06-08 Thread Philip J. Newman
I would liek to check for 0-9 and . charactors i'm using ... $email = 60.00; if eregi(^[0-9.])?$,$email) { echovalid; } else { echonot valid; } Its not working well. umm ... help ...

Re: [PHP] Re: Using register_globals

2003-06-08 Thread Philip Olson
On 08-Jun-2003 Philip Olson wrote: [snip] rant register_globals=off won't make good code any better --it's just a safety net for the sloppy coders. [snip] In some sense, register_globals = off makes both bad and good code better, because it means less pollution. So many

[PHP] SESSION ISSUES

2003-06-08 Thread Dale
HELP? I AM ABOUT TO PULL MY HAIR OUT? I have already spent time reading over the online php manual and I still can't figure a way around this issue. I notice that when I start a session and I create session variables, those variables are attached to the specific domain. For example: both of the

Re: [PHP] Checking for Valid Charactors.

2003-06-08 Thread Jason Wong
On Sunday 08 June 2003 16:22, Philip J. Newman wrote: I would liek to check for 0-9 and . charactors i'm using ... $email = 60.00; if eregi(^[0-9.])?$,$email) { echovalid; } else { echonot valid; } Its not working well. umm ... help ... eregi(^([0-9.])*$, $string) will match:

Re: [PHP] SESSION ISSUES

2003-06-08 Thread Jason k Larson
http://us2.php.net/manual/en/function.session-set-cookie-params.php set the domain strictly to test.com not subdomain.test.com etc etc -- Jason k Larson Dale wrote: HELP? I AM ABOUT TO PULL MY HAIR OUT? I have already spent time reading over the online php manual and I still can't figure a

Re: [PHP] Checking for Valid Charactors.

2003-06-08 Thread Philip J. Newman
thanks - Original Message - From: Jason Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, June 08, 2003 8:57 PM Subject: Re: [PHP] Checking for Valid Charactors. On Sunday 08 June 2003 16:22, Philip J. Newman wrote: I would liek to check for 0-9 and . charactors i'm using

[PHP] A Question with heredoc

2003-06-08 Thread Simon Coggins
Hi I'm writing a wrapper for some mailman archives and i'm trying to put them message into a variable as in: $body = EOF text here. EOF; But I'm getting an error because of some charactors. ^L to be specific. If the text contains a control char I get: Code: pre

[PHP] project users manual howto

2003-06-08 Thread daniel
hi there i have nearly completed a project in php and need to find different approaches in creating user manuals , is there any tutorials or howtos out there and i am not talkin about phpdoc this is code doc level i need to find a good approach at creating the users level documentation let me know

[PHP] HELP PLEASE

2003-06-08 Thread nabil
AGES AND TRYING TO FIND A GOOD RSS CREATOR , PLEASE HELP, NOTE THAT I TRIED http://www.phpclasses.org . PHP Classes Repository BUT I DIDN'T MANAGE PLEASE HELP ME -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] project users manual howto

2003-06-08 Thread Armand Turpel
With phpdoc you can also make user level docs. Read the manual. - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, June 08, 2003 11:38 AM Subject: [PHP] project users manual howto hi there i have nearly completed a project in php and need to find

Re: [PHP] Re: use print

2003-06-08 Thread
thanks to replay I wont to print to paper printer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Linux question with mysql

2003-06-08 Thread AzFLSite
I just installed the rpm for mysql 4 on Redhat 7.1. Now the service is running, but I cannot go to a command line and type in mysql to get to the mysql command prompt. Did I install it wrong? Do I need to add a path like you would in windows (Enviroment Paths)? Thanks Silly

Re: [PHP] Re: use print

2003-06-08 Thread Jean-Christian Imbeault
wrote: thanks to replay I wont to print to paper printer If you mean to have the user print to a paper printer what he sees in his web browser then that has nothing to do with PHP. Printing from a web browser is controlled by the web browser. PHP cannot affect the way a web browser prints.

[PHP] Re: Linux question with mysql

2003-06-08 Thread Jean-Christian Imbeault
Azflsite wrote: You just high jacked someone else's thread. Please don't do that. I just installed the rpm for mysql 4 on Redhat 7.1. Now the service is running, but I cannot go to a command line and type in mysql to get to the mysql command prompt. Did I install it wrong? Do I need to add a

Re: [PHP] Sorry, I cannot run apxs

2003-06-08 Thread Pentothal
Philip Olson wrote: What do these commands output? # /usr/sbin/httpd -v Server version: Apache/2.0.46 Server built: Jun 8 2003 02:59:44 # /usr/sbin/apxs -q SBINDIR apxs -q SBINDIR /usr/sbin apxs:Error: /usr/bin/apr-config not found!. # /usr/sbin/apxs -q TARGET /usr/sbin/apxs -q

RE: [PHP] Checking for Valid Charactors.

2003-06-08 Thread John W. Holmes
From: Jason Wong [mailto:[EMAIL PROTECTED] On Sunday 08 June 2003 16:22, Philip J. Newman wrote: I would liek to check for 0-9 and . charactors i'm using ... $email = 60.00; if eregi(^[0-9.])?$,$email) { echovalid; } else { echonot valid; } Its not working well.

RE: [PHP] SESSION ISSUES

2003-06-08 Thread John W. Holmes
HELP? I AM ABOUT TO PULL MY HAIR OUT? I can't tell from here... move closer to the monitor. I have already spent time reading over the online php manual and I still can't figure a way around this issue. I notice that when I start a session and I create session variables, those variables

Re: [PHP] How to determine if output buffering is on?

2003-06-08 Thread Shawn McKenzie
Thanks Leif. I hoping to get something for vers of PHP 4.2. From my earlier post: The following never echos STARTING!!! ob_end_flush(); if(ob_get_contents() == FALSE) { echo STARTING!!!; ob_start(); } also tried: if(ob_get_contents() === FALSE) and:

php-general Digest 8 Jun 2003 16:02:27 -0000 Issue 2105

2003-06-08 Thread php-general-digest-help
php-general Digest 8 Jun 2003 16:02:27 - Issue 2105 Topics (messages 150628 through 150672): thumbnail program 150628 by: Artoo 150630 by: Philip Olson 150631 by: John W. Holmes 150634 by: Artoo 150637 by: Philip Olson Re: fsockopen and SSL

Re: [PHP] A Question with heredoc

2003-06-08 Thread Richard Baskett
Im not sure if this is your problem, but it was mine awhile ago :) Make sure there are no spaces after closing off heredoc.. so on your line: EOF; Make sure there is nothing except a hard return, no spaces, no characters.. nothing! Cheers! Rick By three methods we may learn wisdom: First, by

[PHP] can't call htpasswd using PHP

2003-06-08 Thread Billy
Dear all, i can't call the htpasswd command after i used RedHat 8 ( which i can do so in Red Hat 7.2) do u have any idea/ suggestion? thx a lot HPS -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] HARDWARE ID WITH PHP

2003-06-08 Thread Marek Kilimajer
You need to execute an external program (hdparm in linux) and catch its output. nabil wrote: Can anyone tell me if i can get the Hardisk serial number, by php code? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in f:\.....\none.php on line 286

2003-06-08 Thread Marcelo Luiz de Laia
What this message means? What it is the error? Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in f:\.\none.php on line 286 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.488 / Virus

Re: [PHP] Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in f:\.....\none.php on line 286

2003-06-08 Thread Marcelo Luiz de Laia
What this message means? What it is the error? Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in f:\.\none.php on line 42 This is the code. Thanks very much. Marcelo ?php if (eregi(block-Concurso.php, $PHP_SELF)) { Header(Location: index.php);

Re: [PHP] Warning: mysql_fetch_row(): supplied argument is not avalid MySQL result resource in f:\.....\none.php on line 286

2003-06-08 Thread Thomas Seifert
why are you using sql_query through your code? its mysql_query for mysql! and the result, needed for mysql_fetch_row is returned from that function. read the docs again. Thomas On Sun, 8 Jun 2003 16:37:59 -0300 [EMAIL PROTECTED] (Marcelo Luiz De Laia) wrote: $result = SELECT categoria,

Re: [PHP] file upload script

2003-06-08 Thread Rodney Green
Thanks Philip. I'm now using the code below to upload. What I'm seeing is that the file is uploaded and placed into the /tmp directory but is not being moved to the /PIVOT directory. It just disappears after a few seconds and can't be found in either directory. Any ideas why? Thanks again, Rod

Re: [PHP] file upload script

2003-06-08 Thread Rodney Green
Sorry, here's the code: form name=form1 method=post action= enctype=multipart/form-data input type=file name=imagefile br input type=submit name=Submit value=Submit ?php $filesdir = /PIVOT; echo $_FILES['imagefile']['name']; echo $_FILES['imagefile']['tmp_name']; if(isset( $Submit )) { if

[PHP] callback function via preg_replace_callback

2003-06-08 Thread Henry H. Tan-Tenn
Hi, I have Function A containing a preg_replace_callback calling Function B. The code works quite nicely. Now, is there a way for the callback function (B) to receive *additional* arguments (from A), so that, for example, it may optionally perform additional tasks? If not, is there a way for B

Re: [PHP] Re: Linux vs. Windows

2003-06-08 Thread AzFLSite
Ok the results are in heh :) With W2k the times were faster than on .NET but varied a lot. Ranging as low as .9 to as high as 2 full seconds. Ouch! So I got Mandrake 9 back up and with php 4.2.3 and mysql 4 I am back to the faster times. Heck even getting .007 on a regular bases. I still need to

Re: [PHP] file upload script

2003-06-08 Thread Philip Olson
What PHP version? You should rewrite your code to more reflect what's being used in the manual. a) use move_uploaded_file() and not copy() b) check what ['error'] has to say c) set action in the form d) print_r($_FILES) is great for debugging e) only show the form is it's not yet

[PHP] filter out with date?

2003-06-08 Thread A. Lyse
I got the array info: on the articles: Array ( [0] = ingress Object ( [artikkelid] = 241 [nettstedid] = 11 [gyldig] = 1 [overskrift] = motorsport formel1 [artikkellink] = art.php?artikkelid=241 [forfatternavn] =

[PHP] Rateing script

2003-06-08 Thread Ryan A
Hi, I am creating a host directory and have decided to add a rate this host kind of option to each of the hosts to make decision time a bit easier, I have visited hotscripts and the like searching for a good one (ex. like the one they are using) but unable to find oneany of you guys have

[PHP] PHPBB and EZBOARD.COM

2003-06-08 Thread Miranda, Joel Louie M
Hello, Has anyone got an idea how to migrate the things in ezboard.com to phpbb forum? Thanks, Louie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Need a safe way to get user supplied data into a varaible.

2003-06-08 Thread Simon Coggins
Hi, After lots of looking I've worked out I can't use heredoc for what I want. Does anyone else have any better ideas on how to do this: I have a template file that is used to generate a html page. in this template I currently have: $body = EOF possibly any type of text as it's an email message

Re: [PHP] Need a safe way to get user supplied data into a varaible.

2003-06-08 Thread Lars Torben Wilson
On Sun, 2003-06-08 at 17:15, Simon Coggins wrote: Hi, [snipped for brevity] I need some way of putting a block of text into a variable without having to read it in from a file. From the template point of view, all that happends is a token is replaced with the body of the text. So reading

Re: [PHP] Need a safe way to get user supplied data into a varaible.

2003-06-08 Thread Leif K-Brooks
Why not just use file() and friends? Simon Coggins wrote: Hi, After lots of looking I've worked out I can't use heredoc for what I want. Does anyone else have any better ideas on how to do this: I have a template file that is used to generate a html page. in this template I currently have: $body

RE: [PHP] IE Pagelength issue

2003-06-08 Thread Larry Brown
Yes, the entire page is visible when selecting view source. And again, it does view ok in Mozilla. I will try breaking the table into smaller tables and see if that is it. I won't have access till Tuesday. If anyone has any other ideas feel free to throw in. Larry S. Brown Dimension Networks,

[PHP] Session Newbie Question: Cookieless sessions

2003-06-08 Thread [EMAIL PROTECTED]
How can one set up cookie-less sessions? More specifically, if you store your sessions in a database, once the user comes back how do you call that same session back? I guess I still don¹t understand how to keep user specific data maintained for a particular user. Because when you log off or

RE: [PHP] Session Newbie Question: Cookieless sessions

2003-06-08 Thread John W. Holmes
How can one set up cookie-less sessions? More specifically, if you store your sessions in a database, once the user comes back how do you call that same session back? I guess I still don¹t understand how to keep user specific data maintained for a particular user. Because when you log off

RE: [PHP] filter out with date?

2003-06-08 Thread John W. Holmes
I got the array info: on the articles: Array ( [0] = ingress Object ( [artikkelid] = 241 [nettstedid] = 11 [gyldig] = 1 [overskrift] = motorsport formel1 [artikkellink] = art.php?artikkelid=241

[PHP] Re: A recommended barcode program

2003-06-08 Thread Manuel Lemos
Hello, On 06/02/2003 09:30 PM, Todd Cary wrote: I would like to have a reccommendation for a PHP class that generates a barcode. Have you seen these? Class: Barcode128 pattern compute class http://www.phpclasses.org/barcode128 Class: BarcodeI25 http://www.phpclasses.org/barcode -- Regards,

[PHP] Hi I get some problems while using eregi_replace

2003-06-08 Thread winst0n
Hi, so first of all, I'm sorry for my bad english. I'll try to write as better as I can, but I think it will be readable ;) So, this is 3 code unsing eregi_replace, but they dont work as well... If some one can give me a help, it's will be great. Many thx ! / code

RE: [PHP] PHPBB and EZBOARD.COM

2003-06-08 Thread Miranda, Joel Louie M
Got an idea. Brb. Louie -Original Message- From: Miranda, Joel Louie M Sent: Monday, June 09, 2003 8:04 AM To: [EMAIL PROTECTED] Subject: [PHP] PHPBB and EZBOARD.COM Hello, Has anyone got an idea how to migrate the things in ezboard.com to phpbb forum? Thanks, Louie -- PHP General

Re: [PHP] callback function via preg_replace_callback

2003-06-08 Thread David Otton
On Sun, 08 Jun 2003 16:25:19 -0400, you wrote: I have Function A containing a preg_replace_callback calling Function B. The code works quite nicely. Now, is there a way for the callback function (B) to receive *additional* arguments (from A), so that, for example, it may optionally perform

[PHP] Execute command which has root privileges

2003-06-08 Thread vijaypatel
Hello, I am using FreeBSD 4.7 ,PHP 4.2.3 Apache 1.3 I want to execute shell script which contains few IPFW commands. I have tried with system(),exec(),passthru() command to execute script but i can't do that. Apache has created www user on FreeBSD. I found that www user has not privilege for

[PHP] reading a file into variable for using in a javascript

2003-06-08 Thread Charles Kline
Hi all, I am reading the content of a text file into a variable to be used in a javascript. I am reworking some code that was originally done using ColdFusion and the jsStringFormat(var) function. What is the PHP equivalent string function? Is there one? I have searched the docs, but can't

php-general Digest 9 Jun 2003 04:23:54 -0000 Issue 2106

2003-06-08 Thread php-general-digest-help
php-general Digest 9 Jun 2003 04:23:54 - Issue 2106 Topics (messages 150673 through 150699): Re: A Question with heredoc 150673 by: Richard Baskett can't call htpasswd using PHP 150674 by: Billy Re: HARDWARE ID WITH PHP 150675 by: Marek Kilimajer Warning:

[PHP] Re: Execute command which has root privileges

2003-06-08 Thread Dustin Pate
You could use sudo, if your system has that. That's what I do for the rare occasion I have to call a script with root perms. But use sudo with care! Vijaypatel [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, I am using FreeBSD 4.7 ,PHP 4.2.3 Apache 1.3 I want to execute

[PHP] XSLT not doing anything

2003-06-08 Thread David Feldman
I'm trying to get the XSLT extension working, and all I can get it to do is echo the source XML back to me. I'm using sample markup from O'Reilly's XSLT book as my XML and XSL files, as follows: hello.xml: ?xml version=1.0? greeting Hello, world! /greeting hello.xsl: xsl:stylesheet

Re: [PHP] HELP PLEASE

2003-06-08 Thread David Otton
On Sun, 8 Jun 2003 13:31:25 +0300, you wrote: AGES AND TRYING TO FIND A GOOD RSS CREATOR , PLEASE HELP, NOTE THAT I TRIED http://www.phpclasses.org . PHP Classes Repository BUT I DIDN'T MANAGE PLEASE HELP ME A simple RSS document is pretty easy to generate. It's just text... even

[PHP] regexp for URL

2003-06-08 Thread Mattia
Does anyone have a good regular expression for capturing all http URL in a string? now i'm using ?(http://[a-z0-9-/_;=+-\.\?:@]+)\b?mi in one of my programs, that is, all strings beginning with http:// and contain chars like a-z0-9 ... does anione have something better? thank you -- PHP

Re: [PHP] Hi I get some problems while using eregi_replace

2003-06-08 Thread poetbox
hi,php-generalwinst0n I'm from china,my English is not very good,too. Here's some example,perhaps it will help you a little. $post =str_replace([b],b,$post); $post =str_replace([/b],/b,$post); $post = eregi_replace(\\[hr=([^\\[]*)\\],hr width=\\1 align=left,$post);

Re: [PHP] Where to start?

2003-06-08 Thread poetbox
hi, Simon Thurtle www.php.net is the best on-line resource on the web. === 2003-06-05 13:36:00 you wrote=== Hi all, I am looking into learning PHP, I have a good understanding of HTML, JS and I know a little Perl. Firstly I know PHP is all server side and so a damn sight

Re: [PHP] regexp for URL

2003-06-08 Thread David Otton
On Mon, 09 Jun 2003 07:13:43 +0200, you wrote: Does anyone have a good regular expression for capturing all http URL in a string? now i'm using ?(http://[a-z0-9-/_;=+-\.\?:@]+)\b?mi in one of my programs, that is, all strings beginning with http:// and contain chars like a-z0-9 ... does anione

[PHP] stripping newlines from a string

2003-06-08 Thread Charles Kline
Hi all, How would i go about stripping all newlines from a string? Thanks, Charles -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] status of current online users

2003-06-08 Thread Miranda, Joel Louie M
Hello, I was wondering how did some people do that they can display current active users on a webpage? I was hoping to find even simple info about this even on a first site basis only. Any ideas and howto's/docs will be great. Thanks, Louie -- PHP General Mailing List (http://www.php.net/) To