Re: [PHP] Im having Trouble with File uploading,

2001-01-10 Thread Richard Lynch
"C:\nusphere\apache\htdocs\morgan\php\database\CMS\pdf"); This string contains a newline... You need \\ on each of those, or just use / and I think it will make everybody happy. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: [PHP] Session cookie expiration

2001-01-10 Thread Richard Lynch
There are settings in php.ini for that, I think... - Original Message - From: Michal Thomka [EMAIL PROTECTED] Newsgroups: php.general Sent: Wednesday, January 10, 2001 4:24 AM Subject: [PHP] Session cookie expiration I am working on an aplication which uses sessions, and I would

Re: [PHP] strip_tags ?

2001-01-10 Thread Richard Lynch
I don't think it looks for specific HTML tags to strip. Anything that looks like xxx or /xxx is going to get yanked. In other words, it strips *EVERY* HTML tag, no matter how obscure. - Original Message - From: "Jon Rosenberg" [EMAIL PROTECTED] Newsgroups: php.general Sent:

Re: [PHP] Cannot send session cache limiter - headers already sent Cannot send session cookie - headers already sent by

2001-01-10 Thread Richard Lynch
I think you want to do more like this: session_start(); if (!session_is_registered('cart')){ session_register('cart'); $cart = array(); } - Original Message - From: "JB" [EMAIL PROTECTED] Newsgroups: php.general Sent: Wednesday, January 10, 2001 3:43 PM Subject: [PHP] Cannot

Re: [PHP] Each site with its php.ini?

2001-01-10 Thread Richard Lynch
Hi. Does anybody knows how to have different configuration options, that is, different php.ini files, for several different sites that reside on the same server? I have IIS and the CGI version of PHP 4.04. H... I dunno how IIS does Virtual Hosting, but maybe you could have a different

Re: [PHP] ibase (firebird) localhost login ?

2001-01-10 Thread Richard Lynch
Most dbs use "localhost" for that, and the database username/password that is configured into the database software/tables... I know nothing of Interbase, but that's how all the others work... If "localhost" doesn't work for the host, try "127.0.0.1" - Original Message - From: "Chris

Re: [PHP] Websites warned over first hypertext virus, is it true?

2001-01-10 Thread Richard Lynch
Either it's not the first, or it's pretty old news... And if it's the same old virus from before, the referenced article didn't even bother to describe the virus and how to detect remove it, which other articles have done -- They just hawk their wares. Search the archives for "PHP Virus" and

Re: [PHP] Accessing Common Log Format (CLF) info.

2001-01-10 Thread Richard Lynch
I doubt it... On busy servers, those files must get so huge, there's no way Apache can be trying to keep it all in RAM. So, pretty much, Apache logs it and forgets it. The only place that data exists is in the log file... Unless you hack the Apache logging routine to send it to your database

Re: [PHP] Running an .exe on localhost

2001-01-10 Thread Richard Lynch
Can somebody please give me a starter in trying to run a local application (.exe) from a html button eg. Does it involve exec() or system() ? And if so, could somebody give me an example. I'm too dim to learn any other way ;) exec("C:/program files/whatever/full/path/something.exe", $output,

Re: [PHP] unique id

2001-01-10 Thread Richard Lynch
*WHY* not use auto_increment? Would the builtin http://php.net/uniqid function not work better? *NEVER* seed the random number generator more than once per script. Call srand() once, and only once. The return() statement will return the MySQL resource ID, which is probably not useful, but all

Re: [PHP] Serving files form DB

2001-01-10 Thread Richard Lynch
You could save yourself a whole lot of headaches by putting the files in the file-system, and storing only the path in the database... Also, IE and Netscape use different things to populate the filename box on the download dialog... One uses Content-disposition header(), and one uses whatever

Re: [PHP] FATAL: emalloc() error

2001-01-10 Thread Richard Lynch
What arguments are you passing to odbc_exec()? - Original Message - From: Justin Smith [EMAIL PROTECTED] Newsgroups: php.general Sent: Tuesday, January 09, 2001 1:07 PM Subject: [PHP] FATAL: emalloc() error I'm trying to query an MS Access database via ODBC, but the odbc_exec

Re: [PHP] Discussion board recommendation

2001-01-10 Thread Richard Lynch
Phorum? - Original Message - From: "H. Wade Minter" [EMAIL PROTECTED] Newsgroups: php.general Sent: Tuesday, January 09, 2001 2:36 PM Subject: [PHP] Discussion board recommendation -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'm looking for a PHP/MySQL-or-Postgres based

Re: [PHP] JavaScript/PHP documentation

2001-01-11 Thread Richard Lynch
I *think* the JavaScript (and DHTML and whatnot) utilize server-side code to detect your browser and come up with different code. The alternative is to crash some browsers, which is not so nice. :-^ I think some complaints were even received at php.net from other webmasters who stole the site

Re: [PHP] ?= was born when?

2001-01-11 Thread Richard Lynch
when was ?= 'enabled' in php? 4.0.0 ? Definitely before that -- Not sure when. It was a long discussion, and some PHP Developers still think it was a Bad Idea (tm). *SHOULD* be in the ChangeLogs somewhere... It mostly keeps the recent ASP converts from whining :-) -- PHP General Mailing

Re: [PHP] killing the session

2001-01-11 Thread Richard Lynch
Force that page not to be cached. You're probably building a new session with all the date from the cart... See the Code Archives linked from http://php.net/links.php Search for "cache" and use all the related headers you can find. - Original Message - From: "Angel Behar" [EMAIL

Re: [PHP] ik

2001-01-11 Thread Richard Lynch
k - Original Message - From: [EMAIL PROTECTED] Newsgroups: php.general Sent: Thursday, January 11, 2001 5:01 PM Subject: [PHP] ik j -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To

Re: [PHP] ?= was born when?

2001-01-11 Thread Richard Lynch
It was minimally documented for a long time... - Original Message - From: Toby Butzon [EMAIL PROTECTED] To: Richard Lynch [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, January 11, 2001 5:58 PM Subject: Re: [PHP] ?= was born when? Manual suggests 3.0.3, but I can't find any

Re: [PHP] where does MAKE INSTALL put PHP things?

2001-01-12 Thread Richard Lynch
It tells you as it does it... The default is, I think, the modules directory in your apache directory for the .so, and /usr/local/lib/ for the php.ini You can alter it using --with-prefix or somesuch. ./configure --help | less - Original Message - From: Derek Sivers [EMAIL PROTECTED]

Re: [PHP] Problem with Exec()

2001-01-12 Thread Richard Lynch
First, make sure that sendmail is something the iUSR_machinename can run -- Just because you logged in as you can run it doesn't mean that the user that Apache/PHP is running as can run it. Next, forget about that goofy DOS backslash thing. Just use "/" for your paths. Finally, add the

Re: [PHP] ereg works in .php, not in .inc

2001-01-13 Thread Richard Lynch
Do you have ?php and ? in your .inc file?... - Original Message - From: Ted Goranson [EMAIL PROTECTED] Newsgroups: php.general Sent: Saturday, January 13, 2001 12:35 AM Subject: [PHP] ereg works in .php, not in .inc Friends-- I have a script that processes another script for

Re: [PHP] Problem building php 3.0.18

2001-01-13 Thread Richard Lynch
If you're smart enough to edit a spec file, you could just compile from source... :-) - Original Message - From: "Michael A. Peters" [EMAIL PROTECTED] Newsgroups: php.general Sent: Saturday, January 13, 2001 12:36 AM Subject: [PHP] Problem building php 3.0.18 Howdy- I'm having a

Re: [PHP] Put data in a odbc connect

2001-01-13 Thread Richard Lynch
You do it just like you would do a select: $query = "insert into blah(field1, field2) values($value1, '$value2')"; odbc_exec($connection,$query) or die(odbc_error()); There's nothing special about any particular kind of query you send to the database. Disclaimer: I don't know that I got the

Re: [PHP] Frontpage Discussion Group/PHP Replacement

2001-01-13 Thread Richard Lynch
I dunno about importing the data, but Phorum is a pretty darned good PHP discussion group program... Hopefully, FP just stores all the stuff in some tables and you can export the data as CSV or tab-delimited. - Original Message - From: "Cybercandy Ltd" [EMAIL PROTECTED] Newsgroups:

Re: [PHP] Calendar holidays

2001-01-13 Thread Richard Lynch
For the most part, you probably have to have some custom code to handle them. I suspect there are authoritative sources of the legal holidays online somewhere that you can query dynamically... What exactly do you want to *do* with the holidays and your calendar is probably the first question

Re: [PHP] cookie stopped working???

2001-01-13 Thread Richard Lynch
I left the php list a few years ago when I lost the clients who wanted (could afford) php scripts (I'm still using 2.12b..lol). Several scripts are still running well after all these years. You probably should consider upgrading... Now, I'm building an online programming resume for myself

Re: [PHP] User/Group for PHP

2001-01-13 Thread Richard Lynch
Anyone know of a cfg option that would make files written by php be a different user/group than the apache server user/group? You could run PHP as a CGI wrapped by suExec (http://apache.org) -- Be sure not to use --with-safe-mode, as suExec and Safe Mode do mostly the same thing, but they fight

Re: [PHP] MSQL and php creating problem with date..

2001-01-15 Thread Richard Lynch
* You have an error in your SQL syntax near 'dayofmonth(date_add('', INTERVAL 7 DAY)))' at line 2 * ?php $odate = date('Y m d'); $connect = mysql_connect("localhost"); What is

Re: [PHP] Problems sending to several recipients with mail() using WIN NT and Apache

2001-01-15 Thread Richard Lynch
I'm using Apache 1.3.14 on WIN NT, and can't send mail to more than one recipient using the PHP-mail command. I've checked php.ini, and everything seems to be fine... This is an example that won't work (but should have worked..?) mail("[EMAIL PROTECTED], [EMAIL

Re: [PHP] debugging php

2001-01-15 Thread Richard Lynch
- what is a good tcp-listener (i tried tcpdump, but this gives to much output) No help for you there... I've never even tried this. Maybe you could pipe tcpdump through grep, and include something like ZZ in all your error messages or something... - the debugger doesn't work: the

Re: [PHP] Netscape differences?

2001-01-15 Thread Richard Lynch
Try sending the various "no-cache" and "expiration" headers. You can find more details in code archive samples linked from: http://php.net/links.php Naturally, IE and Netscape don't agree on which headers mean what, so you have to send at least twice as many as you'd expect. Am I the only one

Re: [PHP] variable tracking overview

2001-01-15 Thread Richard Lynch
If the answers to the 390 inputs are all limited in length, you *might* be able to squeeze them all into POST variables carried forward from page to page. What you need to realize here is that HTTP is stateless -- The browser and server won't remember anything unless you work at it. So, on each

Re: [PHP] Parse Error

2001-01-15 Thread Richard Lynch
PHP parse error, or SQL parse error?... If it's PHP, you may need to look at the *previous* line, or even a bunch of lines before that if you are missing a { or } or have messed up quotes. If it's an SQL error, you probably don't have any data in $HTTP_POST_VARS['UserName'] or

Re: [PHP] Missing function virtual () ???

2001-01-15 Thread Richard Lynch
compiled PHP3/PHP4 as external CGI under Apache. virtual("test.html"); Does is not work in a CGI-PHP ? Correct. virtual() cannot work in CGI. You'll have to use some combination of exec()/fopen()/popen() to achieve what you need. -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] safe mode in 4.0.4pl1

2001-01-15 Thread Richard Lynch
suExec() does most of what safe_mode would do, and other things besides... I don't think they are compatible... What exactly is your suExec'ed PHP able to do that you want to not allow? - Original Message - From: Ian Gulliver [EMAIL PROTECTED] Newsgroups: php.general Sent: Monday,

Re: [PHP] how do I do this, please?

2001-01-15 Thread Richard Lynch
? if (ereg !=("^[0-9]+[.]?[0-9]*$", $val1)) { header("Location:http://localhost/calculate_form.html"); exit; But the script will attempt to perform calculations on non numeric fields and I also want it to return the form if anyone puts in a non numeric value. I think I

Re: [PHP] calling perl from within php

2001-01-15 Thread Richard Lynch
We are running PHP 4 on a Solaris 2.7 box with Apache 1.3.11 with mod_perl 1.24. We need to communicate with 3rd-party Perl APIs from within PHP to handle processing of a form. The API functions each expect an associated array and will return a result value to the calling party. The Perl

Re: [PHP] Perl regular expression bug

2001-01-15 Thread Richard Lynch
?PHP $string = "[["; Okay. I don't think [ is special in PHP. { is a new special character, though. $string = preg_replace("/(\W)/", "1", $string); \W -- what's that? You probably need \\W there... ? $string would then contain "\[\[". I dunno about that. This Regex stuff is

Re: [PHP] PHP FDF on Linux PPC

2001-01-15 Thread Richard Lynch
Try the Apache/MySQL/PHP Mailing List also: To unsubscribe from this list, just send a blank message to [EMAIL PROTECTED] To switch to or start with the digest version, send a blank message to [EMAIL PROTECTED] This list is hosted as a public service by Dynapolis Internet Communities

Re: [PHP] Magic Quotes - Problems with Inconsistent Behavior removing Slashes

2001-01-15 Thread Richard Lynch
Unless I'm even more confused than usual about something I've long believed to be true... MagicQuotes does not ever strip slashes. MagicQuotes does an addslashes before the data gets into the database. Are you viewing the same record all the time, or is it possible that one of your records has

[PHP] Re: [chiPHPug] Addslashes]

2001-01-15 Thread Richard Lynch
The thing that always seems to screw me up is the difference in new lines between windows and *nix ... at the end of the day you need to play with the --records-separated-by clause in the mysqlimport line ... the permutations to play with are ='\n' v. '\r\n' ... you're shooting to get 0 in the

Re: [PHP] HTTP_POST

2001-01-17 Thread Richard Lynch
tdinput type="checkbox" name="?php echo$SkyAccNo;?" value="ON"/td For example there will be three rows with different values and each checkbox will have a unique name. On the next page once a submit button has been pushed I want to do: sqlExecute( "Select * from SkyDiary where AccNo = (Here I

Re: [PHP] Forking email out

2001-01-17 Thread Richard Lynch
Due to the sheer size of my mailing list, it would seems sensible to try streamlining the send -mailing script I run. In PERL I think the command to split the sending proccess was "fork", where the script launches a new command allowing the script to continue on while each person is emailed. Do

Re: [PHP] How can I download information (file) without standard save as dialog ??

2001-01-17 Thread Richard Lynch
"save as" dialog that will come up in all cases (you may have a workaround this problem). If the dialog is not shown up the download destination (directory) need to be passed to the server when the session is initialized so that the web browser knows where to save the information. Is

Re: [PHP] mysql error

2001-01-17 Thread Richard Lynch
mysql_select_db("jamesmc",$db); $result = mysql_query("SELECT * FROM comment WHERE pid='$poid' ORDER by cid desc",$db); $comm = mysql_fetch_array($result); This is in the FAQ, I think... Better re-read that. Start using or die() a lot: mysql_select_db("jamesmc",

Re: [PHP] session_start() and cache problem ...

2001-01-17 Thread Richard Lynch
The other website does use session_start(). A "HEAD / HTTP/1.0" gives I have the extra lines : Expires, Cache-Control, Pragama. I would like to get rid of those 3 lines : is it possible and how could I achieve that ? Probably by sending your own (blank) headers with those names. ?php

Re: [PHP] Images ??? ok,but...

2001-01-17 Thread Richard Lynch
I can see... I mean, the images appears, now, is it possible when uploading images, do a copy to a small file, ie I will have 2 files for each image, but with different sizes, where the small one is a small size of the original image...confused. This is because You can create a thumbnail on the

Re: [PHP] calling static class functions using a function variable

2001-01-17 Thread Richard Lynch
$junk="xml::hi_handler"; $junk(); Fatal error: Call to undefined function: xml::hi_handler() Perhaps this: $j1 = "xml"; $j2 = "hi_handler"; $j1::$j2(); Wait. Are you saying you don't have an instance of an xml object?... I'm surprised you can even call xml::hi_handler() without one in

Re: [PHP] PHP connecting to FIlemaker Database

2001-01-17 Thread Richard Lynch
Has anyone used PHP to connect to a FileMaker database? If you have a url to a tutorial please e-mail me. I'm pretty sure somebody posted something about that on the AMP (Apache/MySQL/PHP) mailing list last week or so... I think they got it to work via ODBC... To unsubscribe from this list,

Re: [PHP] determine number of days, hours minutes between 2 dates

2001-01-17 Thread Richard Lynch
The subject pretty much explains it all. I have 2 dates (MMDDHHSS format) and want to determine the number of days, hours, minutes and seconds left from the later date to the earlier date. I figure I could do all this using date arithmatic, divide by 60 seconds in a minute, 60 minutes

Re: [PHP] Installing with apache

2001-01-17 Thread Richard Lynch
./configure --with-mysql --with_apache=../apache_2.0a9 Don't use relative dir with ./configure. It's not that smart. By Day:|By Night: Don't miss the Zend Web Store's| There's not enough room here... Grand Opening on January 23, 2001! | Start

Re: [PHP] calling static class functions using a function variable

2001-01-18 Thread Richard Lynch
Check out chapter 13 of the php manual: http://www.php.net/manual/en/language.oop.php "Static class methods are apparently supported in php v4.02"... using :: notation. A user-comment that "it works" does not exactly qualify as a documented feature... I wouldn't count on it. By Day:

Re: [PHP] calling static class functions using a function variable

2001-01-18 Thread Richard Lynch
Static class methods certainly do work, and have for some time. I think Shaun's point is that variable-named function support seems to be missing for calling static class methods. Then it looks like somebody needs to file a couple Feature Requests: Documentation to validate that calling

Re: [PHP] Recompile GD ??

2001-01-19 Thread Richard Lynch
How can I do it ??? I installed jpeg-6b, and I readed that before recompile PHP(with option : --with-jpeg-dir=/.../jpeg-6b), I must recompile gd, its really necessary ? If si, how recompile gd. There should be instructions in the GD source code directory. By Day:

Re: [PHP] problems creating a png image from an array{HELP}

2001-01-19 Thread Richard Lynch
I have a txt file as input.This file has the coordinates for a gas network.With php I am creating an array with the above coordinates and then I create from the array the image from the network.When the txt file is 21Kb there is no image, else all works perfect{with a smaller txt file).I am

Re: [PHP] problem with file upload

2001-01-19 Thread Richard Lynch
? for ($i=0 ; $i 4 ; $i++) { file://do something for ($k=0 ; $k 3 ; $k++) { print "input type=\"checkbox\" name=\"checkans[$i][$k]\" value=\"".$K."\" "; file://this is working print "input type=\"file\" name=\"ans[$i][$k]\" "; file://this is not } }

Re: [PHP] Ms SQL Error with php3.0

2001-01-19 Thread Richard Lynch
Fatal error: Call to unsupported or undefined function mssql_connect() in C:\HTTPD\HTDOCS\mssql.php3 on line 3 I have uncommented the ; in the php3.ini file. Is that DLL actually in your php directory?... By Day:|By Night: Don't miss the Zend Web

Re: [PHP] References in an array

2001-01-19 Thread Richard Lynch
$overview = imap_fetch_overview($mbox, "1:$last", 0); $IDs = array(); $i = 0; foreach($overview as $val){ $IDs[$i][0] = $val-message_id; $IDs[$i][1] = $val; $i++; } echo "table border=\"1\""; foreach($IDs as $val){ echo "trtd" . $val[1]-subject . "/td/tr"; } echo

Re: [PHP] Date/Time Formatting

2001-01-19 Thread Richard Lynch
Also I'd like to if possible to be able to enter and display the date in Australian / European Time format (DD,MM,) I'm currently entering it on the form using three text fields and then rearanging them to the Format in mySQL and indserting it as a string, but I don't know how to 'break'

Re: [PHP] fputs() to save mysql db file

2001-01-19 Thread Richard Lynch
I am trying to make a tab delimited file of a mysql table so I can open it with Excel. I select the data - 40 fields, 808 records no prob. I view a mysql_num_rows() query to make sure it selects all records; no prob. I create a tab delimited format: $result = mysql_query("SELECT * FROM

Re: [PHP] is it possible to communicate javascript and php?

2001-01-19 Thread Richard Lynch
I would like to know if it possible to pass in any way some values from javascript functions to php variables ? Yes, but... You can have JavaScript call another URL using something like: document.location = 'http://yoursite.com/whatever.php?foo=' . $foo; But keep this in mind: PHP lives on

Re: [PHP] PHP4 Mime types Causing Save-As dialog

2001-01-19 Thread Richard Lynch
It appears php4 has a bug in it, such that when I install it with apache 1.3.9, then add the proper lines to httpd.conf for the php mime types, whenever i hit a page of one of those types (.php, .html, etc) my browser brings up a 'Save As' dialog, indicating to me that apache has successfully

Re: [PHP] Question about session_register()

2001-01-20 Thread Richard Lynch
My question is, when the user first visit, a session created, and I register the variable. On the second, or following hits, to use the session variable, I also need "session_start", but should I still need to call session_register() for each hit? No, once you register it, it's there unless

Re: [PHP] Session problem?

2001-01-20 Thread Richard Lynch
function add_toCart($id,$array) { session_register("OBJECT"); $c = new Configurator; $c-readConfig($id); $OBJECT = serialize($c); header("Location: Cart.php"); echo "Redirecting..." } Unfortunately, the session file (in /tmp) is always empty after this function executes. I'm using PHP

Re: [PHP] Using a variable in a variable or as the second part of an array?

2001-01-20 Thread Richard Lynch
I need to simulate this effect: $array[$i] or \$something . $i, and have it return $checkbox1 $checkbox2 etc. on up in a while loop. Just doing it doesn't seem to work, but does anyone know of any work arounds? Or just the keyword I should be looking for to search the manual? You could be

Re: [PHP] Image problem

2001-01-20 Thread Richard Lynch
Can anyone tell me how to display both jpg and gif images. Basically, what i've got is: img src="$filedir/$CUserName".jpg Now, I know I probably need slashes in there and I played around with it but no luck. Where do I put them? TIP: Use "View Source" in your browser to see what the IMG

Re: [PHP] PHP Parse MySQL Field???

2001-01-20 Thread Richard Lynch
I have a BLOB field in a MySQL database that I want to parse into my page using PHP. For instance, in this field might be the following: ? echo "test"; ? So when I access this field in PHP I want it to display "test". Is this possible? Yeah. That's called "eval" (short for 'evaluate')

Re: [PHP] Help, can't seem to get this write

2001-01-20 Thread Richard Lynch
function downloadfile($url, $imageDir) { if(!$file = fopen($url , "r")) { echo ("couldn't open $url\n"); } else { #fpassthru($file); if($file2 = fopen("/www/sinead/images/Full/Sinead200.jpg", "w")) { $content=fread($file, filesize("$file"));

Re: [PHP] ibase_num_fields() -a workaround ?

2001-01-20 Thread Richard Lynch
ibase_num_fields() isn't functional in php 4 - anyone have any ideas to work around this ? I'm checking the number of results for a query to check if a user/password is correct -I suppose I could just do a fetch_row() on the result and test if thats empty or not - but I'll only do that as

Re: [PHP] Form refresh problem

2001-01-20 Thread Richard Lynch
My problem is that a user, having voted once, can keel clicking refresh in their browser and the form data keeps getting sent, incrementing the poll results each time Is there a way to kill form data once it;s been posted, or is there a better way of doing what I am trying to accomplish?

Re: [PHP] Verifying against a file

2001-01-21 Thread Richard Lynch
$fd=fopen("words.txt", "r"); Check that $fd is not 0. $words = fread($fd, 100); I then convert a string which is passed in a form to this script $FirstName=strtolower("$FirstName"); And now I check to see if the lowercase version of $FirstName contains any of the words from the

Re: [PHP] MySQL Access Denied

2001-01-21 Thread Richard Lynch
I am trying to conect to a MySQL db and no matter what code I use I am always getting denied, I know the password is correct as I have tested it elsewhere. Just wondering if this could be caused by the fact that the password has a + and a . in it. Would that get me denied, and how can I get

Re: [PHP] Help With passthru, system, exec

2001-01-21 Thread Richard Lynch
I've been trying to write something to ping a URL on the system level, and keep the output in an array. I've been trying to work with system, exec, and passthru, but it looks as though they all return only the last line of the output. How would I put the whole output into the array? A

Re: [PHP] mailTo

2001-01-22 Thread Richard Lynch
I am wrting a php page that will write out an email message to the email address retrieved from Db. If i want to have CC function togethere with mailTo, how could I do that? Use the optional fourth argument to send Cc: header with the mail. $headers = "Cc: [EMAIL PROTECTED]\r\n"; $headers .=

Re: [PHP] How to count time in php

2001-01-22 Thread Richard Lynch
can anybody help me how to count seconds, minutes and hours in php? I want to sum values like 03:35, 02:31, 04:59, etc. and show the results in minutes. Here's how I would try to do it: ?php $times = array("03:35", "02:31", "04:59"); $hours = 0; $minutes = 0; $seconds = 0;

Re: [PHP] Need key() equivalent for string variable

2001-01-22 Thread Richard Lynch
I'm trying to pass a string variable to a custom function, echoing its *value on one line, and its *name (that is, its key if this were an array I think you are looking for "variable variables"... ?php $foo = 'test'; $test = 42; echo "$foo is ", $$foo, "BR\n"; ? Note the use of

Re: [PHP] selected = true

2001-01-22 Thread Richard Lynch
Hey all. Does anyone have any ideas how I can carry over a selected value? :) It's probably easy but my mind is making it difficult. A value is stored for a record in the DB which had been previously assigned through a #get all the possible options into an array $options $options =

Re: [PHP] Outputting specific HTML for table tag.

2001-01-22 Thread Richard Lynch
5 photos that need returning to one of the photo pages, and I have the photos in rows of three; Obviously, there'd be an empty table cell. And ? // Connection code $table = "table border=\"0\" /* Yadda Yadda */ "; $table .= "tr"; $photocount = 0; while($row =

Re: [PHP] HELP! REVOKE COMMAND!!!!

2001-01-22 Thread Richard Lynch
How is the sintaxe of this command Like, a database rollback? That depends on the database, not on PHP. Something not unlike this: $query = "rollback"; mysql_query($query); Only I dunno if the mysql team has that new transaction stuff they bought really integrated yet or not, much less

Re: [PHP] How can I make a PHP script run as a background process ????

2001-01-22 Thread Richard Lynch
I need to have some task performed all the time in the background (database task etc.) How is this possible with PHP. I do not have direct access to the OS (can not make an application to run directly under linux). Is it possible to have a PHP script execute all the time in some way. H.

Re: [PHP] Downloading images through the use of code

2001-01-22 Thread Richard Lynch
First of all, am I correct in assuming I could download a file and parse it using fopen("url")? Yup. Pretty darn nifty, huh? Secondly, if I find an IMG tag, how would I go about grabbing the file that is contained in the SRC of that image tag? Would another simple fopen() and fput() to another

Re: [PHP] Performance: register_globals on or off?

2001-01-22 Thread Richard Lynch
Are there any real performance gained by turning register_globals off? After all, it must take the php engine some clock cycles to generate all the global variables. Have anyone tested it? It can't be that many clock cycles... I think people do it more to stop hackers from trying to use a

Re: [PHP] downloading

2001-01-22 Thread Richard Lynch
Maybe -- If php was installed with FTP, you can have it FTP stuff dynamically... Might be easier to log in to the other server and do FTP by hand for just one file though... Don't miss the Zend Web Store's Grand Opening on January 23, 2001! http://www.zend.com Wanna help me out? Like Music?

Re: [PHP] What PHP Stands For....

2001-01-22 Thread Richard Lynch
Anyway, I only know what I read - I got to the scene to late to actually know this stuff first hand... hope this helps... and if someone who really was on the scene back then cares to comment/correct me, please do ;) I sort of do. ;) LOL :-) tools for personal home pages, that meaning

Re: [PHP] installing and using PEAR

2001-01-23 Thread Richard Lynch
Can anyone direct me to some up-to-date documentation on how to install (and then use) the Pear included in the distribution? There seems to be minimal (and perhaps outdated or inappropriate?) install instructions included with the source distribution, but I've found nothing on how to use it. I

Re: [PHP] Filereference and require()

2001-01-23 Thread Richard Lynch
You can provide the full path: require "/usr/local/share/apache/htdocs/deep/down/dir/a_specific_file"; You can alter include_path in php.ini to have "/usr/local/share/apache/htdocs/deep/down/dir:./:/usr..." in it -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like

Re: [PHP] Export to Spreadsheet Format

2001-01-23 Thread Richard Lynch
I want to run a query on a database and export the recordset to a spreadsheet, preferably Excel native. The box is on a Win32 OS, so I can instantiate a Excel COM object (similar to the PHPBuilder COM article), and use the COM methods to create an Excel file. Or, I can fopen and fput a CSV

Re: [PHP] file or fopen to fetch a web page???

2001-01-23 Thread Richard Lynch
I wonder myself, which method is better to fetch a web page: $file = fopen($url, "r"); $page = fread($file, 5); or $file = join('', file($url)); Probably about the same either way... Maybe not building an array to build a string will save a little... You could test it

Re: [PHP] CREATE DOWNLOAD LINK

2001-01-23 Thread Richard Lynch
How do I build a link to an attached file to an email? I have the filename, mime-type and size but where do I get the path to the file? You may want to use Manuel Lemos' mail class to handle that -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music?

Re: [PHP] where does database go at host

2001-01-24 Thread Richard Lynch
I'm going to created a database with the use of a php/html page on my commercial host (forsite.net). I have yet to master the unix directory system so I don't want to play around looking for it. Does a database have to "live" in the MySQL directory, or can it be in my html web directory? How

Re: [PHP] Bad file descriptors

2001-01-24 Thread Richard Lynch
There are only so many files that your OS can have open at any one time -- Perhaps you are hitting that limit?... I think you can increase this with... "ulimit"??? Another possibility is that if you need to copy an entire directory structure, rather than making PHP walk through it copying one

Re: [PHP] Repition Reduction ?

2001-01-24 Thread Richard Lynch
I'm making a small quiz script, and wanted to know how I could minimize repition of questions to a single user. And also how to randomize all the questions ? If you put all the questions in an array, and then call http://php.net/shuffle on it, you'll do both. -- PHP General Mailing List

Re: [PHP] session.save_path

2001-01-24 Thread Richard Lynch
Warning: open(/tmp\sess_1b7577b36d874741ed1e74b4bead0dfd, O_RDWR) failed: m (2) in h:\program\apache\htdocs/boa/sessionTest.php on line 5 Warning: open(/tmp\sess_1b7577b36d874741ed1e74b4bead0dfd, O_RDWR) failed: m (2) in Unknown on line 0 Warning: Failed to write session data (files). Please

Re: [PHP] Bi-directional popen()?

2001-01-24 Thread Richard Lynch
Is it at all possible, no matter how much trickery and such involved, to do something similar to popen(), but bi-directional? The user-contributed notes indicate that popen() *is* bi-directional for those OSes that support them... Meanwhile, if yours doesn't, you could maybe wrangle something

Re: [PHP] error with REPLACE or UPDATE

2001-01-24 Thread Richard Lynch
I getting dificulties with an updating records procedure: like I have an Auto-Increment field I try to use the REPLACE (but without the the auto-increment I tried also UPDATE). I checked also the variables with an echo, and also all the usual things I could imagine... What goes wrong?... #

Re: [PHP] Use variables, functions ect. in a textfile

2001-01-24 Thread Richard Lynch
Im working on a site where we want to put all the text into text-files. Im having troubles doing this, though. If I have a text like this "Today there are more than users registered", and I put it in a .txt-file, how can I execute the code wich should return the numer ? Im building

Re: [PHP] HTTP_REFERER vs. session_whatever() vs. header()

2001-01-24 Thread Richard Lynch
//echo $test."br"; "//" . Without the remark, the code work but I get the error message stating Warning: Cannot add header information - headers already sent by (output started at test.php) in test.php on line ** Yes. A header is called a header because it comes

Re: [PHP] HELP!!! PDFLIB FOR PHP!!!!!

2001-01-24 Thread Richard Lynch
I think you can get the SDK from adobe.com Search for "fDF" I think. You may wish to specify your OS in your next plea, so people can help more. -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time:

Re: [PHP] problem with imagecolorsforindex()

2001-01-24 Thread Richard Lynch
I have this code in a php script, which takes all pixels from a PNG image and produces a second "image" with random numbers in HTML format this time. (an example can be found at http://www.cyprusnews.org/sub/prog2.php). Instead of getting ALL shades of red from the pallette, I get only 8-9

Re: [PHP] Displaying Date correctly

2001-01-24 Thread Richard Lynch
http://mysql.org should have documentation a date_format() function or something like that somewhere in there. -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm

  1   2   3   4   5   6   7   8   9   10   >