|
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 12 Mar 2000 18:00:02 -0000 Issue 1533
From: php3-digest-help
lists.php.netDate: Sun Mar 12 2000 - 12:00:02 CST
- Next message: php3-digest-help
lists.php.net: "php3 Digest 13 Mar 2000 06:00:01 -0000 Issue 1534"
- Previous message: php3-digest-help
lists.php.net: "php3 Digest 12 Mar 2000 06:00:02 -0000 Issue 1532"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php3 Digest 12 Mar 2000 18:00:02 -0000 Issue 1533
Topics (messages 80805 through 80833):
writing to flat file
80805 by: Jonathan Hendler <hendlerman
yahoo.com>
80832 by: Jonathan Hendler <helpus
whatisprogress.com>
$value in array
80806 by: Kevin waterson <kevin
kevin.oceania.net>
80808 by: Randall Goguen <ranman
huggle.com>
80809 by: Kevin waterson <kevin
kevin.oceania.net>
PHP running as "cgi"
80807 by: Chris Cameron <chris
upnix.org>
[mod_php] : Restrict execution of php code to certain directories ?
80810 by: Markus Fischer <mfischer
josefine.ben.tuwien.ac.at>
MySql Query Problem - please help
80811 by: "WL" <will
localads.net>
80812 by: "James Moore" <James
Prospect-enterprises.co.uk>
80813 by: "WL" <will
localads.net>
80825 by: "Matthew Clark" <matt
genicomsystems.com>
80829 by: "WL" <will
localads.net>
Apache + PHP - How does it work??
80814 by: "David Bouw" <david
mubo.nl>
80817 by: "David Bouw" <david
mubo.nl>
80820 by: "David Bouw" <david
mubo.nl>
Writing Apache modules in PHP
80815 by: "Lukasz Felsztukier" <L.Felsztukier
digitalone.pl>
How to count the number of checkbox checked in a form
80816 by: Mark Lo <markloky
netvigator.com>
80826 by: Peter Banik <bpeter
mentha.hu>
test - ignore
80818 by: Stefan Carstens <stefancarstens
talknet.de>
Regex to check email
80819 by: Thomas Merlin <thomas.merlin
mixad.com>
80823 by: Peter Banik <bpeter
mentha.hu>
Fw: Sorry about the duplicates
80821 by: "David Bouw" <david
mubo.nl>
80833 by: "Andrew Sheh" <ashea
dmetechnologies.com>
GD 1.8 and php
80822 by: Michael Waples <mwaples
waples.net>
80828 by: Nik Gare <nik
cheddarcheese.de>
80831 by: Michael Waples <mwaples
waples.net>
Help !!!
80824 by: Thomas Tiller <Thomas.Tiller
fast.de>
80830 by: Duncan Hill <dhill
bajan.org>
Wrong config file location expectation in Apache
80827 by: Diviner Chan <diviner
netvigator.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:
HI,
I am new to this but find PHP very intuitive.
I am midfying code to get what I need.
I am currently trying to create a list of people who sign in at the site,
a guestbook basically, and I am trying to just use a text file with names and email addresses.
basically:
$gbFile="thebigfatlist.txt";
if (( $to_email_address) && ( $name)) {
$file = $gbFile
$cartFile = fopen($file, "w");
fputs($cartFile, $nameX, $to_email_address);
fclose($cartFile);
do I need anything else from the filesystem commands like fwrite instead?
fwrite seems to fail to, permissions on the file both php and text, are public read write and execute, so...?
thanks -
Jonathan Hendler, Maine
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
attached mail follows:
HI,
I am new to this but find PHP very intuitive.
I am midfying code to get what I need.
I am currently trying to create a list of people who sign in at the site,
a guestbook basically, and I am trying to just use a text file with names and email addresses.
basically:
$gbFile="thebigfatlist.txt";
if (( $to_email_address) && ( $name)) {
$file = $gbFile
$cartFile = fopen($file, "w");
fputs($cartFile, $nameX, $to_email_address);
fclose($cartFile);
do I need anything else from the filesystem commands like fwrite instead?
fwrite seems to fail to, permissions on the file both php and text, are public read write and execute, so...?
thanks -
Jonathan Hendler, Maine
attached mail follows:
I am trying to pass a value to a variable in a funtion
and almost succeeding ( below is the code)
So far I can get the query
SELECT * FROM Category ORDER BY Category
to work fine and to get that into my form. It is when the
submit button is hit and goes to the Items function that things
fall down. I displays the page well enough but does not
get the Category Items into the dropdown box. I imagine
I am missing something obvious here as the first drop down box
is almost identical and works fine.
All help greatfully received
Kevin
Code follows.....
<? include("include/header.php") ?>
<? include("include/menu.php") ?>
<? include("include/access.php") ?>
<?
switch ($i):
case Category;
Category();
break;
case Items:
Items();
break;
case View;
View();
break;
default:
print "hmm";
endswitch;
echo "<H1> Please Choose a Product</H1>";
echo "<TABLE BORDER=\"0\" CELLPADDING=\"10\" CELLSPACING=\"10\"><TR>";
echo "<FORM ACTION=\"checkout2.php?i=Items\" METHOD=\"POST\">";
echo "<tr><td>";
echo "Select A Category<br>";
echo "<select name=\"Category\" size=\"1\">";
mysql_connect("$hostname","$username","$password") OR DIE("Unable to connect to database");
$result=mysql("$dbName","SELECT * FROM Category ORDER BY Category")OR DIE("Unable to select database");
while ($row = mysql_fetch_row($result)) {
echo "<option value=\"$row[1]\"> $row[0] </option>";
}
echo "</select></td>";
echo "<td colspan=\"2\" align=\"center\"><INPUT TYPE=\"submit\" NAME=\"Submit\" VALUE=\"Submit\"></form>";
echo "</TABLE>";
/*
function Items()
{
echo "<TABLE BORDER=\"0\" CELLPADDING=\"10\" CELLSPACING=\"10\"><TR>";
echo "<FORM ACTION=\"checkout.php\" METHOD=\"POST\">";
echo "<td>";
echo "Select A Item<br>";
echo "<select name=\"Item\" size=\"1\">";
mysql_connect("$hostname","$username","$password");
$result=mysql("$dbName","SELECT * FROM Items WHERE Category='$value'");
while ($row = mysql_fetch_array($result)) {
echo "<option value=\"$row[1]\"> $row[0] </option>";
echo "</select></td></tr>";
echo "<tr><td colspan=\"2\" align=\"center\"><INPUT TYPE=\"submit\" NAME=\"Submit\" VALUE=\"Submit\"></form>";
echo "</TABLE>";
}
*/
?>
attached mail follows:
function Items($hostname, $username, $password)
and whatever else you need...also don't echo plain HTML:
?><TABLE BORDER="0" CELLPADDING="10" CELLSPACING="10"><TR><?
Randall Goguen (aka Ranman)
......... Escape the 'Gates' of Hell
`:::' ....... ......
::: * `::. ::' o~o
::: .:: .:.::. .:: .:: `::. :' /V\ Phear the Penguin
::: :: :: :: :: :: :::. // \
::: .::. .:: ::. `::::. .:' ::. /( )\
...:::.....................::' .::::.. ^^-^^
ranman
nbnet.nb.ca
#LinuxSupport EfNet
http://www.LinuxGuruz.org
On Sun, 12 Mar 2000, Kevin waterson wrote:
> I am trying to pass a value to a variable in a funtion
> and almost succeeding ( below is the code)
>
> So far I can get the query
> SELECT * FROM Category ORDER BY Category
> to work fine and to get that into my form. It is when the
> submit button is hit and goes to the Items function that things
> fall down. I displays the page well enough but does not
> get the Category Items into the dropdown box. I imagine
> I am missing something obvious here as the first drop down box
> is almost identical and works fine.
> All help greatfully received
>
> Kevin
> Code follows.....
> <? include("include/header.php") ?>
> <? include("include/menu.php") ?>
> <? include("include/access.php") ?>
>
> <?
>
> switch ($i):
> case Category;
> Category();
> break;
> case Items:
> Items();
> break;
> case View;
> View();
> break;
> default:
>
> print "hmm";
> endswitch;
> echo "<H1> Please Choose a Product</H1>";
> echo "<TABLE BORDER=\"0\" CELLPADDING=\"10\" CELLSPACING=\"10\"><TR>";
> echo "<FORM ACTION=\"checkout2.php?i=Items\" METHOD=\"POST\">";
>
>
> echo "<tr><td>";
> echo "Select A Category<br>";
> echo "<select name=\"Category\" size=\"1\">";
> mysql_connect("$hostname","$username","$password") OR DIE("Unable to connect to database");
> $result=mysql("$dbName","SELECT * FROM Category ORDER BY Category")OR DIE("Unable to select database");
> while ($row = mysql_fetch_row($result)) {
> echo "<option value=\"$row[1]\"> $row[0] </option>";
> }
> echo "</select></td>";
>
> echo "<td colspan=\"2\" align=\"center\"><INPUT TYPE=\"submit\" NAME=\"Submit\" VALUE=\"Submit\"></form>";
> echo "</TABLE>";
>
> /*
> function Items()
> {
> echo "<TABLE BORDER=\"0\" CELLPADDING=\"10\" CELLSPACING=\"10\"><TR>";
> echo "<FORM ACTION=\"checkout.php\" METHOD=\"POST\">";
> echo "<td>";
> echo "Select A Item<br>";
> echo "<select name=\"Item\" size=\"1\">";
> mysql_connect("$hostname","$username","$password");
> $result=mysql("$dbName","SELECT * FROM Items WHERE Category='$value'");
> while ($row = mysql_fetch_array($result)) {
> echo "<option value=\"$row[1]\"> $row[0] </option>";
>
> echo "</select></td></tr>";
> echo "<tr><td colspan=\"2\" align=\"center\"><INPUT TYPE=\"submit\" NAME=\"Submit\" VALUE=\"Submit\"></form>";
> echo "</TABLE>";
> }
> */
>
>
> ?>
>
> --
> 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:
On Sun, 12 Mar 2000, Randall Goguen wrote:
> function Items($hostname, $username, $password)
This does not work for me either. I would have thought
it taken care of with the
mysql_connect("$hostname","$username","$password");
>
> and whatever else you need...also don't echo plain HTML:
Is it better practice to jump in and out of php or faster?
Kind regards
Kevin
attached mail follows:
I'm wondering what speed/preformance advantage PHP has over Perl if PHP
is being run like a cgi process.
Thanks
Chris
attached mail follows:
[Please Excuse if this is a FAQ, haven't found it in the short :/]
Hello,
I'm using mod_php (4beta from debian unstable) and it works well.
But I would like is to only work in certain directories, e.g.
only in '/usr/lib/cgi-bin' and _some_ userdirs, e.g.
/home/user1/public_html, but not in all.
I thought allready about that this is an apache issue, but I
haven't found a solution yet :(
thanks for you time,
Markus Fischer
-- Markus Fischer, http://josefine.ben.tuwien.ac.at/~mfischer/ EMail: mfischerjosefine.ben.tuwien.ac.at PGP Public Key: http://josefine.ben.tuwien.ac.at/~mfischer/C2272BD0.asc PGP Fingerprint: D3B0 DD4F E12B F911 3CE1 C2B5 D674 B445 C227 2BD0 - Free Software For A Free World -
- application/pgp-signature attachment: stored
attached mail follows:
Hi,
I've been trying to get this going for ages now - I just cannot work it out. I have a form which allows users to subscribe themselves to become members. They enter the usal info, including email address which is checked against the database using the code below. If it finds an email in the Users table, it tells me. If it doesn't, or if I enter a fak email address, it should say so and exit; but it says "Warning: Using scalar variable $checkemail_row as an array or object in /home/favasa/www.favasa.org.uk/htdocs/members/index2.phtml on line 73"
So basically, it's not running the `else` bit. Why?
Thanks for any help,
Will
$id = mysql_insert_id(); $insert_users = "INSERT INTO before
(title,name,email,school,dept,address1,address2,address3,address4,phone,righ ts,pass) VALUES ('$title','$name','$email','$school','$dept','$address1','$address2','$addre ss3','$address4','$phone','$rights','$pass')"; $checkemail = "SELECT * FROM users WHERE email = '$email'"; $checkemail_result = mysql_db_query($dbdb,$checkemail,$connection);
if ($checkemail_result) {
$checkemail_row = mysql_fetch_object($checkemail_result); echo("The following error occurred:<p><b>The email address entered(</b>$checkemail_row->email<b>) is already present in the database. Please go back and check you entered your correct address.<p>Alternatively, <a href='pass.phtml'>request</a> your password is emailed to you.");
echo("<table width='303' border='0' cellspacing='0' cellpadding='0'>"); // There's a load more code here for the table and layout which I have excluded.
");
exit; }
} else { echo("Haven't found that email in there, no, sorry.."); // mysql_db_query($dbdb,$insert_users,$connection); // echo mysql_errno().": ".mysql_error()."<BR>"; // echo ("User <b> $email </b> entered successfully into database");
// I deliberatley commented the above out until I know it works.. // There's a load more code here for the table and layout which I have excluded.
"); exit; }} ?>
Web Developer and Programmer for Lukrative Media Ltd http://www.lukrative.com Domain Names-> http://CreativeNames.co.uk Classified Ads-> http://www.LocalAds.Net
attached mail follows:
> I've been trying to get this going for ages now - I just cannot > work it out. > I have a form which allows users to subscribe themselves to > become members. > They enter the usal info, including email address which is checked against > the database using the code below. If it finds an email in the > Users table, > it tells me. If it doesn't, or if I enter a fak email address, it should > say so and exit; but it says "Warning: Using scalar variable > $checkemail_row > as an array or object in > /home/favasa/www.favasa.org.uk/htdocs/members/index2.phtml on line 73" > > So basically, it's not running the `else` bit. Why? > > Thanks for any help, > > Will > > $id = mysql_insert_id(); > $insert_users = "INSERT INTO before > > (title,name,email,school,dept,address1,address2,address3,address4, > phone,righ > ts,pass) VALUES > ('$title','$name','$email','$school','$dept','$address1','$address > 2','$addre > ss3','$address4','$phone','$rights','$pass')"; > $checkemail = "SELECT * FROM users WHERE email = '$email'"; > $checkemail_result = mysql_db_query($dbdb,$checkemail,$connection);
Try putting in an or die statement as this will tell you if the mysql query actually works this would explain your problem if not. If it is failing make sure your connecting properly and all the vars used are correct
$checkemail_result = mysql_db_query($dbdb,$checkemail,$connection) or die("Query Failed");
> if ($checkemail_result) { > > $checkemail_row = mysql_fetch_object($checkemail_result); > echo("The following error occurred:<p><b>The email address > entered(</b>$checkemail_row->email<b>) is already present in the database. > Please go back and check you entered your correct > address.<p>Alternatively, > <a href='pass.phtml'>request</a> your password is emailed to you."); > > echo("<table width='303' border='0' cellspacing='0' cellpadding='0'>"); > // There's a load more code here for the table and layout which I have > excluded. > > "); > > > exit; > } > > } > else > { > echo("Haven't found that email in there, no, sorry.."); > // mysql_db_query($dbdb,$insert_users,$connection); > // echo mysql_errno().": ".mysql_error()."<BR>"; > // echo ("User <b> $email </b> entered successfully into database"); > > // I deliberatley commented the above out until I know it works.. > // There's a load more code here for the table and layout which I have > excluded. > > "); > exit; > }} > ?> >
-- James Moore http://www.prospect-enterprises.co.uk
attached mail follows:
James,
I tried the `die` code before, and again when you said it, but no luck. To me, the code seems fine. Do you, or anyone, have any other ideas?
Thanks in advance.
Will Web Developer and Programmer for Lukrative Media Ltd http://www.lukrative.com Domain Names-> http://CreativeNames.co.uk Classified Ads-> http://www.LocalAds.Net
----- Original Message -----
From: James Moore <James
Prospect-enterprises.co.uk>
To: php <php3
lists.php.net>; WL <will
localads.net>
Sent: Sunday, March 12, 2000 11:55 AM
Subject: RE: [PHP3] MySql Query Problem - please help
> > > > I've been trying to get this going for ages now - I just cannot > > work it out. > > I have a form which allows users to subscribe themselves to > > become members. > > They enter the usal info, including email address which is checked against > > the database using the code below. If it finds an email in the > > Users table, > > it tells me. If it doesn't, or if I enter a fak email address, it should > > say so and exit; but it says "Warning: Using scalar variable > > $checkemail_row > > as an array or object in > > /home/favasa/www.favasa.org.uk/htdocs/members/index2.phtml on line 73" > > > > So basically, it's not running the `else` bit. Why? > > > > Thanks for any help, > > > > Will > > > > $id = mysql_insert_id(); > > $insert_users = "INSERT INTO before > > > > (title,name,email,school,dept,address1,address2,address3,address4, > > phone,righ > > ts,pass) VALUES > > ('$title','$name','$email','$school','$dept','$address1','$address > > 2','$addre > > ss3','$address4','$phone','$rights','$pass')"; > > $checkemail = "SELECT * FROM users WHERE email = '$email'"; > > $checkemail_result = mysql_db_query($dbdb,$checkemail,$connection); > > Try putting in an or die statement as this will tell you if the mysql query > actually works > this would explain your problem if not. If it is failing make sure your > connecting properly and all the > vars used are correct > > $checkemail_result = mysql_db_query($dbdb,$checkemail,$connection) or > die("Query Failed"); > > > if ($checkemail_result) { > > > > $checkemail_row = mysql_fetch_object($checkemail_result); > > echo("The following error occurred:<p><b>The email address > > entered(</b>$checkemail_row->email<b>) is already present in the database. > > Please go back and check you entered your correct > > address.<p>Alternatively, > > <a href='pass.phtml'>request</a> your password is emailed to you."); > > > > echo("<table width='303' border='0' cellspacing='0' cellpadding='0'>"); > > // There's a load more code here for the table and layout which I have > > excluded. > > > > "); > > > > > > exit; > > } > > > > } > > else > > { > > echo("Haven't found that email in there, no, sorry.."); > > // mysql_db_query($dbdb,$insert_users,$connection); > > // echo mysql_errno().": ".mysql_error()."<BR>"; > > // echo ("User <b> $email </b> entered successfully into database"); > > > > // I deliberatley commented the above out until I know it works.. > > // There's a load more code here for the table and layout which I have > > excluded. > > > > "); > > exit; > > }} > > ?> > > > > -- > James Moore > http://www.prospect-enterprises.co.uk > >
attached mail follows:
Hello there..
In English your code says - if this is a valid SQL query, then the email exists..
what you need it to say is - if this is a valid SQL query, and 1 or more rows was returned (in your case 1 row I guess) then the email already exists..
so..
-------untested code----------
$checkemail_result = mysql_db_query($dbdb,$checkemail,$connection);
if ($checkemail_result) { if (mysql_num_rows($checkemail_result) > 0) { echo "Email exists"; } else { echo "Email Doesn't exist"; } } else { echo "Invalid Query: ".$checkemail; }
------------------------------
HTH
Matthew Clark.
> So basically, it's not running the `else` bit. Why?
>
> Thanks for any help,
>
> Will
>
> $id = mysql_insert_id();
> $insert_users = "INSERT INTO before
>
> (title,name,email,school,dept,address1,address2,address3,address4,
> phone,righ
> ts,pass) VALUES
> ('$title','$name','$email','$school','$dept','$address1','$address
> 2','$addre
> ss3','$address4','$phone','$rights','$pass')";
> $checkemail = "SELECT * FROM users WHERE email = '$email'";
> $checkemail_result = mysql_db_query($dbdb,$checkemail,$connection);
>
> if ($checkemail_result) {
>
> $checkemail_row = mysql_fetch_object($checkemail_result);
> echo("The following error occurred:<p><b>The email address
> entered(</b>$checkemail_row->email<b>) is already present in the database.
> Please go back and check you entered your correct
> address.<p>Alternatively,
> <a href='pass.phtml'>request</a> your password is emailed to you.");
>
> echo("<table width='303' border='0' cellspacing='0' cellpadding='0'>");
> // There's a load more code here for the table and layout which I have
> excluded.
>
> ");
>
>
> exit;
> }
>
> }
> else
> {
> echo("Haven't found that email in there, no, sorry..");
> // mysql_db_query($dbdb,$insert_users,$connection);
> // echo mysql_errno().": ".mysql_error()."<BR>";
> // echo ("User <b> $email </b> entered successfully into database");
>
> // I deliberatley commented the above out until I know it works..
> // There's a load more code here for the table and layout which I have
> excluded.
>
> ");
> exit;
> }}
> ?>
>
>
> Web Developer and Programmer for Lukrative Media Ltd
> http://www.lukrative.com
> Domain Names-> http://CreativeNames.co.uk
> Classified Ads-> http://www.LocalAds.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:
Matthew,
Nice idea, and it seems to work - (until I break it, which usually happens). Thanks again.
Will Web Developer and Programmer for Lukrative Media Ltd http://www.lukrative.com Domain Names-> http://CreativeNames.co.uk Classified Ads-> http://www.LocalAds.Net
----- Original Message -----
From: Matthew Clark <matt
genicomsystems.com>
To: WL <will
localads.net>; PHP <php3
lists.php.net>
Sent: Sunday, March 12, 2000 4:51 PM
Subject: RE: [PHP3] MySql Query Problem - please help
> Hello there..
>
> In English your code says - if this is a valid SQL query, then the email
> exists..
>
> what you need it to say is - if this is a valid SQL query, and 1 or more
> rows was returned (in your case 1 row I guess) then the email already
> exists..
>
> so..
>
> -------untested code----------
>
> $checkemail_result = mysql_db_query($dbdb,$checkemail,$connection);
>
> if ($checkemail_result) {
> if (mysql_num_rows($checkemail_result) > 0) {
> echo "Email exists";
> }
> else {
> echo "Email Doesn't exist";
> }
> }
> else {
> echo "Invalid Query: ".$checkemail;
> }
>
> ------------------------------
>
> HTH
>
> Matthew Clark.
>
>
> > So basically, it's not running the `else` bit. Why?
> >
> > Thanks for any help,
> >
> > Will
> >
> > $id = mysql_insert_id();
> > $insert_users = "INSERT INTO before
> >
> > (title,name,email,school,dept,address1,address2,address3,address4,
> > phone,righ
> > ts,pass) VALUES
> > ('$title','$name','$email','$school','$dept','$address1','$address
> > 2','$addre
> > ss3','$address4','$phone','$rights','$pass')";
> > $checkemail = "SELECT * FROM users WHERE email = '$email'";
> > $checkemail_result = mysql_db_query($dbdb,$checkemail,$connection);
> >
> > if ($checkemail_result) {
> >
> > $checkemail_row = mysql_fetch_object($checkemail_result);
> > echo("The following error occurred:<p><b>The email address
> > entered(</b>$checkemail_row->email<b>) is already present in the
database.
> > Please go back and check you entered your correct
> > address.<p>Alternatively,
> > <a href='pass.phtml'>request</a> your password is emailed to you.");
> >
> > echo("<table width='303' border='0' cellspacing='0' cellpadding='0'>");
> > // There's a load more code here for the table and layout which I have
> > excluded.
> >
> > ");
> >
> >
> > exit;
> > }
> >
> > }
> > else
> > {
> > echo("Haven't found that email in there, no, sorry..");
> > // mysql_db_query($dbdb,$insert_users,$connection);
> > // echo mysql_errno().": ".mysql_error()."<BR>";
> > // echo ("User <b> $email </b> entered successfully into database");
> >
> > // I deliberatley commented the above out until I know it works..
> > // There's a load more code here for the table and layout which I have
> > excluded.
> >
> > ");
> > exit;
> > }}
> > ?>
> >
> >
> > Web Developer and Programmer for Lukrative Media Ltd
> > http://www.lukrative.com
> > Domain Names-> http://CreativeNames.co.uk
> > Classified Ads-> http://www.LocalAds.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:
Hallo All
I still don't understand a thing about Apache + PHP....
I have installed PHP about 5 times now on Apache and every time I don't know how I got it to work.. For another Web server (WN) I understand it, you compile a CGI version and in the web-server you tell what files should be pulled throught the PHP-parser.. This is done by defining a default-cgi-handler.. No problem..
For Apache I see two (common) choices: APXS module of CGI version..
I always try the APXS module.. The compiling (./configure, make) goes O.K and what I see at the end is that their has been generated a libphp3.so
When you run 'make install' it is copied to a module directory and the appropiate lines in httpd.conf and srm.conf is set.. (Loadmodule etc...) This is where it every time goes wrong: Mostly I need to copy the file by hand..
This time when I run it on a Redhat 6.1 system I got the following error:
[root
mubo php-3.0.15]# make install
/usr/sbin/apxs -i -a -n php3 libphp3.so
cp libphp3.so modules/libphp3.so
cp: cannot create regular file `modules/libphp3.so': No such file or
directory
apxs:Break: Command failed with rc=65536
make: *** [install] Error 1
The libphp3.so file exist, when I copy this file to my /etc/httpd/modules directory by hand and do a chmod 777 and try to start Apache I get the following: Shutting down http: [OK] Starting httpd: Syntax error on line 171 of /etc/httpd/conf/httpd.conf: Invalid command 'LoadModule', perhaps mis-spelled or defined by a module not inc luded in the server configuration [FAILED]
I don't understand what they mean by server configuration? Is this the httpd.conf file? The error comes from the line LoadModule which tries to load the libphp3.so file.. Everything is spelled correctly what I can see..
By the way, is it easy to setup the CGI version with Apache? Does this mean that I must place all the web files in the cgi-bin directory of apache..? Or can you also install a CGI-handler which means that a certain file extention will be run throught the cgi-program?
Thanks for the help. Maybe someone knows a document which can give me more info..
David
attached mail follows:
Hallo All
I still don't understand a thing about Apache + PHP....
I have installed PHP about 5 times now on Apache and every time I don't know how I got it to work.. For another Web server (WN) I understand it, you compile a CGI version and in the web-server you tell what files should be pulled throught the PHP-parser.. This is done by defining a default-cgi-handler.. No problem..
For Apache I see two (common) choices: APXS module of CGI version..
I always try the APXS module.. The compiling (./configure, make) goes O.K and what I see at the end is that their has been generated a libphp3.so
When you run 'make install' it is copied to a module directory and the appropiate lines in httpd.conf and srm.conf is set.. (Loadmodule etc...) This is where it every time goes wrong: Mostly I need to copy the file by hand..
This time when I run it on a Redhat 6.1 system I got the following error:
[root
mubo php-3.0.15]# make install
/usr/sbin/apxs -i -a -n php3 libphp3.so
cp libphp3.so modules/libphp3.so
cp: cannot create regular file `modules/libphp3.so': No such file or
directory
apxs:Break: Command failed with rc=65536
make: *** [install] Error 1
The libphp3.so file exist, when I copy this file to my /etc/httpd/modules directory by hand and do a chmod 777 and try to start Apache I get the following: Shutting down http: [OK] Starting httpd: Syntax error on line 171 of /etc/httpd/conf/httpd.conf: Invalid command 'LoadModule', perhaps mis-spelled or defined by a module not inc luded in the server configuration [FAILED]
I don't understand what they mean by server configuration? Is this the httpd.conf file? The error comes from the line LoadModule which tries to load the libphp3.so file.. Everything is spelled correctly what I can see..
By the way, is it easy to setup the CGI version with Apache? Does this mean that I must place all the web files in the cgi-bin directory of apache..? Or can you also install a CGI-handler which means that a certain file extention will be run throught the cgi-program?
Thanks for the help. Maybe someone knows a document which can give me more info..
David
attached mail follows:
Hallo All
I still don't understand a thing about Apache + PHP....
I have installed PHP about 5 times now on Apache and every time I don't know how I got it to work.. For another Web server (WN) I understand it, you compile a CGI version and in the web-server you tell what files should be pulled throught the PHP-parser.. This is done by defining a default-cgi-handler.. No problem..
For Apache I see two (common) choices: APXS module of CGI version..
I always try the APXS module.. The compiling (./configure, make) goes O.K and what I see at the end is that their has been generated a libphp3.so
When you run 'make install' it is copied to a module directory and the appropiate lines in httpd.conf and srm.conf is set.. (Loadmodule etc...) This is where it every time goes wrong: Mostly I need to copy the file by hand..
This time when I run it on a Redhat 6.1 system I got the following error:
[root
mubo php-3.0.15]# make install
/usr/sbin/apxs -i -a -n php3 libphp3.so
cp libphp3.so modules/libphp3.so
cp: cannot create regular file `modules/libphp3.so': No such file or
directory
apxs:Break: Command failed with rc=65536
make: *** [install] Error 1
The libphp3.so file exist, when I copy this file to my /etc/httpd/modules directory by hand and do a chmod 777 and try to start Apache I get the following: Shutting down http: [OK] Starting httpd: Syntax error on line 171 of /etc/httpd/conf/httpd.conf: Invalid command 'LoadModule', perhaps mis-spelled or defined by a module not included in the server configuration [FAILED]
I don't understand what they mean by server configuration? Is this the httpd.conf file? The error comes from the line LoadModule which tries to load the libphp3.so file.. Everything is spelled correctly what I can see..
By the way, is it easy to setup the CGI version with Apache? Does this mean that I must place all the web files in the cgi-bin directory of apache..? Or can you also install a CGI-handler which means that a certain file extention will be run throught the cgi-program?
Thanks for the help. Maybe someone knows a document which can give me more info..
David
attached mail follows:
Hi all,
When will it be possible (if ever) to write your own Apache modules in PHP (like one can with mod_perl and perl)... And when will it be possible to handle different request stages using PHP ? Cheers, [ : : ] Lukasz Felsztukier : : I T D e p a r t m e n t : : d i g i t a l O n e : : interactive media agency : : h t t p : / / w w w . d i g i t a l o n e . p l : : Al. Kosciuszki 1, Lodz : : tel./fax [0 42] 632.89.74
attached mail follows:
Hi,
I won't be able to figure it out by myself, so please helm me out. I would like to know the method or syntax to count the number of checkbox checked in a form IN PHP.
This is form yyy.php <? <form action="xxx.php" method="post"> <input type ="checkbox" value="1" name="checkbox1" >check1 <input type ="checkbox" value="1" name="checkbox1" >check1 <input type ="checkbox" value="1" name="checkbox1" >check1
<input type="submit" value="Check how many of checkbox checked" > ?> End of form yyy.php
My question is how to check the number of checkbox checked in xxx.php after hitting the submit button on page yyy.php
Thank You so much so your help
Mark LO
attached mail follows:
Mark Lo wrote: > > Hi, > > I won't be able to figure it out by myself, so please helm me out. > I would like to know the method or syntax to count the number of > checkbox checked in a form IN PHP. > > This is form yyy.php > <? > <form action="xxx.php" method="post"> > <input type ="checkbox" value="1" name="checkbox1" >check1 > <input type ="checkbox" value="1" name="checkbox1" >check1 > <input type ="checkbox" value="1" name="checkbox1" >check1 > > <input type="submit" value="Check how many of checkbox checked" > > ?> > End of form yyy.php > I guess you don't want to set the same value multiple times.. so instead of
<input type ="checkbox" value="1" name="checkbox1" >check1 <input type ="checkbox" value="1" name="checkbox2" >check2 <input type ="checkbox" value="1" name="checkbox3" >check3
write:
<input type ="checkbox" value="1" name="checkbox[1]" >check1 <input type ="checkbox" value="1" name="checkbox[2]" >check2 <input type ="checkbox" value="1" name="checkbox[3]" >check3
This way, count($checkbox) will give you the number of ticked checkboxes, and you will be able to access $checkbox like a regular array.
Hope this helps.
Peter
attached mail follows:
attached mail follows:
Hello,
I need help from a regex wizard about checking email addresses.
I saw the examples on http://www.php.net/manual/function.mail.php
but none of them seem to work with an address like something
something.co.uk
Any ideas ?
Thanks,
Thomas.
attached mail follows:
Thomas Merlin wrote:
> I need help from a regex wizard about checking email addresses.
> I saw the examples on http://www.php.net/manual/function.mail.php
> but none of them seem to work with an address like something
something.co.uk
>
Try this one:
ereg("^[a-zA-Z0-9_\.-]+
[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-]+",
$email)
Peter
attached mail follows:
Hi....
Sorry for my duplicate messages, thought that my emails bounced back:
From: <"Postmaster"
leeuwarden.vuurwerk.nl
> Your message was not delivered for the following reason:
>
> E-mail Account: david
mubo.nl is over the limit of 31457280 bytes.
>
> Automated Postmaster
>
attached mail follows:
I have been getting the same error message when I try to send emails into the newsletters. Any comments?
I don't post often, but it first occurred about a week ago.
E-mail Account: ashea
dmetechnologies.com is over the limit of 31457280
bytes.
Andrew Sheh
> -----Original Message-----
> From: David Bouw [mailto:david
mubo.nl]
> Sent: Sunday, March 12, 2000 8:39 AM
> To: php3
lists.php.net
> Subject: [PHP3] Fw: Sorry about the duplicates
>
>
> Hi....
> Sorry for my duplicate messages, thought that my emails bounced back:
>
> From: <"Postmaster"
leeuwarden.vuurwerk.nl
> > Your message was not delivered for the following reason:
> >
> > E-mail Account: david
mubo.nl is over the limit of 31457280 bytes.
> >
> > Automated Postmaster
> >
>
>
> --
> 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 see GD 1.8 has been released which now lets you create WBMP and jpg images, Will creating WBMP's be supported in php using GD?
attached mail follows:
In article <38CBCA0E.8A8EE99C
waples.net>,
Michael Waples <mwaples
waples.net> wrote:
> I see GD 1.8 has been released which now lets you create WBMP and jpg
> images,
> Will creating WBMP's be supported in php using GD?
God I hope not. Support is already included for PNGs which are far superior, why not use them?
TTFN Nik
-- http://www.cheddarcheese.de
attached mail follows:
Because WBMP's are needed to work with WAP devices - phones and stuff, they don't support other formats. I'd really like to use GD on some WAP sites.
Nik Gare wrote:
>
> In article <38CBCA0E.8A8EE99C
waples.net>,
> Michael Waples <mwaples
waples.net> wrote:
> > I see GD 1.8 has been released which now lets you create WBMP and jpg
> > images,
> > Will creating WBMP's be supported in php using GD?
>
> God I hope not.
> Support is already included for PNGs which are far superior, why not use
> them?
>
> TTFN
> Nik
>
> --
> http://www.cheddarcheese.de
>
> --
> 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 know that this usually isn't what you are supposed to do, but I really seem to need some help here:
Somebody must have done this before:
Storing a gif file as a BLOB in an ORACLE 8i database and then getting it out again with php, letting the php request in an <IMG SRC="***"> tag acting as the url of an actual image file.
So, how do I get the contents of a BLOB into a php variable, to pipe it out using "echo"? Or is this the wrong way to go anyway?
Thanks in advance for any answer that helps me
Tommy
attached mail follows:
On Sun, 12 Mar 2000, Thomas Tiller wrote:
> Storing a gif file as a BLOB in an ORACLE 8i database and then getting it > out again with php, letting the php request in an <IMG SRC="***"> tag > acting as the url of an actual image file.
http://www.weberdev.com/get_example.php3?count=167
may be of use.
--Duncan Hill Sapere aude
attached mail follows:
I upgrade my Apache from version 1.3.9 to 1.3.12. Old version Apache is come with Linux installation and using RPM method. After then I downloaded version 1.3.12 source code and install it by NO uninstall 1.3.9. I planed that install the new Apache to another directory to avoid the confusion in both version. By the old one, the main program is in "/etc/rc.d/init.d/httpd", and the new one I installed it on "/usr/local/apache" and its main program is "/usr/local/apache/bin/apachectl". On the other hand, the config file(httpd.conf) of the old Apache is resided in "/etc/httpd/conf" directory while the new Apache's config file is in "/usr/local/apache/conf". These is my story.
Now the problem is, I started the new Apache and see its status. Yes, the server is work and the new version comment is shown. But I found that it still reference the old config file from "/etc/httpd/conf" ! Because the DocumentRoot is still point to some directory as I set before while I haven't set the new config file yet for my new Apache.
How to solve the problem? Thank you very much.
-- Best regards, Chan Chu Man
- Next message: php3-digest-help
lists.php.net: "php3 Digest 13 Mar 2000 06:00:01 -0000 Issue 1534"
- Previous message: php3-digest-help
lists.php.net: "php3 Digest 12 Mar 2000 06:00:02 -0000 Issue 1532"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]