|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Subject: php3 Digest 7 Mar 2000 06:00:01 -0000 Issue 1522
From: php3-digest-help
lists.php.netDate: Tue Mar 07 2000 - 00:00:01 CST
- Next message: php3-digest-help
lists.php.net: "php3 Digest 7 Mar 2000 18:00:02 -0000 Issue 1523"
- Previous message: php3-digest-help
lists.php.net: "php3 Digest 6 Mar 2000 18:00:01 -0000 Issue 1521"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php3 Digest 7 Mar 2000 06:00:01 -0000 Issue 1522
Topics (messages 79990 through 80071):
[PHP4BETA] Detecting Flash from PHP?
79990 by: Damien Mc Kenna <damien
mc-kenna.com>
each($HTTP_POST_VARS)
79991 by: trond <troh
ifi.ntnu.no>
79998 by: "Henry F. Marquardt" <hank
yerpso.net>
80000 by: "Rossi Designs" <webmaster
rossidesigns.net>
remove function is not working
79992 by: Mark Lo <markloky
netvigator.com>
79993 by: Søren Mogensen <moge
itcampus.dk>
79999 by: "Henry F. Marquardt" <hank
yerpso.net>
accès BD
79994 by: "Can-Host Networks - Félix C.Courtemanche" <webmaster
can-host.com>
Detecting Flash from PHP?
79995 by: "Can-Host Networks - Félix C.Courtemanche" <webmaster
can-host.com>
80002 by: pearson
cmd.com
80019 by: "NickM" <terado
hotmail.com>
loading the contents of a dbm file into an array?
79996 by: "Linux User" <linux
digital-salvage.net>
80021 by: "Linux User" <linux
digital-salvage.net>
[PHP4BETA] Re: Detecting Flash from PHP?
79997 by: "Richard Feather" <richard_feather
hotmail.com>
Form output: Extending GET
80001 by: Gary Bickford <garyb
fxt.com>
80003 by: Gary Bickford <garyb
fxt.com>
Form.
80004 by: "Gabriele Partini" <gabry
ltt.dii.unisi.it>
80015 by: Chris Moewes-Bystrom <christopher
moewes.com>
80067 by: "Ralph Guzman" <raguzman
netraiser.com>
something about php
80005 by: Gary Bickford <garyb
fxt.com>
80013 by: "Andrew Hill" <ahill
openlinksw.com>
80014 by: "Andrew Hill" <ahill
openlinksw.com>
strange filename in tmp after uploading
80006 by: "James Moore" <James
Prospect-enterprises.co.uk>
"require" (or "include") path problem.
80007 by: "SheepCow" <sheepcow
darksectorcenter.com>
PB under Win2K/IIS 5.0 with header()
80008 by: "François BAUD" <promethe
cybercable.fr>
80011 by: Russ Demarest <demarest
thinkquest.org>
Size limit on file retrieval from Access DB ?
80009 by: jplasqui
vub.ac.be (Jan Plasqui)
UK User Group
80010 by: "James Moore" <James
Prospect-enterprises.co.uk>
80016 by: Chris Moewes-Bystrom <christopher
moewes.com>
80017 by: Cliff Rowley <dozprompt
onsea.com>
GET and POST question
80012 by: Gary Bickford <garyb
fxt.com>
Problem Compiling Apache1.3.12 and php-3.0.15
80018 by: Clarence Hart <rti1clh
ismd.ups.com>
80035 by: Clarence Hart <rti1clh
ismd.ups.com>
PHP Template Engine spec revision 0.5
80020 by: Andrei Zmievski <andrei
ispi.net>
pass variable to 3rd page
80022 by: "Cicy Chen" <cicy
peerwork.com>
80023 by: Russ Demarest <demarest
thinkquest.org>
Array Sorting Question.
80024 by: "Linux User" <linux
digital-salvage.net>
how to insert an array into MYSQL
80025 by: "Daevid Vincent" <DayWalker
TheMatrix.com>
mt_rand
80026 by: "Steven T Sigourney" <steve
tophat.com>
80036 by: Zak Greant <zak
freeimages.com>
Fatal Error - File not found
80027 by: "Ron White" <rwhite
edverify.com>
80034 by: "Ron White" <rwhite
edverify.com>
elseif parse error
80028 by: "Erik Boles" <erik
rockymountainwebtech.com>
80029 by: "Rossi Designs" <webmaster
rossidesigns.net>
80033 by: "Erik Mathy" <erik
butlerandco.com>
80041 by: "Erik Mathy" <erik
butlerandco.com>
PHP3, Apache, & Mysql
80030 by: rick
chproducts.com (Rick Salvador)
CGI error on NT 4.0 with IIS 4
80031 by: Jim Bohr <jbohr
match.org>
80037 by: "Erik Mathy" <erik
butlerandco.com>
pdflib3 + php4b4
80032 by: Mark Heintz - PHP Lists <heintzphp
cobalt3.tyler.net>
SMS with PHP ?
80038 by: Stephane Moureau <thx1133
freegates.be>
80046 by: Sevo Stille <sevo
ip23.net>
80047 by: Cliff Rowley <dozprompt
onsea.com>
mySQL and PHP4b4pl1
80039 by: "Gary Rule" <grule
esupportnow.com>
PHP COM tutorials or help ?
80040 by: Jonathan Griffin <jon_griffin_99
yahoo.com>
ATTN: \"Brad\"
80042 by: "Dave 'Duke of URL' Weiner" <davew
webmast.com>
80053 by: "Marck D. Pearlstone" <marck
silverstones.com>
80054 by: "Murray Shields" <murray
mu.com.au>
80059 by: Alex Belits <abelits
phobos.illtel.denver.co.us>
80061 by: Alex Belits <abelits
phobos.illtel.denver.co.us>
PHP and webservers for Win32
80043 by: Chris Toth <toth.22
osu.edu>
80044 by: "Gregory Drake Wilson" <gdw1
cornell.edu>
ODBC on linux :"signal segmentation fault"
80045 by: "Iris Zhong" <izhong
tekdigitel.com>
socket error~!! what's problem??
80048 by: "kesaros" <kesaros
kicomsa.com>
80049 by: Phil Allsopp <phil
virtek.com>
session theory question
80050 by: Aaron Tuller <mandelbaum
olywa.net>
80055 by: "Arpad Tamas" <lsts
neves.pmmf.hu>
80056 by: "Morgan Harvey" <morgan
anomalyinc.com>
string to variable question
80051 by: "Chris Mason" <chris
net.ai>
80058 by: Zak Greant <zak
freeimages.com>
php3 config error and fail to compile
80052 by: "DANG, Muoi" <mdang
link.com.au>
Problem running php scripts
80057 by: Jason <jasonml
iconimaging.net>
SetCookie function doesn't work, need help.
80060 by: "Jose de Leon" <jadiel
thevision.net>
test, no content
80062 by: "PHPig" <PHPig
hotmail.com>
Printable Manual
80063 by: "Diego Mohadeb" <diegoem
hotmail.com>
Apache says it can't file the libphp3.so file?
80064 by: "Tony" <tkirk
tonyk.toad.net>
80070 by: PSE-L
mail.professional.org (Sean Straw / PSE)
WARNING: too many bounced messages
80065 by: "eGroups.com Bounce Manager" <php_nl-return-okay-php3=lists.php.net
returns.egroups.com>
convert a dynamic page to static, almost....
80066 by: "destiney" <webmaster
destiney.com>
output_buffering
80068 by: andrew jacob price <ajprice
students.uiuc.edu>
web hosting research
80069 by: "PHPig" <PHPig
hotmail.com>
80071 by: "destiney" <webmaster
destiney.com>
Administrivia:
To subscribe to the digest, e-mail:
php3-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php3-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php3
lists.php.net
----------------------------------------------------------------------
attached mail follows:
At 12:41 PM 3/6/00, you wrote:
> Is there a way to detect whether the user's browser supports Flash from PHP?
I'm sure it's in the HTTP headers somewhere? Guys?
Damien Mc Kenna, Computer Science Student, Married to Jen, Parent of 4 cats
http://mc-kenna.com - damien
mc-kenna.com - ICQ:17066133
Please use our new web and email addresses and remove any old ones you have
attached mail follows:
I have a problem with array and $HTTP_POST_VARS.
I have done almost the same before with good luck, but now I'm stuck
with this problem.
I get this messages: Warning: Variable passed to reset() is not an array
or object in /..........path/filname
Warning: Variable passed to each() is
not an array or object in /..........path/filname
First I list out a table with checkboxes and then i want to delete the
items that are selected.
To to this I use to files. One that prints the items like this:
----------------------------------------------------------------------------
$array = File("$filename");
.....
print "<H3>Please check the element you want to delete:</H3> \n";
print "<FORM name=linksdelfrm METHOD=post ACTION=\"linksdelete.php3\">
\n";
echo chkbxtable ($array); //chkbxtable is a function I have made that
gives all the items a checkbox
..
..
--------------------------------------------------------------------------------------------------------------------
//In the other file (linksdelete.php3) I try to delete the items that
have been marked.
//I have tried out different kind of loops.
reset ($HTTP_POST_VARS);
while (list($key, $val) = each($HTTP_POST_VARS)) { //her is the bug
$aslette[] = $key;
}
for ($i=0;$i<count($aslette)-1;$i++){
for ($j=$aslette[$i];$j<count($array);$j++){
$array[$j]=$array[$j+1];
}
for($k=$i+1;$k<count($aslette)-1;$k++){
$trekk_fra=$aslette[$k];
$trekk_fra--;
$aslette[$k]=$trekk_fra;
}
}
--------------------------------------------------------------------------------
Any help or suggestions would be greatly appreciated.
Thanks
Trond
attached mail follows:
Looks like your install was compiled without the --enable-tracking-vars
swtch. You might need to rebuild with that enabled.
Hank
-----Original Message-----
From: trond [mailto:troh
ifi.ntnu.no]
Sent: Monday, March 06, 2000 12:09 PM
To: php3
lists.php.net
Subject: [PHP3] each($HTTP_POST_VARS)
I have a problem with array and $HTTP_POST_VARS.
I have done almost the same before with good luck, but now I'm stuck with
this problem.
I get this messages: Warning: Variable passed to reset() is not an array
or object in /..........path/filname
Warning: Variable passed to each() is
not an array or object in /..........path/filname
First I list out a table with checkboxes and then i want to delete the
items that are selected.
To to this I use to files. One that prints the items like this:
--------------------------------------------------------------------------
--
$array = File("$filename");
.....
print "<H3>Please check the element you want to delete:</H3> \n";
print "<FORM name=linksdelfrm METHOD=post ACTION=\"linksdelete.php3\">
\n";
echo chkbxtable ($array); //chkbxtable is a function I have made that
gives all the items a checkbox
..
..
--------------------------------------------------------------------------
------------------------------------------
//In the other file (linksdelete.php3) I try to delete the items that have
been marked.
//I have tried out different kind of loops.
reset ($HTTP_POST_VARS);
while (list($key, $val) = each($HTTP_POST_VARS)) { //her is the bug
$aslette[] = $key;
}
for
=0;$i<count($aslette)-1;$i++){
for ($j=$aslette[$i];$j<count($array);$j++){
$array[$j]=$array[$j+1];
}
for($k=$i+1;$k<count($aslette)-1;$k++){
$trekk_fra=$aslette[$k];
$trekk_fra--;
$aslette[$k]=$trekk_fra;
}
}
--------------------------------------------------------------------------------
Any help or suggestions would be greatly appreciated.
Thanks
Trond
attached mail follows:
A few suggestions
1. use phpinfo() to see if your server sets $HTTP_POST_VARS 2. if no checkboxes are checked nothing will be in your array (assuming you named them "somename[]") because http doesn't send anything for an unchecked checkbox. 3. why do you want to reset $HTTP_POST_VARS?
Rossi Designs
(904) 226-8979
P.O. Box 1084, Holly Hill, Florida 32125-1084
http://rossidesigns.net
----- Original Message -----
From: trond <troh
ifi.ntnu.no>
To: <php3
lists.php.net>
Sent: Monday, March 06, 2000 1:08 PM
Subject: [PHP3] each($HTTP_POST_VARS)
| I have a problem with array and $HTTP_POST_VARS. | I have done almost the same before with good luck, but now I'm stuck | with this problem. | | I get this messages: Warning: Variable passed to reset() is not an array | or object in /..........path/filname | Warning: Variable passed to each() is | not an array or object in /..........path/filname | | First I list out a table with checkboxes and then i want to delete the | items that are selected. | To to this I use to files. One that prints the items like this: | --------------------------------------------------------------------------
-- |
attached mail follows:
Hi,
this function is work exec("rm /dir/file_name");
if (!rm(file_name)) {----
---- ----} I got the error message indicating that rm() called to unsupport function. I would like to know the proper syntax for "rm()".Thank You
Mark Lo
attached mail follows:
On Tue, 7 Mar 2000, Mark Lo wrote: > this function is work > exec("rm /dir/file_name"); > > if (!rm(file_name)) > {---- > ---- > ----} > I would like to know the proper syntax for "rm()".
You probably want to use the unlink() function instead, it does what you are asking and has the system you used for rm(). http://www.php.net/manual/function.unlink.php3
Soeren
attached mail follows:
Remember, in a browser context, php is running with the web servers permissions ... which is probably 'nobody' or 'www' ... in either case the permissions on your file are probably 650 or so ... you might need to chmod to 655 your /dir or something if this is a regular occurance for your script.
Hank
-----Original Message-----
From: root
imsp015.netvigator.com [mailto:root
imsp015.netvigator.com]On
Behalf Of Mark Lo
Sent: Monday, March 06, 2000 11:53 AM
To: php3
Subject: [PHP3] remove function is not working
Hi,
this function is work exec("rm /dir/file_name");
if (!rm(file_name)) {----
---- ----} I got the error message indicating that rm() called to unsupport function. I would like to know the proper syntax for "rm()".Thank You
Mark Lo
-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Il suffit de lire un peu la documentation de PHP... Et PHP supporte effectivement les bases de données que tu as nommé. Plus particulièrement bien MySQL
You just have to read PHP doc a little bit :) PHP effectively support the Databases you named, especially MySQL
[ Félix C.Courtemanche | Web Designer ]
[ Head Designer | Webmaster ]
[ webmaster
can-host.com ]
[ Can-Host Networks | http://can-host.com ]
-----Message d'origine-----
De : Didier Laplanche <dlaplanc
info-ufr.univ-montp2.fr>
À : php3
lists.php.net <php3
lists.php.net>
Date : 6 mars, 2000 06:39
Objet : accès BD
Bonjour,
je cherche s'il existe des fonctions génériques pour accéder aux bases suivantes :
Oracle
Postgres
mysql
ODBC
-- Didier LAPLANCHE DESS TNI Montpellier II MAIL: dlaplancinfo-ufr.univ-montp2.fr laplanche
iname.com
attached mail follows:
You must use Javascript to detect pluggins... So you must work on an interface between PHP and javascript. It can be fairly easily done.
[ Félix C.Courtemanche | Web Designer ]
[ Head Designer | Webmaster ]
[ webmaster
can-host.com ]
[ Can-Host Networks | http://can-host.com ]
-----Message d'origine-----
De : Richard Feather <richard_feather
hotmail.com>
À : php3
lists.php.net <php3
lists.php.net>; php4beta
lists.php.net
<php4beta
lists.php.net>
Date : 6 mars, 2000 12:41
Objet : Detecting Flash from PHP?
>Is there a way to detect whether the user's browser supports Flash from PHP? > >Thanks. >______________________________________________________ >Get Your Private, Free Email at http://www.hotmail.com > >
attached mail follows:
There is a current thread going on the Flash list. One option that has been presented is to actually make an html page with a small flash movie in it. The only thing in the movie is a redirect to the Flash version of the site. If the plugin is not installed on the system, the movie would not load and the user would not be redirected. You could then use Javascript to redirect to the non-Flash version of the site....
Jeff Pearson
> -----Original Message-----
> From: Can-Host Networks - Félix C.Courtemanche
> [SMTP:webmaster
can-host.com]
> Sent: Monday, March 06, 2000 10:34 AM
> To: Richard Feather; php3
lists.php.net; php4beta
lists.php.net
> Subject: [PHP3] Re: Detecting Flash from PHP?
>
> You must use Javascript to detect pluggins... So you must work on an
> interface between PHP and javascript. It can be fairly easily done.
>
> [ Félix C.Courtemanche | Web Designer ]
> [ Head Designer | Webmaster ]
> [ webmaster
can-host.com ]
> [ Can-Host Networks | http://can-host.com ]
>
> -----Message d'origine-----
> De : Richard Feather <richard_feather
hotmail.com>
> À : php3
lists.php.net <php3
lists.php.net>; php4beta
lists.php.net
> <php4beta
lists.php.net>
> Date : 6 mars, 2000 12:41
> Objet : Detecting Flash from PHP?
>
>
> >Is there a way to detect whether the user's browser supports Flash from
> PHP?
> >
> >Thanks.
> >______________________________________________________
> >Get Your Private, Free Email at http://www.hotmail.com
> >
> >
>
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
> To search the mailing list archive, go to:
> http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Well you can use Javascript for the detection and send this back.
But my recommendation would be to have a small detect movie, this would simply forward you to the correct page. You could stick this in a div tag and set its style to hidden. But if you really need to have the info back at php then you will most certainly need javascript to send the info on flash or the plugins back as this info is all on the client only so needs to be collected and resent, in which case the php page is loaded and so another script must be called, bit complex you see. Better that the flash movie does the work.
Nick
----- Original Message -----
From: "Richard Feather" <richard_feather
hotmail.com>
To: <php3
lists.php.net>; <php4beta
lists.php.net>
Sent: Monday, March 06, 2000 6:41 PM
Subject: [PHP3] Detecting Flash from PHP?
> Is there a way to detect whether the user's browser supports Flash from
PHP?
>
> Thanks.
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
>
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
> To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Hi folks,
I have a gdbm file with a bunch of fields like the following.
ID | Product Name | Product Number | Category | Description ...
How can I load the entire contents of the gdbm file into an array?
I've gotten this far:
$key = dba_firstkey($db); while ($key != false) { $value = dba_fetch($key, $db); $data = unserialize($value); /* the fields are serialized in the gdbm db */
/* How do I stuff this data into a new array here?? I know I can't just do $newarray[]= $data. I need to have it in a an array of the format $newarray[1] = (ID1, Product Name1...) $newarray[2] = (ID2, Product Name2...) */
$key = dba_nextkey($db); } dba_close($db);
Any help greatly appreciated. Thanks!
attached mail follows:
Answered my own question - ugly but it works :)
$key = dba_firstkey($db); $x = 0; while ($key != false) { $value = dba_fetch($key, $db); $data = unserialize($value); $array_data[$x] = $data; $x++; $key = dba_nextkey($db); } dba_close($db);
----- Original Message -----
From: "Linux User" <linux
digital-salvage.net>
To: "php3" <php3
lists.php.net>
Sent: Monday, March 06, 2000 1:41 PM
Subject: [PHP3] loading the contents of a dbm file into an array?
> Hi folks,
>
> I have a gdbm file with a bunch of fields like the following.
>
> ID | Product Name | Product Number | Category | Description ...
>
> How can I load the entire contents of the gdbm file into an array?
>
> I've gotten this far:
>
>
> $key = dba_firstkey($db);
> while ($key != false) {
> $value = dba_fetch($key, $db);
> $data = unserialize($value); /* the fields are serialized in the
gdbm
> db */
>
> /* How do I stuff this data into a new array here??
> I know I can't just do $newarray[]= $data.
> I need to have it in a an array of the format
> $newarray[1] = (ID1, Product Name1...)
> $newarray[2] = (ID2, Product Name2...) */
>
>
> $key = dba_nextkey($db);
> }
> dba_close($db);
>
>
> Any help greatly appreciated. Thanks!
>
>
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
> To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Yeah, I've several Javascripts that can do it, but I'm more interested in doing it from the server, if possible.
>From: "Can-Host Networks - Félix C.Courtemanche" <webmaster
can-host.com>
>Reply-To: "Can-Host Networks - Félix C.Courtemanche"
><webmaster
can-host.com>
>To: "Richard Feather" <richard_feather
hotmail.com>, <php3
lists.php.net>,
> <php4beta
lists.php.net>
>Subject: [PHP4BETA] Re: Detecting Flash from PHP?
>Date: Mon, 6 Mar 2000 13:33:31 -0500
>
>You must use Javascript to detect pluggins... So you must work on an
>interface between PHP and javascript. It can be fairly easily done.
>
>[ Félix C.Courtemanche | Web Designer ]
>[ Head Designer | Webmaster ]
>[ webmaster
can-host.com ]
>[ Can-Host Networks | http://can-host.com ]
>
>-----Message d'origine-----
>De : Richard Feather <richard_feather
hotmail.com>
>À : php3
lists.php.net <php3
lists.php.net>; php4beta
lists.php.net
><php4beta
lists.php.net>
>Date : 6 mars, 2000 12:41
>Objet : Detecting Flash from PHP?
>
>
> >Is there a way to detect whether the user's browser supports Flash from
>PHP?
> >
> >Thanks.
> >______________________________________________________
> >Get Your Private, Free Email at http://www.hotmail.com
> >
> >
>
>
>--
>PHP 4.0 Beta Mailing List <http://www.php.net/version4/>
>To unsubscribe, e-mail: php4beta-unsubscribe
lists.php.net
>For additional commands, e-mail: php4beta-help
lists.php.net
>To contact the list administrators, e-mail: php4beta-admin
lists.php.net
>
______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com
attached mail follows:
Short answer is no. GET length is system dependent, usually around 1000 chars. Perhaps a better way would be to construct a non-interactive page on the server, containing all the info and html - use fputs() etc. instead of echo or printf - then send that file to the browser. Keep the temporary file around for a few minutes or as long as you want. This will avoid the problem as you can use POST. You might have to include a button on the form to 'download a printable copy of this form' or redirect from the form result to the static copy, to avoid the reload problem - the interaction between browser and server are an issue.
An interesting problem - I think I'd like to know the outcome for my own use. G
Brian Gardner wrote:
> This message was sent from Geocrawler.com by "Brian Gardner" <webmaster
myu4ea.com>
> Be sure to reply to that address.
>
> I have a large HTML form with a large number of
> variables (136 and 4 text areas) that, upon
> submit, echo into a PHP3 page of the same
> structure neatly typed and wrapped to print or
> send from the browser.
>
> Problem 1: Using the "POST" method will echo all
> the variables to the screen for printing, but
> sends a blank HTML form from the browser when you
> try to e-mail it ('cause the vars aren't in the
> header of course).
>
> Problem 2: Using the "GET" method will also echo
> to the screen and put ONLY SOME OF THE variables
> into the header behind the URL...because it seems
> to be limited to around a thousand characters.
>
> My goal is to have an identical copy of the HTML
> document capable of being sent directly from the
> browser.
>
> Does anyone know if it is possible to force-
> lenghten the variable limit in the header to
> accept the full string?
>
> I'm trying to stay away from splitting the form
> (since it is impractical to e-mail more than once
> for submitters). Hidden input fields don't
> shorten the number of variables and re-iterating
> the GLOBALS send only the $key,$value data. I'm
> also trying to stay away from creating a MySQL DB
> just for this form unless it's the only way to go.
>
> Any suggestions appreciated.
>
> Geocrawler.com - The Knowledge Archive
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
--
"Cyber is cyber, life is life."
Gary E Bickford mailto:garyb
fxt.com
FXT Corporation http://www.fxt.com/ tel:541-383-2749
mail:PO BOX 1808, SISTERS OR 97759 ship:66265 JERICHO ROAD, BEND OR 97701
attached mail follows:
I just posted one reply, but here's another thought. You might use some Javascript to notice if the form has been posted once - send it in the results. If so, then the onreload() function would rewrite the URL in the browser to fetch the static copy of the page. G
Brian Gardner wrote:
> This message was sent from Geocrawler.com by "Brian Gardner" <webmaster
myu4ea.com>
> Be sure to reply to that address.
>
> I have a large HTML form with a large number of
> variables (136 and 4 text areas) that, upon
> submit, echo into a PHP3 page of the same
> structure neatly typed and wrapped to print or
> send from the browser.
>
> Problem 1: Using the "POST" method will echo all
> the variables to the screen for printing, but
> sends a blank HTML form from the browser when you
> try to e-mail it ('cause the vars aren't in the
> header of course).
>
> Problem 2: Using the "GET" method will also echo
> to the screen and put ONLY SOME OF THE variables
> into the header behind the URL...because it seems
> to be limited to around a thousand characters.
>
> My goal is to have an identical copy of the HTML
> document capable of being sent directly from the
> browser.
>
> Does anyone know if it is possible to force-
> lenghten the variable limit in the header to
> accept the full string?
>
> I'm trying to stay away from splitting the form
> (since it is impractical to e-mail more than once
> for submitters). Hidden input fields don't
> shorten the number of variables and re-iterating
> the GLOBALS send only the $key,$value data. I'm
> also trying to stay away from creating a MySQL DB
> just for this form unless it's the only way to go.
>
> Any suggestions appreciated.
>
> Geocrawler.com - The Knowledge Archive
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
--
"Cyber is cyber, life is life."
Gary E Bickford mailto:garyb
fxt.com
FXT Corporation http://www.fxt.com/ tel:541-383-2749
mail:PO BOX 1808, SISTERS OR 97759 ship:66265 JERICHO ROAD, BEND OR 97701
attached mail follows:
I would want to create a form in one script. Help!!!
(i.e) <form method="POST" action="pippo.htm">
<p><input type="submit" value="Invia" name="B1"></p> </form>
Thanks.
attached mail follows:
And so you shall. But what is your question. You are absolutely on the right track.
Just make the action point to your php file/script and once you submit ti form all the input fields will be available as script variables.
<form action="me.php3"> <input type="text" value="Test Me" name=T1> <input type="submit name± value=Invia>
<? if ($B1 ="Invia") { print $T1 } ?> That's all there is to it.
On Mon, Mar 06, 2000 at 08:00:19PM +0100, Gabriele Partini wrote: > I would want to create a form in one script. Help!!! > > (i.e) > <form method="POST" action="pippo.htm"> > > <p><input type="submit" value="Invia" name="B1"></p> > </form> > > > > Thanks. >
---- Chris Moewes-Bystrom christopher
moewes.com http://www.moewes.com http://www.linuxnovice.org
Looking for a PHP User Group in your area? Check http://www.moewes.com/phpug.php3
attached mail follows:
if($action == ""): print "<form method=\"POST\" action=\"$PHP_SELF?action=process\">"; print "<p><input type=\"submit\" value=\"Invia\" name=\"B1\"></p>"; print "</form>"; endif;
if($action == "process"): // code to process form..... endif;
-----Original Message-----
From: Gabriele Partini [mailto:gabry
ltt.dii.unisi.it]
Sent: Monday, March 06, 2000 11:00 AM
To: php3
lists.php.net
Subject: [PHP3] Form.
I would want to create a form in one script. Help!!! (i.e) <form method="POST" action="pippo.htm"> <p><input type="submit" value="Invia" name="B1"></p> </form>
Thanks.
attached mail follows:
I think all you gotta do is get PHP/Apache compiled with ODBC drivers. Then you'll have to figure out port numbers, access control, etc. of course. Not my expertise though.
Roy Tsang wrote:
> Hello Can you tell me what should I have when I want to access MS > SQL server/Access Database from a Linux (e.g. Red hat) host?
--
"Cyber is cyber, life is life."
Gary E Bickford mailto:garyb
fxt.com
FXT Corporation http://www.fxt.com/ tel:541-383-2749
mail:PO BOX 1808, SISTERS OR 97759 ship:66265 JERICHO ROAD, BEND OR 97701
attached mail follows:
Roy,
You need to compile apache/php with ODBC (there is a howto at www.iodbc.org)
Then install drivers on your client (linux) box.
I recommend our Multi-tier ODBC drivers, available at http://www.openlinksw.com They download with a non-expiring trial license.
The server-side components need to go on the Windows box, and the client driver on the linux box. There is thorough documentation on our website as far as setup and configuration. In brief, though, the architecture will go something like this:
Linux - MSSQL
Linux box --- php ---- Openlink odbc driver -------- Windows box ----- Openlink request broker ------- Sql server database
Linux - MSAccess
Linux box --- php ---- Openlink odbc driver -------- Windows box ----- Openlink request broker ------- Openlink odbc_sv agent ----- MS Access ODBC driver ------- MS Access database
There is also free online technical support availabe at: http://www.openlinksw.com/support/suppindx.htm
Best regards, Andrew ---------------------------------------------------- Andrew Hill Technical Support Consultant OpenLink Software http://www.openlinksw.com Universal Database Connectivity Technology Providers
-----Original Message-----
From: Roy Tsang [mailto:cstsang
joymail.com]
Sent: Monday, March 06, 2000 3:26 AM
To: php3
lists.php.net
Subject: [PHP3] something about php
Hello
Can you tell me what should I have when I want to access MS SQL server/Access Database from a Linux (e.g. Red hat) host?
attached mail follows:
Roy,
You need to compile apache/php with ODBC (there is a howto at www.iodbc.org)
Then install drivers on your client (linux) box.
I recommend our Multi-tier ODBC drivers, available at http://www.openlinksw.com They download with a non-expiring trial license.
The server-side components need to go on the Windows box, and the client driver on the linux box. There is thorough documentation on our website as far as setup and configuration. In brief, though, the architecture will go something like this:
Linux - MSSQL
Linux box --- php ---- Openlink odbc driver -------- Windows box ----- Openlink request broker ------- Sql server database
Linux - MSAccess
Linux box --- php ---- Openlink odbc driver -------- Windows box ----- Openlink request broker ------- Openlink odbc_sv agent ----- MS Access ODBC driver ------- MS Access database
There is also free online technical support availabe at: http://www.openlinksw.com/support/suppindx.htm
Best regards, Andrew ---------------------------------------------------- Andrew Hill Technical Support Consultant OpenLink Software http://www.openlinksw.com Universal Database Connectivity Technology Providers
-----Original Message-----
From: Roy Tsang [mailto:cstsang
joymail.com]
Sent: Monday, March 06, 2000 3:26 AM
To: php3
lists.php.net
Subject: [PHP3] something about php
Hello
Can you tell me what should I have when I want to access MS SQL server/Access Database from a Linux (e.g. Red hat) host?
attached mail follows:
> I got some strange file name after uploading ... > > I set my upload_tmp_dir as /tmp... > after upload the file...in my tmp dir i got the strange file name called > "nsform38C2C66D04602C9" > and my origional filename...phpXXXXX is removed--->this is true as > stated in the manual....please correct me if i am wrong. This is perfectly normal and is so duplicate files are not created in the tmp dir by concurrent sessions, I think it is generated by the tmpfile (Or somthing similar) command
> > I would like to know why that strange file name is there? and is it a > normal result generating that file from file uploading in php.
The original name can be found in $userfile_name I think, see the manual
-- James Moore http://www.prospect-enterprises.co.uk
attached mail follows:
for an include in the current directory, use:
include "./filename.extension";
> > < < NEORIFT > > < <
> Gaming Mods, News and Reviews! <
> sheepcow
neorift.net <
> http://www.neorift.net <
----- Original Message -----
From: Michael Mell <mike
nthwave.net>
To: Robert Wane <robertwane
hotmail.com>
Cc: <php3
lists.php.net>
Sent: Monday, March 06, 2000 4:00 PM
Subject: Re: [PHP3] "require" (or "include") path problem.
> This might help -- see the third comment at the bottom of:
> http://www.php.net/manual/function.include.php3
>
> it explains that the base dir for include() and require() calls is the
> location of the html page.
>
> Robert Wane wrote:
> > >
> > > php result :
> > > Warning: Failed opening 'output.php' for inclusion (include_path='')
in
> > > io/io.php ...
> > >
> > > It seems that php does not change current directory as requir/include
> > > command read from other directory.What Is the problem?
> > >
>
> --
> mike
nthwave.net
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
> To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
I would like to know if someone experienced the same pb :
At the very beginning of my intranet, the default page contains a form with two text area (textarea & password). The submition send it to a script called authentication.php ; it catches those two values, and trys to match them with value of an multiple dimension table. If there are matching patterns in that table, I try to use the header() function. No way, it still redirect me to the else. Am I doing something wrong ???
Here is the code :
<?php
$ServerName = getenv (SERVER_NAME) ; $i = -1 ;
$users = array( array("user0" => "passw0"), array("user1" => "passw1"), array("user2" => "passw2"), array("user3" => "passw3"), array("user4" => "passw4"), array("user5" => "passw5"), array("user6" => "passw6") ) ;
$userSize = count ($user) ;
for ($i=0; $i<=$userSize; $i++) { if ( ($login == $user[$i][0]) && ($password == $user[$i][1]) ) { header ("Location : http://".$ServerName."/intranet/default/default.htm") ; break ; }else{ header ("Location : http://".$ServerName."/intranet/default.htm") ; break ; } }
?>
I have a second question : the functions crypt() or decrypt() doesn't work under win32. Is there any function doing the same things to a string ? Or have you a good site on Hachage ?
Warm regard, Division Promethee
attached mail follows:
Try setting the redirect url to a variable and then using a single variable in the header like :
$goto_url = "http://"."$server_name"."/whatever.php";
header("Location : $goto_url");
Good luck, Russ
"François BAUD" wrote:
> I would like to know if someone experienced the same pb :
>
> At the very beginning of my intranet, the default page contains a form with
> two text area (textarea & password).
> The submition send it to a script called authentication.php ; it catches
> those two values, and trys to match them with value of an multiple dimension
> table.
> If there are matching patterns in that table, I try to use the header()
> function. No way, it still redirect me to the else.
> Am I doing something wrong ???
>
> Here is the code :
>
> <?php
>
> $ServerName = getenv (SERVER_NAME) ;
> $i = -1 ;
>
> $users = array(
> array("user0" => "passw0"),
> array("user1" => "passw1"),
> array("user2" => "passw2"),
> array("user3" => "passw3"),
> array("user4" => "passw4"),
> array("user5" => "passw5"),
> array("user6" => "passw6")
> ) ;
>
> $userSize = count ($user) ;
>
> for ($i=0; $i<=$userSize; $i++)
> {
> if ( ($login == $user[$i][0]) && ($password == $user[$i][1]) )
> {
> header ("Location : http://".$ServerName."/intranet/default/default.htm")
> ;
> break ;
> }else{
> header ("Location : http://".$ServerName."/intranet/default.htm") ;
> break ;
> }
> }
>
> ?>
>
> I have a second question : the functions crypt() or decrypt() doesn't work
> under win32. Is there any function doing the same things to a string ? Or
> have you a good site on Hachage ?
>
> Warm regard,
> Division Promethee
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Hi,
i have an application that stores binary files into a MS Access DB
when i try to display a stored text file or download some other file it gets cut of after 2kb
did anyone experience anything similar and/or knows how to overcome this ?
thanks
Jan Plasqui
jplasqui
vub.ac.be
attached mail follows:
Just a quick message to see the sort of intrest in a UK user group and weather it might be worth thinking about setting one up.
-- James Moore http://www.prospect-enterprises.co.uk
attached mail follows:
If you start a PHP User Group, please stop by http://www.moewes.com/phpug.php3 and register it so people can find it. If you are looking for a group, check the registry for groups in your area.
On Mon, Mar 06, 2000 at 07:19:24PM -0000, James Moore wrote:
> Just a quick message to see the sort of intrest in a UK
> user group and weather it might be worth thinking about
> setting one up.
>
> --
> James Moore
> http://www.prospect-enterprises.co.uk
>
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
---- Chris Moewes-Bystrom christopher
moewes.com http://www.moewes.com http://www.linuxnovice.org
Looking for a PHP User Group in your area? Check http://www.moewes.com/phpug.php3
attached mail follows:
I'm up for it, let me know what you have in mind...
Cliff Rowley
- while (!asleep) { code(); }
On Mon, 6 Mar 2000, James Moore wrote:
> Just a quick message to see the sort of intrest in a UK
> user group and weather it might be worth thinking about
> setting one up.
>
> --
> James Moore
> http://www.prospect-enterprises.co.uk
>
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
>
attached mail follows:
AFAIK, There's a limit of about 1K imposed by most systems on command line buffers.
Fundamental knowledge dept. - Both methods are exactly equivalent to unix commands. GET method is the command line variables which are limited by the system's command line buffer length, while POST is standard input (stdin) which can be any length.
Here is an example. Note that the command line includes some GET data, and then stdout of the terminal is redirected (<< EOF) to the stdin of the mail program, until EOF is seen after a newline in the datastream - this is POST data. The EOF syntax is not part of the example, just an easy way to allow it to be demonstrated.
mail -t -mMIME "Kevin <nobody2000
hotmail.com>,garyb
fxt.com" << EOF
Subject: Re: [PHP3] GET and POST question
CC: rRaTao von J <ratao
globalrede.com>
From: Kevin <nobody2000
hotmail.com>
X-some-other-keyword: Example Email Posting
Note: Two blank lines tell the mail system that we're done with headers, so this line is part of the body. Hello, this is a test mail. It can be any length. This will actually work if copied into a shell. Please change the email addresses first, or everyone will know you're a newbie!! blah blah blah blah EOF
RaTao von J wrote:
> Hi,
>
> On 06-Mar-2000 Kevin wrote:
> >
> > For the GET method in PHP3, is there a limit of the length that a parameter
> > can take?
> >
> > Example:
> >
> > 4
123
42">http://www.myserver.com/myfile.php3?coordinate=14
4
123
42
> > .....................
> >
> > As I remember, in ASP the maximum that a GET method can take is up to 255 in
> > length, but I tried it in PHP3, it seems that it can take more than 255
> > chars!!!! So, what is that limit for php3?
> >
>
> AFAIK php doesn't impose a limit. But HTTP specs impose a limit of 8KB on
> URL's, so APACHE or your browser may kill the trailling chars..
>
> > THanks a lot.
>
> Have fun,
> ratao
>
> ----------------------------------
> E-Mail: RaTao von J <ratao
globalrede.com>
> Date: 06-Mar-2000
> Time: 00:44:51
> ----------------------------------
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
--
"Cyber is cyber, life is life."
Gary E Bickford mailto:garyb
fxt.com
FXT Corporation http://www.fxt.com/ tel:541-383-2749
mail:PO BOX 1808, SISTERS OR 97759 ship:66265 JERICHO ROAD, BEND OR 97701
attached mail follows:
Normally I dont have any problems but for some reason with the mewer version of php and apache I cant get php3 to work.
On a Solaris 2.6 machine I run.
./configure --prefix=/usr/local/apache
cd ../php-3.0.15 ./configure --with-apache=../apache_1.3.12 --enable-track-vars make make install
cd apache_1.3.x ./configure --prefix=/www --activate-module=src/modules/php3/libphp3.a
make make install
all goes well and I try to insert a simple print statement like
<? print "hello"; ?>
And nothing happens...
Has anybody else had problems compiling th n ewer versions of apache + php.
In the past I had no problems whne I did the above.
Clarence
attached mail follows:
1st of all --- Thanks for replying man!!!!
I really dont wanna to sound like an idiot but I did make sure the php3.ini file is in the /usr/local/lib dir. Also it must have done something because in the apache logs the following entry exists:
[Mon Mar 6 16:26:28 2000] [notice] Apache/1.3.12 (Unix) PHP/3.0.15 configured -- resuming normal operations
I must have compiled it properly but it will not resolve any php statements.
Is there any way to test if the module is really compiled into the apache server?
Any ideas!!!!
Clarence
attached mail follows:
Hello,
I posted revision 0.5 of the PHP Template engine spec at http://va.php.net/~andrei/tpl-engine-spec.txt. For more information go to http://va.php.net/~andrei/tpl-engine.html.
This one has a lot of updates and has been really fleshed out. Several new attributes are introduced and variables/sections behavior is described in depth.
-Andrei
The 3 great virtues of a programmer: Laziness, Impatience, and Hubris. --Larry Wall
attached mail follows:
Hi All,
I have a variable question that people may asked before. I did some research through the mailing list but no luck. so I'm posting this hope someone can help me.
I want to pass a form variable to 3rd page.
1st page: <form>..... <input type="text" name="cardID" maxlength=13> <...submit...> </form>
------------------------- 2nd page: ..... <input type=\"text\" name=\"cardID\" value=\"$cardID\">";
I tried to pass the variable to the text field but the $cardID doesn't show up ---------------------------
3rd page:
print $cardID;
there is no $cardID passed to the 3rd page.
a php beginner
attached mail follows:
You are submitting the form I take it on the second page to the 3rd? If it is a plain html link add the variable in the url <A HREF=page3.php3?cardID=$cardID>click here for the 3rd page</A>
If it is a form submission from 2 to 3 it shoud work.
Russ
Cicy Chen wrote:
> Hi All, I have a variable question that people may asked before. I did > some research through the mailing list but no luck. so I'm posting > this hope someone can help me. I want to pass a form variable to 3rd > page. 1st page:<form>.....<input type="text" name="cardID" > maxlength=13> > <...submit...></form> -------------------------2nd page:.....<input > type=\"text\" name=\"cardID\" value=\"$cardID\">"; I tried to pass the > variable to the text field but the $cardID doesn't show > up--------------------------- 3rd page: print $cardID; there is no > $cardID passed to the 3rd page. a php beginner
attached mail follows:
I have an array called $data that is set up something like this:
$data[0] = array("ID" => "4", "Product" => "mini-widget", "Category" => "Widgets"); $data[1] = array("ID" => "2", "Product" => "mini-cog", "Category" => "Cogs");
I want to sort the $data array by the Category (i.e. Cogs first, Widgets, etc.)
Which one of them sort functions am I supposed to be using. I've looked at the manual and don't see any examples that might apply here.
Thanks!
attached mail follows:
I'd suggest you create a variable and alter that, then pass that to mysql_query();
$sql = "INSERT INTO PRODUCTS ('PRDO_ID','COMPANY_ID', 'PRODUCT') VALUES (0, '$ID', '$PRODUCT[".$i."]')"; $result2 = mysql_query($sql);
-----Original Message-----
From: Andrew Sheh [mailto:ashea
dmetechnologies.com]
Sent: Saturday, March 04, 2000 7:22 PM
To: php3
lists.php.net
Subject: [PHP3] how to insert an array into MYSQL
this has to be very simple, but I don't seem to get it. Please give me some pointers.
I have an array of strings $PRODUCT it is filled up to 10 products.
I cannot seem to INSERT IT INTO MYSQL (all connected well, it is probably the syntax) Here is the insert code
//to see how big it is (up to 10 fields) $howmany = count($PRODUCT);
for ($i = 0; $i < $howmany; $i++) { $result2 = mysql_query ("INSERT INTO PRODUCTS ('PRDO_ID', 'COMPANY_ID', 'PRODUCT') VALUES (0, '$ID', '$PRODUCT[$i]' ) ") or DIE ("We cannot insert the data now"); }
I am having problem with the $PRODUCT[$i] column, as I can substitute $i with 1 and the insert is fine.
TIA Andrew Sheh
-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribelists.php.net To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Hello, How would I set up mt_rand to pick randomly from a group of numbers? say: (1, 45756, 28, 33, 78 and 100000). I want mt_rand to pick one of these numbers each time, randomly. TIA, Steve
attached mail follows:
At 03:53 PM 3/6/00 -0500, you wrote: >Hello, >How would I set up mt_rand to pick randomly from a group of numbers? say: >(1, 45756, 28, 33, 78 and 100000). I want mt_rand to pick one of these >numbers each time, randomly. >TIA, Steve
Hello Steve,
A simple fairly simple solution is this.
<?PHP /* Seed the random number generator */ MT_SRAND( (double) MICROTIME() * 1000000 );
/* Convert your list of desired values into an array */ $list_of_numbers = ARRAY( 1, 45756, 28, 33, 78, 100000 );
/* Find the length of the $list_of_numbers array */ $length_of_list = COUNT( $list_of_numbers );
/* Subtract one from the $length_of_list value * to find the position of the last element in * the array. * We need to do this because array indexes * start at 0 (zero) in php. */ $last_item_index = COUNT( $list_of_numbers ) - 1;
/* Generate a random number */ $random_int = MT_RAND();
/* Use the modulus operater to return an integer * between 0 and the value of $last_item_index * The modulus (%) operator is very similar to the * division (/) operator. It returns the whole fractional * result of a division operation. * i.e. 12 / 5 = 2.1 ( or, shown as a fraction 2 2/5 ) * 12 % 5 = 2 * 19 / 6 = 3.167 ( or, shown as a fraction 3 1/6 ) * 19 % 6 = 1 * 20 / 2 = 10 ( or, shown as a fraction 10 0/2 ) * 20 % 2 = 0 */ $random_int = $random_int % $last_item_index;
/* Use the $random_int as a key for the $list_of_numbers * array. Because $random_int is a random integer value * that is between 0 and the number of the last item in * the list, you will randomly get one of the numbers * that is in the $list_of_numbers array */ $number_that_you_want = $list_of_numbers[ $random_int ]; ?>
This method seems to give a fairly random distribution.
I ran the code through a 9999 iteration loop and got the following results
Key: 78 # of times selected: 1973 Key: 28 # of times selected: 1959 Key: 1 # of times selected: 2058 Key: 33 # of times selected: 2015 Key: 45756 # of times selected: 1994
HTH,
Zak Greant
attached mail follows:
Using IIS4/NT4 I'm getting the following error, going to page http://server.bar.net/foo.php3
Fatal error: Unable to open d:\directory/foo.php3 in - on line 0 No input file specified.
D:\Directory\intranet is a virtual directory that server.bar.net points to. It finds the index.htm file just fine as well as the ASP files, JS files and CSS files that are in the same directory, however it won't find ANY PHP3 files that are there. If I add intranet, i.e. .net/intranet/foo.php3, THEN it finds the PHP3 file, but then can't find the other files. The configuration is set up to look for php.exe %s %s on a .PHP3 extension.
Any ideas??
TIA, Ron
attached mail follows:
Using IIS4/NT4/PHP3 I'm getting the following error, going to page http://server.bar.net/foo.php3
Fatal error: Unable to open d:\directory/foo.php3 in - on line 0 No input file specified.
D:\Directory\intranet is a virtual directory that server.bar.net points to. It finds the index.htm file just fine as well as the ASP files, JS files and CSS files that are in the same directory, however it won't find ANY PHP3 files that are there. If I add intranet, i.e. .net/intranet/foo.php3, THEN it finds the PHP3 file, but then can't find the other files. The configuration is set up to look for php.exe %s %s on a .PHP3 extension.
Any ideas??
TIA, Ron
-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribelists.php.net To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
I have a regular HTML form that has form.php3 listed as the action, in the form.php3 file I have the following info, but I keep getting an error that says parse error on line 5. I have tried ending it with a comma and a semi-colon, have tried putting the whole operation in { ... }, etc...why do I keep getting an error?
Thanks for any help.
Erik
<?PHP if(empty($FirstName)) { print "Please provide a First Name." }
elseif(empty($LastName)) { print "Please provide a Last Name" }
elseif(empty($Address)) { print "Please provide your Address " }
?>
attached mail follows:
print "Please provide a First Name.";
you forgot your ; at the end of each statement
Rossi Designs
(904) 226-8979
P.O. Box 1084, Holly Hill, Florida 32125-1084
http://rossidesigns.net
----- Original Message -----
From: Erik Boles <erik
rockymountainwebtech.com>
To: PHP3 List <php3
lists.php.net>
Sent: Monday, March 06, 2000 3:01 PM
Subject: [PHP3] elseif parse error
I have a regular HTML form that has form.php3 listed as the action, in the form.php3 file I have the following info, but I keep getting an error that says parse error on line 5. I have tried ending it with a comma and a semi-colon, have tried putting the whole operation in { ... }, etc...why do I keep getting an error?
Thanks for any help.
Erik
<?PHP if(empty($FirstName)) { print "Please provide a First Name." }
elseif(empty($LastName)) { print "Please provide a Last Name" }
elseif(empty($Address)) { print "Please provide your Address " }
?>
attached mail follows:
Hi there!
Speaking for myself, I find it easier to use a slightly different syntax for the variable check...
<?
if (!$FirstName) { print("Please provide a first name. Thanks!"); } elseif (!$LastName) { print("Please provide a last name. Thanks!"); }if (!$Address) { print("Please provide an address. Thanks!"); }
?>
Doing the (!$Var) rather than (empty($Var)) is just a bit quicker and cleaner to me. Again, just my pref. :)
Happy Coding!
- Erik H. Mathy
Applications Developer
butlerandco.com, inc.
-----Original Message-----
From: Rossi Designs <webmaster
rossidesigns.net>
To: Erik Boles <erik
rockymountainwebtech.com>; PHP3 List
<php3
lists.php.net>
Date: Monday, March 06, 2000 1:19 PM
Subject: Re: [PHP3] elseif parse error
>
> print "Please provide a First Name.";
>
>you forgot your ; at the end of each statement
>
>
>Rossi Designs
>(904) 226-8979
>P.O. Box 1084, Holly Hill, Florida 32125-1084
>http://rossidesigns.net
>----- Original Message -----
>From: Erik Boles <erik
rockymountainwebtech.com>
>To: PHP3 List <php3
lists.php.net>
>Sent: Monday, March 06, 2000 3:01 PM
>Subject: [PHP3] elseif parse error
>
>
>I have a regular HTML form that has form.php3 listed as the action, in the
>form.php3 file I have the following info, but I keep getting an error that
>says parse error on line 5. I have tried ending it with a comma and a
>semi-colon, have tried putting the whole operation in { ... }, etc...why do
>I keep getting an error?
>
>Thanks for any help.
>
>Erik
>
>
><?PHP
>if(empty($FirstName))
>{
> print "Please provide a First Name."
>}
>
>elseif(empty($LastName))
>{
> print "Please provide a Last Name"
>}
>
>elseif(empty($Address))
>{
> print "Please provide your Address "
>}
>
>?>
>
>
>
>--
>PHP 3 Mailing List <http://www.php.net/>
>To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
>To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
>To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Crap, I typo'd that code...should be:
<?
if (!$FirstName) { print("Please provide a first name. Thanks!"); } elseif (!$LastName) { print("Please provide a last name. Thanks!"); } elseif (!$Address) { print("Please provide an address. Thanks!"); }
?>
Missed the last else in the elseif argument. Duh.
Pass the caffeine! - Erik
-----Original Message-----
From: Erik Mathy <erik
butlerandco.com>
To: PHP3 List <php3
lists.php.net>
Date: Monday, March 06, 2000 1:35 PM
Subject: Re: [PHP3] elseif parse error
>Hi there!
>
>Speaking for myself, I find it easier to use a slightly different syntax
for
>the variable check...
>
><?
>
>if (!$FirstName) {
> print("Please provide a first name. Thanks!");
>} elseif (!$LastName) {
> print("Please provide a last name. Thanks!");
>}if (!$Address) {
> print("Please provide an address. Thanks!");
>}
>
>?>
>
>Doing the (!$Var) rather than (empty($Var)) is just a bit quicker and
>cleaner to me. Again, just my pref. :)
>
>Happy Coding!
>- Erik H. Mathy
> Applications Developer
>
butlerandco.com, inc.
>
>-----Original Message-----
>From: Rossi Designs <webmaster
rossidesigns.net>
>To: Erik Boles <erik
rockymountainwebtech.com>; PHP3 List
><php3
lists.php.net>
>Date: Monday, March 06, 2000 1:19 PM
>Subject: Re: [PHP3] elseif parse error
>
>
>>
>> print "Please provide a First Name.";
>>
>>you forgot your ; at the end of each statement
>>
>>
>>Rossi Designs
>>(904) 226-8979
>>P.O. Box 1084, Holly Hill, Florida 32125-1084
>>http://rossidesigns.net
>>----- Original Message -----
>>From: Erik Boles <erik
rockymountainwebtech.com>
>>To: PHP3 List <php3
lists.php.net>
>>Sent: Monday, March 06, 2000 3:01 PM
>>Subject: [PHP3] elseif parse error
>>
>>
>>I have a regular HTML form that has form.php3 listed as the action, in the
>>form.php3 file I have the following info, but I keep getting an error that
>>says parse error on line 5. I have tried ending it with a comma and a
>>semi-colon, have tried putting the whole operation in { ... }, etc...why
do
>>I keep getting an error?
>>
>>Thanks for any help.
>>
>>Erik
>>
>>
>><?PHP
>>if(empty($FirstName))
>>{
>> print "Please provide a First Name."
>>}
>>
>>elseif(empty($LastName))
>>{
>> print "Please provide a Last Name"
>>}
>>
>>elseif(empty($Address))
>>{
>> print "Please provide your Address "
>>}
>>
>>?>
>>
>>
>>
>>--
>>PHP 3 Mailing List <http://www.php.net/>
>>To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
>>To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
>>To search the mailing list archive, go to:
>http://www.php.net/mailsearch.php3
>>To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
>--
>PHP 3 Mailing List <http://www.php.net/>
>To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
>To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
>To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Hi,
I'm trying to compile PHP3 into a Apache DSO, and when I compile in --with_mysql I get the following error when I try to startup Apache:
Cannot load /usr/local/apache/libexec/libphp3.so into server: /usr/local/apache/libexec/libphp3.so: undefined symbol: open64 ./apachectl start: httpd could not be started
If I leave out --with_mysql, Apache will start up fine and PHP will load.
I am running: Debian 2.1r4(slink), Apache 1.3.12, MySql binary dist 3.22.32, PHP 3.0.15
Thanks for your help
Rick
attached mail follows:
Erik,
Thanks for the suggestion, but I had those permissions set properly as the README instructed, but got the error anyway. Do you or anyone on the list know where I might find a more detailed set of install instructions for PHP3 specifically for the NT 4.0/IIS 4 platform? I'm wondering if there may be a registry issue as is the case with IIS 3. Thanks again.
Jim
Erik Mathy wrote:
>
> Hi Jim,
>
> Check the permissions on your PHP directory. The iusr_machinename and
> iwam_machinename must have Read (RX) permissions in order for NT to allow it
> to fire off PHP.exe.
>
> - E
>
> -----Original Message-----
> From: Jim Bohr <jbohr
match.org>
> To: php3
lists.php.net <php3
lists.php.net>
> Date: Saturday, March 04, 2000 5:05 PM
> Subject: [PHP3] CGI error on NT 4.0 with IIS 4
>
> >I'm trying to get PHP 3.0.14 working on a Windows NT 4.0 server running
> >IIS 4.
> >I've followed the installation instructions in the README (rev 0.5) and
> >end up
> >with the following error from my browser when pointing to the PHP web
> >page:
> >
> >The specified CGI application misbehaved by not returning a complete set
> >of HTTP
> >headers. The headers it did return are:
> >
> >The rest of the page is empty. I've checked and rechecked my PHP
> >installation
> >and am getting nowhere. Anyone have any answers?
> >
> >--
> >Jim Francis-Bohr Network Administrator
> >Michigan Disability Rights Coalition 517.333.2477 voice
> >740 West Lake Lansing Road, Suite 400 517.333.2677 fax
> >East Lansing, MI 48823 jbohr
match.org
> >
attached mail follows:
Jim,
The PHP Manual entry has never failed me: http://www.php.net/manual/install-windows95-nt.php3
And there's also: http://www.umesd.k12.or.us/php/win32install.html
Speaking for myself, I've never had any registry issues with NT/IIS4/PHP. If you're hitting any databases, via ODBC or otherwise, there are permissions that need to be set there as well. But that shouldn't be an issue. The default NTFS settings for those various folders (C:/Programs/Microsoft/Common/ODBC/, among others) generally include the iusr & iwam accounts (or the Guest group). If it was an issue with the PHP.ini you'd get a different message entirely.
Crap, I'm not sure what to tell you. I assume you're just firing off a real basic page, like:
<?
print("This is a test of my PHP.exe connection.");
?>
as a test?
- Erik
-----Original Message-----
From: Jim Bohr <jbohr
match.org>
To: Erik Mathy <erik
butlerandco.com>
Cc: php3
lists.php.net <php3
lists.php.net>
Date: Monday, March 06, 2000 1:25 PM
Subject: Re: [PHP3] CGI error on NT 4.0 with IIS 4
>Erik,
>
>Thanks for the suggestion, but I had those permissions set properly as the
README
>instructed, but got the error anyway. Do you or anyone on the list know
where I
>might find a more detailed set of install instructions for PHP3
specifically for
>the NT 4.0/IIS 4 platform? I'm wondering if there may be a registry issue
as is
>the case with IIS 3. Thanks again.
>
>Jim
>
>Erik Mathy wrote:
>>
>> Hi Jim,
>>
>> Check the permissions on your PHP directory. The iusr_machinename and
>> iwam_machinename must have Read (RX) permissions in order for NT to allow
it
>> to fire off PHP.exe.
>>
>> - E
>>
>> -----Original Message-----
>> From: Jim Bohr <jbohr
match.org>
>> To: php3
lists.php.net <php3
lists.php.net>
>> Date: Saturday, March 04, 2000 5:05 PM
>> Subject: [PHP3] CGI error on NT 4.0 with IIS 4
>>
>> >I'm trying to get PHP 3.0.14 working on a Windows NT 4.0 server running
>> >IIS 4.
>> >I've followed the installation instructions in the README (rev 0.5) and
>> >end up
>> >with the following error from my browser when pointing to the PHP web
>> >page:
>> >
>> >The specified CGI application misbehaved by not returning a complete set
>> >of HTTP
>> >headers. The headers it did return are:
>> >
>> >The rest of the page is empty. I've checked and rechecked my PHP
>> >installation
>> >and am getting nowhere. Anyone have any answers?
>> >
>> >--
>> >Jim Francis-Bohr Network Administrator
>> >Michigan Disability Rights Coalition 517.333.2477 voice
>> >740 West Lake Lansing Road, Suite 400 517.333.2677 fax
>> >East Lansing, MI 48823 jbohr
match.org
>> >
attached mail follows:
Has anybody gotten apache to compile properly with pdflib 3 and php4b4? I'm getting undefined references to PDF_open_memory_image, PDF_put_image, and PDF_execute_image upon making apache. Clean rh6.1 install, pdflib, zlib, libtiff, libjpeg installed; ld.so.conf up to date. No problems compiling when I exclude --with-pdflib.
Having not including pdf support in past php installations, I'm not sure whether the problem is with my system, or due to possible incompatibilities between the newer versions of php and pdflib. This question is particularly spurred by a post to the pdflib mailing list which can be found at <http://www.egroups.com/group/pdflib/756.html?> (also pasted below).
Thanks for any insight. mh.
------------------------ From pdflib mailing list archive, post dated March 2, 2000
Subject: Re: PHP4b4pl1, PDFlib 3.0: pdf_execute_image From: Thomas Merz
Andreas Altenburg wrote: > > im getting the error: "undefined reference to pdf_execute_image". > > I configured pdflib-3.0, make, make install (/usr/src) > > Then I configured php-4.0b4pl1 --with-pdflib > > After that I configured apache_1.3.11 and tried make and got the error > above. >
>From briefly looking at the PHP wrapper code it seems that the conditionals in the PHP wrapper for distinguishing PDFlib versions are wrong. In several places the clause
#if PDFLIB_MINORVERSION >= 01
obviously fails to detect PDFlib 3.0, since the new version has PDFLIB_MINORVERSION == 0. PDF_execute_image, by the way, is some _really_ old PDFlib function which was abandoned in PDFlib 2.0 already.
We will have to ask Uwe about that...
Thomas
_______________________________________________________________
Thomas Merz t-
pdflib.com http://www.pdflib.com
Visit the PDF 2000 conference: http://www.pdfconference.com
_______PDFlib - a library for generating PDF on the fly________
attached mail follows:
Hi,
How is it possible to send -reliable- SMS (small message system, small ~120 char text) on a mobile phone (gsm) with PHP3 ?
Thanks in advance. Sincerely StocksRaiders - For active investors on speculative markets. http://209.90.185.55/users/srs/ - http://home.freegates.be/club-bourse
attached mail follows:
Stephane Moureau wrote: > > Hi, > > How is it possible to send -reliable- SMS (small message system, small ~120 char text) on a mobile phone (gsm) with PHP3 ?
Lots of possibilities, in order of increasing reliability: 1. Send a mail to a Mail-to-SMS gateway 2. print the required command strings to a suitable cellular phone connected to the serial port 3. exec some program that talks to SMS servers and services (e.g. sendsms) 4. write a library or module to handle the communication with SMS servers (most servers talk TAP or UCP, and quite a few have only ISDN or X.25 access, which would all stretch the limits of PHP beyond the practicable, so you'll probably have to write a C module to get a reasonable degree of reliability)
Sevo
-- Sevo Stille sevoip23.net
attached mail follows:
Check freshmeat.net in the web section, or do a search for php - there is a ready build php/sms script waiting...
Cliff Rowley
- while (!asleep) { code(); }
On Tue, 7 Mar 2000, Sevo Stille wrote:
> Stephane Moureau wrote:
> >
> > Hi,
> >
> > How is it possible to send -reliable- SMS (small message system, small ~120 char text) on a mobile phone (gsm) with PHP3 ?
>
> Lots of possibilities, in order of increasing reliability:
> 1. Send a mail to a Mail-to-SMS gateway
> 2. print the required command strings to a suitable cellular phone
> connected to the serial port
> 3. exec some program that talks to SMS servers and services (e.g.
> sendsms)
> 4. write a library or module to handle the communication with SMS
> servers (most servers talk TAP or UCP, and quite a few have only ISDN or
> X.25 access, which would all stretch the limits of PHP beyond the
> practicable, so you'll probably have to write a C module to get a
> reasonable degree of reliability)
>
> Sevo
>
> --
> Sevo Stille
> sevo
ip23.net
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
>
attached mail follows:
Hello, I've been teaching myself both mySQL and PHP for the last four days. I have developed a completely new web site with multiple forms and user tracking etc. I am having a small problem that I cannot seem to fix. I have checked the manual and searched the site and have even gone to a few sites that are linked from php.net and zend.com. I figure I have either missed the answer or I'm just being bone-headed.
My question:
When a user logs into the site their username and password are checked against the mySQL database and are authenticated. I want to set a cookie on their machine called id and the value will be a unique ID. This ID has already been generated and is in the database along with their information. The problem I am having is when I do a query to pull the ID for that user and set it in a variable I get this RESOURCE ID #3 I'm not sure what that is....I'm posting the code I use below...... I'm guessing I have to handle the result of this query in a special way?
Code:
$id = mysql_query ("select id_number from userinfo where user_name LIKE '$username'"); setcookie('id','$id','time()','/','');
The way I do the check for the username/password combo is like the following...( I saw this in an example and it works fine) but it doesn't help with showing the actual data in the field. ( I do make sure the username has to be unique as well )
user/pass check code: $result = mysql_query ("SELECT * FROM userinfo WHERE user_name LIKE '$username' AND password LIKE '$pword'"); if ($row = mysql_fetch_array($result)) { //authenticated } else { //not authenticated }
Thanks in advance
------------------------------------------------------------------------
Gary Rule
Systems Administrator grule
esupportnow.com
eSupportNow http://www.esupportnow.com
226 Mystic Avenue (781) 395-5652 X 1165 v
Boston, MA 02155 (781) 306-9777 f
------------------------------------------------------------------------
It is impossible to make anything
foolproof because fools are so ingenious.
------------------------------------------------------------------------
attached mail follows:
PHP4 now supports Win32 COM objects. Does anyone have any tutorials or help on using this new feature. Zend.com's forum has an example by Zeev for opening MS Word.
I was hoping to found the funtions, etc. so I could begin practicing with it.
Also, are the COM functions going to be added to the PHP manual in the future?
Thanks,
Jonathan Griffin
Send replies to jgriffin
taascforce.com
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
attached mail follows:
> Bummer, dude!
>
> This happens in Netscape using the Netscape mail client.
> I can\'t turn it iff globally as I use it as a part of business,
> but will turn if off when I post to this group.
>
> If I forget, just send me a (polite) email to
> brad
kieser.net
>
> to remind me!
>
> Apologies to anyone else that the postings effect!
>
> May I suggest, though, that perhaps is it time to upgrade
> your email system? This will not be the first time that
> someone is using digital certificates and vcards, and I suspect
> that it will become more popular as time progresses.
The problem is not in handeling the digital certificate and vcards. The problem is that your mail to the list shows up with a return address that is _DIFFERENT_ from the e-mail address that the digital certificate was issued to. I don't have any of your old messages to tell you the exact e-mail address' in question. My mail reader (Outlook Express 5.0) handles the certificates just fine. It just warns me about the e-mail mismatch.
Dave
attached mail follows:
Hi Dave,
On 06 March 2000 at 17:28:42 GMT -0500 (which was 22:28 where I
live) davew
webmast.com wrote and made these points:
>> May I suggest, though, that perhaps is it time to upgrade your >> email system? This will not be the first time that someone is using >> digital certificates and vcards, and I suspect that it will become >> more popular as time progresses.
DDoUW> The problem is that your mail to the list shows up with a DDoUW> return address that is _DIFFERENT_ from the e-mail address that DDoUW> the digital certificate was issued to. I don't have any of your DDoUW> old messages to tell you the exact e-mail address' in question.
The difference is that Brad's messages are from brad
kieser.net while
the vcf (and I would imagine therefore the certificate also) purports
to be from brad
kieser.demon.co.uk.
Cheers, .\\arck
-- Marck D. Pearlstone, Consultant Software Engineer www: http://www.silverstones.com PGP key: <mailto:mdaemonsilverstones.com?Body=GET%20MARCKKEY> ----------------------------------------- Could it be that all those trick-or-treaters wearing sheets aren't going as ghosts but as mattresses? -----------------------------------------
attached mail follows:
> May I suggest, though, that perhaps is it time to upgrade > your email system? This will not be the first time that > someone is using digital certificates and vcards, and I suspect > that it will become more popular as time progresses.
I use the latest version of Outlook Express, so what do I upgrade to? I know that OE is not perfect, but Communicator also has its share of problems. I personally prefer the MS offering.
> If it\'s your own machine that you are using, then perhaps you > would consider upgrading your OS to Linux as well? It\'s always > possible to boot into Win95 when you need to and Linux is > fast, stable and right up front when it comes to emerging technology.
I also use linux (I have two machines). But Linux cannot run Adobe Acrobat, Illustrator, PageMaker, Photoshop, or HomeSite - all of which I need. I use the Linux box as an internal server for PHP/MySQL testing, as well as an MP3 Jukebox and a few other things. But I use my NT box for all other work.
> Best of all, it runs Apache with PHP like a dream!
I wouldn't DREAM of running PHP on win32!
======================================================================
Murray Shields Email: murray
globalcat.com.au
Global Catalogs Pty Ltd WWW: http://www.globalcat.com.au
Brisbane Australia Phone: +61 7 3351 4777
----------------------------------------------------------------------
Professional Internet Services for Business: Retail Web Catalogs, Web
Design, Corporate Email Delivery, Inhouse Web Servers and Consultancy.
======================================================================
attached mail follows:
On Tue, 7 Mar 2000, Murray Shields wrote:
After looking at REALLY A LOT of mailreaders I still can't find anything better than pine, accessing mail through IMAP, (with cyrus being the best server I know, but in theory anything, even MS Exchange, is usable with it). Maybe mutt is good for small local mailboxes, but it sucks extremely with IMAP, so it's still worse than pine in my book.
> I also use linux (I have two machines). But Linux cannot run Adobe Acrobat, > Illustrator, PageMaker, Photoshop, or HomeSite - all of which I need. I use
#ifdef OFFTOPIC
Actually Acrobat Reader was available for Linux from the very beginning, and recently Pagemaker was ported (beta is available -- obviously ported from Solaris/HP-UX/...) I am not sure about Adobe Distiller -- having limited number of licenses I wrote a wrapper for it in php and installed on solaris box, accessible as a spool-like queue through an html/php form to all users within the LAN. GIMP is a decent replacement for Photoshop (considering the current state of american publishing industry, I can only think that all people involved in it have left at least one post on Slashdot saying "GIMP sucks, it can't do color management for printing!" -- I haven't heard any other valid-sounding complaint about that program in years). I can't say anything about HomeSite -- my personal favorite editor for HTML is XEmacs in HTML (psgml) mode (with properly configured DTD), but probably Bluefish is something closer to HomeSite users' taste.
#endif
-- Alex---------------------------------------------------------------------- Excellent.. now give users the option to cut your hair you hippie! -- Anonymous Coward
attached mail follows:
On Mon, 6 Mar 2000, Alex Belits wrote:
> and recently Pagemaker was ported (beta is available -- obviously ported > from Solaris/HP-UX/...)
Sorry, it was FrameMaker -- my bad.
-- Alex---------------------------------------------------------------------- Excellent.. now give users the option to cut your hair you hippie! -- Anonymous Coward
attached mail follows:
For those of you Win32/PHP users, which web server are you using? I use Apache/PHP at work on a linux machine, but I was wondering what web server works best with PHP on a Win32 platform.
Thank you, Chris Toth
attached mail follows:
Apache Win32 on NT4sp5 Runs pretty good. Even with all the other stuff I run on it, it crashes less than once a month. Not too bad, especially for M$.
Gregory Wilson
Network Administrator - Cornell University
gdw1
cornell.edu 607-255-5670
http://drakos.bh.cornell.edu
-----Original Message----- For those of you Win32/PHP users, which web server are you using? I use Apache/PHP at work on a linux machine, but I was wondering what web server works best with PHP on a Win32 platform.
Thank you, Chris Toth
attached mail follows:
Hi,
I got an error message when using odbctest (or odbc_connect) to reach a
mysql database on a linux server: "signal Segmentation fault (11) ".
Anybody can help me?
Thanks!
Iris Zhong
mailto:izhong
tekdigitel.com
http://www.tekdigitel.com
attached mail follows:
hi~ I got a problem.. so.. I can see this error message.. Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111) in /~/~/test1.php3 on line.. and line 7 is.. <?php $db = mysql_connect("localhost","root"); ... ... ?> what's problem is this code?? Please~ :-(
attached mail follows:
At 09:13 AM 3/7/00 +0900, you wrote: >hi~ >I got a problem.. >so.. >I can see this error message.. > >Warning: MySQL Connection Failed: > Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111) > in /~/~/test1.php3 on line..
You are trying to connect to a socket that doesn't exist. the 'file' /tmp/mysqld.sock has been deleted - Probably by your cron daily or weekly scripts.
This is described in the mysql documentaion. :
http://www.mysql.com/Manual/manual.html#Can_not_connect_to_server
Phil.
attached mail follows:
this is purely theoretical right now but it's been bothering me.
Ok I want to assign a unique ID to visitors and store variables pertaining to them in a MySQL database as they browse my site, before you all tell me to use PHP4 sessions or PHPLIB, just hear me out.
The basic structure of this is:
Generate a random Session ID. Check to see if it's already in use if it is, start again if it's unique then assign and you're good to go.
Now since Apache is multi-process couldn't this happen:
Process 1 randomly generates a session ID, let's say "2" (I know that's simple but whatever).
Process 1 checks to see if "2" is already taken let's say by doing a SELECT where id=2 and if there are any rows returned then it knows it is taken.
Let's say Process 1 finds out that no one has taken 2 and it's ready to move on.
BUT, right before Process 1 INSERT's "2" into the session table, Process 2 takes control.
Process 2 also randomly generated session id "2" (of course this is unlikely but it could happen that the same session number is "randomly" generated close to each other, at least I have to plan that i could happen) and checked the table and found that "2" wasn't taken either.
So at this point both process 1 and 2 are ready to assign session ID "2" to their respective clients. what can I do about this? any insight would be appreciated, I think i'm missing an obvious solution...perhaps make the session ID column a primary key and MySQL would error when the 2nd process tries to insert it?
-aaron
attached mail follows:
Maybe a stupid and slow sollution but why don't you lock the table? Arpi
> this is purely theoretical right now but it's been bothering me.
>
> Ok I want to assign a unique ID to visitors and store variables
> pertaining to them in a MySQL database as they browse my site, before
> you all tell me to use PHP4 sessions or PHPLIB, just hear me out.
>
> The basic structure of this is:
>
> Generate a random Session ID.
> Check to see if it's already in use
> if it is, start again
> if it's unique then assign and you're good to go.
>
> Now since Apache is multi-process couldn't this happen:
>
> Process 1 randomly generates a session ID, let's say "2" (I know
> that's simple but whatever).
>
> Process 1 checks to see if "2" is already taken let's say by doing a
> SELECT where id=2 and if there are any rows returned then it knows it
> is taken.
>
> Let's say Process 1 finds out that no one has taken 2 and it's ready
> to move on.
>
> BUT, right before Process 1 INSERT's "2" into the session table,
> Process 2 takes control.
>
> Process 2 also randomly generated session id "2" (of course this is
> unlikely but it could happen that the same session number is
> "randomly" generated close to each other, at least I have to plan
> that i could happen) and checked the table and found that "2" wasn't
> taken either.
>
> So at this point both process 1 and 2 are ready to assign session ID
> "2" to their respective clients. what can I do about this? any
> insight would be appreciated, I think i'm missing an obvious
> solution...perhaps make the session ID column a primary key and MySQL
> would error when the 2nd process tries to insert it?
>
> -aaron
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
> To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
A sequence on the table seems like it would be a good way to go about preventing collusion between user ids. That way you would just grab the next user ID rather than generating it randomly. If you still want it to be random, just concactenate the sequence value to the end (or beginning or middle or...) of a randomly generated string. Thus if you DO happen to have two randomly generated id's that match, the sequence will be different. Also, if you only use the sequence you won't have to check for uniqueness as it will never give you the same value twice from the sequence (unless you reset it, of course...) I'm pretty tired, so if the above doesn't make sense or is just plain wrong...
-mo
----- Original Message -----
From: Arpad Tamas
To: php3
lists.php.net ; Aaron Tuller
Sent: Monday, March 06, 2000 5:44 PM
Subject: Re: [PHP3] session theory question
Maybe a stupid and slow sollution but why don't you lock the table? Arpi
> this is purely theoretical right now but it's been bothering me.
>
> Ok I want to assign a unique ID to visitors and store variables
> pertaining to them in a MySQL database as they browse my site, before
> you all tell me to use PHP4 sessions or PHPLIB, just hear me out.
>
> The basic structure of this is:
>
> Generate a random Session ID.
> Check to see if it's already in use
> if it is, start again
> if it's unique then assign and you're good to go.
>
> Now since Apache is multi-process couldn't this happen:
>
> Process 1 randomly generates a session ID, let's say "2" (I know
> that's simple but whatever).
>
> Process 1 checks to see if "2" is already taken let's say by doing a
> SELECT where id=2 and if there are any rows returned then it knows it
> is taken.
>
> Let's say Process 1 finds out that no one has taken 2 and it's ready
> to move on.
>
> BUT, right before Process 1 INSERT's "2" into the session table,
> Process 2 takes control.
>
> Process 2 also randomly generated session id "2" (of course this is
> unlikely but it could happen that the same session number is
> "randomly" generated close to each other, at least I have to plan
> that i could happen) and checked the table and found that "2" wasn't
> taken either.
>
> So at this point both process 1 and 2 are ready to assign session ID
> "2" to their respective clients. what can I do about this? any
> insight would be appreciated, I think i'm missing an obvious
> solution...perhaps make the session ID column a primary key and MySQL
> would error when the 2nd process tries to insert it?
>
> -aaron
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
> To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribelists.php.net To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
I'm trying to take field names which are stored in an array "row" and make them be a variable of the same name by concaternating an $ on to the fieldname i.e.
sprintf("$%s",$row[0]); I would like to use $fieldname as a variable as the variable of this name will exist. I want to do
if ($fieldname =="on"){ then do this; }
However, the return from the sprinf is a string which I cannot use as a variable name. How do I get it to be recognised as a variable name?
Very grateful for any help.
Chris Mason Box 340, The Valley, Anguilla, British West Indies Tel: 264 497 5670 Fax: 264 497 8463 USA Fax (561) 382-7771 Take a virtual tour of the island http://net.ai/ The Anguilla Guide Find out more about NetConcepts www.netconcepts.ai bwz*mq
attached mail follows:
At 09:07 PM 3/6/00 -0400, you wrote: >I'm trying to take field names which are stored in an array "row" and make them be a variable of the same name by concaternating an $ on to the fieldname >i.e. > >sprintf("$%s",$row[0]); >I would like to use $fieldname as a variable as the variable of this name will exist. I want to do > >if ($fieldname =="on"){ >then do this; >} > >However, the return from the sprinf is a string which I cannot use as a variable name. How do I get it to be recognised as a variable name?
Hello Chris,
Check the php manual entry on Variable variables ( http://www.zend.com/manual/language.variables.variable.php )
HTH,
Zak
attached mail follows:
Hi all,
I think that this list is not for configuration and compile questioning but without this list I don't know where else I can ask. Apologise for those who are not involved.
O/S : HP-UX 11.0 Apache: 1.3.11 Database: Informix
Here is my configuration:
./configure --disable-debug --with-apxs=/usr/local/apache/bin/ \ --with-apache=/usr/local/apache \ --with-regex=system --enable-sysvshm \ --enable-sysvshm --with-regex=system --with-ftp \ --enable-sysvsem --with-informix=/usr
And the result of configure is: ... creating libphp3.module creating extra/gd/bdf2gdfont creating regex/Makefile creating pcrelib/Makefile creating dbase/Makefile creating config.h ================================================================== WARNING: Your /usr/local/apache/bin/ script is most likely broken.
Please go read http://www.php.net/FAQ.php3#4.11 and make the changes described there and try again. ==================================================================
I go through the apxs file and follow the instruction on FAQ but it still produces the same result.
So I ignore this warning and go to compile the PHP3. Compile php3 gives me a error again:
cc -g -I/usr/incl/esql -I. -I. -I -I/usr/incl/esql -I/usr/local/apache/include -c internal_functions.c -o internal_functions.o cpp: "functions/php3_ifx.h", line 49: error 4036: Can't open include file 'locator.h'. cpp: "functions/php3_ifx.h", line 50: error 4036: Can't open include file 'sqltypes.h'.
*** Error exit code 1
I could not find locator.h or sqltypes.h on the system, nor php3. Can anyone PLEASE help me to compile this and let me know what are these files for?
Thanks in advance,
Muoi Dang
attached mail follows:
I just installed php3, apache 1.3.12 on a Red Hat 6.1 box.
I run a simple php3 script that does a select * on a mysql table (permissions are verfied correct).
The page returns "document contains no data" on the post.
I'm getting the following error in the apache logs:
[Mon Mar 6 07:06:53 2000] [notice] child pid 29070 exit signal Segmentation fault (11)
Any ideas?
-Jason
attached mail follows:
Does anybody have a replacement SetCookie function that actually works? I've found one in the annotated section for SetCookie on the php web site but that doesn't work at all in my application, not to mention about 200 different techniques for fixing SetCookie problems. I don't have time to try them all...it obvious that there is a problem in the SetCookie code itself.
It appears that SetCookie() is hindered with all sorts of problems. One of the problems I'm having is that certain IE 5 browsers are unable to save cookies with the code I'm using. But not all of them. In general about 99% of the browsers I've tested they work. I have one instance of an IE5 browser that won't save the cookies and another IE5 browser that is the SAME version and it works fine. The IE5 browser that doesn't work on this site is able to work fine with other web sites that use cookies.
If somebody finds a mistake in my code please let me know. Here is the source that I'm using and is placed at the top of the file:
<?PHP include "./common.inc" ;
if ( $command == "login" ) { if ( alpha_checkpassword ($authemail,$authpass) == 1 ) { SetCookie ("alphavisitor",$authemail,(time()+$alpha_cookie_timeout),$alpha_cookpath) ; $alphavisitor = $authemail ; Header ("Location: $alpha_forum_url") ; } else { $command = "notauth" ; } } if ( $command == "logout" ) { SetCookie ("alphavisitor","",1,$alpha_cookpath) ; Header ("Location: $alpha_forum_url") ; } ?>
attached mail follows:
sorry, just a test.
attached mail follows:
Please, don´t you know how can I get a file to make printable copy of the PHP3 manual?. I´m really a beginer in that field and its hard without t