[PHP] who is connected?

2002-12-18 Thread fragmonster
Hello, Can you share your method to display the users who are connected to your web site? I did it, but I don't know if it's a good way. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Creating Extensions DLL with Delphi

2002-12-18 Thread Andreas Steibl
Don't know if this is the right place to ask this. I need to write a little extensions DLL in Delphi for PHP where can i find inforamtion for this ? thanxs in advance snoopy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] who is connected?

2002-12-18 Thread Jason Reid
How I do it for my sites is borrowing from the concept that phpBB uses... every time a user accesses a page within the site, update the DB with the username and a timestamp. then have the script that figures out who is on delete any records older then a specified time, and return the users that are

Re: [PHP] who is connected?

2002-12-18 Thread fragmonster
Ok, it's exactly the same way I'm using. I was wondering if it was another way to do the trick. Jason Reid wrote: How I do it for my sites is borrowing from the concept that phpBB uses... every time a user accesses a page within the site, update the DB with the username and a timestamp. then have

[PHP] flush output error

2002-12-18 Thread electroteque
hi guys i have a little problem with flushing the buffer output, in this loop it should be downloading a file and changing the progress of a progress bar, although it waits until the shell_exec of all the files are done and then flushes the buffer which will start @ 95% , so it wont start until she

[PHP] Compiling php-4.0.6 with MySQL support

2002-12-18 Thread Igor Shulgin
Hi! I cannot compile php-4.0.6 with MySQL support as static module for apache_1.3.20 on FreeBSD 4.4. Early I successfully build and install /usr/ports/databases/mysql323-server and /usr/ports/databases/mysql323-client with standard configuration. I have done following without problems: cd /

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

2002-12-18 Thread electroteque
i tend not to use the internel mysql lib, install mysql into a prefix dir ie /usr/local/etc/mysql then do --with-mysql=/usr/local/etc/mysql u only had --with-mysql= which will use the internal lib. "Igor Shulgin" <[EMAIL PROTECTED]> wrote in message 227601c2a67a$0e5fb750$e964a8c0@ptt">news:2276

Re: [PHP] flush output error

2002-12-18 Thread Wico de Leeuw
At 20:41 18-12-02 +1100, you wrote: hi guys i have a little problem with flushing the buffer output, in this loop it should be downloading a file and changing the progress of a progress bar, although it waits until the shell_exec of all the files are done and then flushes the buffer which will sta

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

2002-12-18 Thread Wico de Leeuw
At 14:44 18-12-02 +0500, Igor Shulgin wrote: Hi! I cannot compile php-4.0.6 with MySQL support as static module for apache_1.3.20 on FreeBSD 4.4. Early I successfully build and install /usr/ports/databases/mysql323-server and /usr/ports/databases/mysql323-client with standard configuration

[PHP] Re: mysql_num_rows

2002-12-18 Thread liljim
Hi John, "John Taylor-Johnston" wrote in message: > I use $mycounter, not saying it is pretty. But if you have a whole bunch of stuff deleted, your last id might be worth a lot more than the actual number of rows. > > $myconnection = mysql_connect($server,$user,$pass); > mysql_select_db($db,$myco

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

2002-12-18 Thread Igor Shulgin
Re: [PHP] Compiling php-4.0.6 with MySQL supportThank you for your answer, Wico! I had deleted '=' after '--with-mysql' but it didn't help me. All these messages about "undefined reference to `mysql..." was repeated. --- With best wishes,

Re: [PHP] flush output error

2002-12-18 Thread electroteque
no this has been working before, it stopped working ever since i upgraded to 4.3 , whats there to multitask ? i'm simply executing curl and then executing the funtion after not at the same time but should both be executing within the same loop , it was working before especially for image uploads bu

[PHP] Undefined variable error message

2002-12-18 Thread Michael Egan
All of the PHP scripts hosted on a Linux server I'm working with have suddenly begun producing an error message: undefined variable 'variablename' This occurs wherever a variable name is referred to. I'm concerned about this for two reasons: 1 Will I have to go through each scri

Re: [PHP] Undefined variable error message

2002-12-18 Thread Wico de Leeuw
http://www.php.net/manual/en/function.error-reporting.php At 10:31 18-12-02 +, Michael Egan wrote: All of the PHP scripts hosted on a Linux server I'm working with have suddenly begun producing an error message: undefined variable 'variablename' This occurs wherever a variable name

RE: [PHP] Undefined variable error message

2002-12-18 Thread Jon Haworth
Hi Michael, > All of the PHP scripts hosted on a Linux server > I'm working with have suddenly begun producing > an error message: > > undefined variable 'variablename' Looks like someone's tweaked the error reporting level so it's on E_ALL, which can be a somewhat alarmist setting :-) R

Re: [PHP] Undefined variable error message

2002-12-18 Thread Chris Hewitt
Michael Egan wrote: All of the PHP scripts hosted on a Linux server I'm working with have suddenly begun producing an error message: undefined variable 'variablename' Has the code been working on a different server with an earlier version of PHP (or this server upgraded)? It sounds as though

Re: [PHP] Undefined variable error message

2002-12-18 Thread Chris Hewitt
Hmm, yes. Why did I not think of error reporting at E_ALL? Chris Hewitt wrote: Michael Egan wrote: All of the PHP scripts hosted on a Linux server I'm working with have suddenly begun producing an error message: undefined variable 'variablename' Has the code been working on a different

[PHP] Javascript var to PHP

2002-12-18 Thread Cesar Aracena
Hi all, I want one of my links to open a brand-new pre defined window using a javascript (defined in the header) with javascript: launchinfopage(); but I don't know how to pass a variable so the opened PHP file knows which info to get from MySQL... if I use launchinfopage(varname=varvalue) how can

RE: [PHP] Javascript var to PHP

2002-12-18 Thread Jon Haworth
Hi Cesar, > I want one of my links to open a brand-new > pre defined window using a javascript > but I don't know how to pass a variable so > the opened PHP file knows which info to get > from MySQL... In your launchinfopage() function, presumably you're specifying the url of the page ("foo.

RE: [PHP] Javascript var to PHP

2002-12-18 Thread Cesar Aracena
Jon, thanx for the fast response, but the problem is that the link is made dynamically from a DB and the varvalue changes on every link... if it helps, I make this link list with a FOR loop in PHP and the varvalues I want to pass are the IDs of a table elements. Cesar L. Aracena [EMAIL PROTECTED]

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

2002-12-18 Thread Igor Shulgin
Should I use --with-mysl=/usr/ports/databases/mysql323-server/work/mysql-3.23.42 (where sources are placed) or --with-mysql=/usr/local (I see in Makefile in above directory that 'prefix = /usr/local') ? --- With best wishes,

RE: [PHP] Undefined variable error message[Scanned]

2002-12-18 Thread Michael Egan
Jon, Many thanks - the actual problem is now solved. As to how it occurred I think must be attributable to me at some stage in terms of fiddling around with the php.ini file. Perhaps I've had too many nights like last night and the brain cells are depleting past a critical point! Thanks to ev

RE: [PHP] Javascript var to PHP

2002-12-18 Thread Jon Haworth
Hi Cesar, > Jon, thanx for the fast response, but the problem is > that the link is made dynamically from a DB and the varvalue > changes on every link... if it helps, I make this link > list with a FOR loop in PHP and the varvalues > I want to pass are the IDs of a table elements. You probabl

[PHP] How to upload a file

2002-12-18 Thread Somesh
Hi, I am using the following code to upload file; X--- Send the file: X--- This works fine for small files of like some Kbs but fails to upload larger files near to 1MB. Can any one help me out from this problem my file processing c

RE: [PHP] How to upload a file

2002-12-18 Thread Jon Haworth
Hi Somesh, > This works fine for small files of like some > Kbs but fails to upload larger files near to 1MB. What's your upload_max_size set to in php.ini? Cheers Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to upload a file

2002-12-18 Thread Wico de Leeuw
Look for the limit in php.ini http://www.php.net/manual/en/configuration.directives.php#ini.upload-max-filesize Gr, Wico At 16:47 18-12-02 +0530, Somesh wrote: Hi, I am using the following code to upload file; X--- Send the file: X---

RE: [PHP] How to upload a file

2002-12-18 Thread Somesh
Hi Jon, It is as follows ; Maximum allowed size for uploaded files. upload_max_filesize = 8M On Wed, 18 Dec 2002, Jon Haworth wrote: > Hi Somesh, > > > This works fine for small files of like some > > Kbs but fails to upload larger files near to 1MB. > > What's your up

RE: [PHP] Javascript var to PHP

2002-12-18 Thread Cesar Aracena
Actually Jon, the IDs are not exactly expressed that way, but your example gave me a nice idea... To tell you the truth (and now that I have a clearer idea of what to do), the id I need to pass along is from a random quote (or FAQ) but I'll fetch it before script is being declared (even before the

Re: [PHP] How to upload a file

2002-12-18 Thread Bogdan Stancescu
Are you sure it's PHP the one that fails? i.e. do you get the "some error has occured while uploading the file $userfile_name" message or some other message? I had this kind of problem when trying to store incoming files in a database, and the link to the database failed, not PHP. Also, if you

RE: [PHP] How to upload a file

2002-12-18 Thread Jon Haworth
Hi Somesh, > > > This works fine for small files of like some > > > Kbs but fails to upload larger files near to 1MB. > > > > What's your upload_max_size set to in php.ini? > > It is as follows > ; Maximum allowed size for uploaded files. > upload_max_filesize = 8M I don't have a clue then

[PHP] Random Number Genertation

2002-12-18 Thread shaun
Hi, Say i have a set of non sequential numbers for example: 1 3 8 12 13 16 19 21. How can i get php to take a random number from this set? Thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Browser Language

2002-12-18 Thread Nenad Djordjevic
Hello Jeff, Try: //--- function DetectBrowserLanguage() { DEF_LANG = 'en'; global $HTTP_ACCEPT_LANGUAGE; $arr_lang = preg_split('/(\s*,\s*)/', $HTTP_ACCEPT_LANGUAGE); if (is_array($arr_lang)) { $lang_first = strtolower((trim(strval($arr_lang[0];

Re: [PHP] Random Number Genertation

2002-12-18 Thread Wico de Leeuw
http://www.php.net/manual/en/function.array-rand.php At 11:35 18-12-02 +, shaun wrote: Hi, Say i have a set of non sequential numbers for example: 1 3 8 12 13 16 19 21. How can i get php to take a random number from this set? Thanks for your help -- PHP General Mailing List (http://www.

Re: [PHP] Random Number Genertation

2002-12-18 Thread Somesh
Hi shaun, Store all those numbers in an array and use the function array_rand. On Wed, 18 Dec 2002, shaun wrote: > Hi, > > Say i have a set of non sequential numbers for example: 1 3 8 12 13 16 19 > 21. > > How can i get php to take a random number from this set? > > Thanks f

[PHP] Security issues with file uploads

2002-12-18 Thread Steve Fitzgerald
Hi, I was wondering if anyone would care to comment on the following. I am currently building a business directory using PHPand MySQL for a client who wants to be able to maintain the site themselves. The site will be hosted on Apache (of course) and I have built an admin section where they can ad

Re: [PHP] Help needed on CMS Project

2002-12-18 Thread 1LT John W. Holmes
Don't post in HTML and are you paying? ---John Holmes... - Original Message - From: "Mike Bowers" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, December 17, 2002 7:15 PM Subject: [PHP] Help needed on CMS Project > I'm working on a CMS project. It's based on PHP-Nule but I

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

2002-12-18 Thread Robert Nedbal
Hi, I'm having problems with my PHP installation. When I try to get real path to my script by using $_SERVER["PATH_TRANSLATED"], I receive empty string. $_SERVER["PATH_TRANSLATED"] empty string (why?) $_SERVER["PHP_SELF"] works as expected (ok) $_SERVER["DOCUMENT_ROOT"]works as expect

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

2002-12-18 Thread Wico de Leeuw
Maybe basename($_SERVER['SCRIPT_NAME']); At 14:10 18-12-02 +0100, Robert Nedbal wrote: Hi, I'm having problems with my PHP installation. When I try to get real path to my script by using $_SERVER["PATH_TRANSLATED"], I receive empty string. $_SERVER["PATH_TRANSLATED"] empty string (why?) $_SERVE

[PHP] Re: AW: [PHP-DEV] PHP Setup / Query

2002-12-18 Thread Wico de Leeuw
Hiya It's not allowed to put spaces into an url it has to be replaced by a + or %20 however apache will fix this IIS will however not You could make a header script that looks at $_SERVER['REQUEST_URI'] and fix the vars Gr, Wico At 14:19 18-12-02 +0100, you wrote: Thanks for the information.

RE: [PHP] How to upload a file

2002-12-18 Thread Rich Gray
What does print_r($_FILES) tell you? Is $_FILES['userfile']['error'] set to a value? Rich -Original Message- From: Somesh [mailto:[EMAIL PROTECTED]] Sent: 18 December 2002 11:18 To: [EMAIL PROTECTED] Subject: [PHP] How to upload a file Hi, I am using the following code to upload file;

RE: [PHP] How to upload a file

2002-12-18 Thread Somesh
It is not displaying any thing. It just gives the browser's error page "The page cannot be displayed" And the print_r($_FILES) prints an empty array; On Wed, 18 Dec 2002, Rich Gray wrote: > What does print_r($_FILES) tell you? Is $_FILES['userfile']['error'] set to > a value? > Rich

[PHP] test

2002-12-18 Thread Wico de Leeuw
test -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Mailling list error

2002-12-18 Thread Wico de Leeuw
Hiya everytime i send something to the php list i get an error from someone @fc.emc.com.ph stating: php-list,emc (The name was not found at the remote site. Check that the name has been entered correctly.) I can't send the whole email, i tried but then i was unsubscribed from the list :) Can

[PHP] Re: Put text matching regex into array?

2002-12-18 Thread achillex
[EMAIL PROTECTED] (Leif K-Brooks) wrote in news:3DFE7849.5050102 @buyer-brokerage.com: > Is there a way to put each part of a string matching a regex into an > array? Example: > $string = "-_-_--- --_-_-- random text here-_"; > $array = regextoarray($string,"[-_]{1,}"); > //Produces array of

[PHP] Re: can I mail unlimited in one click?

2002-12-18 Thread achillex
[EMAIL PROTECTED] (Jan GrafströM) wrote in [EMAIL PROTECTED]:">news:[EMAIL PROTECTED]: > Hi, > > I wonder if I can mail 300 customers in one click? > > part of script: > > while($listrow = mysql_fetch_array($listresult)) { > > $recipient = $listrow[epost]; > $subject = "$subj"; >

Re: [PHP] Re: Put text matching regex into array?

2002-12-18 Thread Wico de Leeuw
At 13:39 18-12-02 +, achillex wrote: [EMAIL PROTECTED] (Leif K-Brooks) wrote in news:3DFE7849.5050102 @buyer-brokerage.com: > Is there a way to put each part of a string matching a regex into an > array? Example: > $string = "-_-_--- --_-_-- random text here-_"; > $array = regextoarray($

[PHP] preventing sql injections

2002-12-18 Thread Anders Thoresson
Would this function do the trick? // validate.php - functions that validates form input function validate_string($unsafe_string) { // create array containing bad words $badwords = array(";","--","select","drop","insert","xp_","delete"); $goodwords = array(":","---","choose","leave","add",

Re: [PHP] preventing sql injections

2002-12-18 Thread 1LT John W. Holmes
Why would you do all this? Just use addslashes() and let them send all the crap they want. All it will do is cause your query to return zero results, which you should be handling all ready. If you're ever including a variable in an SQL query that's not enclosed in quotes, then make darn sure you've

[PHP] easy spliting

2002-12-18 Thread Alex Ciurea
Hi, I know it is easy but I can't figure how I should do I want to split a string from position 1 to 9, from 10 to 36, from 37 to 54 and so on... how can I do this? is there a function who does this? Regards, Alx

Re: [PHP] preventing sql injections

2002-12-18 Thread Wico de Leeuw
addslashes should be enough and put qoutes arround your strings in the sql At 14:58 18-12-02 +0100, Anders Thoresson wrote: Would this function do the trick? // validate.php - functions that validates form input function validate_string($unsafe_string) { // create array containing b

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

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 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

[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] 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] 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] 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] 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] 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

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] $_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

[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

[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

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 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] 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

[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] 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] 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

[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

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 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] 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

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] $_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?

[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] 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

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
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] 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 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] 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] $_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: 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] 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 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

[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: *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 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] $_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

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] 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

[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] 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] *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] *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] 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 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] *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] *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

  1   2   >