|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: php-general-digest-help
lists.php.netDate: Tue Aug 14 2001 - 07:19:47 CDT
php-general Digest 14 Aug 2001 12:19:47 -0000 Issue 815
Topics (messages 62522 through 62622):
Cookie Help
62522 by: Max Mouse
62545 by: Richard Baskett
62547 by: Richard Lynch
Re: Question about sessions
62523 by: Peter Houchin
62526 by: speedboy
Win32 Manual error?
62524 by: Boaz Amit
62548 by: Richard Lynch
Dealing with a file
62525 by: John Meyer
62540 by: Dan Lowe
62549 by: Richard Lynch
Problems with split
62527 by: Ville Mattila
62541 by: Dan Lowe
62544 by: CC Zona
62546 by: Richard Lynch
Re: Can't run perl script using exec or system
62528 by: Richard Lynch
Re: Apache/PHP File Upload problems
62529 by: Richard Lynch
62611 by: Martin Laws
Re: variable variables and eval
62530 by: Richard Lynch
Re: PHP's equivalent to Net::SSLeay?
62531 by: Richard Lynch
Re: Problem with Error/Mail/something...
62532 by: Richard Lynch
Re: Postgresql large objects.
62533 by: Richard Lynch
Re: Using a receiving a cookie with cURL?
62534 by: Richard Lynch
Re: Interbase lob field on the web
62535 by: Richard Lynch
Re: Problem with Zend Optimizer
62536 by: Richard Lynch
Re: Storing Credit Card Numbers, etc.
62537 by: Richard Lynch
62621 by: Sean C. McCarthy
Re: variable $PATH_INFO
62538 by: Richard Lynch
62580 by: lolodev news php
Re: inserting a remote html file
62539 by: Richard Lynch
62616 by: Boaz Amit
Re: How to stop images preloading in netscape?
62542 by: Dan Lowe
Re: auto_prepend_file
62543 by: David Robley
Re: How give a 'timed' online quiz?
62550 by: Bryan \"Cyngon\" Helmkamp
62569 by: Evan Nemerson
62613 by: pierre-yves
using eregi_replace to replace only substrings -- not the entire string.
62551 by: Kurt Lieber
62552 by: David Robley
stop a batch of mail during send
62553 by: Matthew Delmarter
62554 by: Matthew Delmarter
62567 by: Evan Nemerson
62583 by: Maxim Maletsky
space in strings
62555 by: Martin Skjoldebrand
62556 by: Jack Dempsey
62560 by: CC Zona
Need Info -Memory leakage tool
62557 by: senthilvellan
Put value directly into form?
62558 by: Phil Latio
62571 by: Dave Freeman
62582 by: Maxim Maletsky
PHP Script causing recursive free() calls (?)
62559 by: Chris Cameron
62586 by: David Robley
Regarding file upload using php
62561 by: Parinda
62562 by: Parinda
62563 by: Jason Murray
62565 by: Evan Nemerson
62566 by: Jason Murray
62581 by: Maxim Maletsky
Good News for PHP programmer.
62564 by: Ian
Classes and performance bottlenecks
62568 by: Artyom Plouzhnikoff
62577 by: Maxim Maletsky
Re: The secrecy of PHP code
62570 by: Garth Dahlstrom
62591 by: Soeren Nielsen
62592 by: Ben-Nes Michael
62605 by: Soeren Nielsen
Re: IE Download twice from DB - MAJOR disaster to db users
62572 by: Ryan Fischer
Re: How to get the query string?
62573 by: Ryan Fischer
Re: IE Download twice from DB - apologies
62574 by: Ben-Nes Michael
62575 by: Maxim Maletsky
Mail() not setting MIME TYPE
62576 by: Peter Houchin
62585 by: James Quinn-Hawtin
"location bar"
62578 by: Wolfgang Schneider
62584 by: Maxim Maletsky
62599 by: lallous
Using fopen to read a URL - DNS Problem?
62579 by: Brian White
Sessions in older browsers
62587 by: Sheni R. Meledath
Re: prob with session start
62588 by: Balaji Ankem
62595 by: Renze Munnik
62607 by: Balaji Ankem
62608 by: ReDucTor
Re: cropping a string
62589 by: Tom Carter
Re: session_questions() part IV
62590 by: Renze Munnik
qwestion about %E6%E2%E0%F7%EA%E0
62593 by: BRACK
62598 by: Ben-Nes Michael
Re: NEXT - PREVIOUS coding
62594 by: Boaz Amit
Re: Strange session problems. Please help.
62596 by: lallous
Re: mysql_query()
62597 by: lallous
62600 by: Ben-Nes Michael
62603 by: lallous
62610 by: Ben-Nes Michael
62612 by: lallous
62620 by: Alnisa Allgood
PUT method support
62601 by: Rukhiya
to include php file into html page
62602 by: Jack
62606 by: Evan Nemerson
62619 by: Alnisa Allgood
SQL script ---------any help
62604 by: legal.HEROCYCLES.COM
Need people's advice on a web registration system.
62609 by: sunny AT wde
session security issue
62614 by: Christian Dechery
62615 by: Renze Munnik
62617 by: Tim
Re: ucwords Except 'The' 'And' etc?
62618 by: Steve Edberg
SQL script ------ .any help
62622 by: legal.HEROCYCLES.COM
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
Hi, I have a problem with setting cookies...I am able to set cookies and
retreive the information when using IE but not netscape. I'm not totally
sure what the problem is. Here is the syntax that I am using, any
suggestions are welcomed.
$cookiedata = "Mmmm";
$time = mktime()+900;
$expire = date("l, d-M-y H:i:s", ($time));
setcookie("cookiemonster", $cookiedata, $expire, "/", "domain.com.", 1);
It needs to be secure, hence the 1. Also, I need the domain to be
"domain.com" and it cannot be www.domain.com. Can anyone help me at all?
Thanks!
Max
attached mail follows:
header("Set-Cookie: cookiemonster=$cookiedata; expires=$expire; path=/;
domain="domain.com", secure);
or go to http://home.netscape.com/newsref/std/cookie_spec.html to view even
more specs on it. I just found this way of setting cookies to always work
compared to the php setcookie command which didnt always set on all
platforms and browsers. I hope it helps!
Rick
> Hi, I have a problem with setting cookies...I am able to set cookies and
> retreive the information when using IE but not netscape. I'm not totally
> sure what the problem is. Here is the syntax that I am using, any
> suggestions are welcomed.
>
> $cookiedata = "Mmmm";
> $time = mktime()+900;
> $expire = date("l, d-M-y H:i:s", ($time));
> setcookie("cookiemonster", $cookiedata, $expire, "/", "domain.com.", 1);
>
> It needs to be secure, hence the 1. Also, I need the domain to be
> "domain.com" and it cannot be www.domain.com. Can anyone help me at all?
> Thanks!
>
> Max
attached mail follows:
> Hi, I have a problem with setting cookies...I am able to set cookies and
> retreive the information when using IE but not netscape. I'm not totally
> sure what the problem is. Here is the syntax that I am using, any
> suggestions are welcomed.
>
> $cookiedata = "Mmmm";
> $time = mktime()+900;
> $expire = date("l, d-M-y H:i:s", ($time));
> setcookie("cookiemonster", $cookiedata, $expire, "/", "domain.com.", 1);
>
> It needs to be secure, hence the 1. Also, I need the domain to be
> "domain.com" and it cannot be www.domain.com. Can anyone help me at all?
> Thanks!
Change your Netscape preferences to "warn me before accepting any cookies".
Is Netscape getting the cookies?
Look at the cookie Netscape stored in your Cookies file. Does it seem to
have what you would expect?
You *ARE* doing all of this on an SSL site with https:// throughout,
correct?...
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
Chris,
I have found that when you get the users to exit propperly they will go by them
selves ... also have a look
the garbage collection in your php.ini file
>Mailing-List: contact php-general-help
lists.php.net; run by ezmlm
>list-help: <mailto:php-general-help
lists.php.net>
>list-unsubscribe: <mailto:php-general-unsubscribe
lists.php.net>
>list-post: <mailto:php-general
lists.php.net>
>Delivered-To: mailing list php-general
lists.php.net
>X-Sender: chriskay
mail.ideal.net.au
>Date: Tue, 14 Aug 2001 10:11:22 +1000
>To: php-general
lists.php.net
>From: Chris Kay <chriskay
ideal.net.au>
>Mime-Version: 1.0
>Subject: [PHP] Question about sessions
>X-Mozilla-Status: 0000
>X-Mozilla-Status2: 00000000
>X-UIDL: e0581fbdbadb633f348da8cb3b99517e
>
>
>I have a mysql/php db/website that uses session, (i am new to sessions).
>My question is that the session works and all but i notice that it writes
>alot of sess_*************** files in the /tmp directory.
>
>Do i need to purge these weekly so it wont use tooo much room or are these
>spose to delete them selves.?
>
>Maybe someone has come accross this before and fixed it?
>
>
>
>
>------------------------------------------------------------------------
> Chris Kay - Tech Support - IDEAL Internet
>email: chriskay
ideal.net.au phone: +61 2 4628 8888 fax: +61 2 4628 8890
>------------------------------------------------------------------------
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
------------------------------------------------------
Peter Houchin
Sun Rentals STR Manager
Phone: 03 9329 1455
Fax: 03 9329 6755
peterh
sunrentals.com.au
http://www.sun.com.au/rentals
=========================================================
_____ __ /\
/_/_/_\ / |_/ \
/_/_/_ __ __ __ __ / \
\_/_/_\ /_/ /_/ /_/ /_/ \ _ /
___\_\_\/ /_/_/_/ /_//\/_/ \_/ \/\_/
\_//_/_/ /_/_/_/ /_/ \/_/ v
________ ________________________________________
/_/_/_/_/ /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
/_/_ _/_/ ______ __ __ /_/ ____ __ ______
/_/_/_/_/ /_/_/_/ /_/ /_/ /_/ /_/\_\ /_/ /_/_/_/
/_/ \_\ /_/ _/ /_//\/_/ /_/ /_/__\_\ /_/___ _\_\_\
/_/ \_\/_/_/_/ /_/ \/_/ /_/ /_/ \_\/_/_/_//_/_/_/
=========================================================
Telephone : (03) 9329 1455 Facsimile : (03) 9329 6755
************* We rent the dot in .COM! **************
attached mail follows:
There's a session deletion script based on the last time a session file was written to. You can set the duration a session is allowed to stay on the file system for. http://database.sf.net/ - Down the bottom.
On Tue, 14 Aug 2001, Chris Kay wrote:
>
> I have a mysql/php db/website that uses session, (i am new to sessions).
> My question is that the session works and all but i notice that it writes
> alot of sess_*************** files in the /tmp directory.
>
> Do i need to purge these weekly so it wont use tooo much room or are these
> spose to delete them selves.?
>
> Maybe someone has come accross this before and fixed it?
>
>
>
>
> ------------------------------------------------------------------------
> Chris Kay - Tech Support - IDEAL Internet
> email: chriskay
ideal.net.au phone: +61 2 4628 8888 fax: +61 2 4628 8890
> ------------------------------------------------------------------------
>
>
>
attached mail follows:
While building a simple feedback form, I came across what seemed like a puzzling error(?) in the manual.
After the user has filled the form I call for the mail() function. To do so, I referred to the manual about the mail function: http://php.net/manual/en/function.mail.php
"...Please also note that the cc: and bcc: headers are case sensitive and should be written as Cc: and Bcc: on Win32 systems."
Since I Am using a Win32 system, and accustomed with the many 'nuances' involved in running PHP on Windows, I followed to the letter.
<?php
/* subject and message are arguments returned from the form */
$headers = "From: Me <Me
myplace.com>\r\nCc: someonelse
wherever.com\r\nBcc: log
myplace.com";
mail($address, $subject, $message, $headers);
?>
When I ran the script IE repeatedly launched an error message saying the page can't be opened, and the connection with the server has been reset. The mail of course wasn't sent, as well. I tried a few different ways to write the headers argument, but none of them worked unless I removed the 'cc' and 'bcc' ones. Then finally I gave up, and wrote them case insensitive.
$headers = "cc: someonelse
wherever.com\r\nbcc: log
myplace.com";
To my surprise that worked perfectly, and produced no error at all, despite of the explicit warning in the manual.
It really is no biggie, the script Is Working. But it is interesting, as I usually assume that on these matters the manual is accurate. I also checked the PHP Manual Errata (http://www.php.net/manual/browse-errata.php) , but no one seems to report this error before.
I would appreciate it if someone would clear the matter, as it seems very unlikely to me that the fault is in the manual, rather than in my system. I am using Apache 1.3.12 and PHP 4.0.6, on a Win32 (95) system.
--- regards, Boaz Amit
attached mail follows:
> "...Please also note that the cc: and bcc: headers are case sensitive and should be written > as Cc: and Bcc: on Win32 systems."
This depends more on the mailing software you use that Win32-ness. There might even exist some lame-ass Un*x software somewhere that insists on case-sensitivity, which is still in accordance with RFC-spec, though somewhat niggardly so.
> <?php
> /* subject and message are arguments returned from the form */
> $headers = "From: Me <Me
myplace.com>\r\nCc:
someonelse
wherever.com\r\nBcc: log
myplace.com";
> mail($address, $subject, $message, $headers);
> ?>
Me <Me
myplace.com> is the trouble-maker. I dunno exactly if you can only
use xxx
yyy.zzz or what, but for sure what you got ain't working...
> $headers = "cc: someonelse
wherever.com\r\nbcc: log
myplace.com;
Ah, but now the From: is not in there, so it works.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
I haven't had much experience with dealing with uploaded files. Are there any links that would help me to deal with these files using PHP from a server-side.
attached mail follows:
Previously, John Meyer said: > I haven't had much experience with dealing with uploaded files. Are there > any links that would help me to deal with these files using PHP from a > server-side.
http://www.php.net/manual/en/features.file-upload.php
--
If carpenters made buildings the way programmers make programs, the first
woodpecker to come along would destroy all of civilization.
-Weinberg's Second Law
attached mail follows:
There's a "File Upload Feature" page on http://php.net that pretty much tells you everything you need to know...
Then there's sample code in the various archives linked from http://php.net/links.php I'm willing to bet that every site linked there has at least one (1) file-upload sample.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm ----- Original Message ----- From: John Meyer <john_meyer
geocities.com> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Monday, August 13, 2001 8:34 PM Subject: Dealing with a file
> I haven't had much experience with dealing with uploaded files. Are there > any links that would help me to deal with these files using PHP from a > server-side. >
attached mail follows:
Hi there,
First the code:
---
$invdate = "14.8.2001";
echo "$invdate\n";
list($day, $month, $year) = split(".", $invdate);
echo "$year-$month-$day";
---
Somehow, the second echo outputs only "--" as it should be "2001-8-14". Any idea why this happen and how this could be avoided?
Thanks,
- Ville
attached mail follows:
Previously, Ville Mattila said: > --- > $invdate = "14.8.2001"; > echo "$invdate\n"; > list($day, $month, $year) = split(".", $invdate); > echo "$year-$month-$day"; > --- > Somehow, the second echo outputs only "--" as it should be "2001-8-14". > Any idea why this happen and how this could be avoided?
Change the third line to read:
list($day, $month, $year) = split("\.", $invdate);
-dan
--
What do you do when you see an endangered animal eating an endangered plant?
-George Carlin
attached mail follows:
In article <20010813205117.B888
tangledhelix.com>,
dan
tangledhelix.com (Dan Lowe) wrote:
> > $invdate = "14.8.2001"; > > echo "$invdate\n"; > > list($day, $month, $year) = split(".", $invdate); > > echo "$year-$month-$day"; > > --- > > Somehow, the second echo outputs only "--" as it should be "2001-8-14". > > Any idea why this happen and how this could be avoided? > > Change the third line to read: > > list($day, $month, $year) = split("\.", $invdate);
Or change: split(".", $invdate)
To: explode(".", $invdate)
Since you aren't using the regex overhead anyway.
-- CC
attached mail follows:
>--- >$invdate = "14.8.2001"; >echo "$invdate\n"; >list($day, $month, $year) = split(".", $invdate); >echo "$year-$month-$day"; >---
split uses Regular Expressions.
This means that a whole slew of characters like [, ], |, \, $, ^, and [drum roll please] '.' are "special".
Specifically, "." means "any damn character at all".
You could 'escape' the "." character with file://\\. and all would be good
But, it would be way easier (and more efficient if you're doing a lot of these) to use http://php.net/explode instead, wherein *NO* characters are "special" (other than the usual ones for PHP itself, of course.)
As a bonus, you save yourself the headache of trying to understand Regular Expressions. :-)
list($day, $month, $year) = explode(".", $invdate);
Besides, blowing things up is much more fun than just chopping them with an axe :-) :-) :-)
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
> Using the following code, the two files copyUp.pl and convert.pl > aren't called. I can run them peachy dandy from the commandline > with the expected results. I've tried system(), exec(), and back tics.
> $command = "/home/copyUp.pl $sellerid $image"; > exec($command, $output, $error); > if($error) > { > echo "OS Error1 $error<br>"; > }
Do you get this error output? What number? If not, add this:
echo implode("<BR>\n", $output);
Are the Perl scripts world-executable? Do they start with #! /usr/bin/perl, or are you relying on shell configuration to "know" they are Perl scripts, which PHP's shell probably won't?
Does either Perl script access other files to which "nobody" might not have access?
Why are you using Perl anyway? :-)
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
> If I try to submit a file for upload using the form using Netscape I get > > "Document contains no data". If I do the same in IE5.0 it just waits > forever. > > Looking at the apache server error_log file I appear to be getting a > "Segmentation Fault (11)" each time I try and Post the contents of the > form to the server.
It should just work.
Your page *IS* trying to return some HTML as well as dealing with the uploaded file, right?...
With the segfault, read the instructions on http://bugs.php.net about generating a back-trace to submit.
You may want to back off of the -dev version (development == untested) and go with an actual release.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
Thanks for the message Richard,
I've been advised to upgrade to a new version (now running 4.0.6) and it works fine.
Martin
Richard Lynch wrote:
> > If I try to submit a file for upload using the form using Netscape I get
> >
> > "Document contains no data". If I do the same in IE5.0 it just waits
> > forever.
> >
> > Looking at the apache server error_log file I appear to be getting a
> > "Segmentation Fault (11)" each time I try and Post the contents of the
> > form to the server.
>
> It should just work.
>
> Your page *IS* trying to return some HTML as well as dealing with the
> uploaded file, right?...
>
> With the segfault, read the instructions on http://bugs.php.net about
> generating a back-trace to submit.
>
> You may want to back off of the -dev version (development == untested) and
> go with an actual release.
>
> --
> WARNING richard
zend.com address is an endangered species -- Use
> ceo
l-i-e.com
> Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
> Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
> i have come across a strange problem with variable variables. Basicly i'm > doing the following and its not working: > > $section = 'data["SITE"][0]["NAME"][0]'; > $pData = 'My Site.'; > ${sprintf('$%s', $section)}.=$pData; > > but it is not working. But if i do this: > > eval('$'.$section.'.="'.addslashes($pData).'";'); > > it works and all is well. I don't really want to use eval() and just > wanted to see if anybody has any ideas why the above doesn't work.
Why is the sprintf in there?...
Try this:
${$section} .= $pData;
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
I think you can do all that with "cURL"
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm ----- Original Message ----- From: Brandon Orther <orther
webintellects.com> Newsgroups: php.general To: PHP User Group <php-general
lists.php.net> Sent: Monday, August 13, 2001 2:48 PM Subject: PHP's equivalent to Net::SSLeay?
> Hello, > > I have a cgi script that logins to a site and then emulates a form POST. > The script uses Net::SSLeay and was wondering if there is soemthing > equvilent to it? > Thank you, > > -------------------------------------------- > Brandon Orther > WebIntellects Design/Development Manager > brandon
webintellects.com > 800-994-6364 > www.webintellects.com > -------------------------------------------- > >
attached mail follows:
> <? > include("/home/fplg/lib/functions.php");
We'll probably need this file as well...
> echo "starting page<br>";
> if(!isset($action)) {
> $action = 1;
> }
> echo "finished isset action if<br>";
>
> echo "starting if for submit check<br>";
> if($submit) {
> //$action = 2;
> echo "inside if<br>";
> $match = ereg("^[^
]+
[^
]+\.[^
\.]+$", $sender);
> echo "set match to ereg<br>";
>
> echo "entering mailto if<br>";
> if(!isset($mailto)) {
> echo "inside mailto if<br>";
> array_push($error_fields, "Mail To Field(select name from
list");
> $action = 3;
> }
>
> echo "entering sender if<br>";
> if(!isset($sender)) {
> echo "inside sender if<br>";
> array_push($error_fields, "From Field(fill in your email
> address)");
> $action = 3;
> }
> echo "else statement for sender if<br>";
You can't put echo here in the middle of an if/else...
Put it after the {
> else { > echo "entering match if<br>"; > if(!match) { > echo "inside match if<br>"; > array_push($error_fields, "Invalid Email Address(please > reenter your email address)"); > $action = 3; > } > echo "done with match if<br>"; > } > > echo "entering subject if<br>"; > if(!isset($subject)) { > echo "inside subject if<br>"; > array_push($error_fields, "Empty Subject(please fill in the subject > field for your message)"); > $action = 3; > } > > echo "entering body if<br>"; > if(!isset($body)) { > echo "inside body if<br>"; > array_push($error_fields, "Empty Body field(please type some text > in your for message)"); > $action = 3; > } > > echo "entering if for empty error fields array<br>"; > if(empty($error_fields)) { > echo "inside empty array if<br>"; > $send_to = $people[$mailto]; > $sender = chop($sender); > $subject = chop($subject); > $body = chop($body); > $body = htmlspecialchars($body); > $mail_headers = ''; > $mail_headers .= "From:$sender\r\n"; > $mail_headers .= "Reply-to:$sender\r\n"; > } > > echo "entering else for empty array<br>";
and here.
> else { > echo "inside else<br>"; > $action = 3; > } > > echo "entering if for mail<br>"; > if(!mail($send_to,$subject,$body,$mail_headers)) { > echo "inside mail if<br>"; > $action = 4; > }
# Up to now, when the email worked, you were returning NOTHING to the browser...
else{ echo "Successfully send email!"; }
>
> }
> echo "outside of submit if<br>";
>
> echo "entering switch statement<br>";
> switch($action) {
> case 1:
> echo "in case 1<br>";
> header_start("FPLG: CONTACT US!");
> display_form();
> break;
> case 2:
> echo "in case 2<br>";
> header_start("FPLG: Mail status.");
> display_conf();
> break;
> case 3:
> echo "in case 3<br>";
> header_start("FPLG: Form error.");
> display_error($error_fields);
> display_form();
> break;
> case 4:
> echo "in case 4<br>";
> header_start("FPLG: Sending Error.");
> display_m_err();
> break;
> }
>
> echo "outside of switch<br>";
>
> function display_form() {
> global $send_to,$sender,$subject,$body;
> ?>
> <center>
> <form method="POST" action="contact.php">
> <table width="692" cellspacing="1" cellpadding="0">
> <tr align="center">
> <td colspan="2" bgcolor="#ff6600">
> <font size="2" face="verdana" color="#ffffff">
> </td>
> </tr>
> <tr align="center">
> <td width="35%" bgcolor="#808080" valign="top">
> <font face="verdana" size="2" color="#ffffff">To:</font><br>
> <select name="mailto" size="1" style="BACKGROUND-COLOR:
rgb(0,0,0);
> BORDER-BOTTOM: rgb(255,255,255) 1px solid; BORDER-LEFT: rgb(255,255,255)
1px
> solid; BORDER-RIGHT: rgb(255,255,255) 1px solid; BORDER-TOP:
> rgb(255,255,255) 1px solid; COLOR: rgb(255,255,255); FLOAT: none;
> FONT-FAMILY: verdana; FONT-SIZE: 8pt; LETTER-SPACING: normal; LINE-HEIGHT:
> normal; MARGIN-LEFT: 0px; PADDING-BOTTOM: 1px; PADDING-TOP: 1px;
TEXT-ALIGN:
> center; TEXT-INDENT: 0px; VERTICAL-ALIGN: middle;
> scrollbar-arrow-color:#ffffff; scrollbar-base-color:#808080;
> scrollbar-Highlight-Color:#ffffff">
> <option selected>Select from this list</option>
> <option value="band">Band</option>
> <option value="booking">Booking</option>
> <option value="jamie">Jamie Balmer</option>
> <option value="chris">Chris Cocuzzo</option>
> <option value="jared">Jared Salavatore</option>
> <option value="max">Max Baehr</option>
> <option value="ben">Ben Brenner</option>
> <option value="marcus">Marcus Sholar</option>
> </select>
> <br><br><br><br>
> <font face="verdana" size="2" color="#ffffff">From(email
> address):</font><br>
> <input type="text" name="sender" size="30"
style="BACKGROUND-COLOR:
> rgb(0,0,0); BORDER-BOTTOM: rgb(255,255,255) 1px solid; BORDER-LEFT:
> rgb(255,255,255) 1px solid; BORDER-RIGHT: rgb(255,255,255) 1px solid;
> BORDER-TOP: rgb(255,255,255) 1px solid; COLOR: rgb(255,255,255); FLOAT:
> none; FONT-FAMILY: verdana; FONT-SIZE: 8pt; LETTER-SPACING: normal;
> LINE-HEIGHT: normal; MARGIN-LEFT: 0px; PADDING-BOTTOM: 1px; PADDING-TOP:
> 1px; TEXT-ALIGN: center; TEXT-INDENT: 0px; VERTICAL-ALIGN: middle">
> <br><br>
> <font face="verdana" size="2" color="#ffffff">Subject</font><br>
> <input type="text" name="subject" size="30"
style="BACKGROUND-COLOR:
> rgb(0,0,0); BORDER-BOTTOM: rgb(255,255,255) 1px solid; BORDER-LEFT:
> rgb(255,255,255) 1px solid; BORDER-RIGHT: rgb(255,255,255) 1px solid;
> BORDER-TOP: rgb(255,255,255) 1px solid; COLOR: rgb(255,255,255); FLOAT:
> none; FONT-FAMILY: verdana; FONT-SIZE: 8pt; LETTER-SPACING: normal;
> LINE-HEIGHT: normal; MARGIN-LEFT: 0px; PADDING-BOTTOM: 1px; PADDING-TOP:
> 1px; TEXT-ALIGN: center; TEXT-INDENT: 0px; VERTICAL-ALIGN: middle">
> </td>
> <td width="65%" bgcolor="#808080">
> <font face="verdana" size="2" color="#ffffff">Enter text of
message
> in box below:</font><br>
> <textarea name="body" cols="68" rows="16" style="BACKGROUND-COLOR:
> rgb(0,0,0); BORDER-BOTTOM: rgb(255,255,255) 1px solid; BORDER-LEFT:
> rgb(255,255,255) 1px solid; BORDER-RIGHT: rgb(255,255,255) 1px solid;
> BORDER-TOP: rgb(255,255,255) 1px solid; COLOR: rgb(255,255,255); FLOAT:
> none; FONT-FAMILY: verdana; FONT-SIZE: 8pt; LETTER-SPACING: normal;
> LINE-HEIGHT: normal; MARGIN-LEFT: 0px; PADDING-BOTTOM: 1px; PADDING-TOP:
> 1px; TEXT-ALIGN: left; TEXT-INDENT: 0px; VERTICAL-ALIGN: middle">
> </textarea>
> <br><br>
> </td>
> </tr>
> <tr align="center" valign="middle">
> <td colspan="2" bgcolor="#ff6600" align="center" valign="middle">
> <input type="submit" name="submit" value="Submit"
> style="BACKGROUND-COLOR: rgb(0,0,0); BORDER-BOTTOM: rgb(255,255,255) 1px
> solid; BORDER-LEFT: rgb(255,255,255) 1px solid; BORDER-RIGHT:
> rgb(255,255,255) 1px solid; BORDER-TOP: rgb(255,255,255) 1px solid; COLOR:
> rgb(255,255,255); FLOAT: none; FONT-FAMILY: verdana; FONT-SIZE: 8pt;
> LETTER-SPACING: normal; LINE-HEIGHT: normal; MARGIN-LEFT: 0px;
> PADDING-BOTTOM: 1px; PADDING-TOP: 1px; TEXT-ALIGN: center; TEXT-INDENT:
0px;
> VERTICAL-ALIGN: middle">
> <input type="reset" value="Reset" style="BACKGROUND-COLOR:
> rgb(0,0,0); BORDER-BOTTOM: rgb(255,255,255) 1px solid; BORDER-LEFT:
> rgb(255,255,255) 1px solid; BORDER-RIGHT: rgb(255,255,255) 1px solid;
> BORDER-TOP: rgb(255,255,255) 1px solid; COLOR: rgb(255,255,255); FLOAT:
> none; FONT-FAMILY: verdana; FONT-SIZE: 8pt; LETTER-SPACING: normal;
> LINE-HEIGHT: normal; MARGIN-LEFT: 0px; PADDING-BOTTOM: 1px; PADDING-TOP:
> 1px; TEXT-ALIGN: center; TEXT-INDENT: 0px; VERTICAL-ALIGN: middle">
> <input type="hidden" name="action" value="2">
> </td>
> </tr>
> </table>
> </form>
> </center>
> <?php
> }
>
> function display_conf() {
> global $send_to,$subject;
> ?>
> <center>
> <table width="692" cellspacing="0" cellpadding="0">
> <tr>
> <td align="center">
> <font size="2" face="verdana,arial" color="WHITE">
> Your message, '<?php echo $subject;?>' has been delivered to <?php
> echo $send_to;?>.<br>
> Expect a response back within the next couple of
> days.<br><br><br><br>
> <a href="/index.php?page=home" class="hov1">Click here to go back
to
> the home page</a>
> </font>
> </td>
> </tr>
> </table>
> </center>
> <?php
> }
>
> function display_error($error_fields) {
> global $send_to,$sender,$subject,$body;
> ?>
> <center>
> <form method="POST" action="contact.php">
> <table width="692" cellspacing="1" cellpadding="0">
> <tr align="center">
> <td colspan="2" bgcolor="#ff6600" align="center">
> <font size="2" face="verdana" color="#ffffff">
> The following form fields are blank/have errors:<br>
> <?php
> foreach($error_fields As $error) {
> echo "$error<br>";
> }
> ?>
> Please correct your errors in resubmit.
> </font>
> </td>
> </tr>
> <tr align="center">
> <td width="35%" bgcolor="#808080" valign="top">
> <font face="verdana" size="2" color="#ffffff">To:</font><br>
> <select name="mailto" size="1" style="BACKGROUND-COLOR:
rgb(0,0,0);
> BORDER-BOTTOM: rgb(255,255,255) 1px solid; BORDER-LEFT: rgb(255,255,255)
1px
> solid; BORDER-RIGHT: rgb(255,255,255) 1px solid; BORDER-TOP:
> rgb(255,255,255) 1px solid; COLOR: rgb(255,255,255); FLOAT: none;
> FONT-FAMILY: verdana; FONT-SIZE: 8pt; LETTER-SPACING: normal; LINE-HEIGHT:
> normal; MARGIN-LEFT: 0px; PADDING-BOTTOM: 1px; PADDING-TOP: 1px;
TEXT-ALIGN:
> center; TEXT-INDENT: 0px; VERTICAL-ALIGN: middle;
> scrollbar-arrow-color:#ffffff; scrollbar-base-color:#808080;
> scrollbar-Highlight-Color:#ffffff">
> <option selected>Select from this list</option>
> <option value="band">Band</option>
> <option value="booking">Booking</option>
> <option value="jamie">Jamie Balmer</option>
> <option value="chris">Chris Cocuzzo</option>
> <option value="jared">Jared Salavatore</option>
> <option value="max">Max Baehr</option>
> <option value="ben">Ben Brenner</option>
> <option value="marcus">Marcus Sholar</option>
> </select>
> <br><br><br><br>
> <font face="verdana" size="2" color="#ffffff">From(email
> address):</font><br>
> <input type="text" name="sender" size="30"
style="BACKGROUND-COLOR:
> rgb(0,0,0); BORDER-BOTTOM: rgb(255,255,255) 1px solid; BORDER-LEFT:
> rgb(255,255,255) 1px solid; BORDER-RIGHT: rgb(255,255,255) 1px solid;
> BORDER-TOP: rgb(255,255,255) 1px solid; COLOR: rgb(255,255,255); FLOAT:
> none; FONT-FAMILY: verdana; FONT-SIZE: 8pt; LETTER-SPACING: normal;
> LINE-HEIGHT: normal; MARGIN-LEFT: 0px; PADDING-BOTTOM: 1px; PADDING-TOP:
> 1px; TEXT-ALIGN: center; TEXT-INDENT: 0px; VERTICAL-ALIGN: middle">
> <br><br>
> <font face="verdana" size="2" color="#ffffff">Subject</font><br>
> <input type="text" name="subject" size="30"
style="BACKGROUND-COLOR:
> rgb(0,0,0); BORDER-BOTTOM: rgb(255,255,255) 1px solid; BORDER-LEFT:
> rgb(255,255,255) 1px solid; BORDER-RIGHT: rgb(255,255,255) 1px solid;
> BORDER-TOP: rgb(255,255,255) 1px solid; COLOR: rgb(255,255,255); FLOAT:
> none; FONT-FAMILY: verdana; FONT-SIZE: 8pt; LETTER-SPACING: normal;
> LINE-HEIGHT: normal; MARGIN-LEFT: 0px; PADDING-BOTTOM: 1px; PADDING-TOP:
> 1px; TEXT-ALIGN: center; TEXT-INDENT: 0px; VERTICAL-ALIGN: middle">
> </td>
> <td width="65%" bgcolor="#808080">
> <font face="verdana" size="2" color="#ffffff">Enter text of
message
> in box below:</font><br>
> <textarea name="body" cols="68" rows="16" style="BACKGROUND-COLOR:
> rgb(0,0,0); BORDER-BOTTOM: rgb(255,255,255) 1px solid; BORDER-LEFT:
> rgb(255,255,255) 1px solid; BORDER-RIGHT: rgb(255,255,255) 1px solid;
> BORDER-TOP: rgb(255,255,255) 1px solid; COLOR: rgb(255,255,255); FLOAT:
> none; FONT-FAMILY: verdana; FONT-SIZE: 8pt; LETTER-SPACING: normal;
> LINE-HEIGHT: normal; MARGIN-LEFT: 0px; PADDING-BOTTOM: 1px; PADDING-TOP:
> 1px; TEXT-ALIGN: left; TEXT-INDENT: 0px; VERTICAL-ALIGN: middle">
> </textarea>
> <br><br>
> </td>
> </tr>
> <tr align="center" valign="middle">
> <td colspan="2" bgcolor="#ff6600" align="center" valign="middle">
> <input type="submit" name="submit" value="Submit"
> style="BACKGROUND-COLOR: rgb(0,0,0); BORDER-BOTTOM: rgb(255,255,255) 1px
> solid; BORDER-LEFT: rgb(255,255,255) 1px solid; BORDER-RIGHT:
> rgb(255,255,255) 1px solid; BORDER-TOP: rgb(255,255,255) 1px solid; COLOR:
> rgb(255,255,255); FLOAT: none; FONT-FAMILY: verdana; FONT-SIZE: 8pt;
> LETTER-SPACING: normal; LINE-HEIGHT: normal; MARGIN-LEFT: 0px;
> PADDING-BOTTOM: 1px; PADDING-TOP: 1px; TEXT-ALIGN: center; TEXT-INDENT:
0px;
> VERTICAL-ALIGN: middle">
> <input type="reset" value="Reset" style="BACKGROUND-COLOR:
> rgb(0,0,0); BORDER-BOTTOM: rgb(255,255,255) 1px solid; BORDER-LEFT:
> rgb(255,255,255) 1px solid; BORDER-RIGHT: rgb(255,255,255) 1px solid;
> BORDER-TOP: rgb(255,255,255) 1px solid; COLOR: rgb(255,255,255); FLOAT:
> none; FONT-FAMILY: verdana; FONT-SIZE: 8pt; LETTER-SPACING: normal;
> LINE-HEIGHT: normal; MARGIN-LEFT: 0px; PADDING-BOTTOM: 1px; PADDING-TOP:
> 1px; TEXT-ALIGN: center; TEXT-INDENT: 0px; VERTICAL-ALIGN: middle">
> <input type="hidden" name="action" value="2">
> </td>
> </tr>
> </table>
> </form>
> </center>
> <?php
> }
>
> function display_m_err() {
> global $mailto;
> ?>
> <center>
> <table width="692" cellspacing="0" cellpadding="0">
> <tr>
> <td align="center">
> <font size="2" face="verdana,arial" color="WHITE">
> There was a problem with sending your message to <?php echo
> $mailto;?><br><br>
> Please contact: webmaster
fplg.net and notify us of the problem.
> <br><br><br><br>
> <a href="/index.php?page=home" class="hov1">Click here to go back
to
> the home page</a>
> </font>
> </td>
> </tr>
> </table>
> </center>
> <?php
> }
>
> ?>
>
attached mail follows:
> Does using pg_loread or any other php functions for postgresql large > objects modify the size of the file? I'm seeing a size increase in a few > bytes when I receive the file back to my hard drive. The file still seems > to run ok, but I'm wondering what is doing this?
Under Un*x, compare the files using:
diff original copy
Or, just use a text-editor to A/B them.
It's possible that the OS is allocating file segments in "chunks" differently depending on how the file is created, I think... And it's reporting the actual allocated bytes, not the true file size.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
Probably -- You may need to examine the output of the HTTP stream coming back and store it yourself, but the data is all just text coming out of their server into your script.
Read it, store it, figure out what to send back to get through the next page, and just keep plugging away at it.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm ----- Original Message ----- From: Brandon Orther <orther
webintellects.com> Newsgroups: php.general To: PHP User Group <php-general
lists.php.net> Sent: Monday, August 13, 2001 5:30 PM Subject: Using a receiving a cookie with cURL?
> Hello, > > I need to login to a site that requires you to have cookies. Can cURL > receive and accept cookies? > > Thank you, > > Brandon Orther > >
attached mail follows:
I dunno about the Interbase part, but you need to have a separate script just for the image, since that's a separate HTTP request from a web-page.
This separate file needs to send out the right header for GIF images: <?php header("Content-type: image/gif"); ?>
You then need to get the GIF data out of Interbase, and echo it out.
Since echo-ing error messages will not be visible in image data, you may wish to use http://php.net/log_error and view your Apache logs for any errors you think you might be getting.
You can also comment out the header line and see what you get by surfing directly to the image URL.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm ----- Original Message ----- From: Alex.Tesi <alex.tesi
plangroup.it> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Monday, August 13, 2001 8:15 AM Subject: Interbase lob field on the web
Hi i have a problem printing a lob field containing an image. The database i use is Interbase 6.0 I have a blob/lob field with a gif image inside an i like to print this image on the web. Can you help me?
Bye Alessandro
attached mail follows:
You probably should take this to Zend support and/or their forums if nobody here knows it.
That said, *WHERE* is libm.so.5, and where are they likely to be looking for it?...
Make some SymLinks to it in the usual places until it works.
Disclosure: I used to *BE* Zend support :-)
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm ----- Original Message ----- From: Richard Kurth <rkurth
pacifier.com> Newsgroups: php.general To: php <php-general
lists.php.net> Sent: Monday, August 13, 2001 6:51 PM Subject: Problem with Zend Optimizer
> I just upgraded my PHP to version 4.6 and add the version of > Zend Optimizer that is supposed to be compatible with this version of > php. But I can not get it to work it seams it can not find the file > libm.so.5 on the server. I know for a fact it is on the server. > This is the error I get > > Failed loading /usr/local/include/php/Zend/zendoptimizer.so: libm.so.5: > cannot open shared object file: No such file or directory > > I also ran the ldd Command and I get this > > ldd /usr/local/include/php/Zend/zendoptimizer.so > /lib/libNoVersion.so.1 => /lib/libNoVersion.so.1 (0x40033000) > libm.so.5 => not found > libdl.so.1 => /lib/libdl.so.1 (0x40038000) > libc.so.6 => /lib/libc.so.6 (0x4003b000) > /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000) > > What can I do to get this working > > > > > > > Best regards, > Richard > mailto:rkurth
pacifier.com >
attached mail follows:
> I'm new to PHP and to e-commerce. Needless to say, I've done a lot of > studying over the last few weeks and I'm ready to dive in head first!
Actually, you're not... Sorry. The fact that you want to store data in flat files, and that you want to store CREDIT CARD INFO the way you describe tells me that you haven't read enough.
> I'll be building an e-commerce site and I'll be using PHP. I'd like > customers to have the option of saving their information so that they don't > have to enter it each time they purchase -- much like Buy.com does or like > Amazon.com's One-Click feature.
Those are nice features, *IF* the information is stored and accessed properly.
> This means that the customer will be storing information like one or more > credit cards, shipping addresses, billing addresses, etc. > > I'm planing on storing all information in flat files so that I don't have > the additional expense of using MySQL (My ISP is charging 24.95/month extra > for MySQL service).
Consider moving to a different server. $24.95/month should get you everything you need including MySQL *UNLESS* you're a high-volume site with 10,000+ hits/day or heavy bandwidth like audio/video.
> So the question is: How can I store each customer's information safely? Can > I use .htaccess and .htpasswd to help me out? Or don't they even apply?
.htaccess and htpasswd would be okay for AUTHENTICATION of a few people, but if your server is running PHP as a Module, you're better off using PHP to do the HTTP Authentication. See the PHP manual online for sample code. http://php.net/
Authenticating a user as a specific customer is COMPLETELY SEPARATE from safely storing their credit card information.
> My intention is to store the user's password encoded with md5 or something > and also to develop my own cipher for disguising the credit card numbers as > well. > > Any suggestions?
Don't.
md5 is useless for this, and developing your own cipher is out-and-out silly unless you are a cryptography expert.
When Amazon et al store a credit card number, they have a very specific custom setup for that, involving:
A separate dedicated computer *NOT* directly connected to the Internet to store the cc info. These machines are: accessible via a SECOND Ethernet card in the web-servers invisible to the outside world only accept connections to the Database server -- no other software installed only accept data from that one Ethernet cable physically accessible only to trusted few
Further, even their web-servers are DEDICATED machines, not shared-access at an ISP. These machines will have an extremely limited number of users able to directly access them. Yours has several hundred untrusted users.
In short, if you are balking at $24.95 a month for MySQL, your budget is *NOWHERE* *NEAR* within reach of the hardware/software/facilities required to safely STORE credit card numbers.
By all means, feel free to hook up with a third-party firm to process your credit cards in real-time.
But you'll have to forego the STORAGE of credit card info feature for now.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
Hi,
I agree completly with him. You should go through another entity for payment. You should go through some company that ensures you reliability and security. Here in Europe there are a lot of histories about company databases being hacked and loosing up to 15.000 cc numbers. By no way you could get the security these companies can offer you.
Try these ones (I do not endorse to any of these companies or have no information about them) ccbill.com or americanbank.com. I recomend you browsing through the net for more.
Also for the private information you should use SSL in the trasactions. Hope this helps
Sean C. McCarthy SCI, S.L. (www.sci-spain.com)
Richard Lynch wrote:
>
> > I'm new to PHP and to e-commerce. Needless to say, I've done a lot of
> > studying over the last few weeks and I'm ready to dive in head first!
>
> Actually, you're not... Sorry. The fact that you want to store data in
> flat files, and that you want to store CREDIT CARD INFO the way you describe
> tells me that you haven't read enough.
>
> > I'll be building an e-commerce site and I'll be using PHP. I'd like
> > customers to have the option of saving their information so that they
> don't
> > have to enter it each time they purchase -- much like Buy.com does or like
> > Amazon.com's One-Click feature.
>
> Those are nice features, *IF* the information is stored and accessed
> properly.
>
> > This means that the customer will be storing information like one or more
> > credit cards, shipping addresses, billing addresses, etc.
> >
> > I'm planing on storing all information in flat files so that I don't have
> > the additional expense of using MySQL (My ISP is charging 24.95/month
> extra
> > for MySQL service).
>
> Consider moving to a different server. $24.95/month should get you
> everything you need including MySQL *UNLESS* you're a high-volume site with
> 10,000+ hits/day or heavy bandwidth like audio/video.
>
> > So the question is: How can I store each customer's information safely?
> Can
> > I use .htaccess and .htpasswd to help me out? Or don't they even apply?
>
> .htaccess and htpasswd would be okay for AUTHENTICATION of a few people, but
> if your server is running PHP as a Module, you're better off using PHP to do
> the HTTP Authentication. See the PHP manual online for sample code.
> http://php.net/
>
> Authenticating a user as a specific customer is COMPLETELY SEPARATE from
> safely storing their credit card information.
>
> > My intention is to store the user's password encoded with md5 or something
> > and also to develop my own cipher for disguising the credit card numbers
> as
> > well.
> >
> > Any suggestions?
>
> Don't.
>
> md5 is useless for this, and developing your own cipher is out-and-out silly
> unless you are a cryptography expert.
>
> When Amazon et al store a credit card number, they have a very specific
> custom setup for that, involving:
>
> A separate dedicated computer *NOT* directly connected to the Internet to
> store the cc info. These machines are:
> accessible via a SECOND Ethernet card in the web-servers
> invisible to the outside world
> only accept connections to the Database server -- no other software
> installed
> only accept data from that one Ethernet cable
> physically accessible only to trusted few
>
> Further, even their web-servers are DEDICATED machines, not shared-access at
> an ISP. These machines will have an extremely limited number of users able
> to directly access them. Yours has several hundred untrusted users.
>
> In short, if you are balking at $24.95 a month for MySQL, your budget is
> *NOWHERE* *NEAR* within reach of the hardware/software/facilities required
> to safely STORE credit card numbers.
>
> By all means, feel free to hook up with a third-party firm to process your
> credit cards in real-time.
>
> But you'll have to forego the STORAGE of credit card info feature for now.
>
> --
> WARNING richard
zend.com address is an endangered species -- Use
> ceo
l-i-e.com
> Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
> Volunteer a little time: http://chatmusic.com/volunteer.htm
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
> why can i read PATH_INFO server variable with apache under windows server ? > > with IIS 5 it's OK > > how can i ? > > <? print $PATH_INFO ?> -> Warning: Undefined variable: PATH_INFO in > e:\sitephp\php_edit\htdocs\var.php on line 3
Is Apache configured to pass that variable on?
Did you compile as CGI -- IE, are you using "Action" in your httpd.conf or LoadModule/AddModule?
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm
attached mail follows:
PHP is configured to loadModule php4ts.dll
i don't know configured to pass that variable on !
Richard Lynch <ceo
l-i-e.com> a écrit dans le message :
014601c12459$6e069920$6401a8c0
Lynchux100...
> > why can i read PATH_INFO server variable with apache under windows
server
> ?
> >
> > with IIS 5 it's OK
> >
> > how can i ?
> >
> > <? print $PATH_INFO ?> -> Warning: Undefined variable: PATH_INFO in
> > e:\sitephp\php_edit\htdocs\var.php on line 3
>
> Is Apache configured to pass that variable on?
>
> Did you compile as CGI -- IE, are you using "Action" in your httpd.conf or
> LoadModule/AddModule?
>
>
>
> --
> WARNING richard
zend.com address is an endangered species -- Use
> ceo
l-i-e.com
> Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
> Volunteer a little time: http://chatmusic.com/volunteer.htm
>
>
attached mail follows:
What errors are you receiving?
You probably should change your \\ to / for Windows paths to work right.
-- WARNING richardzend.com address is an endangered species -- Use ceo
l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm ----- Original Message ----- From: Minardi Boy <minardi
aon.at> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Monday, August 13, 2001 2:40 PM Subject: inserting a remote html file
> Hello > I wanted the user to choose certain html files (one or more) via a checkbox > and then insert them into the new php site. > The checkbox thing is okay but I keep recieveing errors on the php site > Could you help me? > *** > <html> > <body> > Here is your required information > <?php > if ($choice=="arlberg") > { > include ("C:\\inetpub\\wwwroot\\page1.html"); > } > if ($choice=="paznauntal") > { > include ("C:\\inetpub\\wwwroot\\page2.html"); > } > if ($choice=="otztal") > { > include ("C:\\inetpub\\wwwroot\\page3.html"); > } > else > { > echo ("Please select a Skiing resort"); > } > ?> > </body> > </html> > *** > > I hope I didn't make you more experienced people sigh too much > > Thanks RJ > >
attached mail follows:
Re: inserting a remote html file
"Minardi boy" <minardi
aon.at> wrote:
>Hello >I wanted the user to choose certain html files (one or more) via a checkbox >and then insert them into the new php site. >The checkbox thing is okay but I keep recieveing errors on the php site >Could you help me? >*** ><html> ><body> >Here is your required information ><?php >if ($choice=="arlberg") >{ >include ("C:\\inetpub\\wwwroot\\page1.html"); >} >if ($choice=="paznauntal") >{ >include ("C:\\inetpub\\wwwroot\\page2.html"); >} >if ($choice=="otztal") >{ >include ("C:\\inetpub\\wwwroot\\page3.html"); >} >else >{ >echo ("Please select a Skiing resort"); >} >?> ></body> ></html> >*** >Thanks RJ
You wrote the path with backslashes (\). An inclusion path should be written with regular slashes:
include('C:/inetpub/wwwroot/page1.html');
--- Regards, Boaz Amit
attached mail follows:
Previously, Kelly Corkill said: > Define the height and width for each graphic, otherwise how does the browser > know how to draw the screen? With height/width netscape will allocate space > for the missing images and fill them in as the files complete, without - it > waits until all are done before drawing to the screen.
Hint: use GetImageSize() to get the height/width info.
http://php.net/manual/en/function.getimagesize.php
-dan
-- "Contrariwise", continued Tweedledee, "If it was so, it might be; and if it were so, it would be; but as it isn't, it ain't. That's logic." -Lewis Carroll
attached mail follows:
On Tue, 14 Aug 2001 05:05, lolodev wrote: > recetly i ask about running automatically a page after each request > page. > > response is auto_prepend_file, auto_append_file, > > but how can i prepend file is the same for all php.ini > > but how can i do this with my provider , and how can i have a > auto_prepend_file different to another web site? > > (my english is no correct !)
If you don't have access to php.ini or httpd.conf, you can use, in .htaccess file the entry
php_value auto_prepend_file filename
or, to have no auto_prepend
php_value auto_prepend_file none
-- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIASelf-made man: A horrible example of unskilled labor.
attached mail follows:
You could have PHP insert a hidden form value holding the start time in the form. Then compare the start time with the current time when they submit and handle as needed. You could somehow encrypt the start time to prevent tampering.
-Bryan
attached mail follows:
You can't do this and keep it tamper-proof with JavaScript/PHP. No matter what, anyone with an IQ above that of a tree stump could play with the POST variables.
I think the only way to do this and keep it tamper proof would be a Java applet. If memory serves, you can have record the time on the server, and have each answer sent as it is answered.
If you had a web site that posted forms to the server after every answer, the transmission time would have a big effect. No, Java is the way to go.
On Monday 13 August 2001 19:18, you wrote: > You could have PHP insert a hidden form value holding the start time in the > form. Then compare the start time with the current time when they submit > and handle as needed. You could somehow encrypt the start time to prevent > tampering. > > -Bryan
attached mail follows:
Hello, I did an timed online quiz using session variables for my timer. It work fine.
When the user start the quiz, you check the time and calculate the duration of your quiz. exemple: 20:00 + 60 min = 21:00 So you register 2100 in a session variable
Each subsequent request you make shure the current time is still below 2100 or you stop the quiz and tell user.
py
----- Original Message -----
From: "Evan Nemerson" <evan
coeus-group.com>
To: "Bryan "Cyngon" Helmkamp" <cyngon
remove.this.runbox.com>;
<php-general
lists.php.net>
Sent: Tuesday, August 14, 2001 1:16 AM
Subject: Re: [PHP] Re: How give a 'timed' online quiz?
> You can't do this and keep it tamper-proof with JavaScript/PHP. No matter
> what, anyone with an IQ above that of a tree stump could play with the
POST
> variables.
>
> I think the only way to do this and keep it tamper proof would be a Java
> applet. If memory serves, you can have record the time on the server, and
> have each answer sent as it is answered.
>
> If you had a web site that posted forms to the server after every answer,
the
> transmission time would have a big effect. No, Java is the way to go.
>
>
> On Monday 13 August 2001 19:18, you wrote:
> > You could have PHP insert a hidden form value holding the start time in
the
> > form. Then compare the start time with the current time when they submit
> > and handle as needed. You could somehow encrypt the start time to
prevent
> > tampering.
> >
> > -Bryan
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
I'm trying to update a number in a text file using eregi_replace.
The original line is:
$registrationLimit = 100;
and I'd like to change it to:
$registrationLimit = 300;
now, 100 appears multiple times throughout the file, so I have to match on the whole string, not just 100. I used the following code: (this may wrap in your mail client)
$contents = eregi_replace("registrationLimit = ([0-9]+);","registrationLimit = " . $form_registrationLimit . ";",$contents);
which works, but I'd like to find a more elegant way to do this, rather than rebuilding the entire string. I tried:
$contents = eregi_replace("registrationLimit = ([0-9]+);",\\1$form_registrationLimit,$contents);
but that only produces:
$100300
(in other words, it combines the two values and strips out the "registrationLimit = " part...) After reading the manual, I understand why, but I'm hoping there's some similar such method where I can parenthesize a substring in the string pattern and then replace only that substring with my replacement string.
Any thoughts?
--kurt
attached mail follows:
On Tue, 14 Aug 2001 12:23, Kurt Lieber wrote: > I'm trying to update a number in a text file using eregi_replace. > > The original line is: > > $registrationLimit = 100; > > and I'd like to change it to: > > $registrationLimit = 300; > > now, 100 appears multiple times throughout the file, so I have to match > on the whole string, not just 100. I used the following code: (this > may wrap in your mail client) > > $contents = eregi_replace("registrationLimit = > ([0-9]+);","registrationLimit = " . $form_registrationLimit . > ";",$contents); > > which works, but I'd like to find a more elegant way to do this, rather > than rebuilding the entire string. I tried: > > $contents = eregi_replace("registrationLimit = > ([0-9]+);",\\1$form_registrationLimit,$contents); > > but that only produces: > > $100300 > > (in other words, it combines the two values and strips out the > "registrationLimit = " part...) After reading the manual, I understand > why, but I'm hoping there's some similar such method where I can > parenthesize a substring in the string pattern and then replace only > that substring with my replacement string. > > Any thoughts? > > --kurt
That sounds like a task for str_replace()
-- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIAWindows is the best GUI - It always sticks!
attached mail follows:
Let's say I am mailing 1000 members of a mailing list - is it possible to stop the process once started? In particular I am looking for a browser based solution...
Regards,
Matthew Delmarter
attached mail follows:
Let's say I am mailing 1000 members of a mailing list - is it possible to stop the process once started? In particular I am looking for a browser based solution...
Regards,
Matthew Delmarter
attached mail follows:
If the server is linux, you could have another page that just sends a KILL signal to PHP using exec(), system(), backtics, whatever...
On Monday 13 August 2001 20:56, you wrote: > Let's say I am mailing 1000 members of a mailing list - is it possible > to stop the process once started? In particular I am looking for a > browser based solution... > > Regards, > > Matthew Delmarter
attached mail follows:
try to learn about register_shut_down (whatever the actual name of it was) function. let me see, here: http://www.php.net/manual/en/function.register-shutdown-function.php
this could be of some help to you.
Cheers, Maxim Maletsky
-----Original Message-----
From: Matthew Delmarter [mailto:matt
adplusonline.com]
Sent: Tuesday, August 14, 2001 12:15 PM
To: PHP Mailing List
Subject: [PHP] stop a batch of mail during send
Let's say I am mailing 1000 members of a mailing list - is it possible to stop the process once started? In particular I am looking for a browser based solution...
Regards,
Matthew Delmarter
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Some time ago I needed a function that remove space in strings. Sure there is one that remove space at the start of the string, and one that removes trailing space - but is there one that removes ALL spaces from a string? Like:
$string = "this is a string"; rmspc($string); // $string is now "thisisastring"
Martin
attached mail follows:
$string = str_replace(' ','',$string);
-----Original Message-----
From: Martin Skjoldebrand [mailto:chimbis
bahnhof.se]
Sent: Tuesday, August 14, 2001 12:03 AM
To: php-general
lists.php.net
Subject: [PHP] space in strings
Some time ago I needed a function that remove space in strings. Sure there is one that remove space at the start of the string, and one that removes trailing space - but is there one that removes ALL spaces from a string? Like:
$string = "this is a string"; rmspc($string); // $string is now "thisisastring"
Martin
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
In article <001301c12476$3420f300$82602c3f
2pqjp01>,
dabigdemp
hotmail.com (Jack Dempsey) wrote:
> > that removes trailing space - but is there one that removes ALL spaces > > from a string? Like: > > > > $string = "this is a string"; > > rmspc($string); > > // $string is now "thisisastring"
> $string = str_replace(' ','',$string);
Or if you want to strip all typres of whitespace (space chars, tabs, newlines, carriage returns)...
$string = preg_replace('|\s|','',$string);
-- CC
attached mail follows:
Hello techies, In Java automatic garbage collection is there.How abt PHP?. Is there any tool(open source/free ware) to test the memory leakage.If it so where i can get that tool?Any suggestions will be appreciated. Thanks in advance. SenthilVellan.
_________________________________________________________
Do You Yahoo!?
Get your free
yahoo.com address at http://mail.yahoo.com
attached mail follows:
How can I directly put values into a form instead having to create hidden fields and drag the data from them?
You can see what I mean at:
http://www.yorkshire-search.co.uk/links/add.php3
Would a javascipt function be any use to me?
attached mail follows:
On 14 Aug 01, at 5:14, Phil Latio wrote:
> How can I directly put values into a form instead having to create hidden > fields and drag the data from them? > > You can see what I mean at: > > http://www.yorkshire-search.co.uk/links/add.php3
Looks to me like they're still using the form to process info. If you mean getting information into the various fields then you'll need something like this:
<input type="text" name="sometext" value="sometexthere" size=30 maxlength=100>
The 'value=' bit will insert the information into the form field when it outputs to the browser. There's similar constructs for every form tag available. Find yourself a reasonable form tutorial and it'll no doubt cover this sort of thing.
The php to do it is pretty much up to you - in the case of the site above they're going away and reading the web site for you.
> Would a javascipt function be any use to me?
I guess you could. That's not the way that the web site you refer to is doing it.
CYA, Dave
-----------------------------------------------------------------------
Outback Queensland Internet - Longreach, Outback Queensland - Australia
http://www.outbackqld.net.au mailto:dfreeman
outbackqld.net.au
-----------------------------------------------------------------------
attached mail follows:
again,
a simple HTML/PHP is enough.
page 1:
form
page 2
the same form and in the <input> fields use value attributes. i.e: <input type="text" name="title" size=20 value="<?=$title?>">
if the form was not submitted then $title will be empty and will show nothing, while if Title was submitted it will then reappear on the next page (which is obviously as same as the one before)
Cheers, Maxim Maletsky www.PHPBeginner.com
-----Original Message-----
From: Phil Latio [mailto:phil.latio
f-in-stupid.co.uk]
Sent: Tuesday, August 14, 2001 1:14 PM
To: php-general
lists.php.net
Subject: [PHP] Put value directly into form?
How can I directly put values into a form instead having to create hidden fields and drag the data from them?
You can see what I mean at:
http://www.yorkshire-search.co.uk/links/add.php3
Would a javascipt function be any use to me?
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
I was told this was a PHP problem, and to submit a bug report. I'm not too sure what such a bug report would look like, or even if this is a PHP problem.
Below is the message I sent to an Apache list, could someone tell me whether my problem is crummy code, or an actual problem with PHP/Apache?
Thanks Chris
-----Original Message-----
From: Chris Cameron [mailto:chris
upnix.com]
Sent: Friday, August 10, 2001 12:40 PM
To: apache-server
yahoogroups.com
Subject: PHP Script causing recursive free() calls (?)
I've got quite a problem with part of a PHP script I wrote causing Apache too fill up it's error logs with: httpd in free(): warning: chunk is already free. httpd in free(): warning: chunk is already free. httpd in malloc(): warning: recursive call. FATAL: emalloc(): Unable to allocate 256 bytes
Each call of this script will put about 20 megs in my error log. My Apache setup is: Apache/1.3.20 (Unix) mod_ssl/2.8.4 OpenSSL/0.9.6b PHP/4.0.6
And my phpinfo page is at chris.upnix.com/index.php
The part of my PHP script that's causing the problem (sorry about the wraping): /* If no errors, submit junk to database */ if(!isset($Error)) { for($i = 1; $i <= $Days; $i++) { /* Write to bookings first */ $QueryString = "INSERT INTO bookings VALUES(nextval('BID'), '$CompanyID', '" . $TimeSpan[$i] . "', '$TimeF', '$TimeT', '$PricePerUnit')"; $Query = pg_exec($Connect, $QueryString); $OID = pg_getlastoid($Query); /* Find the BID we were given */ $QueryString = "SELECT bid FROM bookings WHERE oid = '" . $OID . "'"; $Query = pg_exec($Connect, $QueryString); $Result = pg_fetch_array($Query, 0); $BID = $Result['bid']; /* Go through our therapists */ foreach($Therapists[$i] as $Key => $TherapistID) { $QueryString = "INSERT INTO bookedtherapist VALUES('" . $BID . "', '$TherapistID', '$TimeF', '$TimeT')"; pg_exec($Connect, $QueryString); } } /* Everything Should be done, send us off to schview.php */ header("Location: " . $BaseURL . "admin/schview.php"); exit; }
I've tried rewriting little parts of this script, but haven't had any luck in stopping the errors. Also, I've recompiled everything twice now, which also didn't help. Any help would be appreciated.
Thanks, Chris
attached mail follows:
On Tue, 14 Aug 2001 13:45, Chris Cameron wrote:
> I was told this was a PHP problem, and to submit a bug report. I'm not
> too sure what such a bug report would look like, or even if this is a
> PHP problem.
>
> Below is the message I sent to an Apache list, could someone tell me
> whether my problem is crummy code, or an actual problem with
> PHP/Apache?
>
> Thanks
> Chris
>
> -----Original Message-----
> From: Chris Cameron [mailto:chris
upnix.com]
> Sent: Friday, August 10, 2001 12:40 PM
> To: apache-server
yahoogroups.com
> Subject: PHP Script causing recursive free() calls (?)
>
>
> I've got quite a problem with part of a PHP script I wrote causing
> Apache too fill up it's error logs with:
> httpd in free(): warning: chunk is already free.
> httpd in free(): warning: chunk is already free.
> httpd in malloc(): warning: recursive call.
> FATAL: emalloc(): Unable to allocate 256 bytes
>
> Each call of this script will put about 20 megs in my error log.
> My Apache setup is:
> Apache/1.3.20 (Unix)
> mod_ssl/2.8.4
> OpenSSL/0.9.6b
> PHP/4.0.6
>
> And my phpinfo page is at chris.upnix.com/index.php
>
> The part of my PHP script that's causing the problem (sorry about the
> wraping):
> /* If no errors, submit junk to database */
> if(!isset($Error)) {
> for($i = 1; $i <= $Days; $i++) {
> /* Write to bookings first */
> $QueryString = "INSERT INTO bookings VALUES(nextval('BID'),
> '$CompanyID', '" . $TimeSpan[$i] . "', '$TimeF', '$TimeT',
> '$PricePerUnit')";
> $Query = pg_exec($Connect, $QueryString);
> $OID = pg_getlastoid($Query);
> /* Find the BID we were given */
> $QueryString = "SELECT bid FROM bookings WHERE oid = '" . $OID . "'";
> $Query = pg_exec($Connect, $QueryString);
> $Result = pg_fetch_array($Query, 0);
> $BID = $Result['bid'];
> /* Go through our therapists */
> foreach($Therapists[$i] as $Key => $TherapistID) {
> $QueryString = "INSERT INTO bookedtherapist VALUES('" . $BID . "',
> '$TherapistID', '$TimeF', '$TimeT')";
> pg_exec($Connect, $QueryString);
> }
> }
> /* Everything Should be done, send us off to schview.php */
> header("Location: " . $BaseURL . "admin/schview.php");
> exit;
> }
>
>
> I've tried rewriting little parts of this script, but haven't had any
> luck in stopping the errors. Also, I've recompiled everything twice
> now, which also didn't help. Any help would be appreciated.
>
> Thanks,
> Chris
This comes from someone who has no experience with Postgres, but I suspect that you may be getting into trouble inside your for and foreach loops where you do apossibly huge number of inserts without freeing used result pointers. Try doing a pg_free_result after each insert and see if that helps.
For reporting PHP bugs, try www.php.net and follow the link 'reporting bugs' at the top right :-)
-- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIAFact is solidified opinion
attached mail follows:
Hi !!
Can I upload a file to a server without using "<input type=file>" I don't want to browse a file. My filename will be fixed & file will be present on my local machine.
Please reply at the earliest as this is very urgent.
Thanking you.
Regards, Parinda. Software Group Phil Systems Ltd.
attached mail follows:
Hi !!
Can I upload a file to a server without using "<input type=file>" I don't want to browse a file. My filename will be fixed & file will be present on my local machine.
Please reply at the earliest as this is very urgent.
Thanking you.
Please send me a reply at my address because I am not currently subscribed to your list.
Regards, Parinda. Software Group Phil Systems Ltd.
attached mail follows:
> Can I upload a file to a server without using "<input > typele>" I don't want to browse a file. My filename will > be fixed & file will be present on my local machine.
No, you can't.
You need to use <INPUT TYPELE> in a multipart/form-data <FORM> regardless of the fixed file name and file's presence.
Jason
attached mail follows:
I don't think so, but to you could put <input type="file" value="/path/to/file"> in a hidden layer...
Untested, but it should work...
On Tuesday 14 August 2001 09:58, you wrote: > Hi !! > > Can I upload a file to a server without using "<input type=file>" I don't > want to browse a file. My filename will be fixed & file will be present on > my local machine. > > Please reply at the earliest as this is very urgent. > > Thanking you. > > Please send me a reply at my address because I am not currently subscribed > to your list. > > > Regards, > Parinda. > Software Group > Phil Systems Ltd.
attached mail follows:
> I don't think so, but to you could put <input type="file" > value="/path/to/file"> in a hidden layer... > > Untested, but it should work...
Yay, security.
I doubt it'd work...
<INPUT TYPE=FILE VALUE='/etc/passwd'>
Hmmm...
Jason
attached mail follows:
If HTML would work this way then people would never stop guessing the other's files to steal as you visit web pages.
answer: no. I'm curious now: perhaps, you can have a value attribute in it? But neither that should be allowed. Never tried myself.
Cheers, Maxim Maletsky
-----Original Message-----
From: Parinda [mailto:parinda
phil.com.sg]
Sent: Wednesday, August 15, 2001 1:59 AM
To: php-general
lists.php.net
Subject: [PHP] Regarding file upload using php
Hi !!
Can I upload a file to a server without using "<input type=file>" I don't want to browse a file. My filename will be fixed & file will be present on my local machine.
Please reply at the earliest as this is very urgent.
Thanking you.
Please send me a reply at my address because I am not currently subscribed to your list.
Regards, Parinda. Software Group Phil Systems Ltd.
attached mail follows:
We are looking for interested partnership for our dotcom organisation, which are based in Kuala Lumpur, Malaysia.
The Required Partner should be familiar with : 1. Operating System - Linux. 2. Language - PHP script. 3. Database - MySQL. 4. Internet Infrastructure.
Interested candidate may send a curriculum vitae to us.
We could be reached at frankie
b163.com, or fax 6-03-77299163.
attached mail follows:
I have a strange problem with PHP 4.0.4pl1 and above. It looks like including a file that contains classes can become a major performance bottleneck
My machine is an Intel Pentium ]I[ 667Mhz, 128Mb RAM running RedHat Linux 7.1; I installed PHP as a DSO module. I used ab (Apache Benchmark) for benchmarking. The following application runs a very simple query and outputs the result:
<?php $db = pg_pconnect("dbname=jokes user=foo password=xxxxxxxxx"); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> <html> <head> <title>test</title> </head> <body> <?php $res = pg_exec($db, "SELECT * FROM j_jokes ORDER BY posted DESC LIMIT 10"); echo "<table>"; for ($i=0; $i<pg_numrows($res);$i++) { echo "<tr>"; $row = pg_fetch_row($res, $i); for ($c=0;$c<count($row);$c++) echo "<td>$row[$c]</td>"; echo "</tr>"; } echo "</table>"; ?> </body> </html>
It can process up to 200 requests per second depending on the size of the dataset. Sometimes it can do even more than that. I didn't optimize Apache and PostgreSQL for performance.
However, the following "application" <?php require_once("Smarty.class.php"); require_once("DB.php"); ?>
can process about 25 requests per second.
My applications use Smarty, Pear DB and my own classes from several include files. Thus, they can hardly handle 10 requests per second. I tried to benchmark them in many different ways and I figured out that *including* a class takes a lot of time. Using those classes doesn't seem to change anything dramatically. Is it an inherent problem of using classes with PHP or is there something I can do about it?
attached mail follows:
See, there's also a time needed for the server to read the included file - an extra effort for your hard disk. If you'd put everything in one file it would work for you faster, but, of course, less portable.
Though, I don't understand why are your performance measures THAT different.
Cheers, Maxim Maletsky
-----Original Message-----
From: Artyom Plouzhnikoff [mailto:artyompl
softhome.net]
Sent: Tuesday, August 14, 2001 2:22 PM
To: php-general
lists.php.net
Subject: [PHP] Classes and performance bottlenecks
I have a strange problem with PHP 4.0.4pl1 and above. It looks like including a file that contains classes can become a major performance bottleneck
My machine is an Intel Pentium ]I[ 667Mhz, 128Mb RAM running RedHat Linux 7.1; I installed PHP as a DSO module. I used ab (Apache Benchmark) for benchmarking. The following application runs a very simple query and outputs
the result:
<?php $db = pg_pconnect("dbname=jokes user=foo password=xxxxxxxxx"); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> <html> <head> <title>test</title> </head> <body> <?php $res = pg_exec($db, "SELECT * FROM j_jokes ORDER BY posted DESC LIMIT 10"); echo "<table>"; for ($i=0; $i<pg_numrows($res);$i++) { echo "<tr>"; $row = pg_fetch_row($res, $i); for ($c=0;$c<count($row);$c++) echo "<td>$row[$c]</td>"; echo "</tr>"; } echo "</table>"; ?> </body> </html>
It can process up to 200 requests per second depending on the size of the dataset. Sometimes it can do even more than that. I didn't optimize Apache and PostgreSQL for performance.
However, the following "application" <?php require_once("Smarty.class.php"); require_once("DB.php"); ?>
can process about 25 requests per second.
My applications use Smarty, Pear DB and my own classes from several include files. Thus, they can hardly handle 10 requests per second. I tried to benchmark them in many different ways and I figured out that *including* a class takes a lot of time. Using those classes doesn't seem to change anything dramatically. Is it an inherent problem of using classes with PHP or is there something I can do about it?
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
('binary' encoding is not supported, stored as-is)
Of course the absolute safest way besides encryting your PHP is to just store your state secrets in files outside the web server's document tree.
i.e. if your web server's document root is /var/www
<?php require("/var/super-secret/super-functions.php"); if ($theanswer == 42) { echo (findthequestion($theanwer)); } ?>
then even if you screw up the web server config and .php files are sent back unrendered all you expose is what's in the file above but not what was included/required statements.
This is an excellent way to protect sensitive info like database passwords too.
-Ironstorm
Northern.CA ===-- http://www.northern.ca Canada's Search Engine
attached mail follows:
"James Shaker" <james
vartek-corp.com> wrote in message
news:OHEHIDODEJCGOFHHLLPOGEJGCIAA.james
vartek-corp.com...
>
> Greetings,
> [snip] calculations and I code them in PHP
> for use on a website are they safe from being
> viewed or taken?
If your php-code is on a web-server which gives access to other than you they can read your code. An example could be other people being hosted on the same server..
Regards, Søren
attached mail follows:
its a problem because the code is not compiled into binary file, and then every one who can browse the directory ( using ftp for example ) can view your code.
To prevent this ( as root ) I chroot every user that log to ftp to another directory so they cant go out and browse the /etc /php-directories or what ever.
The problem still stays if you open php to system commands like `echo /etc/passwd` or using system() ....
-------------------------- Canaan Surfing Ltd. Internet Service Providers Ben-Nes Michael - Manager Tel: 972-4-6991122 http://sites.canaan.co.il --------------------------
----- Original Message -----
From: "Soeren Nielsen" <news
n-crypt.dk>
To: <php-general
lists.php.net>
Sent: Tuesday, August 14, 2001 10:56 AM
Subject: [PHP] Re: The secrecy of PHP code
>
> "James Shaker" <james
vartek-corp.com> wrote in message
> news:OHEHIDODEJCGOFHHLLPOGEJGCIAA.james
vartek-corp.com...
> >
> > Greetings,
> > [snip] calculations and I code them in PHP
> > for use on a website are they safe from being
> > viewed or taken?
>
> If your php-code is on a web-server which gives access to other than you
> they can read your code. An example could be other people being hosted
> on the same server..
>
> Regards,
> Søren
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
"Ben-Nes Michael" <admin
canaan.co.il> wrote in message
news:022201c12498$79178ce0$aa5796d4
canaan.co.il...
> The problem still stays if you open php to system commands like `echo
> /etc/passwd` or using system() ....
A problem is also that other web-programers can read your source code through PHP. An example from my page is this: My homepage is here: /hotel/<my domain>/WWW
I can make a php-script that opens /hotels/<some other domain>/WWW , list the files, view them, steal code from others etc etc.
Hope what I wrote gave some sort of meaning :-)
/Søren
attached mail follows:
You wrote: > very amusing indeed. > > Go learn php and when youll have answer send it or stfu. > > you might start with your own site: www.PHPBeginner.com > and then go to http://logos.uoregon.edu/explore/socioling/politeness.html to > learn how to behave ! > > Its amazing how many people are rude !
I see nothing rude about his post. Your's on the other hand ... well, let's just say that telling someone to "stfu" and then insisting that they're rude and need to learn how to behave is both ironic, sad, and a bit amusing. ;)
-- -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/
attached mail follows:
You wrote: > hi guys, > > I'd like to get the query string the browser sends to the script. The > problem is that since the $HTTP_POST_VARS (or $HTTP_GET_VARS ) is an > associative array I can't use numbers to point to the elements of > this array. This piece of code does not work: > > for ($a=1;$a<=sizeof($HTTP_POST_VARS);$a++){ > echo "$a. ".$HTTP_POST_VARS[$a]."<br>"; > }
Use:
print_r($HTTP_POST_VARS);
-or-
foreach($HTTP_POST_VARS as $k => $v){ echo "$k => $v<br>\n"; }
-or-
while(list($k, $v) = each($HTTP_POST_VARS)){ echo "$k => $v<br>\n"; }
-- -Ryan :: ICQ - 595003 :: GigaBoard - http://www.gigaboard.net/
attached mail follows:
ohh I'm sorry
after reading it more deeply I realized that I misunderstood it.
I thought you offered me to send my self email to suck of and then sleep on it. :(
Sorry English is not my primary language.
any way I thank you for the help but it wont work as the content is not loaded twice in IE only the headers. I think once for checking and evaluating and second to the download itself.
?
mail(
'your.own
email.com',
'visiting myself',
"Sucked off $PHP_SELF on $HTTP_USER_AGENT
);
sleep(2); // just for the sake of it ?>
attached mail follows:
you're forgiven
:-)
take care, m
-----Original Message-----
From: Ben-Nes Michael [mailto:miki
canaan.co.il]
Sent: Tuesday, August 14, 2001 3:15 PM
To: Maxim Maletsky; php-general
lists.php.net
Subject: Re: [PHP] IE Download twice from DB - apologies
ohh I'm sorry
after reading it more deeply I realized that I misunderstood it.
I thought you offered me to send my self email to suck of and then sleep on it. :(
Sorry English is not my primary language.
any way I thank you for the help but it wont work as the content is not loaded twice in IE only the headers. I think once for checking and evaluating and second to the download itself.
?
mail(
'your.own
email.com',
'visiting myself',
"Sucked off $PHP_SELF on $HTTP_USER_AGENT
);
sleep(2); // just for the sake of it ?>
attached mail follows:
Hi,
can some one please have a look at this and tell me why it's not setting correctly?
<?
$address .= "blah
blah.com.au";
// Subject
$subject = "VFSA-eRentals Application Form";
//Body of email $body = "<html> <title> VFSA-eRentals Application </title> <body> <table> <tr> <td>howdy ho stranger</td> </tr> <tr> <td>how aint ya doing</td> </tr> </table> ";
$headers .= "From: VFSA-eRentals <webmaster
vfsa-erentals.com.au>\n";
$headers .= "X-Sender: VFSA-eRentals <webmaster
vfsa-erentals.com.au>\n";
$headers .= "X-Mailer: PHP\n"; // mailer
$headers .= "Return-Path: VFSA-eRentals <webmaster
vfsa-erentals.com.au>\n";
// Return path for errors
$headers .= "X-Priority: 1\n"; // Urgent message!
/* If you want to send html mail, uncomment the following line */
//$headers .= "Content-Type: text/html; charset=iso-8859-1\n"; // Mime type
//send the email
$mail = mail("$address", "$subject", "$body", "$headers \nContent-Type: text/html; charset=iso-8859-1\nContent-Transfer-Encoding: 64bit" ); ?>
Now that doesn't show all the html I use in the body but it will give you an idea.. as far as I can tell this script should work and set the content-type to text/html but when it sends the email the
Content-Type: text/html; charset=iso-8859-1
is changed to
Content-Type: text/plain; charset=us-ascii and I get this after it's set the content type
X-BadHeader: html; charset=iso-8859-1
but from looking in the PHP manual and php books I have the way I've tried to set it should be right.
if you want to look at my page with the script on let me know and I will send it to you off the list.
thanks in advance
------------------------------------------------------
Peter Houchin
Sun Rentals STR Manager
Phone: 03 9329 1455
Fax: 03 9329 6755
peterh
sunrentals.com.au
http://www.sun.com.au/rentals
=========================================================
_____ __ /\
/_/_/_\ / |_/ \
/_/_/_ __ __ __ __ / \
\_/_/_\ /_/ /_/ /_/ /_/ \ _ /
___\_\_\/ /_/_/_/ /_//\/_/ \_/ \/\_/
\_//_/_/ /_/_/_/ /_/ \/_/ v
________ ________________________________________
/_/_/_/_/ /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
/_/_ _/_/ ______ __ __ /_/ ____ __ ______
/_/_/_/_/ /_/_/_/ /_/ /_/ /_/ /_/\_\ /_/ /_/_/_/
/_/ \_\ /_/ _/ /_//\/_/ /_/ /_/__\_\ /_/___ _\_\_\
/_/ \_\/_/_/_/ /_/ \/_/ /_/ /_/ \_\/_/_/_//_/_/_/
=========================================================
Telephone : (03) 9329 1455 Facsimile : (03) 9329 6755
************* We rent the dot in .COM! **************
attached mail follows:
$mail = mail("$address", "$subject", "$body", "$headers \nContent-Type: text/html; charset=iso-8859-1\nContent-Transfer-Encoding: 64bit" );
Hi peter,
You've got a space and a newline right after the headers ($headers).. they shouldn't be there.. and i'd put a \n after 64bit
I don't know if that will solve your problem, but from what i understand of headers, it should help :)
by the way, make sure that your "$headers \nContent-Type: .. etc" string is all on the same line...
also, why aren't you using the $headers variable for your extra header information?
Cheers
James Quinn-Hawtin Web Development Training Online International http://www.trainingonline.com.au/
-----Original Message-----
From: Peter Houchin [SMTP:peterh
vfsa.com.au]
Sent: Tuesday, August 14, 2001 4:20 PM
To: php-general
lists.php.net
Subject: [PHP] Mail() not setting MIME TYPE
Hi,
can some one please have a look at this and tell me why it's not setting correctly?
<?
$address .= "blah
blah.com.au";
// Subject
$subject = "VFSA-eRentals Application Form";
//Body of email $body = "<html> <title> VFSA-eRentals Application </title> <body> <table> <tr> <td>howdy ho stranger</td> </tr> <tr> <td>how aint ya doing</td> </tr> </table> ";
$headers .= "From: VFSA-eRentals <webmaster
vfsa-erentals.com.au>\n";
$headers .= "X-Sender: VFSA-eRentals <webmaster
vfsa-erentals.com.au>\n";
$headers .= "X-Mailer: PHP\n"; // mailer
$headers .= "Return-Path: VFSA-eRentals <webmaster
vfsa-erentals.com.au>\n";
// Return path for errors
$headers .= "X-Priority: 1\n"; // Urgent message!
/* If you want to send html mail, uncomment the following line */
//$headers .= "Content-Type: text/html; charset=iso-8859-1\n"; // Mime type
//send the email
$mail = mail("$address", "$subject", "$body", "$headers \nContent-Type: text/html; charset=iso-8859-1\nContent-Transfer-Encoding: 64bit" ); ?>
Now that doesn't show all the html I use in the body but it will give you an idea.. as far as I can tell this script should work and set the content-type to text/html but when it sends the email the
Content-Type: text/html; charset=iso-8859-1
is changed to
Content-Type: text/plain; charset=us-ascii and I get this after it's set the content type
X-BadHeader: html; charset=iso-8859-1
but from looking in the PHP manual and php books I have the way I've tried to set it should be right.
if you want to look at my page with the script on let me know and I will send it to you off the list.
thanks in advance
------------------------------------------------------
Peter Houchin
Sun Rentals STR Manager
Phone: 03 9329 1455
Fax: 03 9329 6755
peterh
sunrentals.com.au
http://www.sun.com.au/rentals
=========================================================
_____ __ /\
/_/_/_\ / |_/ \
/_/_/_ __ __ __ __ / \
\_/_/_\ /_/ /_/ /_/ /_/ \ _ /
___\_\_\/ /_/_/_/ /_//\/_/ \_/ \/\_/
\_//_/_/ /_/_/_/ /_/ \/_/ v
________ ________________________________________
/_/_/_/_/ /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
/_/_ _/_/ ______ __ __ /_/ ____ __ ______
/_/_/_/_/ /_/_/_/ /_/ /_/ /_/ /_/\_\ /_/ /_/_/_/
/_/ \_\ /_/ _/ /_//\/_/ /_/ /_/__\_\ /_/___ _\_\_\
/_/ \_\/_/_/_/ /_/ \/_/ /_/ /_/ \_\/_/_/_//_/_/_/
=========================================================
Telephone : (03) 9329 1455 Facsimile : (03) 9329 6755
************* We rent the dot in .COM! **************
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Hi everyone,
I am somewhat new at the use of php and would appreciate if someone could help me with a question re "location bar"
How can a location bar such as the sample below be generated in php to be displayed in web pages ...
Location : home:/category:sub_1:/page title
Is there a specific setup needed in terms of the directory structure on the server? Or will this only function with database type website?
Thanks in advance for any input and helpful ideas ... God bless you with His grace and peace Wolfgang
Looking for Biblical information? COME AND SEE! -- ONLINE Courses: http://classes.bibelcenter.de ... NEW! -- BibelCenter: http://www.bibelcenter.de -- Bookstore: http://www.worthy.net/BibelCenter/
attached mail follows:
if you're asking on how to show where you are, then this is what you could do:
Create an array of page names:
ie:
$page_name = Array(
'/' => 'Home', '/page1' => 'Page One'
);
... and so on....
Then just do
echo $page_name[strtolower($PHP_SELF)];
This is only appropriate for small static sites, and is not really a solution. try to extend this idea, with maybe use of databases and go ahead.
Also, look for such scripts. Tons of code was written already and some module like this, I think, you can easily find.
Cheers, Maxim Maletsky
www.PHPBeginner.com
-----Original Message-----
From: Wolfgang Schneider [mailto:schneider
bibelcenter.de]
Sent: Tuesday, August 14, 2001 3:35 PM
To: php-general
Subject: [PHP] "location bar"
Hi everyone,
I am somewhat new at the use of php and would appreciate if someone could help me with a question re "location bar"
How can a location bar such as the sample below be generated in php to be displayed in web pages ...
Location : home:/category:sub_1:/page title
Is there a specific setup needed in terms of the directory structure on the server? Or will this only function with database type website?
Thanks in advance for any input and helpful ideas ... God bless you with His grace and peace Wolfgang
Looking for Biblical information? COME AND SEE! -- ONLINE Courses: http://classes.bibelcenter.de ... NEW! -- BibelCenter: http://www.bibelcenter.de -- Bookstore: http://www.worthy.net/BibelCenter/
attached mail follows:
I don't believe such locations can't be displayed. Usually location contains: http://server/directory/file.ext The ':' used in the location denotes the port number that is used to connect to the web server.
Maybe javascript can do that. Don't know exactly how.
Good luck.
"Wolfgang Schneider" <schneider
bibelcenter.de> wrote in message
news:15WXmx-0qNGXwC
fmrl01.sul.t-online.com...
> Hi everyone,
>
> I am somewhat new at the use of php and would appreciate if someone
> could help me with a question re "location bar"
>
> How can a location bar such as the sample below be generated in php to
> be displayed in web pages ...
>
> Location : home:/category:sub_1:/page title
>
> Is there a specific setup needed in terms of the directory structure on
> the server? Or will this only function with database type website?
>
> Thanks in advance for any input and helpful ideas ...
> God bless you with His grace and peace
> Wolfgang
>
> Looking for Biblical information? COME AND SEE!
> -- ONLINE Courses: http://classes.bibelcenter.de ... NEW!
> -- BibelCenter: http://www.bibelcenter.de
> -- Bookstore: http://www.worthy.net/BibelCenter/
>
>
>
attached mail follows:
The following code:
$url = "http://www.php.net/"; print ( implode( "", file( $url ) ));
causes my browser to sit and twiddle it's thumbs for ages and then produce:
Warning: file("http://www.php.net/") - Bad file descriptor in myfile.php on line 33
Warning: Bad arguments to implode() in myfile.php on line 33
If, however, I explictly use the IP address:
$url = "http://208.247.106.187/"; print ( implode( "", file( $url ) ));
it will successfully dump a copy of the php front page.
This says to me that PHP can't resolve names. It is not a problem with the linux box it's running on, given that I ran "ping www.php.net" on that particular box to find the IP address.
Can anyone tell me what I need to do to make it work?
Regs
Brian White
-------------------------
Brian White
Step Two Designs Pty Ltd - SGML, XML & HTML Consultancy
Phone: +612-93197901
Web: http://www.steptwo.com.au/
Email: bwhite
steptwo.com.au
attached mail follows:
Hello:
I am using Sessions for user authentication in one of our sites. The problem is now so many users are calling us saying that they are not able to access the site. They have got IE v 4.0 . Are there any problems with sessions in older browser versions. Could anybody please suggest a way to solve this issue.
Many thanks
Sheni R Meledath
sheni
cyber-gear.com
attached mail follows:
Hi! Renze, good afternoon. oh i forgot attachments are not allowed to this group...so i am pasting here...
login.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <html> <head> <HEAD> <TITLE>IMAC</TITLE> <meta http-equiv="Expires" CONTENT="0"> <meta http-equiv="Cache-Control" CONTENT="no-cache"> <meta http-equiv="Pragma" CONTENT="no-cache"> </HEAD> <SCRIPT language="Javascript">
function check(){
if (document.login.emp_id.value=='') { alert('Please enter your employee number'); document.issue.emp_id.focus(); return false;
}
else if(document.login.emp_pass.value=='') { alert("Please enter the password"); document.issue.emp_pass.focus(); return false; } else { document.login.method = "POST"; document.login.action="http://10.145.2.23/authentication.php"; document.login.submit(); return true; } } </script> </head>
<body text="arial" background="imacbg1.gif" ONLOAD="document.login.emp_id.focus()"> <font face="arial" > <center> <h1> WELCOME TO IMAC TOOL </h1></center> <center> <img SRC="logo.gif" height=100 width=100></img> <pre> <form name="login" > <b>Employee No:</b> <input type="text" size="10" name="emp_id" maxlength="10" value=""><br> <b>Password :</b> <input type="password" size="10" name="emp_pass" maxlength="10" value=""><br> <input type="button" Value="LOGIN" OnClick="check();"> </form> </pre> </center> </font> </body></html>
authentication.php
<?php header ("Cache-Control: no-cache, must-revalidate"); header ("Pragma: no-cache");
// Connect to MySQL
mysql_connect( 'localhost', 'balaji', 'pingpong' ) or die ( 'Unable to connect to server.' );
// Select database on MySQL server
mysql_select_db( 'imac' ) or die ( 'Unable to select database.' );
// Formulate the query
$sql = "SELECT * FROM employee WHERE emp_id = '$emp_id' AND emp_pass = '$emp_pass'";
// Execute the query and put results in $result
$result = mysql_query( $sql ) or die ( 'Unable to execute query.' );
// Get number of rows in $result.
$num = mysql_numrows( $result );
if ( $num != 0 ) { // A matching row was found - the user is authenticated. session_start(); session_register('$emp_id'); error_log ("emp_id: $emp_id", 0); error_log ("Lastname: $emp_pass", 0);
$row = mysql_fetch_object($result);
if ($row->user_type=='S') { include('super.php');
} else if ($row->user_type=='O') { include('ordinary.php');
} }
else { file://User does not exist or not authenticated. echo '<center><h1>Authorization Required.</h1></center>'; file://header( 'WWW-Authenticate: Basic realm="Private"' ); file://header( 'HTTP/1.0 401 Unauthorized' ); exit; }
?>
logout.php <?php session_start(); session_unregister($emp_id); session_destroy(); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <HTML> <HEAD> <TITLE>Thankyou </TITLE>
<meta http-equiv="Expires" CONTENT="0"> <meta http-equiv="Cache-Control" CONTENT="no-cache"> <meta http-equiv="Pragma" CONTENT="no-cache">
</HEAD>
<BODY background="nightsky.gif" text="white">
<p>
<center><h1>THANKYOU FOR USING IMAC TOOL</h1></center><br><br> <center> <h3>Do you want to login again?</h3><a href="login.html">clickhere</a> </center>
</p> </BODY> </HTML>
Thanks in advance
Regards -Balaji
Original Message ----- From: Renze Munnik To: Balaji Ankem Sent: Monday, August 13, 2001 5:46 PM Subject: Re: [PHP] Re: prob with session start
On Mon, Aug 13, 2001 at 05:45:27PM +0530, Balaji Ankem wrote: > Hi,these are the pages... > > > see u tomorrow.. > > thankyou.. > > -Balaji
Ehmmmm... I get the impression you forgot to attach something. You announce the files, but they didn't follow... :)
--
* R&zE:
-- »»»»»»»»»»»»»»»»»»»»»»»»
-- Renze Munnik
-- DataLink BV
--
-- E: renze
datalink.nl
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM HAARLEM
--
-- http://www.datalink.nl
-- ««««««««««««««««««««««««
- text/plain attachment: Wipro_Disclaimer.txt
attached mail follows:
I think I know what it is. The construction I mentioned to avoid the reloading used three pages to login: the login-page, the validation page and then some page that produces output to the user. What you do, is include that output page in the validation page (authentication.php). You shouldn't do that. Instead of the include('super.php') you should use header("Location: super.php") and instead of include('ordinary.php') you should use header("Location: ordinary.php"). If you include super.php/ordinary.php you still don't leave authentication.php. That means that one can still reload authentication.php. Then the browser asks for resubmitting the form. If you use header() instead of include() you actually leave authentication.php and go to a different page. The user can ofcourse reload that page, but that page wasn't actually the result of a form-submital so the page will then just be reloaded and no information will be resubmitted. Even if one pushes Back from that page, he/she will not go back to authentication.php but to login.html. And gone is your problem.
I think this should be your solution...
Oh... btw:
in authentication.php: session_register('$emp_id'); should be: session_register("emp_id");
and in logout.php: session_unregister($emp_id); should be session_unregister("emp_id");
--* R&zE:
-- »»»»»»»»»»»»»»»»»»»»»»»» -- Renze Munnik -- DataLink BV -- -- E: renze
datalink.nl -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- ««««««««««««««««««««««««
attached mail follows:
Hi,Renze i tried u'r last solution first.But it is acting as same .no change.
After that i tried u'r first solution i.e removing include and adding header("Location....");
It is giving the following error message. Warning: Cannot add header information - headers already sent in c:\www\authentication.php on line 40
Thanks and regards
-Balaji
----- Original Message -----
From: Renze Munnik
To: Balaji Ankem
Cc: php-general
lists.php.net
Sent: Tuesday, August 14, 2001 2:26 PM
Subject: Re: [PHP] Re: prob with session start
I think I know what it is. The construction I mentioned to avoid the reloading used three pages to login: the login-page, the validation page and then some page that produces output to the user. What you do, is include that output page in the validation page (authentication.php). You shouldn't do that. Instead of the include('super.php') you should use header("Location: super.php") and instead of include('ordinary.php') you should use header("Location: ordinary.php"). If you include super.php/ordinary.php you still don't leave authentication.php. That means that one can still reload authentication.php. Then the browser asks for resubmitting the form. If you use header() instead of include() you actually leave authentication.php and go to a different page. The user can ofcourse reload that page, but that page wasn't actually the result of a form-submital so the page will then just be reloaded and no information will be resubmitted. Even if one pushes Back from that page, he/she will not go back to authentication.php but to login.html. And gone is your problem.
I think this should be your solution...
Oh... btw:
in authentication.php: session_register('$emp_id'); should be: session_register("emp_id");
and in logout.php: session_unregister($emp_id); should be session_unregister("emp_id");
--
* R&zE:
-- »»»»»»»»»»»»»»»»»»»»»»»»
-- Renze Munnik
-- DataLink BV
--
-- E: renze
datalink.nl
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM HAARLEM
--
-- http://www.datalink.nl
-- ««««««««««««««««««««««««
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
For additional commands, e-mail: php-general-help
lists.php.net
To contact the list administrators, e-mail: php-list-admin
lists.php.net
- text/plain attachment: Wipro_Disclaimer.txt
attached mail follows:
header() must be before anything is writen on the page
----- Original Message -----
From: Balaji Ankem
To: php-general
lists.php.net
Sent: Tuesday, August 14, 2001 8:10 PM
Subject: Fw: [PHP] Re: prob with session start
Hi,Renze i tried u'r last solution first.But it is acting as same .no change.
After that i tried u'r first solution i.e removing include and adding header("Location....");
It is giving the following error message. Warning: Cannot add header information - headers already sent in c:\www\authentication.php on line 40
Thanks and regards
-Balaji
----- Original Message -----
From: Renze Munnik
To: Balaji Ankem
Cc: php-general
lists.php.net
Sent: Tuesday, August 14, 2001 2:26 PM
Subject: Re: [PHP] Re: prob with session start
I think I know what it is. The construction I mentioned to avoid the reloading used three pages to login: the login-page, the validation page and then some page that produces output to the user. What you do, is include that output page in the validation page (authentication.php). You shouldn't do that. Instead of the include('super.php') you should use header("Location: super.php") and instead of include('ordinary.php') you should use header("Location: ordinary.php"). If you include super.php/ordinary.php you still don't leave authentication.php. That means that one can still reload authentication.php. Then the browser asks for resubmitting the form. If you use header() instead of include() you actually leave authentication.php and go to a different page. The user can ofcourse reload that page, but that page wasn't actually the result of a form-submital so the page will then just be reloaded and no information will be resubmitted. Even if one pushes Back from that page, he/she will not go back to authentication.php but to login.html. And gone is your problem.
I think this should be your solution...
Oh... btw:
in authentication.php: session_register('$emp_id'); should be: session_register("emp_id");
and in logout.php: session_unregister($emp_id); should be session_unregister("emp_id");
--
* R&zE:
-- »»»»»»»»»»»»»»»»»»»»»»»»
-- Renze Munnik
-- DataLink BV
--
-- E: renze
datalink.nl
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
-- H: +31 23 5516190
--
-- Stationsplein 82
-- 2011 LM HAARLEM
--
-- http://www.datalink.nl
-- ««««««««««««««««««««««««
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
For additional commands, e-mail: php-general-help
lists.php.net
To contact the list administrators, e-mail: php-list-admin
lists.php.net
------------------------------------------------------------------------------
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
For additional commands, e-mail: php-general-help
lists.php.net
To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Message-ID: <005e01c12490$e2cb9d50$0a00a8c0
bjorn>
From: "Tom Carter" <subs
roundcorners.com>
To: "Chris Lee" <lee
mediawaveonline.com>
Cc: <php-general
lists.php.net>
Date: Tue, 14 Aug 2001 08:15:23 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Subject: Re: [PHP] Re: cropping a string
Thanks for the reply chris, altho that was what I had already. Guess it's
down to me measuring chars myself then :-(
----- Original Message -----
From: "Chris Lee" <lee
mediawaveonline.com>
To: <php-general
lists.php.net>
Sent: Monday, August 13, 2001 10:28 PM
Subject: [PHP] Re: cropping a string
> function truncate($string, $size)
> {
> $new_string = substr($string, 0, $size);
>
> $new_string = explode(' ', $new_string);
> array_pop($new_string);
> $new_string = implode(' ', $new_string);
>
> return $new_string;
> }
>
> this function can defn be improved apon. all this does is trims the
string
> to the spec length and takes the last word (or pastial word) off.
>
> you might want to take a look at wordwrap() too, probably not what your
> looking for though.
>
> --
>
> Chris Lee
> lee
mediawaveonline.com
>
>
>
> "Tom Carter" <subs
roundcorners.com> wrote in message
> news:01ea01c1243c$36fd1d40$0a00a8c0
bjorn...
> > hi all
> >
> > I was wondering if anyone had found a solution to the problem of
cropping
> a
> > string to a certain length...however a certain length based upon the
> actual
> > "size" of it. By this I don't mean after n characters, or even after m
> words
> > (have a function for this already)... what I'm looking for is function
> that
> > will take a string and crop it down to a length dependant upon its size,
> ie.
> > it would treat a w different to a l (apologies to those reading this on
a
> > monospaced client). I'm guessing such a function would take type of font
> > (say, serif ot times) and the desired length in "standard" characters
and
> > then compare the string, translating each character into a length
> > comparative with the standard character.
> >
> > I appreciate tha because of the nature of the medium that it becomes
> > difficult to control how things appear on browsers, and that it would be
> > nigh on impossible to make an *exact* function, all I'm looking for is
> > something rough and ready which is better then counting chars.
> >
> > TIA, Tom
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
On Mon, Aug 13, 2001 at 05:59:42PM +0200, Aniceto Lopez wrote: > Renze asked: > "how would you detect whether or not someone has > closed his browser? (session is over then)" > > Do I realy need to know this to let or not a registered > user navigate some restricted web pages? > > > Aniceto Lopez
That question was just a small part of my message. I was explaining that you don't need to destroy the session when someone closes the browser. You were asking if you needed to take some action if the browser closes. But you never can tell when it closes. That's why I mentioned (not really asked) how you thought to detect the browser closing.
--* R&zE:
-- »»»»»»»»»»»»»»»»»»»»»»»» -- Renze Munnik -- DataLink BV -- -- E: renze
datalink.nl -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- ««««««««««««««««««««««««
attached mail follows:
Hi
I'm doing the script for searching the mySQL db in Russian language. but output of textform http://localhost/indexr.php3?search_idea=%E6%E2%E0%F7%EA %E0 is not the same as http://localhost/indexr.php3?search_idea=%C6%C2%C0%D7%CA %C0 (this is the same word but first is lower case and second is upper case) so search becomes case sencitive, I don't want to have case sencitive search so, how can I tell to program that both of above are the same word?
Thank you for help,
Youri
attached mail follows:
As I recall MySQL is not case sensitive
did you use --with-charset=koi8_ru ( or what ever) when you did ./configure ?
snip form INSTALL-SOURCE file of mysql-3.23.40
* By default, *MySQL* uses the ISO-8859-1 (Latin1) character set. To change the default set, use the `--with-charset' option: shell> ./configure --with-charset=CHARSET `CHARSET' may be one of `big5', `cp1251', `cp1257', `czech', `danish', `dec8', `dos', `euc_kr', `gb2312', `gbk', `german1', `hebrew', `hp8', `hungarian', `koi8_ru', `koi8_ukr', `latin1', `latin2', `sjis', `swe7', `tis620', `ujis', `usa7', or `win1251ukr'. *Note Character sets::.
-------------------------- Canaan Surfing Ltd. Internet Service Providers Ben-Nes Michael - Manager Tel: 972-4-6991122 http://sites.canaan.co.il --------------------------
----- Original Message -----
From: "BRACK" <brak
nettaxi.com>
To: <php-general
lists.php.net>
Sent: Tuesday, August 14, 2001 11:28 AM
Subject: [PHP] qwestion about %E6%E2%E0%F7%EA%E0
> Hi
>
> I'm doing the script for searching the mySQL db in Russian
> language. but output of textform
> http://localhost/indexr.php3?search_idea=%E6%E2%E0%F7%EA
> %E0 is not the same as
> http://localhost/indexr.php3?search_idea=%C6%C2%C0%D7%CA
> %C0 (this is the same word but first is lower case and second is
> upper case) so search becomes case sencitive, I don't want to
> have case sencitive search so, how can I tell to program that both
> of above are the same word?
>
> Thank you for help,
>
> Youri
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
>Hi, >what about other possibilities to do this ?
>Tom
Other possibilities? Why not just utilize the second argument of the LIMIT function with a fairly simple SQL query?
Here's a portion of a script I wrote, modified to be an example on this matter:
<?php
$articles_display_limit = 5; // set the number of articles to be displayed on each page
/* $article_number sets the position in the database from which the current query results will begin from. $article_number is passed to the script as a GET method variable (i.e article.php?record_number=5) */
$articles = mysql_query("SELECT * FROM articles LIMIT $article_number,$articles_display_limit");
$next = $article_number + $articles_display_limit; // next page's starting point $prev = $article_number - $articles_display_limit ; // previous page's starting point $total_number_of_articles = mysql_num_rows(mysql_query("SELECT NULL FROM articles"));
/* display this page's articles*/
/* determine if a 'Previous' button is required */ if ($prev >= 0) { echo '<a href="article.php?article_number=' . $prev . '">Previous</a>' . "\n"; }
/* determine if a 'Next' button is required */ if ($next < $total_number_of_articles) { echo '<a href="article.php?article_number=' . $next . '">Next</a>' . "\n"; }
?>
This should do the trick if I haven't modified too much. There's a good but a bit messy article about it in PHPBuilder: http://phpbuilder.com/columns/rod20000221.php3 The script is much more experienced and advanced than my own.
--- regards, Boaz Amit> > Hello Pranot, > > > > On 16-Jul-01 06:09:33, you wrote: > > > > > >hi.. friends > > > > > >i have a database (mysql) in which their r many records. Through PHP i want > > > them to display on the page. > > > > > > Main requirement is that there should be a NEXT - PREVIOUS facility. So if > > > there r 20 records and suppose only 10 should show up on scren at a time, > > > then a NEXT link should be visible which could show the remaining 10 > > > records. > > > > > > Their can be n no. of records. > > > > > Maybe you would like to try this PHP class that does exactly what you are > > asking. > > > > http://phpclasses.UpperDesign.com/browse.html/package/130 > > > > > > Regards, > > Manuel Lemos > > > > Web Programming Components using PHP Classes. > > Look at: acm.org">http://phpclasses.UpperDesign.com/?user=mlemos
acm.org > > -- > > E-mail: mlemos
acm.org > > URL: http://www.mlemos.e-na.net/ > > PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp > > -- > >
attached mail follows:
I wish someone deletes this post! It's posted with date 2002! I'm gonna see it on the top of my messages for about a year now! I'm using the news server and not mailing list!
"By Proxy" <byproxy1
optushome.com.au> wrote in message
news:005301c23ee3$27ba1500$f4cea4cb
kelvn1.qld.optushome.com.au...
> Hi.
>
> Does anybody know of any issues in PHP 4.0B2 regarding to the handling of
> session variables on different networks?
>
> Here is the problem. I have written a user authentication system using
> session variables. When the user logs in their name and pass are stored as
> an associative array (with other details from a database). If the details
> are invalid the user is booted back to the logon screen. The system worked
> fine for everyone except myself and one other person who was on the same
> network (optus
home network).
>
> The problem was that although the username and password were sent and
stored
> into the session variables, upon accessing another page the session
> variables were not carried forward (although the session id was) and so I
> was thrown back to the login. As I said, this was only true for users on
the
> optus
home network. Fpr anyone else it seemed to be fine.
>
> Identical code on a server running PGP 4.0.4pl1 worked universally.
> I have been tearing my remaining hair out for days on this one now. Does
> anyone have any suggestions (except for 'Upgrade PHP on the 4.0B2 server'
or
> 'move to a different server'. That, unfortunately is beyond my control
:( )
>
> Cheers
>
> Lee
>
attached mail follows:
Actually the mysql_query() seems to accept only one statement at a time.
Any work around so i can do query suchs:
mysql_query(" SELECT 1+1; SHOW DATABASES; USE database1; SELECT * FROM table1; ");
Just multiple commands seperated with ';' ? (as if using the Mysql command prompt)
attached mail follows:
You cant do this.
Its even recommended to drop the `;' from the end of the sql command.
You can go around using array to store the sql statements and use foreach to run mysql_query with thee sql statement.
But I don't think its right way to do thing !
If you intention was to do update one after other then you should use locks or use Postgres :)
-------------------------- Canaan Surfing Ltd. Internet Service Providers Ben-Nes Michael - Manager Tel: 972-4-6991122 http://sites.canaan.co.il --------------------------
----- Original Message -----
From: "lallous" <elias_bachaalany
yahoo.com>
To: <php-general
lists.php.net>
Sent: Tuesday, August 14, 2001 12:59 PM
Subject: [PHP] PHP: mysql_query()
> Actually the mysql_query() seems to accept only one statement at a time.
>
> Any work around so i can do query suchs:
>
> mysql_query("
> SELECT 1+1;
> SHOW DATABASES;
> USE database1;
> SELECT * FROM table1;
> ");
>
> Just multiple commands seperated with ';' ? (as if using the Mysql command
> prompt)
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
No actually I have a .SQL file that is a complete dump of my database. All i want to do is the execute with mysql_query() the whole .SQL which will create databases and tables and fillin fields!
"Ben-Nes Michael" <admin
canaan.co.il> wrote in message
news:004701c124a0$e690c860$aa5796d4
canaan.co.il...
> You cant do this.
>
> Its even recommended to drop the `;' from the end of the sql command.
>
> You can go around using array to store the sql statements and use foreach
to
> run mysql_query with thee sql statement.
>
> But I don't think its right way to do thing !
>
> If you intention was to do update one after other then you should use
locks
> or use Postgres :)
>
> --------------------------
> Canaan Surfing Ltd.
> Internet Service Providers
> Ben-Nes Michael - Manager
> Tel: 972-4-6991122
> http://sites.canaan.co.il
> --------------------------
>
> ----- Original Message -----
> From: "lallous" <elias_bachaalany
yahoo.com>
> To: <php-general
lists.php.net>
> Sent: Tuesday, August 14, 2001 12:59 PM
> Subject: [PHP] PHP: mysql_query()
>
>
> > Actually the mysql_query() seems to accept only one statement at a time.
> >
> > Any work around so i can do query suchs:
> >
> > mysql_query("
> > SELECT 1+1;
> > SHOW DATABASES;
> > USE database1;
> > SELECT * FROM table1;
> > ");
> >
> > Just multiple commands seperated with ';' ? (as if using the Mysql
command
> > prompt)
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
> >
>
attached mail follows:
For that MySQL team designed the Mysql client to get input from file and execute it.
do system ( "mysql < sql.fie"); or `mysql < sql.fie`;
dont forget to use -D and -p if User is required.
----- Original Message -----
From: "lallous" <elias_bachaalany
yahoo.com>
To: <php-general
lists.php.net>
Sent: Tuesday, August 14, 2001 1:29 PM
Subject: Re: [PHP] PHP: mysql_query()
> No actually I have a .SQL file that is a complete dump of my database.
> All i want to do is the execute with mysql_query() the whole .SQL which
will
> create databases and tables and fillin fields!
>
> "Ben-Nes Michael" <admin
canaan.co.il> wrote in message
> news:004701c124a0$e690c860$aa5796d4
canaan.co.il...
> > You cant do this.
> >
> > Its even recommended to drop the `;' from the end of the sql command.
> >
> > You can go around using array to store the sql statements and use
foreach
> to
> > run mysql_query with thee sql statement.
> >
> > But I don't think its right way to do thing !
> >
> > If you intention was to do update one after other then you should use
> locks
> > or use Postgres :)
> >
> > --------------------------
> > Canaan Surfing Ltd.
> > Internet Service Providers
> > Ben-Nes Michael - Manager
> > Tel: 972-4-6991122
> > http://sites.canaan.co.il
> > --------------------------
> >
> > ----- Original Message -----
> > From: "lallous" <elias_bachaalany
yahoo.com>
> > To: <php-general
lists.php.net>
> > Sent: Tuesday, August 14, 2001 12:59 PM
> > Subject: [PHP] PHP: mysql_query()
> >
> >
> > > Actually the mysql_query() seems to accept only one statement at a
time.
> > >
> > > Any work around so i can do query suchs:
> > >
> > > mysql_query("
> > > SELECT 1+1;
> > > SHOW DATABASES;
> > > USE database1;
> > > SELECT * FROM table1;
> > > ");
> > >
> > > Just multiple commands seperated with ';' ? (as if using the Mysql
> command
> > > prompt)
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > > For additional commands, e-mail: php-general-help
lists.php.net
> > > To contact the list administrators, e-mail:
php-list-admin
lists.php.net
> > >
> > >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
I can't execute MySql via system() I have no rights!
"Ben-Nes Michael" <admin
canaan.co.il> wrote in message
news:005a01c124ae$ab50e740$aa5796d4
canaan.co.il...
> For that MySQL team designed the Mysql client to get input from file and
> execute it.
>
> do
> system ( "mysql < sql.fie");
> or
> `mysql < sql.fie`;
>
> dont forget to use -D and -p if User is required.
>
> ----- Original Message -----
> From: "lallous" <elias_bachaalany
yahoo.com>
> To: <php-general
lists.php.net>
> Sent: Tuesday, August 14, 2001 1:29 PM
> Subject: Re: [PHP] PHP: mysql_query()
>
>
> > No actually I have a .SQL file that is a complete dump of my database.
> > All i want to do is the execute with mysql_query() the whole .SQL which
> will
> > create databases and tables and fillin fields!
> >
> > "Ben-Nes Michael" <admin
canaan.co.il> wrote in message
> > news:004701c124a0$e690c860$aa5796d4
canaan.co.il...
> > > You cant do this.
> > >
> > > Its even recommended to drop the `;' from the end of the sql command.
> > >
> > > You can go around using array to store the sql statements and use
> foreach
> > to
> > > run mysql_query with thee sql statement.
> > >
> > > But I don't think its right way to do thing !
> > >
> > > If you intention was to do update one after other then you should use
> > locks
> > > or use Postgres :)
> > >
> > > --------------------------
> > > Canaan Surfing Ltd.
> > > Internet Service Providers
> > > Ben-Nes Michael - Manager
> > > Tel: 972-4-6991122
> > > http://sites.canaan.co.il
> > > --------------------------
> > >
> > > ----- Original Message -----
> > > From: "lallous" <elias_bachaalany
yahoo.com>
> > > To: <php-general
lists.php.net>
> > > Sent: Tuesday, August 14, 2001 12:59 PM
> > > Subject: [PHP] PHP: mysql_query()
> > >
> > >
> > > > Actually the mysql_query() seems to accept only one statement at a
> time.
> > > >
> > > > Any work around so i can do query suchs:
> > > >
> > > > mysql_query("
> > > > SELECT 1+1;
> > > > SHOW DATABASES;
> > > > USE database1;
> > > > SELECT * FROM table1;
> > > > ");
> > > >
> > > > Just multiple commands seperated with ';' ? (as if using the Mysql
> > command
> > > > prompt)
> > > >
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > > > For additional commands, e-mail: php-general-help
lists.php.net
> > > > To contact the list administrators, e-mail:
> php-list-admin
lists.php.net
> > > >
> > > >
> > >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
> >
>
attached mail follows:
At 2:21 PM +0200 8/14/01, lallous wrote: >I can't execute MySql via system() I have no rights! >
Generally ISPs either give you shell rights or access to PHPMyAdmin, if they give access to a MySQL database. Otherwise, you'd never be able to add tables, or modify data. If PHPMyAdmin is installed, you can general locate it in the following manner: your_url/phpmyadmin
So http://www.my_crazy_domain.com/phpmyadmin
You'll need to enter your database username and password, but this will allow you to upload INSERT statements, perform routine MySQL tasks, as well as run SQL queries.
Otherwise you need to request shell access from your ISP. Some ISPs only provide it when asked.
Alnisa
--
.........................................
Alnisa Allgood
Executive Director
Nonprofit Tech
(ph) 415.337.7412 (fx) 415.337.7927
(url) http://www.nonprofit-techworld.org
(url) http://www.nonprofit-tech.org
(url) http://www.tech-library.org
.........................................
Nonprofit Tech E-Update
mailto:nonprofit-tech-subscribe
egroups.com
.........................................
applying technology to transform
.........................................
attached mail follows:
Hi!
How do I use a PUT method support to upload files from the client to the WEB server? Can anyone pls. help me out to find a solution to these problems. It's very urgent!!!!
regards Rukhiya
attached mail follows:
Message-ID: <021501c12508$abb1b200$6400a8c0
activelifestyle.com>
From: "Jack" <jacky
activelifestyle.com>
To: <php-general
lists.php.net>
Date: Tue, 14 Aug 2001 16:32:50 -0500
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0212_01C124DE.C2230860"
Subject: to include php file into html page
------=_NextPart_000_0212_01C124DE.C2230860 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi people I have tried to include php file into html page using the syntax below and it said syntax error at this part when the page is loaded. What is wrong with calling php file this way? Or is there any other way to call php file from html page?
******************* <html> <body> <script language='JavaScript' src='/include/adjs.php></script> </body> </html> *******************
Jack
jacky
activelifestyle.com
"Love your enemies, it will drive them nuts"
------=_NextPart_000_0212_01C124DE.C2230860--
attached mail follows:
The language is php, not javascript. Plus I'm not sure if you can use an src attribute, but you can use the include or require functions...
http://php.net/manual/en/language.basic-syntax.php
On Tuesday 14 August 2001 14:32, you wrote:
> Hi people
> I have tried to include php file into html page using the syntax below and
> it said syntax error at this part when the page is loaded. What is wrong
> with calling php file this way? Or is there any other way to call php file
> from html page?
>
> *******************
> <html>
> <body>
> <script language='JavaScript' src='/include/adjs.php></script>
> </body>
> </html>
> *******************
>
> Jack
> jacky
activelifestyle.com
> "Love your enemies, it will drive them nuts"
attached mail follows:
At 4:32 PM -0500 8/14/01, Jack wrote: >Hi people >I have tried to include php file into html page using the syntax >below and it said syntax error at this part when the page is loaded. >What is wrong with calling php file this way? Or is there any other >way to call php file from html page? > >******************* ><html> ><body> ><script language='JavaScript' src='/include/adjs.php></script> ></body> ></html> >*******************
Well first of a PHP script is not a JavaScript. You need to actually use a php statement to include a php, text, or other file type. There are two methods for including a file, the general include, or the more stringent, require file. I've included a sample if both statements below:
............ <html> <?php require("/web/ftp/biz/path_to_file/html/includes/globals.php3"); include("/web/ftp/biz/path_to_file/html/includes/location.php3"); ?> <?php require($gBasePath . "/includes/header.php"); include($gBaseURL . "/includes/header.php"); ?> <?php require("/includes/header.php"); include("/includes/header.php"); ?> ..............
You'll note some differences:
The first require statement basically indicates the page shouldn't run or display unless this file is found. The path_to_file is given implicitly from the server root rather than from the .html folder. You can require a file for many reasons, but in general I do so only if the information absolutely needs to be included on the page. So for template pages: header, footer, and startBody, closeBody statements are all required, as well as a global file and a config file, just in case, we rapidly ad a MySQL statement.
The second statement is an include statement, which can use absolute or relative path.
The following two statements use the same method, but call on specifications defined in the "globals" file. The global file defines a BaseURL (http://www.yourdomain.net), and a BasePath (/web/path_to_file). Once defined they can be used to specify a full path in more relative terms. This is useful for files that are called throughout the site, since if your always using a header, on ever page, regardless of directory, you don't want to code for it ../includes/header.php on one page and ../../../includes/header.php on the next. A global base or global url, will keep the code portable, short, and sweet.
The last two statements basically specify relative paths, for including files within the same folder.
Alnisa
--
.........................................
Alnisa Allgood
Executive Director
Nonprofit Tech
(ph) 415.337.7412 (fx) 415.337.7927
(url) http://www.nonprofit-techworld.org
(url) http://www.nonprofit-tech.org
(url) http://www.tech-library.org
.........................................
Nonprofit Tech E-Update
mailto:nonprofit-tech-subscribe
egroups.com
.........................................
applying technology to transform
.........................................
attached mail follows:
In MS SQL server, table data can be uploaded on webserver by using the Enterprise Manager by using the export option.
Is there any feature in Mysql to upload the data on webserver? I understand that it can be done with the help of SQL script file. This is the only way or some another way also is there? Also, Pl. let me know: 1. How to create SQL script file, with what extension it is to be saved? The format? 2. How to call/execute/run that file using php?
Can anyone send me sample SQL script file?
Thanks in advance??..
Ajay K. Ratra
Ludhiana (INDIA)
ajay
LudhianaInfoline.com
attached mail follows:
Hi all!
I'm trying to build a registration system for a community site that I'm building, and was wondering if people could give me advice or tell me about problems they've been having??
I'm planning to let people register with a username and password (encrypted), and then make them login with that, and thus putting a cookie on their machine.
If the cookie is detected the next time, they don't have to login, but if it is, then they do.
Sounds pretty simple??
Any advice?
TIA!
sunny
____________________________________________________________
Do You Yahoo!?
Get your free
yahoo.co.uk address at http://mail.yahoo.co.uk
or your free
yahoo.ie address at http://mail.yahoo.ie
attached mail follows:
I have pages that uses session for security that looks something like this:
<?php session_start();
if( !isset($uid) ) { include("include/auth.inc.php"); auth_user(); }
more code... ?>
so $uid tells me if the user is logged on or not...
but what if somebody calls the script directly from the address bar like this: http://server/script.php?uid=10
wouldn't this be a security problem? ____________________________ . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer
attached mail follows:
On Tue, Aug 14, 2001 at 08:42:22AM -0300, Christian Dechery wrote: > I have pages that uses session for security that looks something like this: > > <?php > session_start(); > > if( !isset($uid) ) > { > include("include/auth.inc.php"); > auth_user(); > } > > more code... > ?> > > so $uid tells me if the user is logged on or not... > > but what if somebody calls the script directly from the address bar like > this: http://server/script.php?uid=10 > > wouldn't this be a security problem?
Christian,
This can indeed be a security issue. Try using $HTTP_SESSION_VARS{"uid"} instead. It's a saver solution. Then one cannot just use ?uid=10 in order to fool you. At least, not in that way.
--* R&zE:
-- »»»»»»»»»»»»»»»»»»»»»»»» -- Renze Munnik -- DataLink BV -- -- E: renze
datalink.nl -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- ««««««««««««««««««««««««
attached mail follows:
If you test $HTTP_SESSION_VARS["uid"] instead, you'll know that it came from a session and not from a GET variable.
- Tim
On 14 Aug 2001 08:42:22 -0300, Christian Dechery wrote: > I have pages that uses session for security that looks something like this: > > <?php > session_start(); > > if( !isset($uid) ) > { > include("include/auth.inc.php"); > auth_user(); > } > > more code... > ?> > > so $uid tells me if the user is logged on or not... > > but what if somebody calls the script directly from the address bar like > this: http://server/script.php?uid=10
attached mail follows:
I know, I know, I have a lot of work to do...I shouldn't be doing this. I did get to play with PCRE regexps here, though...lotsa cool features over eregs!. Anyway, here's a *** NEW!!! IMPROVED!!! *** version of smart_ucwords(), that's probably way too much overkill. I did some quick tests, seems to work. Beware of email-induced line-wrapping, particularly in the comment black & quoted strings:
<?php
function smart_ucwords($String, $ForceCase=1, $CapitalizeTrailing=1) {
################################################################################
#
# A more sophisticated approach to title-casing.
#
## PARAMETERS
##################################################################
#
# $String string Input string.
# $ForceCase 0|1 If true, will force title case (only
first letter
# capitalized, no matter what case the
string is in.
# $CaptializeTrailing 0|1 If true, will capitalize a normally-excepted
# word if it is the last word in the
string. So, a
# string like 'Shot In the Dark, A'
works properly.
#
## USAGE NOTES
#################################################################
#
# The Exception List words should be in the case you desire;
normally this will
# be lowercase.
#
# The Invariant List contains words and titles (eg; NASA, MySQL, PostGreSQL,
# eBusiness) whose capitalization should be fixed, no matter what.
#
# If one of these arrays is not to be used, simply set it to array().
#
## MODIFICATION HISTORY
########################################################
#
# 14 august 2001: S. Edberg, UCDavis <sbedberg
ucdavis.edu>
# Original
#
################################################################################
$EXCEPTION_LIST = array( 'a', 'an', 'and', 'at', 'but', 'for', 'nor', 'or', 'some', 'the', 'to', 'with' ); $INVARIANT_LIST = array( 'NASA', 'MySQL', 'PostGreSQL', 'eBusiness' ); # First, strip & save leading & trailing whitespace
preg_match( '/^(\s*?)(.*)(\s*)$/U', ($ForceCase ? strtolower($String) : $String), $StringParts );
# Replace exception words
$String = ucwords($StringParts[2].($CapitalizeTrailing ? '' : ' '));
foreach ($EXCEPTION_LIST as $Word) { $String = preg_replace("/(\s+)$Word(\s+)/i", "\\1$Word\\2", $String); }
# Replace invariants
$String = " $String "; foreach ($INVARIANT_LIST as $Word) { $String = preg_replace("/(\s+)$Word(\s+)/i", "\\1$Word\\2", $String); }
# Replace whitespace and return
return $StringParts[1].trim($String).$StringParts[3];
}
?>
At 4:09 PM -0500 8/13/01, Jeff Oien wrote: >Fabulous. Thanks to Steve and Mark. Exactly what I needed. >Jeff Oien > >> >Something like this, perhaps (untested): >> >> I needed this too so I just tested it. >> >> >function smart_ucwords($String) >> >{ >> > >> > $ExceptionList = array('the', 'an', 'a'); # should all be in >> >lowercase >> > >> > $String = ucwords(strtolower(ltrim($String))); # LINE A >> > >> > foreach ($ExceptionList as $Word) >> > { >> > $String = eregi_replace("[[:space:]]+$Word[[:space:]]+", >> >$Word, $String); >> > } >> >> >> this line should be more like: >> $String = eregi_replace("([[:space:]]+)".$Word."([[:space:]]+)", >> "\\1".$Word."\\2", $String); >> >> > return $String; # LINE B >> > >> >} >> >> thanks! >> - Mark > > >
-- +------ Factoid: Of the 100 largest economies in the world, 51 are ------+ | Steve Edberg University of California, Davis | | sbedbergucdavis.edu Computer Consultant | | http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu/ | +--- corporations ------ http://www.ips-dc.org/reports/top200text.htm ---+
attached mail follows:
Hi,
In MS SQL server, table data can be uploaded on webserver by using the Enterprise Manager by using the export option.
Is there any feature in Mysql to upload the data on webserver? I understand that it can be done with the help of SQL script file. This is the only way or some another way also is there? Also, Pl. let me know: 1. How to create SQL script file, with what extension it is to be saved? The format? 2. How to call/execute/run that file using php?
Can anyone send me sample SQL script file?
Thanks in advance??..
Ajay K. Ratra
Ludhiana (INDIA)
ajay
LudhianaInfoline.com
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]