Re: [PHP] flush output error

2002-12-18 Thread electroteque
sorry about the false alarm , if you go here u will see a working example http://galleries.dyndns.org:1023/progress.php i had to add both flush functions together to work , obviosuly flsuh is not emptying the buffer within a loop, is this still a bug ? flush(); ob_flush(); "Wico De Leeuw" <[EM

[PHP] php + xsl + xsm

2002-12-18 Thread Hristina
hello! I have the following problem: I want to display text from nodes in xsm file, but after every text to put picture with link. The rows above dispay the text correctly in

[PHP] PHP: XML + XSL

2002-12-18 Thread Hristina
hello! I have the following problem: I want to display text from nodes in xsm file, but after every text to put picture with link. The rows above dispay the text correctly in

RE: [PHP] PHP and MySQL queries

2002-12-18 Thread John W. Holmes
So print out $query before you execute it and see what you're actually sending to MySQL. You're apparently sending a valid query, but it's not matching any rows... ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ > -O

[PHP] Re: URL parsing

2002-12-18 Thread gamin
Hi Mako, if your URL is going to have this format consistently try this $data = explode("/",$URL); $user = $data[3]; HTH (untested code) gamin. "Mako Shark" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I've got a URL like this: > > http://www.naturalis

Re: [PHP] repeat region

2002-12-18 Thread Justin French
Hi, what you want to do is only echo the and every 7 loops through the records. Untested example: "; } echo "{$myrow['id']}"; if($i == 7) { echo ""; $i = 0; } } ?> Justin on 19/12/02 4:27 PM, Bruce Levick ([EMAIL PROTECTED]) wrote: > Hi php'ers, > I have learnt alot in the la

[PHP] FW: checking bounce email

2002-12-18 Thread See kok Boon
Hi, Can someone kindly teach me how to check for bounced emails when I use mail() to send emails? OR Tell me whether there are other mail functions which can accomplish that. Thanks in advance kokboon

[PHP] Re: repeat region

2002-12-18 Thread Jeff
$idx=1; echo() while(fetch_rows) { printf("%s, ID); if($idx%7=0) {echo(''} ++$idx; } "Bruce Levick" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi php'ers, I have learnt alot in the last week in regards to php and listing the rows of a table set. I nee

[PHP] Re: PHP question

2002-12-18 Thread gamin
Have a look at suexec HTH gamin "Tom Ray" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Are PHP script supposed to run as the user or as the web server? > Currently I'm running Red Hat 7.3 with apache 1.3.x and all my PHP > scripts run as apache, not as the

[PHP] repeat region

2002-12-18 Thread Bruce Levick
Hi php'ers, I have learnt alot in the last week in regards to php and listing the rows of a table set. I need help with a small challenge. I can retrieve rows from a database table and list the results in HTML cell successfully. My challenge is this. I want to list the I.D (auto increment id num

[PHP] Re: recommendation needed for dedicated server hosting

2002-12-18 Thread Kyle Gibson
Hi, I recently went through a horrendous experience with two different hosting providers. I'd like some recommendations on excellent hosting providers if anybody has some. My key priorities in order are: 1) around-the-clock, technically competent TELEPHONE support (webchat support, message boards

Re: [PHP] recommendation needed for dedicated server hosting

2002-12-18 Thread Tom Rogers
Hi, Thursday, December 19, 2002, 2:30:44 PM, you wrote: TK> Hi, TK> I recently went through a horrendous experience with two different hosting TK> providers. I'd like some recommendations on excellent hosting providers if TK> anybody has some. TK> My key priorities in order are: TK> 1) around-th

Re: [PHP] recommendation needed for dedicated server hosting

2002-12-18 Thread Jason Sheets
For server colocation or dedicated leased servers I would recommend Hurricane Electric, they have an excellent backbone, excellent technical support and friendly sales staff. Their website is at http://www.he.net. For shared hosting I recommend pair networks ( http://www.pair.com ) or Fidelity Ho

[PHP] PHP and MySQL queries

2002-12-18 Thread Beauford.2002
Hi, I am having a real problem with variables in PHP and trying to query my MySQL database. I have a form that a user inputs information and then that info is used to query my database, but it's not working. I don't get any errorrs and it appears every thing worked, but nothing gets displayed (see

[PHP] recommendation needed for dedicated server hosting

2002-12-18 Thread Taek Kwon
Hi, I recently went through a horrendous experience with two different hosting providers. I'd like some recommendations on excellent hosting providers if anybody has some. My key priorities in order are: 1) around-the-clock, technically competent TELEPHONE support (webchat support, message boards

Re: [PHP] is there php equiv left() and right() functions?

2002-12-18 Thread Jeff Bluemel
works great thanks, Jeff "Philip Olson" <[EMAIL PROTECTED]> wrote in message Pine.BSF.4.10.10212190240490.68100-10@localhost">news:Pine.BSF.4.10.10212190240490.68100-10@localhost... > > You want explode(), something like: > > list($a, $b) = explode('|', $string); > > > Regards, > Philip

[PHP] Re: is there php equiv left() and right() functions?

2002-12-18 Thread Jeff Bluemel
thanks... Jeff "Matthew Gray" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Jeff Bluemel wrote: > > > I have a string that will look like the following; > > > > data1|data2 > > > > now - I need to put data1 in a variable, and data2 in another variable. > > I'v

Re: [PHP] is there php equiv left() and right() functions?

2002-12-18 Thread Philip Olson
You want explode(), something like: list($a, $b) = explode('|', $string); Regards, Philip Olson On Wed, 18 Dec 2002, Jeff Bluemel wrote: > I have a string that will look like the following; > > data1|data2 > > now - I need to put data1 in a variable, and data2 in another variable. > I've

[PHP] Re: is there php equiv left() and right() functions?

2002-12-18 Thread Matthew Gray
Jeff Bluemel wrote: > I have a string that will look like the following; > > data1|data2 > > now - I need to put data1 in a variable, and data2 in another variable. > I've found the functions strlen, and strpos, but I can't figure how to > grab this data. > > thanks, > > Jeff Try list($var1,

[PHP] Re: creating objects by reference?

2002-12-18 Thread Matthew Gray
Jonathan Sharp wrote: > Is it better to do: > $obj = &new object(); > > verses: > $obj = new object(); > > thanks, > -js If you are looking to the future: I don't believe the ability to return objects by reference will be an option in Zend Engine 2. Matt -- PHP General Mailing List (http:/

[PHP] is there php equiv left() and right() functions?

2002-12-18 Thread Jeff Bluemel
I have a string that will look like the following; data1|data2 now - I need to put data1 in a variable, and data2 in another variable. I've found the functions strlen, and strpos, but I can't figure how to grab this data. thanks, Jeff -- PHP General Mailing List (http://www.php.net/) To uns

RE: [PHP] *Premature end of script headers

2002-12-18 Thread Dave [Hawk-Systems]
>Guys? The support guy says that my php-script brings his php interpreter to >crash. I am astonished (wow-what a powerful man I am :) ) - no, but really, >it doesn't crash MY server? He also said, it happens just right after the >file is being asked for, that is, as I suspect, somewhere in the firs

Re: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-18 Thread DL Neil
Rolf, > > the document_root just doesn't show up in my phpinfo(); > > > > do windows machines have one anyway? > > I have used this var before, just not testing it locally. > > > > It normally shows up when I use phpifno on the server. Please check/compare the entries for doc_root = in the two P

RE: [PHP] *OK, more eval for today

2002-12-18 Thread Martin Towell
argh! eval() try this instead: $temp = ${"php_q3_$i"}; to get it directly from $HTTP_POST_VARS: $temp = $HTTP_POST_VARS["php_q3_$i"]; simple HTH Martin -Original Message- From: Alexey Lysenkov [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 6:08 AM To: [EMAIL PROTECTED] Subje

Re: [PHP] *Premature end of script headers

2002-12-18 Thread Alexey Lysenkov
Guys? The support guy says that my php-script brings his php interpreter to crash. I am astonished (wow-what a powerful man I am :) ) - no, but really, it doesn't crash MY server? He also said, it happens just right after the file is being asked for, that is, as I suspect, somewhere in the first li

Re: [PHP] Empty textfield

2002-12-18 Thread Justin French
read ALL of http://www.php.net/manual/en/features.file-upload.php I'm assuming php >= 4.1.1 Justin on 19/12/02 2:33 AM, shaun ([EMAIL PROTECTED]) wrote: > Hi, > > what is the best way to check if a textfield is empty, and is it the same > for file fields? > > thanks for your help > >

Re: [PHP] session variables

2002-12-18 Thread Justin French
on 19/12/02 2:25 AM, Antti ([EMAIL PROTECTED]) wrote: > Neather this seem to work > > $_SESSION['some_variable']=$variable; > > nor this: > > $_SESSION['today']= date('Y-m-d h:m:s'); > > antti What do you mean "don't work"... what are you trying to do? page1.php click to go to page 2

Re: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-18 Thread Joseph W. Goff
IIS may not have that variable. You might want to install apache on your local machine so that you are using the same tools. - Original Message - From: "rolf vreijdenberger" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, December 18, 2002 4:00 PM Subject: Re: [PHP] $_SERVER['

Re: [PHP] old getenv?

2002-12-18 Thread Bryan Koschmann - GKT
Hey thanks Kevin. That was all I needed to know. I can't quite understand why it didn't report back, but I have it working now. I did have register_globals off, and even tried turning it on, but that didn't make a difference. Maybe I should just start trying to write my own from scratch :) Thanks

Re: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-18 Thread rolf vreijdenberger
the document_root just doesn't show up in my phpinfo(); do windows machines have one anyway? I have used this var before, just not testing it locally. It normally shows up when I use phpifno on the server. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.ph

Re: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-18 Thread rolf vreijdenberger
I use php 4.2.3 and only my pc is running xp, the server is a linux machine -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-18 Thread Joseph W. Goff
Both sites are running winXP and IIS? Both same version of IIS? If the variable is on one and not on the other it could be either a version conflict, or a configuration problem. - Original Message - From: "Rolf Vreijdenberger" <[EMAIL PROTECTED]> To: "Joseph W. Goff" <[EMAIL PROTECTED]>; "

Re: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-18 Thread Leif K-Brooks
No, PHP version. With virtually no information, I'm going to guess that you're using a version below 4.1, which is where the $_* variables were introduced. Upgrade or use $HTTP_SERVER_VARS. Rolf Vreijdenberger wrote: yes, the server var doesn't exist in phpifno(); no difference winxp pro wit

Re: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-18 Thread Rolf Vreijdenberger
yes, the server var doesn't exist in phpifno(); no difference winxp pro with iss -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] preventing sql injections

2002-12-18 Thread Bogdan Stancescu
Thy words are wise, milord. Bogdan John W. Holmes wrote: Also, please note that if you're using MySQL you don't have to bother at all security-wise - MySQL won't accept more than one query per mysql_query(). You do have to bother about regular errors though - if $f_namn or $email contain quo

Re: [PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-18 Thread Joseph W. Goff
Is there a difference between PHP versions on your machine and your site? Have you looked at phpinfo() to see what variables have been set on your system? - Original Message - From: "rolf vreijdenberger" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, December 18, 2002 3:38 PM

Re: [PHP] Automated Php Page

2002-12-18 Thread Brad Bonkoski
Well, read up on fwrite() to actually write the page. I would have the 1st page form submit to itslef, process/create the new static page and then to a re-direct to the new page. There are tutorials for image uploading, and the other stuff would just be writting form vairables to a static file wi

[PHP] $_SERVER['DOCUMENT_ROOT'] on localhost

2002-12-18 Thread rolf vreijdenberger
hey there, I include files outside the document root in my site. include $_SERVER['DOCUMENT_ROOT']."../inc.php" ; when I use this on the localhost it doesn't find this variable: $_SERVER['DOCUMENT_ROOT'] which makes testing more annoying since I have to upload to my site all the time. any idea

[PHP] Automated Php Page

2002-12-18 Thread msmecca
Still a php newbie here I am creating a website set on an intranet server. I have to create two pages that consists of the following actions and I'd like to know if its possible to do with php if so, how? The first page, information page, would somewhat look like a forum page to enter infor

Re: [PHP] old getenv?

2002-12-18 Thread Kevin Stone
The only way to get at HTTP_REFERER is either through getenv(), $HTTP_SERVER_VARS, or $_SERVER. There is no other way around it. But since the methods are universial there shouldn't be any harm in just using the Find/Replace command in your editor. I found one (rather odd) reference that suggest

RE: [PHP] Re: Compiling php-4.0.6 with MySQL support

2002-12-18 Thread Dan Rossi
not the sources where you put your libmysql, i prefix my apps , as its easier to contain and find stuff -Original Message- From: Igor Shulgin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 18, 2002 10:00 PM To: electroteque; [EMAIL PROTECTED] Subject: Re: [PHP] Re: Compiling php-4.0.

[PHP] old getenv?

2002-12-18 Thread Bryan Koschmann - GKT
Hello, I'm trying to use a formmail script (Jack's Formmail) but I'm having a problem, because it seems to not spit out any info for getenv("HTTP_REFERER"). Is there any way around this, other than fixing every reference to that (there are others to get the form information as well)? I had the sam

Re: [PHP] who is connected?

2002-12-18 Thread Scott Alden
I've done the same for my site, but I've found that even when using the MySQL INSERT DELAYED when adding a username to the online users table it can bring my site to a crawl under heavy traffic. -- Scott Jason Reid wrote: How I do it for my sites is borrowing from the concept that phpBB uses...

[PHP] creating objects by reference?

2002-12-18 Thread Jonathan Sharp
Is it better to do: $obj = &new object(); verses: $obj = new object(); thanks, -js -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] *OK, more eval for today

2002-12-18 Thread Alexey Lysenkov
It worked for validation! :) Hooray. Now, I guess, I have to set the same logic for the whole other bumch of questions God.. Most probably will post here today later again. Cheers, John! -Alex -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/

Re: [PHP] Re: mysql_num_rows

2002-12-18 Thread Philip Olson
And now mysql4 allows doing this another way, I *assume* this new way is slightly faster then the additional count() although I haven't tested it and wonder if it affects mysql_num_rows()... See: SQL_CALC_FOUND_ROWS() http://www.mysql.com/doc/en/Miscellaneous_functions.html Regards, Philip

Re: [PHP] *OK, more eval for today

2002-12-18 Thread Alexey Lysenkov
am trying -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] *OK, more eval for today

2002-12-18 Thread John W. Holmes
> Okay, wait. > How? > > say, I have a field of checkboxes in 3 columns and 6 rows. I need at least > one checked. > At the moment every checkbox has the name of kind: q3_4_1 , where 4 stands > for row and 1 for column. Now, how do I name them and loop through them? > Plus, if $HTTP_POST_VAR["q3_4

Re: [PHP] *OK, more eval for today

2002-12-18 Thread Alexey Lysenkov
Okay, wait. How? say, I have a field of checkboxes in 3 columns and 6 rows. I need at least one checked. At the moment every checkbox has the name of kind: q3_4_1 , where 4 stands for row and 1 for column. Now, how do I name them and loop through them? Plus, if $HTTP_POST_VAR["q3_4_1"] wasn't chec

RE: [PHP] preventing sql injections

2002-12-18 Thread John W. Holmes
> Also, please note that if you're using MySQL you don't have to bother at > all security-wise - MySQL won't accept more than one query per > mysql_query(). You do have to bother about regular errors though - if > $f_namn or $email contain quotes (which $email might well contain) then > you're goin

RE: [PHP] *OK, more eval for today

2002-12-18 Thread John W. Holmes
Why not name your form elements php_q3[] and then just loop through the array. That would cut the need for eval(). ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ > -Original Message- > From: Alexey Lysenkov [mai

[PHP] *OK, more eval for today

2002-12-18 Thread Alexey Lysenkov
I know, it's eval = evil, but I don't see any other way I can check for 120 variables submitted via post, without making a temp variable, assigning a value of the posted Var and checking for it (and deciding on the further run of the script). Anyways, I took a classical eval thing and am doing f

Re: [PHP] *Premature end of script headers

2002-12-18 Thread Alexey Lysenkov
Not that I am really bothered with it... The thing should run in 12 hours, and the guy is gone, I guess, to have his late night beer, and me is sitting here and battling with either my stupidity or his. Anyways. phpinfo() runs okay "Adam Voigt" <[EMAIL PROTECTED]> wrote in message [EMAIL

[PHP] Re: Encrypt and decrypt cookie

2002-12-18 Thread J Smith
Note that IVs only affect block cipher modes other than ECB mode. ECB mode ignores IVs completely. J Titu Kim wrote: > Hi, >I am using libmcrypt-2.5.3 to do encryption in php. > I use exactly the steps provided in mcrypt_module_open > available on php website > http://php.benscom.com/manu

Re: [PHP] *Premature end of script headers

2002-12-18 Thread Adam Voigt
Calm down. Does it do that same error if you have something simple like: On a page all by itself? On Wed, 2002-12-18 at 13:12, Alexey Lysenkov wrote: What does THAT mean? My script cannot execute on this goddamn server, running goddamn safe-damn-mode! A line

[PHP] *Premature end of script headers

2002-12-18 Thread Alexey Lysenkov
What does THAT mean? My script cannot execute on this goddamn server, running goddamn safe-damn-mode! A line in the error.log: [Wed Dec 18 14:18:55 2002] [error] [client 217.***.*.***] Premature end of script headers: e:/~~~/~~~/apache/php/php.exe Regards, Alex What should I tell the support guy

Re: [PHP] list and (array) get_val

2002-12-18 Thread Ns_Andy
ic, thanks all. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] problem with sending pages directly from browser

2002-12-18 Thread Kocnár Peter
I have problem with sending pages directly(by Send->Page by E-mail...) from browser(ie6) with Outlook 2002. It tells:"The current document type can not be sent as mail.Would you like to send a Short cut instead?". The pages use php sessions and it is https with 128 bit encryption. I found that it i

Re: [PHP] preventing sql injections

2002-12-18 Thread Bogdan Stancescu
Also, please note that if you're using MySQL you don't have to bother at all security-wise - MySQL won't accept more than one query per mysql_query(). You do have to bother about regular errors though - if $f_namn or $email contain quotes (which $email might well contain) then you're going to e

Re: [PHP] ereg.

2002-12-18 Thread liljim
Instead of: (!ereg("^([a-zA-ZåÅäÄöÖ]{4,20})\$", $_REQUEST['f_name'])) Try: (!ereg("^[a-zA-ZåÅäÄöÖ]{4,20}$", $_REQUEST['f_name'])) (You don't need the brackets unless you're wanting to get the output of the matches, which in this case, it doesn't look as though you do) Better still: (!preg_ma

Re: [PHP] $_SERVER["PATH_TRANSLATED"] returns empty string

2002-12-18 Thread Chris Hewitt
Robert Nedbal wrote: Are you implying that it used to work on another computer, or before an upgrade? If so, can you compare the php.ini files? Otherwise maybe its a bug (php with Apache2 I don't think is stable yet). HTH Chris Yes exactly, it's working on our production server (apache 1.x, p

[PHP] problem with sending pages directly from browser

2002-12-18 Thread Kocnár Peter
I have problem with sending pages directly(by Send->Page by E-mail...) from browser(ie6) with Outlook 2002. It tells:"The current document type can not be sent as mail.Would you like to send a Short cut instead?". The pages use php sessions and it is https with 128 bit encryption. I found that it i

Re: [PHP] Re: *Cannot connect to db

2002-12-18 Thread Alexey Lysenkov
Well, you will laugh, but it worked. :)) Not really, the way you showed - I commented out the username and password and it worked! :)) Mang... So whose fall was it? Definitely not php, right?... okay. Thanks Gregory! :)) - Original Message - From: "Gregory Hernandez" <[EMAIL PROTECTED]> T

[PHP] problem with sending pages directly from browser

2002-12-18 Thread Peter Kocnar
I have problem with sending pages directly(by Send->Page by E-mail...) from browser(ie6) with Outlook 2002. It tells:"The current document type can not be sent as mail.Would you like to send a Short cut instead?". The pages use php sessions and it is https with 128 bit encryption. I found that it i

Re: [PHP] Re: mysql_num_rows

2002-12-18 Thread liljim
I would also tend to do a count(*) as well as the main query if I intend to use pagination (with the help of LIMIT in the main query). Suppose, for example, you're limiting to 30 news posts per page, and from calculations there are only 2 pages that fall into the criteria, then trying to bring the

RE: [PHP] How to upload a file

2002-12-18 Thread Rich Gray
What are these settings in your php.ini? post_max_size upload_tmp_dir Does the upload_tmp_dir have enough space? Are the permissions on the directory correct? When you start the upload - how long does it take to fail immeditaely you click submit or after a delay. If the latter then is there anyth

Re: [PHP] Re: mysql_num_rows

2002-12-18 Thread Philip Olson
First, there is no reason to do mycounter like this when mysql_num_rows() will work perfectly. It's not based on any certain column numbers or primary keys. Although if you're suggesting this method to simply print 0-n in the loop (as users may want to know the row number of output not any id nu

Re: [PHP] $_SERVER["PATH_TRANSLATED"] returns empty string

2002-12-18 Thread Robert Nedbal
On Wed, 18 Dec 2002, Chris Hewitt wrote: > Robert Nedbal wrote: > > >Hi, > >thanks for your reply. But changing source code in my setup is not a long > >term option. My problem is that $_SERVER["PATH_TRANSLATED"] gives me > >empty string. > > > >Does anybody know how to fix my PHP installation, so

Re: [PHP] Re: *Cannot connect to db

2002-12-18 Thread Chris Hewitt
Alexey Lysenkov wrote: Warning: MySQL Connection Failed: Access denied for user: 'tmc@localhost' (Using password: YES) in e:\~~~\~~~\apache\website\~~~\testdb.php on line 8 The guy at the support says, that everybody else can connect no problems, sent me the code, which I copy-pasted and I still

Re: [PHP] ereg.

2002-12-18 Thread 1LT John W. Holmes
^ is only NOT when it's the first character within brackets, [ and ]. Also, don't escape the $ at the end if you really want it to match the end of the string. Right now your regular expression is matching a literal dollar sign. As for the original question, it looks correct, providing you can hav

Re: [PHP] easy spliting

2002-12-18 Thread Philip Olson
You may want to provide more information like why is this string being split at these seemingly random points? Maybe there is a common separator or could be? But anyway it sounds like you want substr(). http://www.php.net/substr Regards, Philip Olson On Wed, 18 Dec 2002, Alex Ciurea wrot

Re: [PHP] ereg.

2002-12-18 Thread Wico de Leeuw
At 17:26 18-12-02 +0100, Wico de Leeuw wrote: ^ is not in this case Cancel that, i don't think thats true anyway if(!ereg("^[a-zA-ZåÅäÄöÖ]{4,20}\$", $_REQUEST['f_name'])) { Should work i think Gr, Try if(!ereg("^([a-zA-ZåÅäÄöÖ]{4,20})\$", $_REQUEST['f_name'])) { Added the $ at the end else

Re: [PHP] list and (array) get_val

2002-12-18 Thread Philip Olson
Have another look here: http://www.php.net/list Note that the list construct only works on numerical arrays and assumes 0-n. You may want to use import_request_variables() or extract() though. Regards, Philip Olson On Wed, 18 Dec 2002, Ns_Andy wrote: > a.php > > list($a) = $_GET; > print

Re: [PHP] ereg.

2002-12-18 Thread Wico de Leeuw
^ is not in this case Try if(!ereg("^([a-zA-ZåÅäÄöÖ]{4,20})\$", $_REQUEST['f_name'])) { Added the $ at the end else the could be more then 20 chars Greetz At 17:20 18-12-02 +0100, Anders Thoresson wrote: What's wrong with the following regular expression? As far as I can se, only alphabetic ch

[PHP] ereg.

2002-12-18 Thread Anders Thoresson
What's wrong with the following regular expression? As far as I can se, only alphabetic characters including the special swedish ones, should be let through, but whatever character passed on in $_REQUEST['f_name'] passes the test? if(!ereg("(^[a-zA-ZåÅäÄöÖ]{4,20})", $_REQUEST['f_name'])) { e

Re: [PHP] $_SERVER["PATH_TRANSLATED"] returns empty string

2002-12-18 Thread Chris Hewitt
Robert Nedbal wrote: Hi, thanks for your reply. But changing source code in my setup is not a long term option. My problem is that $_SERVER["PATH_TRANSLATED"] gives me empty string. Does anybody know how to fix my PHP installation, so $_SERVER["PATH_TRANSLATED"] will give me correct file path?

RE: [PHP] How to upload a file

2002-12-18 Thread Somesh
No difference On Wed, 18 Dec 2002, Rich Gray wrote: > As others have suggested does it make any difference if you up the script > timeout limit with set_time_limit() or via the max_execution_time in > php.ini? > > -Original Message- > From: Somesh [mailto:[EMAIL PROTECTED]] > Sent: 18

Re: [PHP] Re: *Cannot connect to db

2002-12-18 Thread bbonkosk
Can you get into the mysql DB via command line? If so, try to get in there and make sure this user has permissions in the mysql.users table to connect via localhost. Also verufy password they are using. Try to have this user connect via the commandline in MYSQL, which if he is unable to there

[PHP] Re: *Cannot connect to db

2002-12-18 Thread Alexey Lysenkov
Warning: MySQL Connection Failed: Access denied for user: 'tmc@localhost' (Using password: YES) in e:\~~~\~~~\apache\website\~~~\testdb.php on line 8 The guy at the support says, that everybody else can connect no problems, sent me the code, which I copy-pasted and I still have this error. :((

Re: [PHP] *Cannot connect to db

2002-12-18 Thread bbonkosk
the '@' sign suppresses the error/warning messages. Perhaps you would want to leave that off in a development environment. It may lead to some good keys to finding the solution.. -Brad > mySQL; php running in safe mode; compared to the other code on the same > server. here is mine - I don't ge

[PHP] Re: *Cannot connect to db

2002-12-18 Thread Bastian Vogt
Hi, leave out the "@", and give us the error message. "@" suppresses error messages of any function. HTH, Bastian > mySQL; php running in safe mode; compared to the other code on the same > server. here is mine - I don't get any connection. What could be wrong? > Also, what does this @ sign mea

[PHP] Re: list and (array) get_val

2002-12-18 Thread Bastian Vogt
As you can read here: http://www.php.net/manual/en/function.list.php Note: list() only works on numerical arrays and assumes the numerical indices start at 0. "b" is not numerical, I think ;-) HTH, Bastian > a.php > > list($a) = $_GET; > print $a; > ?> > > and I typed a.php?b=c > > I expected c

Re: [PHP] URL parsing

2002-12-18 Thread 1LT John W. Holmes
> http://www.php.net/manual/en/function.parse-url.php If you're going to help, at least read the question. The poster already said they tried that and it's not even a solution, anyhow. The "username" it refers to in parse_url() is for URLs in the format of http://username:[EMAIL PROTECTED]. > >ht

[PHP] *Cannot connect to db

2002-12-18 Thread Alexey Lysenkov
mySQL; php running in safe mode; compared to the other code on the same server. here is mine - I don't get any connection. What could be wrong? Also, what does this @ sign mean before the mysql_connect? function dbopen(){ $tablename = "balzerdez02"; $dbname = "marketingcompany"; $hostname=

Re: [PHP] Empty textfield

2002-12-18 Thread Wico de Leeuw
At 15:33 18-12-02 +, shaun wrote: Hi, what is the best way to check if a textfield is empty, and is it the same for file fields? if (empty(trim(@$textfield))) { } thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.ph

Re: [PHP] URL parsing

2002-12-18 Thread Tim Ward
you could use a combination of the string functions (strstr(), substr(), strpos()) or you could work out something with regular expressions. Tim Ward http://www.chessish.com mailto:[EMAIL PROTECTED] - Original Message - From: Mako Shark <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent:

Re: [PHP] session variables

2002-12-18 Thread Antti
Justin French wrote: 1. the opposite of session_register('varname') is session_unregister('varname') NOT unset($varname) 2. Are you on PHP >= 4.1 ?? If so, move away from things like: session_start(); $variable = 'foo'; session_register('variable'); session_unregister('variable') ?> and int

[PHP] Empty textfield

2002-12-18 Thread shaun
Hi, what is the best way to check if a textfield is empty, and is it the same for file fields? thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] list and (array) get_val

2002-12-18 Thread Ns_Andy
a.php and I typed a.php?b=c I expected c would be printed, What the problems have I made? -- Regards, Ns_Andy, [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] $_SERVER["PATH_TRANSLATED"] returns empty string

2002-12-18 Thread Robert Nedbal
Hi, thanks for your reply. But changing source code in my setup is not a long term option. My problem is that $_SERVER["PATH_TRANSLATED"] gives me empty string. Does anybody know how to fix my PHP installation, so $_SERVER["PATH_TRANSLATED"] will give me correct file path? Best regards, Robert O

Re: [PHP] session variables

2002-12-18 Thread Antti
Justin French wrote: 1. the opposite of session_register('varname') is session_unregister('varname') NOT unset($varname) 2. Are you on PHP >= 4.1 ?? If so, move away from things like: session_start(); $variable = 'foo'; session_register('variable'); session_unregister('variable') ?> and int

Re: [PHP] URL parsing

2002-12-18 Thread Wico de Leeuw
http://www.php.net/manual/en/function.parse-url.php At 06:39 18-12-02 -0800, Mako Shark wrote: I've got a URL like this: http://www.naturalist.com/~fungae/index.php which is stored in $http_referer (as parse_url from $HTTP_REFERER). I'm trying to extract the username (~fungae). I've read the do

[PHP] URL parsing

2002-12-18 Thread Mako Shark
I've got a URL like this: http://www.naturalist.com/~fungae/index.php which is stored in $http_referer (as parse_url from $HTTP_REFERER). I'm trying to extract the username (~fungae). I've read the docs on parse_url(), and have tried to get $http_referer[user], but it comes up with zilch. I've a

RE: [PHP] Media library

2002-12-18 Thread Cal Evans
since you've not indicated that you've looked around and not found one, I suggest starting your search at www.freshmeat.net. =C= * * Cal Evans * The Virtual CIO * http://www.calevans.com * -Original Message- From: GWAD Mailinglist [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 18,

[PHP] Media library

2002-12-18 Thread GWAD Mailinglist
Hi! I'm looking a (good) PHP source for media library reg (eg.). - user authentication - user groups - store pictures / video / audio (database or file) - easy upload - php / mysql / apache and maybe - simple picture edit, video / audio edit?? Anyone to know something good source? -- PHP

RE: [PHP] How to upload a file

2002-12-18 Thread Rich Gray
As others have suggested does it make any difference if you up the script timeout limit with set_time_limit() or via the max_execution_time in php.ini? -Original Message- From: Somesh [mailto:[EMAIL PROTECTED]] Sent: 18 December 2002 13:37 To: Rich Gray Cc: [EMAIL PROTECTED] Subject: RE: [

[PHP] Upload status

2002-12-18 Thread Monil Chheda
Hello, I am using an upload script provided in one of the PhPScripts sites. Its working perfectly fine. The form is used to upload huge files ( 10 - 15 MB ). The upload takes place without any hassels. But till the time the file is uploaded , there is no indication for how much of file has been

Re: [PHP] preventing sql injections

2002-12-18 Thread 1LT John W. Holmes
> >addslashes should be enough and put qoutes arround your strings in the sql > > Meaning that a query like this one is safe, as long as I first have > $e_namn = addslashes($e_namn);? > > $query = "INSERT INTO addr (last_name, first_name, email) > VALUES(\"$e_namn\",\"$f_namn\",\"$email\")"; Yea

Re: [PHP] easy spliting

2002-12-18 Thread 1LT John W. Holmes
Are there specific patterns associated with each range of numbers? If not, then just use a couple substr() calls to get what you want. That'll be the fastest method. Or you could use a regular expression like /(.{9})(.{26})(.{17))/ possibly. ---John Holmes... - Original Message - From: "A

Re: [PHP] preventing sql injections

2002-12-18 Thread Anders Thoresson
addslashes should be enough and put qoutes arround your strings in the sql Meaning that a query like this one is safe, as long as I first have $e_namn = addslashes($e_namn);? $query = "INSERT INTO addr (last_name, first_name, email) VALUES(\"$e_namn\",\"$f_namn\",\"$email\")"; -- PHP Gene

  1   2   >