Re: [PHP] Planning a project with PHP.

2003-09-05 Thread Leonie
Have you checked out the code libraries at PEAR? It is all OO and includes templates for separating code from presentation. I think its pretty cool. http://www.pear.php.net/ You might also like to check this out with the folks at another forum on news.php.net: php.pear.general I think y

[PHP] [Newbie Guide] For the benefit of new members

2003-09-05 Thread tech
= This message is for the benefit of new subscribers and those new to PHP. Those who do not want to be bothered just filter out the [Newbie Guide] mails. Please feel free to add more points and send to the list. ===

[PHP] client certs (how to)

2003-09-05 Thread Scott
Hello, I am trying to post to a site that requires me to use a client cert. I can get it to work for both windows and unix, but only on the command line. I have tried without success to use the PHP built-in methods for doing this. Here is the command line that works: curl -d "" -k -E myCert.pem

Re: [PHP] Database updation

2003-09-05 Thread Raditha Dissanayake
Hi, What do you mean running from the cd? are you using something like knoppix? The log directory for both apache and mysql definitely needs to be writable not to mention the data dir for mysql. Have you tried running your query from the mysql command line client? Uma Shankari T. wrote: Hell

[PHP] Database updation

2003-09-05 Thread Uma Shankari T.
Hello, I am running mysql from my hard disk..i am trying to write some contents while during running in to the database the values are not getting updated..it is not giving any error message also..i am running apache and php from the CD itself..is it necessary that the php and apache should

Re: [PHP] Re: Opening Zip Files in Linux

2003-09-05 Thread Raditha Dissanayake
make sure it's (unzip) patched there was a recent security issue with unzip. You can get the latest RPM from redhat. Otherwise someone might upload a zip file and get control of your server :-) Richard D. Marriner II wrote: Umm, I believe somebody already answered... unzip is what you need...

[PHP] simple Apache question I'm sure

2003-09-05 Thread Paul O'Neil
This is more Apache related but I have a php/apache config'd box at home I want to test stuff out on before uploading to a public server. Every directory except wwwroot dir I must place a '/' after the dir name to get a listing such as http:://192.168.1.1/mydirectory will not load the index.php fil

Re: [PHP] Planning a project with PHP.

2003-09-05 Thread Raditha Dissanayake
Hi, Just a personal opinion only: If you are a die hard OO fan. you are better of with J2EE. If you were brought up on C, think linux is the best thing that ever happened to computers, welcome to the world of PHP. best regards raditha [EMAIL PROTECTED] wrote: I am building a project where I pl

RE: [PHP] Too Advanced? Re: Cookies & Hidden Image

2003-09-05 Thread Mark Charette
> From: Nicole [mailto:[EMAIL PROTECTED] > > Thanks. The cookie sets fine using the redirect. The problem is accessing > the cookie when the script is called via the image tag. If the script is > called directly, the cookie is accessible. Images have their own connection (which is why you can see

Re: [PHP] Too Advanced? Re: Cookies & Hidden Image

2003-09-05 Thread John W. Holmes
Nicole wrote: Not sure what else to do other than try something different. Using Cookie seems to be the only way to store the value on the client side for later retrieval. How about using a session and passing the session ID in the URL for the cookie? -- ---John Holmes... Amazon Wishlist: www.am

Re: [PHP] Too Advanced? Re: Cookies & Hidden Image

2003-09-05 Thread Nicole
Thanks. The cookie sets fine using the redirect. The problem is accessing the cookie when the script is called via the image tag. If the script is called directly, the cookie is accessible. http://trackerurl/blahblah/script.php--- called directly can see the Cookie http://trackerurl/blahblah/

Re: [PHP] Notices - Variable not defined

2003-09-05 Thread Leonie
Wow! That's service! Thank you. Leonie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Planning a project with PHP.

2003-09-05 Thread [EMAIL PROTECTED]
I am building a project where I plan to build a site with PHP. Right now I have organized it with the following: Page objects ­ format and layout of the pages Functional Objects ­ Database querys Data objects ­ objects that hold data specific to the object type. Scripts ­ scripts called to instan

Re: [PHP] Notices - Variable not defined

2003-09-05 Thread John W. Holmes
Leonie wrote: I have this code: if (!$path) { $path = getPath(); } Sometimes $path is set (there are forms on the page that can change it). When the page is first displayed: Notice: Undefined variable: path in e:\program/ etc... It then gives a reference to the line: if (!$path) { Is there

[PHP] Notices - Variable not defined

2003-09-05 Thread Leonie
I have this code: if (!$path) { $path = getPath(); } Sometimes $path is set (there are forms on the page that can change it). When the page is first displayed: Notice: Undefined variable: path in e:\program/ etc... It then gives a reference to the line: if (!$path) { Is there a way to ge

Re: [PHP] Re: Opening Zip Files in Linux

2003-09-05 Thread Richard D. Marriner II
Umm, I believe somebody already answered... unzip is what you need... - Original Message - From: "John Ryan" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, September 05, 2003 4:00 PM Subject: [PHP] Re: Opening Zip Files in Linux > ive spent the last 2 hours looking for a sol

[PHP] Re: Opening Zip Files in Linux

2003-09-05 Thread John Ryan
ive spent the last 2 hours looking for a solution. i was going to recompile php with zip support for one file. THANK YOU! "John Herren" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > John Ryan wrote: > > This is kinda off topic, well.. depending on the answer. > > > > I downloaded a

[PHP] Maximum amount of variables in a session?

2003-09-05 Thread Richard D. Marriner II
Hey everyone... I am creating a project for a web hosting control panel and just wondering if there is a limit to the amount of variables I can store in a session? If I have too many variables will it create an uneccassary strain on my server? What is an average amount of variables that a sessio

Re: [PHP] Display after a certain date

2003-09-05 Thread John Taylor-Johnston
Jay, I should have though of that. Thanks. "Jay Blanchard" <[EMAIL PROTECTED]> wrote: >$display_start = "2003-10-01"; >$display_end = "2003-10-31"; >if((date("Y-m-d") >= $display_start) && (date("Y-m-d") <= >$display_end)){ >print($stuff); >} >?> Cesar: Is your server is set up correctly?

Re: [PHP] dl() problem

2003-09-05 Thread Curt Zirzow
* Thus wrote Alex ([EMAIL PROTECTED]): > I saw...:( > > And what should I do ? I'm assuming that this is on some hosting site. You can contact them to see if they are willing to work with you on being able to load a custom module. As the hosting company, they most likely wont have you just enab

Re: [PHP] [SOLVED] Re: [PHP] Parse error?

2003-09-05 Thread Mike Migurski
>Ok, the reason I was getting this error seems to be related to Safari on >OS X. When I copy code segments in Safari and paste them in BBEdit they >generally looked ok, although there were extra spaces inserted in some >places. I then turned on show invisible characters and it made it even >more cl

Re: [PHP] global array, can't assign values from variables

2003-09-05 Thread Curt Zirzow
* Thus wrote Chris Edwards ([EMAIL PROTECTED]): > Hi > > I'm just going to give the code and output. It should be self explanatory. > The array, $criteria, is having the issue. I don't know what it's doing. I > cannot seem to assign the value from the $data variable to the > $criteria[index] va

Re: [PHP] global array, can't assign values from variables SOLVED

2003-09-05 Thread Chris Edwards
Hi $data is not empty. It's obvious from the : > > OUTPUT: > > 9/6/2003 Anyways, it is overwriting itself because of begin and start tags. I didn't realize that. Thanks. -- Chris Edwards Web Application Developer Outer Banks Internet, Inc. 252-441-6698 [EMAIL PROTECTED] http://www.OuterBanksIn

Re: [PHP] dl() problem

2003-09-05 Thread Curt Zirzow
* Thus wrote Alex ([EMAIL PROTECTED]): > Hello.. > > Is there a way of setting the extension_dir by not modifying php.ini ? > > i've tried with > > ini_set("extension_dir","/home/alexcos/www/phps"); > > then , i've tried setting the extension_dir in a .htaccess file.. > still , the same result

Re: [PHP] global array, can't assign values from variables

2003-09-05 Thread John W. Holmes
Chris Edwards wrote: I'm just going to give the code and output. It should be self explanatory. The array, $criteria, is having the issue. I don't know what it's doing. I cannot seem to assign the value from the $data variable to the $criteria[index] value. You will see some attempts to debug

[PHP] global array, can't assign values from variables

2003-09-05 Thread Chris Edwards
Hi I'm just going to give the code and output. It should be self explanatory. The array, $criteria, is having the issue. I don't know what it's doing. I cannot seem to assign the value from the $data variable to the $criteria[index] value. You will see some attempts to debug the situation whic

RE: [PHP] RH9.0: Upgrade to 4.3, mysql functions not working

2003-09-05 Thread Wouter van Vliet
No I'm not using a shorthand or other code to define the function .. I just typed select instead of connect. ;) And yep, I can both stat and vim ;) those libs. -> -Oorspronkelijk bericht- -> Van: Jay Blanchard [mailto:[EMAIL PROTECTED] -> Verzonden: vrijdag 5 september 2003 19:21 ->

[PHP] dl() problem

2003-09-05 Thread Alex
Hello.. Is there a way of setting the extension_dir by not modifying php.ini ? i've tried with ini_set("extension_dir","/home/alexcos/www/phps"); dl("first_module.so"); Warning: Unable to load dynamic library '/usr/lib/php4/first_module.so' then , i've tried setting the extension_dir in a .

[PHP] Re: Opening Zip Files in Linux

2003-09-05 Thread John Herren
John Ryan wrote: This is kinda off topic, well.. depending on the answer. I downloaded a ZIP file to my server, and want to open it. My version of PHP wasnt compiled with the Zip uncompressing functions, otherwise Id do it with php, so I was wondering if there was a linux-x86 binary that just ope

[PHP] Opening Zip Files in Linux

2003-09-05 Thread John Ryan
This is kinda off topic, well.. depending on the answer. I downloaded a ZIP file to my server, and want to open it. My version of PHP wasnt compiled with the Zip uncompressing functions, otherwise Id do it with php, so I was wondering if there was a linux-x86 binary that just opens zip files!

Re: [PHP] Very interesting.....

2003-09-05 Thread Scott Fletcher
Will do that once I get a newer PHP version. No time for it right now. :-) The workaround to rand() I did was to use it twice and add up the result. For ex. --snip-- $randomNumberLeft = rand(0,9); $randomNumberRight = rand(0,9); $randomNumber = $randomNumberLeft.$randomNumberRight; ech

Re: [PHP] RH9.0: Upgrade to 4.3, mysql functions not working

2003-09-05 Thread Curt Zirzow
* Thus wrote Wouter van Vliet ([EMAIL PROTECTED]): > Hi Folks, > > I've got a (in my eyes) very strange behaviour from my RedHat Linux 9.0 box. > I needed to upgrade my PHP version to 4.3, since that's the version on the > production server and well .. test and production should match pretty good

RE: [PHP] Very interesting.....

2003-09-05 Thread Jay Blanchard
[snip] It is not there, so I added it and restarted Apache. Still got the same result. How is PHP is built into Apache was done by downloading the tar.gz file from php.net and compile it. Then compile Apache, had it take in PHP. So, when it was done, there is never a php.ini there. So, I creat

[PHP] [SOLVED] Re: [PHP] Parse error?

2003-09-05 Thread Mike Zornek
On 9/5/03 1:50 PM, "Mike Zornek" <[EMAIL PROTECTED]> wrote: > I'm trying to give PEAR a try and am currently following it's tutorial at: > http://pear.php.net/manual/en/package.database.db.intro-fetch.php > > Now when I put this code into a PHP file I get a parse error on line 49 > which has: >

Re: [PHP] Using rand() for 10 digit numbers????

2003-09-05 Thread Curt Zirzow
* Thus wrote Scott Fletcher ([EMAIL PROTECTED]): > How interesting. Yours work while mine doesn't. All I did was .. > > --snip-- > $randomNumber = rand(0,99); > echo $randomNumber; > --snip-- > > What PHP version do you use? I only have version 4.3.1 on the machine. I believe its the

Re: [PHP] Remove vars from memory?

2003-09-05 Thread Curt Zirzow
* Thus wrote murugesan ([EMAIL PROTECTED]): > You must use unset() How you keep doing this, I have no clue. but your subject and content has nothing to do with the thread or quoted content. Please reply and quote the proper messages with the proper subject so it doesn't confuse people. > > -Mur

Re: [PHP] using fwrite to create PHP files

2003-09-05 Thread Chris Sherwood
this is a sample of what I do when I need to write a php file $stringtowrite = " > Vince LaMonica wrote: > > > I wish to use fwrite() to create a small PHP file. So far, when I attempt > > to do this, php parses the contents of the file that fwrite needs to > > create. Eg, I have this: > > > > $ne

Re: [PHP] mysql Pattern Matching

2003-09-05 Thread Curt Zirzow
* Thus wrote CPT John W. Holmes ([EMAIL PROTECTED]): > From: "Ralph Guzman" <[EMAIL PROTECTED]> > > > > Is there an advantage or difference in running FIND_IN_SET() instead of > > LIKE? > > Actually no, I guess there isn't. Neither one will use an index. There will be a slight diffence in the r

Re: [PHP] using fwrite to create PHP files

2003-09-05 Thread John W. Holmes
Vince LaMonica wrote: I wish to use fwrite() to create a small PHP file. So far, when I attempt to do this, php parses the contents of the file that fwrite needs to create. Eg, I have this: $new_id = mysql_insert_id(); // create brand new file $new_file = fopen("/var/www/html/$sitename/$submitted_

Re: [PHP] Very interesting.....

2003-09-05 Thread Scott Fletcher
It is not there, so I added it and restarted Apache. Still got the same result. How is PHP is built into Apache was done by downloading the tar.gz file from php.net and compile it. Then compile Apache, had it take in PHP. So, when it was done, there is never a php.ini there. So, I create one a

Re: [PHP] previous and next link

2003-09-05 Thread Chris Shiflett
--- phpu <[EMAIL PROTECTED]> wrote: > I've tried but i don't know how to put it in my script. Here is your SQL statement (between the quotes): > $sql = "SELECT * FROM categorie"; Add a LIMIT clause to that statement. The syntax is described at the URL I sent you. Hope that helps. Chris =

Re: [PHP] Using rand() for 10 digit numbers????

2003-09-05 Thread Scott Fletcher
Continue(ing) of this replying go into the title, 'Very Interesting'. "Scott Fletcher" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Very Interesting. I tried your code on my machine and I got this... > > --snip-- > 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > 0 0 0 0 0 0

RE: [PHP] Very interesting.....

2003-09-05 Thread Jay Blanchard
[snip] There isn't one in php.ini. Could this be the problem? [/snip] Look for these lines in your php.ini ; The number of significant digits displayed in floating point numbers. precision= 14 What is precision equal to? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vi

Re: [PHP] Very interesting.....

2003-09-05 Thread Scott Fletcher
There isn't one in php.ini. Could this be the problem? "Jay Blanchard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] [snip] I tried your code on this machine and I got this... 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0. [/snip] What is your numeric precesion set to in t

RE: [PHP] previous and next link

2003-09-05 Thread Jay Blanchard
[snip] I've tried but i don't know how to put it in my script. And also i don't know how to display it in page. Here is my script and I hope you could help me with this one. thanks [/snip] Google is SO cool!!! :) http://www.onlamp.com/pub/a/php/2000/11/02/next_previous.html Have a pleasant and p

Re: [PHP] Using rand() for 10 digit numbers????

2003-09-05 Thread Scott Fletcher
Very Interesting. I tried your code on my machine and I got this... --snip-- 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

RE: [PHP] Very interesting.....

2003-09-05 Thread Jay Blanchard
[snip] I tried your code on this machine and I got this... 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0. [/snip] What is your numeric precesion set to in the php.ini? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] previous and next link

2003-09-05 Thread phpu
I've tried but i don't know how to put it in my script. And also i don't know how to display it in page. Here is my script and I hope you could help me with this one. thanks $sql = "SELECT * FROM categorie" ; $rezultat = mysql_query($sql); $num_rows = mysql_num_rows($rezultat); while ($row=my

[PHP] Very interesting.....

2003-09-05 Thread Scott Fletcher
I tried your code on this machine and I got this... --snip-- 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

[PHP] Re: Java based HTML editor

2003-09-05 Thread Dan Phiffer
Assuming you mean that the user isn't typing HTML code (like an online IDE), you might want to take a look at: http://www.bris.ac.uk/is/projects/cms/ttw/ttw.html#os Best, -Dan "Todd Cary" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I would like to have a HTML editor on a Web si

Re: [PHP] previous and next link

2003-09-05 Thread Chris Shiflett
--- phpu <[EMAIL PROTECTED]> wrote: > I have this code and I wanna display only 10 records on page. Use the LIMIT clause in your select statement: http://www.mysql.com/doc/en/SELECT.html Hope that helps. Chris = Become a better Web developer with the HTTP Developer's Handbook http://httpha

[PHP] previous and next link

2003-09-05 Thread phpu
I have this code and I wanna display only 10 records on page. For the rest of them I wanna use a "next" link(or a previous link). Please tell me hoe can I do that. $sql = "SELECT * FROM categorie" ; $rezultat = mysql_query($sql); $num_rows = mysql_num_rows($rezultat); while ($row=mysql_fetch_

[PHP] Parse error?

2003-09-05 Thread Mike Zornek
I'm trying to give PEAR a try and am currently following it's tutorial at: http://pear.php.net/manual/en/package.database.db.intro-fetch.php Now when I put this code into a PHP file I get a parse error on line 49 which has: while ($row = $result->fetchRow()) { I don't see what would cause the er

RE: [PHP] Re: PHP code generation

2003-09-05 Thread Chris Hubbard
No, not random character generation. Currently the application I'm working does the following: 1. from an array that defines HTML components (like a table row, input field, file upload, etc), and, 2. from an array that defines PHP components (like sql queries, file upload, assigning values to va

RE: [PHP] Using rand() for 10 digit numbers????

2003-09-05 Thread Jay Blanchard
[snip] What PHP version do you use? I only have version 4.3.1 on the machine. [/snip] Did this on a 4.2.1 and a 4.3...no probs. Have you tried the code I posted on your machine? 0){ $random=rand (0,9); echo number_format($random, 0, '', ',')."\n"; $i--; } ?> -- PHP General Mail

[PHP] Re: PHP code generation

2003-09-05 Thread Scott Fletcher
What are the example of code generation project? Are you referring to the generation of the random characters? "Chris Hubbard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm working on a code generation project. Is there anyone on the list who > has experience building these t

[PHP] PHP 4.3.3 compile error

2003-09-05 Thread Adam Williams
Hello, I'm trying to compile PHP 4.3.3. My configure is: ./configure --enable-track-vars --without-mysql --with-mail --with-apxs2=/usr/local/apache2/bin/apxs --with-informix and when doing make I get: [EMAIL PROTECTED] php-4.3.3]# make /bin/sh /root/php-4.3.3/libtool --silent --preserve-dup-d

Re: [PHP] Using rand() for 10 digit numbers????

2003-09-05 Thread Scott Fletcher
Could be "Robert Cummings" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > It probably wraps the standard C rand() function which only takes an > unsigned integer which is usually 16 bits. > > Cheers, > Rob. > > On Fri, 2003-09-05 at 12:34, Scott Fletcher wrote: > > Hi! > > > >

Re: [PHP] Using rand() for 10 digit numbers????

2003-09-05 Thread Scott Fletcher
How interesting. Yours work while mine doesn't. All I did was .. --snip-- $randomNumber = rand(0,99); echo $randomNumber; --snip-- What PHP version do you use? I only have version 4.3.1 on the machine. "Jay Blanchard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] [snip]

[PHP] Virus Detected by Network Associates, Inc. Webshield SMTP V4.5

2003-09-05 Thread postmaster
Network Associates WebShield SMTP V4.5 on fzkmail2 detected virus W32/[EMAIL PROTECTED] in attachment document_9446.pif from <[EMAIL PROTECTED]> and it was Cleaned and Quarantined. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] RH9.0: Upgrade to 4.3, mysql functions not working

2003-09-05 Thread Jay Blanchard
[snip] "undefined function mysql_select". [/snip] mysql_select by itself isn't a function. Are you using other code to define this function? Or are you just using shorthand here? [snip] === errors from error_log === PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php4/ldap.so'

Re: [PHP] mySQL overhead: Tweaking Scripts for Speed

2003-09-05 Thread CPT John W. Holmes
From: "Dan Anderson" <[EMAIL PROTECTED]> > > While multiple connections will just return the first connection, anyhow, > > why do the extra work, right? > > Yes that was what I was thinking. But I was also thinking that I would > need to global the $link and $db variables and run mysql_query() w

Re: [PHP] Remove vars from memory?

2003-09-05 Thread Tyler Lane
On Fri, 2003-09-05 at 09:38, [cz]Emo wrote: > Hi all. > Will PHP remove variables from memory when script will NOT use them in rest > of code? > for example: > > $tmp=true; > if ($tmp) // here is $tmp used last time, will it be removed from memory? > ... > ... // $tmp is NOT in the rest of code

[PHP] RH9.0: Upgrade to 4.3, mysql functions not working

2003-09-05 Thread Wouter van Vliet
Hi Folks, I've got a (in my eyes) very strange behaviour from my RedHat Linux 9.0 box. I needed to upgrade my PHP version to 4.3, since that's the version on the production server and well .. test and production should match pretty good ;). Since self compiling didn't work. All errors with apxs an

Re: [PHP] mysql Pattern Matching

2003-09-05 Thread CPT John W. Holmes
From: "Ralph Guzman" <[EMAIL PROTECTED]> > Is there an advantage or difference in running FIND_IN_SET() instead of > LIKE? Actually no, I guess there isn't. Neither one will use an index. mysql> desc test; +---+-+--+-+-+---+ | Field | Type| Null | Key

[PHP] PHP code generation

2003-09-05 Thread Chris Hubbard
I'm working on a code generation project. Is there anyone on the list who has experience building these things, and, would like to discuss architecture/patterns/structure of code generation off-list? Chris Hubbard [EMAIL PROTECTED] www.wildcharacters.com 425 481 2020 php based web application d

Re: [PHP] mySQL overhead: Tweaking Scripts for Speed

2003-09-05 Thread Dan Anderson
> While multiple connections will just return the first connection, anyhow, > why do the extra work, right? Yes that was what I was thinking. But I was also thinking that I would need to global the $link and $db variables and run mysql_query() with them in options. So I'm wondering how much work

RE: [PHP] Using rand() for 10 digit numbers????

2003-09-05 Thread Jay Blanchard
[snip] I looked at the rand() at php.net which spoke about min and max random number. So, I use rand(0,99) to get a 10 digit random number but it only return an 1 digit random number that is displayed at '0'. So, I tried rand(0,) with 4 digit random number and got the random numbe

Re: [PHP] mySQL overhead: Tweaking Scripts for Speed

2003-09-05 Thread CPT John W. Holmes
From: "Dan Anderson" <[EMAIL PROTECTED]> > But how much overhead is there in: > > $link = mysql_connect($hostname,$username,$password) or die(""); > $db = mysql_select_db($database,$link) or die(""); > > Would it be beneficial to run a single one at the beginning of every > script? Currently I hav

RE: [PHP] Re: URGENT: how to make a global "server temporarily down" page?

2003-09-05 Thread Chris W. Parker
David Robley on Friday, September 05, 2003 5:59 AM said: > Well, no - I am sure you can do it with an entry in .htaccess in the > server root. Yeah, like a rewrite rule. RewriteRule ^*$ down.html Chris. -- PHP General Mailing List (http://www.php.net/) To unsub

Re: [PHP] Remove vars from memory?

2003-09-05 Thread murugesan
You must use unset() -Murugesan - Original Message - From: "Robert Cummings" <[EMAIL PROTECTED]> To: "Scott Fletcher" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, September 05, 2003 10:25 PM Subject: Re: [PHP] Using rand() for 10 digit numbers > It probably wraps the st

Re: [PHP] Using rand() for 10 digit numbers????

2003-09-05 Thread Robert Cummings
It probably wraps the standard C rand() function which only takes an unsigned integer which is usually 16 bits. Cheers, Rob. On Fri, 2003-09-05 at 12:34, Scott Fletcher wrote: > Hi! > > I looked at the rand() at php.net which spoke about min and max random > number. So, I use rand(0,999

[PHP] Remove vars from memory?

2003-09-05 Thread \[cz\]Emo
Hi all. Will PHP remove variables from memory when script will NOT use them in rest of code? for example: or I must use allways unset()? Thanx Emo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] [Thoughts About This] [Newbie Guide] For the benefit of new members

2003-09-05 Thread Joe Harman
Great guide here Ma Siva Kumar... I am a little guilty of not doing this, actually recently too... As I think most of us are at one point or another... Although I would like to add alittle something, maybe just alittle guidance for newbies and seasoned professionals like yourself! 1. Helping those

[PHP] Using rand() for 10 digit numbers????

2003-09-05 Thread Scott Fletcher
Hi! I looked at the rand() at php.net which spoke about min and max random number. So, I use rand(0,99) to get a 10 digit random number but it only return an 1 digit random number that is displayed at '0'. So, I tried rand(0,) with 4 digit random number and got the random number.

Re: [PHP] mySQL overhead: Tweaking Scripts for Speed

2003-09-05 Thread Chris Shiflett
--- Dan Anderson <[EMAIL PROTECTED]> wrote: > I've figured out that all mySQL queries should use indexed ids for > speed. (For anyone who doesn't know: mySQL indexes fields with ... You can create an index yourself: KEY [index_name] (index_col_name,...) Find more on this page: http://www.mysql

Re: [PHP] mySQL overhead: Tweaking Scripts for Speed

2003-09-05 Thread Chris Sherwood
check this out dan It may help http://www.mysql.com/doc/en/EXPLAIN.html - Original Message - From: "Dan Anderson" <[EMAIL PROTECTED]> To: "PHP List" <[EMAIL PROTECTED]> Sent: Friday, September 05, 2003 8:38 AM Subject: [PHP] mySQL overhead: Tweaking Scripts for Speed > I'm trying to

[PHP] mySQL overhead: Tweaking Scripts for Speed

2003-09-05 Thread Dan Anderson
I'm trying to figure out ways to tweak my scripts for performance. I've figured out that all mySQL queries should use indexed ids for speed. (For anyone who doesn't know: mySQL indexes fields with PRIMARY KEY, UNIQUE, or AUTO_INCREMENT in them. This means they're stored in binary trees internall

Re: [PHP] POST security

2003-09-05 Thread Dan Anderson
Be careful about hidden variables and form variables. A clever user can create a new form with custom edited fields and ACTION="yoursite.com" For instance, if you keep a hidden variable: It's not very hard for a computer saavy person to create a new form where it says: And circumvent your

RE: [PHP] How can I get IP of ppp0?

2003-09-05 Thread Dan Anderson
> [snip] > How can I get IP Address from my connection ppp0 or ppp1 in Linux? What > 's the function? > [/snip] Well, you can (if I'm not mistaken) create PHP modules using C++. You could also create shell scripts you could exec(). PHP isn't really meant to be a server control though. So anyth

RE: [PHP] Java based HTML editor

2003-09-05 Thread Chris Hubbard
I recommend htmlarea, it's _javascript_, not java. http://www.interactivetools.com/products/htmlarea/ there's a couple similar scripts available.  chris -Original Message-From: Todd Cary [mailto:[EMAIL PROTECTED]Sent: Friday, September 05, 2003 6:48 AMTo: [EMAIL PROTECTED]Subj

Re: [PHP] Java based HTML editor

2003-09-05 Thread Raditha Dissanayake
Yes java newsgroups :-) but seriously there is a good on at sourceforge. Todd Cary wrote: I would like to have a HTML editor on a Web site so the user can create HTML based text. Google brings up too many matches when I type in "Browser HTML editor Java" that do not match my needs. Does anyone

RE: [PHP] using fwrite to create PHP files

2003-09-05 Thread Chris Hubbard
Vince, You also need to escape the $, so instead of ." if ($_GET.. use ." if (\$_GET. You may have to escape the single quotes. I have written two pretty lame code generators. The first one did not use "templates", the second one does. You've got the lines of code in your "builder" scri

[PHP] Java based HTML editor

2003-09-05 Thread Todd Cary
I would like to have a HTML editor on a Web site so the user can create HTML based text.  Google brings up too many matches when I type in "Browser HTML editor Java" that do not match my needs.  Does anyone have a suggestion? Todd -- <>

Re: [PHP] POST security

2003-09-05 Thread Chris Shiflett
--- bob pilly <[EMAIL PROTECTED]> wrote: > Is there any security issues with passing data via the > POST method from a webserver to a different webserver > running ssl. There are always security concerns, regardless of your approach. Nothing is perfect. However, sending data over an SSL connection

[PHP] POST security

2003-09-05 Thread bob pilly
Hi all, i know this isnt strictly a php question but thought you would be a good group to ask because of your experience. Is there any security issues with passing data via the POST method from a webserver to a different webserver running ssl. For example: webserver1 and then just using on

Re: [PHP] Email to database

2003-09-05 Thread Enda Nagle
Its working ok now ­ I changed the error in the headers, but I had added in another BCC item which was causing the repeated emails. Working great now Jay ­ thanks a mil for your help! Regards Enda -- On 9/5/03 2:59 PM, "Jay Blanchard" <[EMAIL PROTECTED]> wrote: > [snip] > email1 - gets a copy

RE: [PHP] Email to database

2003-09-05 Thread Jay Blanchard
[snip] email1 - gets a copy of each message email2 - gets his message and the one for email3 email3 - gets his own message [/snip] Did you change that header line as recommended? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Email to database

2003-09-05 Thread Enda Nagle
Jay, The $to variable is [EMAIL PROTECTED] Then the emails are pulled from the database in the following order: email1, email2, email3 The result is: [EMAIL PROTECTED] ­ gets a copy of each message (fine since its the $to address for each mail) email1 ­ gets a copy of each message email2 ­ gets h

Re: [Fwd: Re: [PHP] How can I get IP of ppp0?]

2003-09-05 Thread Raditha Dissanayake
And i am sorry for being trigger happy. Erick Okasaki wrote: Sorry if I was not clear enough but it's a php question because I want get IP Address from connection ppp0 (in Linux) with some function in PHP! thanks Erick Original Message Hardly what you call a php question. j

RE: [PHP] Email to database

2003-09-05 Thread Jay Blanchard
[snip] Is there something like MoveNext I should use for the mail function? If I put the $headers in the while loop it just keeps adding to the $headers instead of sending each mail separately as I want it to. .. > while($row = mysql_fetch_array($result1)) > { > $head

Re: [PHP] Email to database

2003-09-05 Thread Enda Nagle
I¹ve defined $to earlier on ­ only thing is it still doesn¹t work correctly with the mail() function inside the while loop. The reason I wanted it in here was I¹m using the person¹s first name in the body of the mail. Should I just populate an array with the details of the users (first_name, email

[Fwd: Re: [PHP] How can I get IP of ppp0?]

2003-09-05 Thread Erick Okasaki
Sorry if I was not clear enough but it's a php question because I want get IP Address from connection ppp0 (in Linux) with some function in PHP! thanks Erick Original Message Hardly what you call a php question. just type ifconfig -a Erick Okasaki wrote: Hello List, How can

Re: [PHP] How can I get IP of ppp0?

2003-09-05 Thread Curt Zirzow
* Thus wrote Erick Okasaki ([EMAIL PROTECTED]): > Hello List, > > How can I get IP Address from my connection ppp0 or ppp1 in Linux? What > 's the function? > This might work. $ip = `ifconfig ppp0 | grep netmask | cut -f 2 -d ' ' | tail -1`; Curt -- "I used to think I was indecisive, but no

Re: [PHP] How can I get IP of ppp0?

2003-09-05 Thread Maciek Ruckgaber Bielecki
I would use something like this $ifconfMess = shell_exec("ifconfig tun0"); if(preg_match("/\d{2,3}(\.(\d){1,3}){3}/",$ifconfMess,$ip)) $tunip = $ip[0]; see ya ! On Fri, Sep 05, 2003 at 09:46:41AM -0300, Erick Okasaki wrote: > Hello List, > > How can I get IP Address from m

Re: [PHP] How can I get IP of ppp0?

2003-09-05 Thread Raditha Dissanayake
Hardly what you call a php question. just type ifconfig -a Erick Okasaki wrote: Hello List, How can I get IP Address from my connection ppp0 or ppp1 in Linux? What 's the function? thanks Erick -- http://www.raditha.com/php/progress.php A progress bar for PHP file uploads. -- PHP General Mail

Re: [PHP] How can I get IP of ppp0?

2003-09-05 Thread MuToGeN
Hello Erick, ipconfig EO> Hello List, EO> How can I get IP Address from my connection ppp0 or ppp1 in Linux? What EO> 's the function? EO> thanks EO> Erick -- Best regards, MuToGeNmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/)

RE: [PHP] How can I get IP of ppp0?

2003-09-05 Thread Javier Tacon
function getRemoteIP() { if(getenv("HTTP_CLIENT_IP")) $ip = getenv("HTTP_CLIENT_IP"); else if(getenv("HTTP_X_FORWARDED_FOR)) $ip = getenv("HTTP_X_FORWARDED_FOR"); else return getenv("REMOTE_ADDR"); return $ip; } -Mensaje original- De: Erick Okasaki [mailto:[EMAIL PROTECTED] Enviado

RE: [PHP] How can I get IP of ppp0?

2003-09-05 Thread Jay Blanchard
[snip] How can I get IP Address from my connection ppp0 or ppp1 in Linux? What 's the function? [/snip] shootin' from the hip because I am looking for something like this as well. I would also like to be able to activate PPP...need some serial port control. Here are my thoughts on your quest

Re: [PHP] Re: URGENT: how to make a global "server temporarily down" page?

2003-09-05 Thread David Robley
In article <[EMAIL PROTECTED]>, davidtg- [EMAIL PROTECTED] says... > Bogdan -- > > ...and then Bogdan Stancescu said... > % > % Typing "Apache custom 404" and clicking on "I feel lucky" would get you > % to this information: > > Ah! That's a good point; just make everything on the site a 404.

  1   2   >