[Fwd: Re: [PHP] Some error in file upload.]

2002-11-23 Thread Marco Tabini
-Forwarded Message- > From: Marco Tabini <[EMAIL PROTECTED]> > To: Naif Al-Otaibi <[EMAIL PROTECTED]> > Subject: Re: [PHP] Some error in file upload. > Date: 23 Nov 2002 07:56:06 -0500 > > I think this needs changing: > > error-> if(isset(!$WI

Re: [Fwd: Re: [PHP] Some error in file upload.]

2002-11-23 Thread Marco Tabini
m On Sat, 2002-11-23 at 08:16, Naif Al-Otaibi wrote: > Thanks, I fix this error but now I have another one: > Notice: Undefined variable: action in c:\inetpub\wwwroot\php5 > \file_upload.php on line 45 > > I have register_globals on > > > -Forwarded Message-

RE: [PHP] Using Ping (was: using cookies)

2002-11-23 Thread Marco Tabini
I took the liberty of changing the subject of your e-mail because this way everyone can follow it better. Well, you can execute the ping command directly from within PHP and then parse its input. For example: /dev/null"), $a); if (count ($a) && $a[1]) echo "success"; else echo "f

Re: [PHP] Passing Variables

2002-11-23 Thread Marco Tabini
Try looking into the manual for register_globals Marco php|architect - The magazine for PHP Professionals The monthly worldwide magazine dedicated to PHP programmers Check us out on the web at http://www.phparch.com On Sat, 2002-11-23 at 14:42, Craig Edgmon wrote: > I am sure this q

Re: [PHP] PHP Syntax - mail statement

2002-11-23 Thread Marco Tabini
Probably just a problem with register_globals Try: $contents = "{$_REQUEST['firstname']}, {$_REQUEST['lastname']}, {$_REQUEST['email']}"; Marco php|architect - The magazine for PHP Professionals The monthly worldwide magazine dedicated to PHP programmers Check us out on the web at

Re: [PHP] php and caching

2002-11-24 Thread Marco Tabini
Caching is usually managed through a set of headers--for example: You can use these in the pages that are dynamic and omit them in those pages where you want to keep the information. Cheers, Marco php|architect - The magazine for PHP Professionals The monthly worldwide magazine d

Re: [PHP] Php Search Engine

2002-11-25 Thread Marco Tabini
Can you be a bit more specific as to what you need to search on? Is it a database, a set of web documents or do you want to create a search engine like Google, which crawls websites as needed? Let us know! Marco -- php|architect - The magazine for PHP Professionals The first monthl

Re: [PHP] spawing new PHP process

2002-11-26 Thread Marco Tabini
Assuming you're working on UNIX--you need to use one of the execute functions (search for exec in the manual). You can spawn a separate PHP in the background in a number of way, for example, by using the screen program. If I remember correctly, you can't instantiate it directly and run it in the

Re: [PHP] FTP and security

2002-11-26 Thread Marco Tabini
Rich, Why don't you create an ssh tunnel between your two boxes and then perform you ftp connection through there? This way, the connection would be secure and you could impersonate whichever user you need to. There is also a secure version of ftp, but I don't think that it can be instantiated di

Re: [PHP] FTP and security

2002-11-26 Thread Marco Tabini
d you have any examples for using an SSH tunnel? I'm using fsockopen to get data from proprietary server software (just returns data to me in different formats) and I would like to have it secure. I'm just not sure how I could incorporate that. Thanks, Bryan On 26 Nov 2002

Re: [PHP] URL hiding

2002-11-26 Thread Marco Tabini
If index.php is the index page of your website, then you do not need to specify it at all. i.e. www.whatever.com/index.php?uName=Kris is functionally equivalent to www.whatever.com?uName=Kris A way to get rid of the variables passed in the query string is to use POST instead of GET as the method

Re: [PHP] URL hiding

2002-11-26 Thread Marco Tabini
rt on the end I still need the variables to be passed I just don't want the user to be able to see them. Thanks for your help Kris - Original Message ----- From: "Marco Tabini" <[EMAIL PROTECTED]> To: "Kris" <[EMAIL PROTECTED]> Cc: "PHP-General" &l

Re: [PHP] How to create zip files in PHP ?

2002-11-27 Thread Marco Tabini
You will have to invoke an external utility, like PKZIP on Windows or zip on Linux to create the archives you need. Marco -- php|architect - The magazine for PHP Professionals The monthly worldwide magazine dedicated to PHP programmers Come visit us at http://www.phparch.com! --- 

Re: [PHP] String function

2002-11-28 Thread Marco Tabini
You can use strstr: if (strstr ($str, '.')) echo 'Full stop'; else echo 'No full stop'; Marco -- php|architect - The magazine for PHP Professionals The first monthly worldwide magazine dedicated to PHP programmers On Thu, 2002-11-28 at 08:49, Shaun wrote: > Hi, >

Re: [PHP] php and https

2002-11-29 Thread Marco Tabini
Is this related to PHP? Or are you getting the error from your browser? In that case, are you using IE? If so, it might be a bug with IE--I've seen it discussed in a few mailing lists. Otherwise, it might indicate that the web server you're connecting to is not configured properly. Marco -- --

Re: [PHP] Weblogs

2002-12-01 Thread Marco Tabini
b2, which you can find here: http://cafelog.com/ Cheers, Marco -- php|architect - The magazine for PHP Professionals The monthly worldwide magazine dedicated to PHP programmers Come visit us at http://www.phparch.com! On Sun, 2002-12-01 at 09:35, Randum Ian wrote: > Can anybody

Re: [PHP] PHP Trouble-Ticket-Systems?

2002-12-01 Thread Marco Tabini
http://www.inicrm.com Offered as an ASP (my company produces it, so... shameless plug) Marco On Sun, 2002-12-01 at 10:59, Thomas Seifert wrote: > Hi folks, > > I already searched through the web but couldn't find any which provide the features >I want. > > What I would want to see in such a

Re: [PHP] Call to undefined function: mysql_foo()...

2002-12-01 Thread Marco Tabini
Is it possible that phpBB is using a different copy of PHP? On Sun, 2002-12-01 at 14:21, Adam Atlas wrote: > I'm having a strange problem. If I run any MySQL function, I get the > error message "Call to undefined function: mysql_foo()". Why would I be > getting this? I've checked php.ini to see

Re: [PHP] PHP and the PDFlib

2002-12-02 Thread Marco Tabini
Take a look at the iText library--it's a Java library, but you can build your Java classes and then instantiate them through PHP by executing them as external apps. That's what we use to personalize copies of our magazine. Marco -- php|architect - The magazine for PHP Professional

Re: [PHP] PHP Sessions

2002-12-04 Thread Marco Tabini
Are you sure? I thought $_SESSION was a superglobal. Marco On Wed, 2002-12-04 at 09:15, Justin French wrote: > Good point -- are the included files functions, or other stuff?? > > function myfunc() > { > return $_SESSION['something']; > } > > will not work, but: > > > function my

Re: [PHP] Max File Size

2002-12-04 Thread Marco Tabini
Are you sure you're looking at the right php.ini? Try calling phpinfo() and check where PHP is looking for the ini file. Marco -- php|architect - The magazine for PHP Professionals The monthly worldwide magazine dedicated to PHP programmers Come visit us at http://www.phparch.com!

Re: [PHP] force download with header()

2002-12-08 Thread Marco Tabini
Are you using Internet Explorer? Then it's a "feature" of IE--it ignores the disposition headers sent by your server because its registry tells it that PDF files must be "viewed" inline. There's a way around it, although it's a bit kludgy--I wrote a small article about it that you can find here (it

Re: [PHP] Question about "if" statement evaluating (0=="string")as TRUE

2002-12-13 Thread Marco Tabini
I think this is happening because you're comparing apples to oranges. Your first comparison causes an integer to be compared to a string. Because the string "string" evaluates to the integer value 0, the comparison succeeds. The manual recommends the use of the identical comparison operator (===) i

Re: [PHP] Fw: Formatting dates (from MySQL)

2002-12-14 Thread Marco Tabini
You should be able to use strtotime() to transform the datetime string into a UNIX timestamp, which you can then format back using date(). However, this is a very circuitous way--either use SQL to format it or, if your DBMS supports it, have it returned already as a UNIX timestamp. The actual SQL c

Re: [PHP] Undefined Variable

2002-12-14 Thread Marco Tabini
Best guess, your local server has register_globals on and your ISP doesn't. However, without seeing your code it's going to be difficult to tell for sure! :-) Marco -- php|architect - The Magazine for PHP Professionals The monthly magazine dedicated to the world of PHP programming

Re: [PHP] Undefined Variable

2002-12-14 Thread Marco Tabini
ED]"; $subject = "Narrowsburg Chamber of Commerce"; $mailheaders = "From: $thename\n"; $mailheaders .= "Reply to:$email\n\n"; mail($to, $subject, $msg, $mailheaders); ?> -- php|architect - The Magazine for PHP Professionals The monthly magazine dedica

Re: [PHP] Session: I RTFM

2002-12-14 Thread Marco Tabini
I haven't followed the rest of the thread, but how about using a function? function getvar ($varname) { if (isset ($_POST[$varname]) { $_SESSION[$varname] = $_POST[$varname]; return $_POST[$varname]; } elseif (isset ($_SESSION[$varnam

Re: [PHP] Session: I RTFM

2002-12-15 Thread Marco Tabini
quotes do, as a general rule, that double cannot (he asks remembering something, but not sure what)? Marco Tabini wrote: > I haven't followed the rest of the thread, but how about using a > function? > > function getvar ($varname) > { > if (isset ($_POST[$

Re: [PHP] mail()

2002-12-16 Thread Marco Tabini
You need to use HTML mail. There's an example on how to this in the manual. Marco -- php|architect - The Magazine for PHP Professionals The monthly magazine dedicated to the world of PHP programming Check us out on the web at http://www.phparch.com! --- Begin Message --- Is there

Re: [PHP] PHP shell scripting not working right?

2002-12-16 Thread Marco Tabini
In Unix you need to specify the working folder when you are launching an executable, otherwise Bash will try to look into its search path, which does not include the current folder. Try: ./test.php That should work. BTW--running "test" by itself only *looks* like hitting enter--it's really a vali

Re: [PHP] Divide into words

2002-12-16 Thread Marco Tabini
You could use strpos--there are easier ways if you don't need the offsets. Example: This is from memory, but it looks like it should work even for weird strings like the one above. Cheers, Marco -- php|architect - The magazine for PHP Professionals The monthly worldwide magazin

RE: [PHP] Divide into words

2002-12-16 Thread Marco Tabini
John, I'm not sure this will work if there is more than one space between words. Also, my previous example won't work if there are duplicate words (although it's easy to make an array out of each word and solve the problem), nor if the words are delimited by any character other than spaces, in wh

Re: Re[2]: [PHP] Divide into words

2002-12-16 Thread Marco Tabini
Yes, but my example was geared towards trying to work through a more generic scenario. I'll bet if you try using perl regex with callback it'll be even faster. Marco -- php|architect - The magazine for PHP Professionals The monthly worldwide magazine dedicated to PHP programmers Co

Re: [PHP] key pairs

2002-12-17 Thread Marco Tabini
This is a bit crude but should work: Note that I made a bunch of assumptions here--that the data is always properly formatted, that there is only one record in the $data, and that you will later manipulate the key names so that they will actually work as database columns. Still, this way you can

Re: [PHP] Resource limit/performance questions

2002-12-20 Thread Marco Tabini
IMHO it depends on the amount of operations you have to perform on your rows. If manipulating 2,600 rows takes several seconds, then either you're performing some really complicated data manipulation or your db could use some optimization. I have an application that manipulates ~150,000 rows on a P

Re: [PHP] Resource limit/performance questions

2002-12-20 Thread Marco Tabini
is running 260 queries on 2600 lines of code. Marco Tabini wrote: > > IMHO it depends on the amount of operations you have to perform on your > rows. If manipulating 2,600 rows takes several seconds, then either > you're performing some really complicated data manipulation

Re: [PHP] Resource limit/performance questions

2002-12-20 Thread Marco Tabini
ctable rate, with the same basic number of records added each day. I should have said records, instead of objects. (too many sessions with crAccess, too little time talking to real people about databases) Now... would you spell that querys or queries? Marco Tabini wrote: > > Well, then, ass

Re: [PHP] Date Subtraction

2002-12-23 Thread Marco Tabini
I don't think you can use strtotime in that case. However, assuming that your data is properly formatted every time, you can use a simple function like this (I'm doing it from memory, so it might not actually work): Hope this helps. Cheers, Marco -- php|architect - The Magazine

Re: [PHP] Does PHP recognize multiple selections in a form?

2002-12-27 Thread Marco Tabini
Hello Micah-- Yes, PHP supports multiple selections, but you need to change the name of the control from submitID to submitID[], so that it will become an array once inside your script. Hope this helps! Marco -- php|architect - The Magazine for PHP Professionals The monthly magazi

Re: [PHP] Load Data Infile

2002-12-29 Thread Marco Tabini
I'm not sure how MySQL works under Windows, but you should either use double backslashes (\\) instead of single backslashes or use forward slashes (/) instead. MySQL is trying to escape your string. Cheers, Marco -- php|architect - The Magazine for PHP Professionals The monthly mag

Re: [PHP] creating a .doc file in php

2002-12-30 Thread Marco Tabini
My guess is that your best bet is creating either an HTML or RTF documents, both of which are readable by MS Word. RTF is well documented and it should be fairly easy to work with--you can save a template with placeholders and simply replace them, since it's entirely text-based. Cheers, Marco --

RE: [PHP] creating a .doc file in php

2002-12-30 Thread Marco Tabini
ut on the web at http://www.phparch.com! --- Begin Message --- Thanks Marco, So I would just create the .rtf file with php, then store it on the server and attach it to the e-mail? Thanks, Eddie -Original Message- From: Marco Tabini [mailto:[EMAIL PROTECTED]] Sent: Monday, December 30, 2

Re: [PHP] Multiple forms

2002-12-30 Thread Marco Tabini
You should be able to insert a hidden field in your form and that check against that in your PHP script to determine which (if any) of your form was submitted: in your script: --- Begin Message --- Hi all, I have an update page that has a form in it. However, I want to add another fo

Re: [PHP] call_user_method_array

2003-01-01 Thread Marco Tabini
Chris-- On my system, the function works as expected (at least as I understand it): myFunc receives the parameters "Hello!" and array("this"=>"that"), which is what you pass to it in the first place. Were you expecting it to expand $myArrayVar into individual parameters? If so, that's not how it w

Re: [PHP] mail attachments

2003-01-02 Thread Marco Tabini
Nope--it's a bit more complicated than that. However, there are a number of classes out there that can help you out with that. Cheers, Marco -- php|architect - The Monthly Magazine for PHP Professionals Come check us out on the web at http://www.phparch.com! --- Begin Message 

Re: [PHP] loading a different web page ...

2003-01-06 Thread Marco Tabini
Check the header() function--you want header ("Location: http://www.xyz.com";). It has to be outputted before any other output. Cheers, Marco -- php|architect - The Monthly Magazine for PHP Professionals Come check us out on the web at http://www.phparch.com! --- Begin Message

Re: [PHP] No Idea - Comparing Lines

2003-01-06 Thread Marco Tabini
Hi Chris-- Try this: 0) { $kbitsout = float) $data['OctetsOut'] - $olddata['OctetsOut']) / ($data['UnixTime'] - $olddata['UnixTime'])) * 8 ) / 1000; print str_pad ($i, 2, ' ', STR_PAD_LEFT) . ' -- ' . number_format ($kbitsout, 2) . " kbits/s\n";

Re: [PHP] restrictions

2003-01-07 Thread Marco Tabini
Hello Bruce-- That depends on what restrictions are imposed on your box, of course. Does your company use an SMTP-compatible mail server for your internal mail? If so, you could use the server your mail client points to to perform your tests. Cheers, Marco -- php|architect - T

RE: [PHP] restrictions

2003-01-07 Thread Marco Tabini
Professionals Come check us out on the web at http://www.phparch.com! --- Begin Message --- Well I can't be totally sure but I think all outgoing mail points to an external SMTP server. -Original Message- From: Marco Tabini [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 9:11

RE: [PHP] restrictions

2003-01-07 Thread Marco Tabini
dnesday, January 08, 2003 9:32 AM To: Bruce Levick; 'Marco Tabini' Cc: [EMAIL PROTECTED] Subject: RE: [PHP] restrictions In windowsxp do the following: Start -> Run Open: cmd At the shell type: telnet x.x.x.x 25< x.x.x.x being the smtp server If you get a prompt then yo

Re: [PHP] Re: difference between shared and /usr/bin/mysql

2003-01-15 Thread Marco Tabini
On Wed, 2003-01-15 at 09:36, Leon Mergen wrote: > Somebody correct me if I'm wrong, but from what I know is that when using > shared it is compiled as a shared object and only loaded when needed. This > decreases ram usage (which is good) , but increases load (which is bad) . AFAIK, you should use

Re: [PHP] x12 837

2003-01-16 Thread Marco Tabini
On Thu, 2003-01-16 at 16:10, Rodney Green wrote: > Just curious. What is an 837? I'm curious, too... what is it? Not a good start, if you were hoping to get an answer eh? :-))) Marco -- php|architect - The Monthly Magazine for PHP Professionals Come check us out on the web at h

Re: [PHP] Re: Job Opportunity

2003-01-20 Thread Marco Tabini
Don't apologize... pass the job offers around instead ;-) My Evolution has decided that I don't have a Calendar anymore. No matter how hard I try. *sigh* Cheers, Marco On Mon, 2003-01-20 at 13:53, Ray Hunter wrote: > I apologize everyone...evolution is going crazy... > > R

Re: [PHP] Headers bust ?

2003-02-15 Thread Marco Tabini
On Sat, 2003-02-15 at 09:01, Malcolm wrote: > Hello, > > I've been fooling with this for a few days now. > I'm getting a hearders already sent error. > I know it means I've got output before the header but > I can't figure how else to do this. Hi Malcom-- Looks like you are outputting data ri

Re: [PHP] Block direct image loads but allow them in PHP

2003-02-15 Thread Marco Tabini
On Sat, 2003-02-15 at 11:00, Michael Mulligan wrote: > Hi > > I have a bit of a problem which might just be due to my lack of knowledge > with Apache. Basically, what I want to do is to *not* allow users to enter > particular URLs in their browser (namely to *.jpg and *.xml files under a > particu

Re: [PHP] Block direct image loads but allow them in PHP

2003-02-15 Thread Marco Tabini
On Sat, 2003-02-15 at 11:13, Michael Mulligan wrote: > If the user knew the actual URL of the image though, wouldn't they be able > to get around a script like this by simply typing it into their web browser? > > Thanks! :-) Only if you let them. The PHP script allows to put the appropriate check

Re: [PHP] Block direct image loads but allow them in PHP

2003-02-15 Thread Marco Tabini
t that first checks the permissions and then, if the user is authorized, outputs the file to the browser. This way, if the user is not authorized to download a file, it will be blocked. Obviously, the files themselves should be inaccessible to the web *except* through your scripts. Hope it's a

Re: [PHP] IRR Function in PHP

2003-02-17 Thread Marco Tabini
On Mon, 2003-02-17 at 16:44, Jonathan Pitcher wrote: > We are getting ready to automate a process that was currently done in > Excel to a Web page. > > This process involves an IRR Calculation. Or Internal Rate of Return. > > I have looked at PHP.net and spent the last couple hours searching for

Re: [PHP] IRR Function in PHP

2003-02-17 Thread Marco Tabini
ves an IRR Calculation. Or Internal Rate of Return. > > Sorry, I don't think there are any accountants lurking on the list, so > please explain what the actual calculation for an IRR should be. > > > -- > Greg Donald > http://destiney.com -- Marco T

Re: [PHP] IRR Function in PHP -- MORE Info

2003-02-17 Thread Marco Tabini
. With all input and > export going through a web based system. > > I have all the information I need but I can't seem to find the right > formulas to make the calculations. > > Thanks again, > > Jonathan -- Marco Tabini President Marco Tabini & As

Re: [PHP] file-upload.errors

2003-02-17 Thread Marco Tabini
On Mon, 2003-02-17 at 21:44, Nate wrote: > Does this mean the file was examined by the browser and it determined it was > too large OR does it have to upload the file temporarily and then check to > see if its too large? > > It sounds like browser would first examine the file before it gets upload

Re: [PHP] Version 5?

2003-03-06 Thread Marco Tabini
On Thu, 2003-03-06 at 23:09, Larry Brown wrote: > Someone mentioned a facet of version 5 to be expected that I am really > looking forward to. Does anyone know what the release target date is? I > didnt see any mention of it on php.net. Version 5 is still being actively developed (at least as fa

Re: [PHP] quick question

2003-03-10 Thread Marco Tabini
You should look at E-xact (http://www.e-xact.com). They have a solution they call "tagged transactions" that actually replaces the credit card numbers with "tags" that are only meaningful in the context of your merchant account. That way, you can let your customers make repeat purchases without act

Re: [PHP] Problems compiling PHP 5.0.0b1

2003-07-01 Thread Marco Tabini
al diffrent versions of PHP before without problems. Has > anyone had a similar problem ? > > TIA, > > _________ > Mauricio Cuenca -- Marco Tabini President Marco Tabini & Associates, Inc. 28 Bombay Avenue Toronto, ON M3H 1B7 Canada Phone: (416) 630-6202 Fax:

Re: [PHP] PHP5 - Bugs

2003-07-01 Thread Marco Tabini
Which platform are you running on? Marco On Tue, 2003-07-01 at 13:39, Michael A Smith wrote: > Hey, > > Can't figure this out... whenever I try to use any mysql functions or > anything, I get problems. PHP throws a DNS error... what's up with that? > > -Michael

Re: [PHP] mysql detect

2003-07-02 Thread Marco Tabini
# > With best regards ! > Roy Daniel , ST > IT Application Support & Development Engineer - PT BERCA > [EMAIL PROTECTED] // [EMAIL PROTECTED] > ICQNumber : # 103507581 // Phone Cell : 0816-1192832 > ########## -- Marco Tabini Pr

Re: [PHP] Eval var from query

2003-07-14 Thread Marco Tabini
On Mon, 2003-07-14 at 15:03, Shawn McKenzie wrote: > How can I evaluate a var that is from a text field of a database? Example: > Hi Shawn-- Have you looked at eval? http://www.php.net/eval. Cheers, Marco -- php|architect -- The Magazine for PHP Professionals NOW AVAILABLE IN PRINT! Get y

Re: [PHP] Recommended package for online editing of HTML files

2003-03-18 Thread Marco Tabini
Hiya Brad-- We published a news item on this a few days ago; there's a free WYSIWYG editor that works both on IE and Mozilla 1.3 called HTMLArea. You can find it here: http://www.interactivetools.com/products/htmlarea/reviews.html (our news item is at http://phparch.com/newsarchive.php?s=htmlar

Re: [PHP] Refreshing

2003-06-30 Thread Marco Tabini
ickey for each conversation within the chat. > > 2. You can disable sounds in a themes thingie, depends on which windoze > version you own. > > HTH! > > Jay > -- Marco Tabini President Marco Tabini & Associates, Inc. 28 Bombay Avenue Toronto, ON M3H 1B7 Canada Phone: (416) 630-6202 Fax: (416) 630-5057 Web: http://www.tabini.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Refreshing

2003-06-30 Thread Marco Tabini
ior Executive Web Developer > Mophus.com, Inc. > > > - Original Message - > From: "Marco Tabini" <[EMAIL PROTECTED]> > To: "Stephen" <[EMAIL PROTECTED]> > Cc: "Jay Blanchard" <[EMAIL PROTECTED]>; "PHP List" > <[

Re: [PHP] Refreshing

2003-06-30 Thread Marco Tabini
ny images). > > There are a number of references that talk about this > trick if you search on "iframe rpc javascript" in > google: > > http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=iframe+rpc+javascript > > You will still get the clicking

Re: [PHP] eregi_replace help

2002-10-07 Thread Marco Tabini
Jennifer-- A couple of things. eregi_replace does not have a limitation parameter, which means that if you use it *all* the strings that match your pattern will be replace with the new pattern. In your case, if I read your code correctly (and I may not--I'm doing this from memory), the eregi repl

Re: [PHP] MAIL taking 60 seconds to send... (too long)

2002-10-07 Thread Marco Tabini
Hey John-- Couple of ideas: 1) Is your sendmail configured as a relay? As such your PHP process may have to wait for the e-mail to be relayed before returning, which might explain why it's taking so long. The same might happen if your machine is very busy (although that has never happened to me)

Re: [PHP] parsing variables through webpages

2002-10-07 Thread Marco Tabini
You can use $_POST in a similar fashion to retrieve values from form that have been posted with the POST method. Also, you can use $_REQUEST to catch both at the same time. In this case, you may have a problem if the same variable is passed through both GET and POST, in that one will override th

Re: [PHP] Chat with php

2002-10-07 Thread Marco Tabini
But, Robert, doesn't this technique leave a connection open on the server--and, won't it cause the server to run out of resources after a very finite number of connections has been established? Marco On Mon, 2002-10-07 at 14:07, Robert Cummings wrote: > You can have your script enter a loop to

Re: [PHP] Chat with php

2002-10-07 Thread Marco Tabini
Simple trick (well, not so simple, but kind of a Columbus' Egg): 1) Create an tag in your web page that is hidden 2) Point the img tag to a php script that returns: 1) An image with a pixel width of 1 if there is new data to pick up from the server 2) An image with a

Re: [PHP] Sockets

2002-10-07 Thread Marco Tabini
Yep, if you're using UNIX and compiling from source, you must add this switch to the command line when you're configuring and compiling PHP: --enable-sockets (e.g.: ./configure --enable-sockets). If you're using a prepackaged version (RPM or Windows) then you should look into the documentation

Re: [PHP] Chat with php

2002-10-07 Thread Marco Tabini
Oliver-- I'm afraid I wasn't too clear! If you do it the way I'm suggesting, your page will look like it's reloading ONLY when there is new data available, and not continuously. PHPChat is an example--it looks really good and doesn't do any of the annoying things that reloading the page usually d

Re: [PHP] Grabbing auto_increment during insert?

2002-10-07 Thread Marco Tabini
If you're using MySQL: mysql_insert_id If you're using MSSQL, you need to execute SELECT @@IDENTITY right after your insertion operation. The result will give you the ID of your last insertion. This won't work well if you're doing a bulk insert, though. On Mon, 2002-10-07 at 15:46, Jason Young

Re: [PHP] how to build a webmail

2002-10-07 Thread Marco Tabini
Try this: http://www.horde.org/imp/ On Mon, 2002-10-07 at 16:26, Nagib Abi Fadel wrote: > > Hi i want to build a webmail with PHP, can someone give me some guidelines. > > thx. > > > > - > Do you Yahoo!? > Faith Hill - Exclusive Performances, Videos, & more >

Re: [PHP] Deleting multiple items from database using checkboxes

2002-10-07 Thread Marco Tabini
Try WHERE EntryID IN (" . implode ($dele, ',') . ")" However: 1) Anybody could fake a form post or query url to delete any data in your database 2) It would also be possible to create a more dangerous post that could give the attacker control over your entire database Thus, I assume that you wi

Re: [PHP] Execute...

2002-10-08 Thread Marco Tabini
Unfortunately no, because the calculator is a Windows application that runs on your local desktop and cannot be seen by your web-based users. If you need your customers to use a calculator through their browsers, you're probably looking for a Javascript calculator. Take a look at this as an examp

Re: [PHP] PHP AND C

2002-10-08 Thread Marco Tabini
Passing that many parameters shouldn't be a problem, I think...argv/argc parsing in the standard C library is pretty fast. On Tue, 2002-10-08 at 06:04, karthikeyan wrote: > Hi, > > I want to pass some 10 to 15 parameters as input to an C Program. Does passing it >as command line argument thr

Re: [PHP] shell_exec('cp...

2002-10-08 Thread Marco Tabini
Have you tried redirecting stderr to a file? On Tue, 2002-10-08 at 11:50, Alec Solway wrote: > I'm having problems running cp from shel_exec(). Nothing is returned, but > the copy is unsuccessful. The same call works as user nobody from the > actual shell. Any ideas? > > -Alec > > > -- > PH

Re: [PHP] PHP socket connections with SSL

2002-10-08 Thread Marco Tabini
Hi Darren-- 4.3 is not out yet; the reference is to the current CVS version (which will, eventually, become 4.3, I suppose), which you can check out and use, although it is not an "official" release and will therefore probably be a bit unstable (I've been running it on my dev server for a while w

Re: [PHP] Speeding up a Mysql Select

2002-10-09 Thread Marco Tabini
Also, probably a stupid question, but, is the `begintime` column indexed? If it isn't, no matter what you do, the whole thing will keep getting slower at an alarmingly fast pace :) Marco On Wed, 2002-10-09 at 07:14, Maurits Lawende wrote: > You should include a LIMIT to the sql-query or mysql

Re: [PHP] Encrypting passwords in a flat file before import

2002-10-09 Thread Marco Tabini
I think that generally you do not want passwords to be decryptable. What I normally do is try to encrypt whatever the user enters as a password and compare the resulting encrypted string with what's in the database to make sure they correspond. If the encrypting function is univocal (and md5 is) t

Re: [PHP] ASP Option Explicit equivalent in PHP

2002-10-09 Thread Marco Tabini
Well, you can set error_reporting to E_ALL, which will cause PHP to complain if you use a variable without having it initialized. There is no exact equivalent to Option Explicit--and there still isn't any need to declare the variables, just to initialize them before use. Marco On Wed, 2002-10-0

Re: [PHP] problem with SUM and Postgres

2002-10-09 Thread Marco Tabini
Because pg_exec only executes the query and returns the resource that's associated with the returns. If you want to read the results, you should use pg_fetch_result(): $sql1 = "SELECT SUM(hostingcost) FROM $tablename WHERE webserver = '$webserver'"; $hosting_rs = pg_exec($connect, $sql1); $hostin

Re: [PHP] problem with SUM and Postgres

2002-10-09 Thread Marco Tabini
Sorry, folks... I meant "result" and not "returns" below. End of day = brain fried. :) Marco On Wed, 2002-10-09 at 19:32, Marco Tabini wrote: > Because pg_exec only executes the query and returns the resource that's > associated with the returns. If you want

Re: [PHP] Problems pulling up a certain url with curl

2002-10-10 Thread Marco Tabini
Did you compile curl from scratch? If so, did you enable https? On Thu, 2002-10-10 at 12:13, Brandon Orther wrote: > Hello, > > I am farely familar with the use of curl. I have used it in the past > and it seems to be working going to test pages such as php.ner and so > on. When I try to got

Re: [PHP] help with mysql query / logic

2002-10-10 Thread Marco Tabini
Can you perhaps post the structure of your tables? That would make it easier to help (at least for me) On Thu, 2002-10-10 at 15:40, Pablo Oliva wrote: > I have 2 tables, one with job ad information, and a second one with the > locations that this ad applies to. > > When a person queries the jo

Re: [PHP] Undefined variables?

2002-10-10 Thread Marco Tabini
Of course, you should switch to UNIX :-) Seriously, have you looked at the source on those lines? Can you post the source code otherwise so we can take a look and let you know? The error you are receiving usually means that a variable is used without having been initialized. For example: $b = $

Re: [PHP] Undefined variables?

2002-10-10 Thread Marco Tabini
I think the problem is simply that the other server had a different configuration setting for error reporting, since I can't find $debug_wintrmte configured anywhere. I don't know what this code is for, so it's difficult for me to say how to fix it, since any changes I make may affect the outcome

Re: [PHP] MS SQL server TEXT column

2002-10-10 Thread Marco Tabini
Set TEXTSIZE usually does it for me: Make sure that you select a database first and that the connection is not closed between your Set TEXTSIZE op and the actual query. If you are not specifying a connection in you mssql_query statement, make sure that you haven't opened a different connection

Re: [PHP] Accessing serial ports from PHP

2002-10-11 Thread Marco Tabini
If you're using UNIX, you can try reading and writing to/from /dev/ttyS* or /dev/ttyS/* On Fri, 2002-10-11 at 06:34, José León Serna wrote: > Hello: >I would like to read and write to serial ports from PHP, is possible? > if so, how? > > Regards. > > > -- > PHP General Mailing List (http

Re: [PHP] MSSQL_RESULT Problem

2002-10-11 Thread Marco Tabini
Hi! This is actually a limitation of the sql libraries used by PHP (I assume you're using Windows). Try using a cast to a text field: Select Cast(Field As Text) As Field This should (and I say should because I can't test it right now :) take care of the problem, although it might make your db a

Re: [PHP] how to configure with ldap?

2002-10-11 Thread Marco Tabini
You need an LDAP package like OpenLDAP: http://www.openldap.org/ On Fri, 2002-10-11 at 10:37, Jody Cleveland wrote: > Hello, > > I'm trying to configure php with ldap support. Looking at ./configure > --help, I noticed that when I configure it, I need to put this in: > ./configure --with-ldap=[

Re: [PHP] php cgi question

2002-10-13 Thread Marco Tabini
Without seeing your code... only one guess: what are the permissions on the file like? When you're running the script from the web server, you're running it as the user under which the web server is running (usually nobody or apache if you're using Apache on Linux), and this causes problem if that

Re: [PHP] PHP/mySQL help or advice

2002-10-13 Thread Marco Tabini
There are a few PHP calendars: http://www.cascade.org.uk/software/php/calendar/index.php for example, that you can start from. It should be relatively easy then to write a small table that contains just one field: Date (datetime) All you do is insert a row in the db for each day that is booked

  1   2   3   >