|
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: Mon Aug 13 2001 - 07:16:05 CDT
php-general Digest 13 Aug 2001 12:16:05 -0000 Issue 813
Topics (messages 62355 through 62411):
Re: replacing variables in file
62355 by: David Ovens
Using fsockopen()
62356 by: David Ovens
62398 by: David Ovens
62399 by: Tim
62404 by: David Ovens
62406 by: David Ovens
62407 by: Tim
62411 by: i_union
Re: Can't insert record using UltraDEV with PHAKT to MYSQL
62357 by: David Robley
Re: strstr Question
62358 by: Mark Maggelet
Interested in a new Affiliate Program??
62359 by: new
Re: Passing LARGE (1500-2500 chars) variable from JScript to PHP?
62360 by: news.fbcc.com
62361 by: news.fbcc.com
62362 by: chrissl \[christopher czettel\]
Re: Problems with exec
62363 by: Data Driven Design
Re: upgrading from 4.03 to 4.06
62364 by: Yamin Prabudy
Can't run perl script using exec or system
62365 by: Lara J. Fabans
Postgresql large objects.
62366 by: speedboy
logging bandwidth
62367 by: php.swifte.net
62368 by: Rasmus Lerdorf
62369 by: Jason Brooke
Mail()
62370 by: Mahmoud Kassem
62371 by: ReDucTor
62372 by: Mahmoud Kassem
62375 by: Mahmoud Kassem
62392 by: Maxim Maletsky
Re: WAHOO!!!
62373 by: elias
component library
62374 by: lolodev news php
62376 by: Rasmus Lerdorf
variable $PATH_INFO
62377 by: lolodev news php
Re: Meta Tags and Regular Expressions
62378 by: Renze Munnik
Re: Having my script login to a secure area of another site.....
62379 by: Renze Munnik
Simple question (what's ISAPI ?)
62380 by: Tribun
62386 by: Phil Driscoll
php 4.0.6 and imap support
62381 by: Jason Rennie
posix_getpwnam
62382 by: Tomá¹ Kubi¹
62383 by: Daniel Rezny
Re: Socket problem
62384 by: Jon Farmer
Re: plz check the warning message
62385 by: Balaji Ankem
62387 by: Renze Munnik
Re: Reliable PHP web hosts
62388 by: Pere Vineta
something about the documentation
62389 by: Yamin Prabudy
62390 by: Rasmus Lerdorf
IE Download twice from DB - MAJOR disaster to db users
62391 by: Ben-Nes Michael
62393 by: Maxim Maletsky
62395 by: Ben-Nes Michael
Apache/PHP File Upload problems
62394 by: Martin Laws
PHP and SMS
62396 by: ahmad varoqua
Re: it works at last!
62397 by: Steve Brett
MySQL
62400 by: Roman
62401 by: Jon Farmer
prob with session start
62402 by: Balaji Ankem
62408 by: Renze Munnik
session_start() problem
62403 by: Aniceto Lopez
62405 by: Richard Baskett
Re: Form help
62409 by: Johannes Janson
thanks all sesion_start problem
62410 by: Aniceto Lopez
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:
I am making a program, that uses the fsockopen command looking at various
url's, but occasionally it stops with a timeout error, I have used the
infront of the fsockopen command, but it still times out with the error, how
do I make php ignore the error so that I can make it automatically retry or
do something else ??
Dave
attached mail follows:
I am making a program, that uses the fsockopen command looking at various
url's, but occasionally it stops with a timeout error, I have used the
infront of the fsockopen command, but it still times out with the error, how
do I make php ignore the error so that I can make it automatically retry or
do something else ??
Dave
attached mail follows:
Thought I would repost, does anyone have a solution ?
I am using php, apache on a windows system.
----- Original Message -----
From: "David Ovens" <DOvens
doweb.co.uk>
To: <php-general
lists.php.net>
Sent: Monday, August 13, 2001 1:26 AM
Subject: [PHP] Using fsockopen()
> I am making a program, that uses the fsockopen command looking at various
> url's, but occasionally it stops with a timeout error, I have used the
> infront of the fsockopen command, but it still times out with the error,
how
> do I make php ignore the error so that I can make it automatically retry
or
> do something else ??
>
>
> Dave
>
>
>
>
>
> --
> 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:
Is the timeout coming from fsockopen() or from the program using too
much time?
I've used
fsockopen() before without any issues (at least on Linux and
Solaris), but if your script is running for a long time, you may need to
tweak the execution time limit:
http://www.php.net/manual/en/function.set-time-limit.php
- Tim
On 13 Aug 2001 11:40:04 +0100, David Ovens wrote:
> Thought I would repost, does anyone have a solution ?
>
> I am using php, apache on a windows system.
>
> ----- Original Message -----
> From: "David Ovens" <DOvens
doweb.co.uk>
> To: <php-general
lists.php.net>
> Sent: Monday, August 13, 2001 1:26 AM
> Subject: [PHP] Using fsockopen()
>
>
> > I am making a program, that uses the fsockopen command looking at various
> > url's, but occasionally it stops with a timeout error, I have used the
> > infront of the fsockopen command, but it still times out with the error,
> how
> > do I make php ignore the error so that I can make it automatically retry
> or
> > do something else ??
attached mail follows:
this is my fsockopen satement it will check about 4/5 urls and then time out
(exceed 30 second timeout error) on the 5/6 url, I have no idea, why my
program wont continue checking all the urls in one go.
$socket =
fsockopen($urlArray["host"], $urlArray["port"], $errnum, $errstr,
100);
----- Original Message -----
From: "Tim" <infoz
earthlink.net>
To: "David Ovens" <DOvens
doweb.co.uk>
Cc: <php-general
lists.php.net>
Sent: Monday, August 13, 2001 11:55 AM
Subject: Re: [PHP] Using fsockopen()
> Is the timeout coming from fsockopen() or from the program using too
> much time?
>
> I've used
fsockopen() before without any issues (at least on Linux and
> Solaris), but if your script is running for a long time, you may need to
> tweak the execution time limit:
>
> http://www.php.net/manual/en/function.set-time-limit.php
>
> - Tim
>
> On 13 Aug 2001 11:40:04 +0100, David Ovens wrote:
> > Thought I would repost, does anyone have a solution ?
> >
> > I am using php, apache on a windows system.
> >
> > ----- Original Message -----
> > From: "David Ovens" <DOvens
doweb.co.uk>
> > To: <php-general
lists.php.net>
> > Sent: Monday, August 13, 2001 1:26 AM
> > Subject: [PHP] Using fsockopen()
> >
> >
> > > I am making a program, that uses the fsockopen command looking at
various
> > > url's, but occasionally it stops with a timeout error, I have used the
> > > infront of the fsockopen command, but it still times out with the
error,
> > how
> > > do I make php ignore the error so that I can make it automatically
retry
> > or
> > > do something else ??
>
>
>
> --
> 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:
so far by increasing the set_tim_limit function it seems to have cured my
problem. I shall see how it goes.
Thanks
Dave
----- Original Message -----
From: "Tim" <infoz
earthlink.net>
To: "David Ovens" <DOvens
doweb.co.uk>
Cc: <php-general
lists.php.net>
Sent: Monday, August 13, 2001 11:55 AM
Subject: Re: [PHP] Using fsockopen()
> Is the timeout coming from fsockopen() or from the program using too
> much time?
>
> I've used
fsockopen() before without any issues (at least on Linux and
> Solaris), but if your script is running for a long time, you may need to
> tweak the execution time limit:
>
> http://www.php.net/manual/en/function.set-time-limit.php
>
> - Tim
>
> On 13 Aug 2001 11:40:04 +0100, David Ovens wrote:
> > Thought I would repost, does anyone have a solution ?
> >
> > I am using php, apache on a windows system.
> >
> > ----- Original Message -----
> > From: "David Ovens" <DOvens
doweb.co.uk>
> > To: <php-general
lists.php.net>
> > Sent: Monday, August 13, 2001 1:26 AM
> > Subject: [PHP] Using fsockopen()
> >
> >
> > > I am making a program, that uses the fsockopen command looking at
various
> > > url's, but occasionally it stops with a timeout error, I have used the
> > > infront of the fsockopen command, but it still times out with the
error,
> > how
> > > do I make php ignore the error so that I can make it automatically
retry
> > or
> > > do something else ??
>
>
>
> --
> 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:
Try doing
set_time_limit(0);
at the start of your script and see if that makes a difference.
- Tim
On 13 Aug 2001 12:00:24 +0100, David Ovens wrote:
> this is my fsockopen satement it will check about 4/5 urls and then time out
> (exceed 30 second timeout error) on the 5/6 url, I have no idea, why my
> program wont continue checking all the urls in one go.
>
>
> $socket =
fsockopen($urlArray["host"], $urlArray["port"], $errnum, $errstr,
> 100);
attached mail follows:
Hi All
I'm new in this forum and this is a test message if you recived it please
only reply this message .
Thanks in advance
_________________________________________________________
Do You Yahoo!?
Get your free
yahoo.com address at http://mail.yahoo.com
attached mail follows:
On Fri, 10 Aug 2001 19:58, Jack wrote:
> Dear all
> I had installed a software (PHAKT) into UltraDev, then the application
> server i used is ASP, and i had create a table on Mysql.
> Everthing seems works fine, i had test the connection and match all to
> field to the field of the mysql table!
> i had create a insert record on the server behavior before i can match
> the field to the Mysql table!
> But when i had submit the form, there is error prompts out :
>
> "HTTP Error 405
> 405 Method Not Allowed
> The method specified in the Request Line is not allowed for the
> resource identified by the request. Please ensure that you have the
> proper MIME type set up for the resource you are requesting.
>
> Please contact the server's administrator if this problem persists."
>
> Can anyone tell me what is the most likely problem is??? pls
>
> jack
> jack
nedcor.com
I don't see where you are using PHP so you may perhaps be asking in the
wrong place. However, for a stab in the dark I'd say look to your server
configuration.
-- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIALove is grand. Divorce is twenty grand.
attached mail follows:
On Sun, 12 Aug 2001 18:42:48 -0500, Erich Zigler
(erichz
superhero.org) wrote:
>I am currently writing a piece of code that when a user enters in
>their
>email address it will check it for validity.
>
>In this instance they are supposed to type in user
domain.com But if
>they
>just type in user I want it to add
domain.com at the end by
>default. This
>is the piece of code I have so far, but it does not seem to be
>working...
>
>if (strstr($email, '
')) {
> continue;
>} else {
> $email = $email . "
domain.com";
>}
>
>I've been all over the documentation but I am obviously missing
>something.
>If anyone could be of any assistance I would greatly appreciate it.
continue is for loops, not if's. delete that line and it should work, or better yet:
if (!strstr($email, '
')) $email.="
domain.com";
attached mail follows:
This message is not SPAM. You have received this email because you either posted to my FFA page, Classified Ad page, submitted an e-mail ad, we have had several EMAIL exchanges or we belong to the same opt-in EMAIL list. If you wish to have your address removed please forward this message with the subject REMOVE. Please Check the message at the end of the email
Dear Fellow Entrepreneur,
Are you looking for a new affiliate program? Have you found the 'Right' way of marketing that program? I think I have a way to Start Your Own Success!
If you are interested in this program, please send an email to: Success_is_free
getresponse.com
Thanks so much for your time and consideration!
Kim Hylton
PLEASE NOTE: If you need help with starting a business, registering a business name, learning how income tax is handled, etc., contact your local office of the Small Business Administration (a Federal Agency) 1-800-827-5722 for free help and answers to questions. Also, the InternalRevenue Service offers free help via telephone and free seminars about business tax requirements. Your earnings are highly dependant on your activities and advertising. The information contained on this site and in the report constitutes no guarantees stated nor implied. In the event that it is determined that this site or report constitutes a guarantee of any kind, that guarantee is now void. The earnings amounts listed on this site and in the report are estimates only. If you have any questions of the legality of this program, contact the Office of Associate Director for Marketing Practices, Federal Trade Commission, Bureau of Consumer Protection in Washington, DC. ***Under Bill S.1618 TITLE III passed by the 105th U.S. Congress this letter Can Not be Considered Spam as long as we include the way to be removed. ////////////////////////////////////////////////////////////////////////////// This message is sent in compliance with the new e-mail bill: SECTION 301. Sender: "Per Section 301, Paragraph (a)(2)(C) of S. 1618, further transmissions to you by sender of this email may be stopped, at no cost to you, by sending a reply to this email address with the word "remove" in the subject line." <><><><><><><><><><><><><><><><><><><><><><><> If at any time you no longer wish to receive email from us, please hit reply and put Please Remove in the subject box. This will remove you from our list until you post at one of our sites again. . <><><><><><><><><><><><><><><><><><><><><><><>
attached mail follows:
Wow, seems pretty obvious now that you've said it, Richard, but then that's how it always works.
Yes, I can just write it all to a file and then upload that to the server then can grab it from there with PHP. Ahhh, life is GOOD! Worst case, the the user will have to click twice, once for the upload and again to confirm the update. AWESOME! You have no idea how stuck I was on that on. I'll have a look/listen at some of those CD's.
Thanks again! Andre
"Richard Lynch" <ceo
l-i-e.com> wrote in message
news:00ef01c1237a$74dff0a0$6401a8c0
Lynchux100...
> Any server along the way is allowed to chop GET requests to, like, 255
> characters.
>
> Any server along the way is allowed to chop POST requests to, like, 1024?
> characters.
>
> *MOST* won't chop either, any more, but you're safe with POST instead of
> GET.
>
> You *COULD* however, try this to guarantee delivery:
>
> Breaking up the HTML into "packets" and POST each packet successively with
a
> numbering scheme whereby PHP holds each packet in a temp table and
assembles
> them when all packets have arrived. Dunno if JavaScript will let you
> execute multiple POSTs and ignore the returning HTML or not though...
>
> Your best bet by far is to have JavaScript execute a POST with a FILE
> UPLOAD. You'll have to figure out if JavaScript can do that, though...
>
> --
> 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
> ----- Original Message -----
> From: News.Fbcc.Com <AndreBajew
KatyTexas.Com>
> Newsgroups: php.general
> To: <php-general
lists.php.net>
> Sent: Sunday, August 12, 2001 12:55 PM
> Subject: Passing LARGE (1500-2500 chars) variable from JScript to PHP?
>
>
> > I want to pass a large (easily 1500-2500 characters) variable between a
> > DHTML object using Jscript over to a PHP script to ultimately update a
> MySQL
> > database. I know that I can pass a variable along with the link, i.e.
> > location.href=etc. etc., but I believe there is a limit on the size of
an
> > href. What I am doing is editting text and am using MSIE specific
> functions
> > to create HTML on the fly which I then want to pass to a PHP script to
> > update my database.
> >
> > Any help would be SINCERELY appreciated!!
> > Merci, (or is that mercy?)
> > Andre
> >
> >
>
attached mail follows:
Thank you for the response Julio! That's what I will do is write to a file and then upload that file. From there I can have PHP get to that file for insert/update into a MySQL database.
Thanks much! Andre
"InéRcia Sensorial" <inerte
hotmail.com> wrote in message
news:20010812210410.959.qmail
pb1.pair.com...
> I don't think it is possible to pass so much chars in a href, or URL for
> the matter. Is it really necessary? Couldn't you first write somewhere
> (db/file) those chars and retrieve it later, referencing it on the href?
>
> --
>
>
> Julio Nobrega.
>
> 2B||!BB - That's the question.
>
> "News.Fbcc.Com" <AndreBajew
KatyTexas.Com> wrote in message
> news:20010812175808.8234.qmail
pb1.pair.com...
> > I want to pass a large (easily 1500-2500 characters) variable between a
> > DHTML object using Jscript over to a PHP script to ultimately update a
> MySQL
> > database. I know that I can pass a variable along with the link, i.e.
> > location.href=etc. etc., but I believe there is a limit on the size of
an
> > href. What I am doing is editting text and am using MSIE specific
> functions
> > to create HTML on the fly which I then want to pass to a PHP script to
> > update my database.
> >
> > Any help would be SINCERELY appreciated!!
> > Merci, (or is that mercy?)
> > Andre
> >
> >
>
>
attached mail follows:
all you need is a unvisible iframe (<IFRAME width="0" height="0" name="framename"> ... </IFRAME>) and give it a name.
then, you do a framename.write('data') with data in this format:
<form method="post" action="youphpscript.php" name="formname"> <input type="hidden" name="youvarname" value="youdatatosend"> </form>
followed by a formname.submit();
that's about all it is.....
k/r
chrissl ICQ#54897804
> I want to pass a large (easily 1500-2500 characters) variable between a > DHTML object using Jscript over to a PHP script to ultimately update a MySQL > database. I know that I can pass a variable along with the link, i.e. > location.href=etc. etc., but I believe there is a limit on the size of an > href. What I am doing is editting text and am using MSIE specific functions > to create HTML on the fly which I then want to pass to a PHP script to > update my database.
attached mail follows:
I've used system() instead of exec() on windows systems with success before.
Data Driven Design 1506 Tuscaloosa Ave Holly Hill, Florida 32117
http://www.datadrivendesign.com Phone: (386) 226-8979
Websites That WORK For You
----- Original Message -----
From: "Richard Lynch" <ceo
l-i-e.com>
To: <php-general
lists.php.net>
Sent: Sunday, August 12, 2001 4:52 PM
Subject: [PHP] Re: Problems with exec
> > i have some problems with "exec". i am using win2000, apache and latest
> php
> > version. always 'unable to fork' . what´s the problem?
>
> As I understand it:
>
> Windows is not thread-safe.
>
> As an implication, exec-ing something would just crash anyway.
>
> Thus, exec() and friends won't work on Windows in PHP4 and up.
>
> If that's wrong, somebody email me off-list.
>
> --
> 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:
Ok this is my error line...once again when I used 4.03 this script is already run...but got problem when i upgrade itu to 4.06 $db="database"; $connectid=mysql_connect(bla,bluh,foo); mysql_db_query($db,"UPDATE profile SET FullName='$FullName',Gender='$Gender',Birthday='$Birthday',".
"Address='$Address',HomePhone='$HomePhone',CelPhone='$CelPhone'". " WHERE id=$profile->id",$connectid);
----- Original Message -----
From: Richard Lynch <ceo
l-i-e.com>
To: <php-general
lists.php.net>
Sent: Monday, August 13, 2001 4:46 AM
Subject: [PHP] Re: upgrading from 4.03 to 4.06
> You'd have to show us every line that mentioned $connectionid for us to
> figure out where it disappeared...
>
> --
> 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
> ----- Original Message -----
> From: Yamin Prabudy <yamin
pro.net.id>
> Newsgroups: php.general
> To: <php-general
lists.php.net>
> Sent: Friday, August 10, 2001 10:57 PM
> Subject: upgrading from 4.03 to 4.06
>
>
> Hi there
> recently I had upgrade my php from as you see in the subject
>
> and I have a problem raise after I do some upgrading....
> my php script already run OK when I used the previous version
> after I do the upgrading a lot of error raise
> here is how I configure
>
/configure --with-mysql=/usr/local --with-apxs=/usr/local/apache/bin/apxs --
>
enable-memory-limit --enable-ucd-snmp-hack --with-snmp=/usr/local/snmpd --en
> able-discard-path --enable-force-cgi-redirect --enable-trans-sid
>
>
> the problem is like this....
>
> on the beginning of the script i declare
> $connectid=mysql_connect(bla,bla,bla);
>
> and at the end (still the same page)
> I used this
> mysql_db_query($db,"query",$connectid); <------ here is the error come up
> seems like the $connectid variable that I declare in previous didn't parse
> till the end....
> then I put the $connectid=mysql_connect(bla,bla,bla);
> before the query then everything is OK......
>
> can any body point me out where did I go wrong...I'm sure my script is
> OK..it's run in version 4.03 but got error in 4.06
>
> Thanks in Advance
>
> Yamin Prabudy
>
>
>
> --
> 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, friends,
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. Thanks, Lara
---------------8< 8< -------------------------------------
$command = "/home/copyUp.pl $sellerid $image";
exec($command, $output, $error);
if($error)
{
echo "OS Error1 $error<br>";
}
$filename = basename($image);
print "Filename: $filename";
$cmd="/home/convert.pl $sellerid $filename";
exec($cmd, $output, $error);
if($error)
{
echo "OS Error2 $error<br>";
}
---------------------
Lara J. Fabans
Lodestone Software, Inc
lara
lodestone-sw.com
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?
attached mail follows:
Hello,
I am logging server activity to a MySQL database. Unfortunately, I have yet found a way to log the number of bytes being transferred to a visitor. The closest I've come to anything like that is apache_lookup_uri() but I'm not sure it's meant to handle such a thing. Does anyone know a solution to this?
Thankz.
attached mail follows:
> I am logging server activity to a MySQL database. Unfortunately, I > have yet found a way to log the number of bytes being transferred to a > visitor. The closest I've come to anything like that is > apache_lookup_uri() but I'm not sure it's meant to handle such a > thing. Does anyone know a solution to this?
I wouldn't use PHP for this at all. Look at Apache's Piped Logs feature that sends log entries to an external process for logging. Should be relatively simple to pipe it to something that enters the information into a MySQL DB. I bet something exists that does just that somewhere.
-Rasmus
attached mail follows:
> > I am logging server activity to a MySQL database. Unfortunately, I > > have yet found a way to log the number of bytes being transferred to a > > visitor. The closest I've come to anything like that is > > apache_lookup_uri() but I'm not sure it's meant to handle such a > > thing. Does anyone know a solution to this? > > I wouldn't use PHP for this at all. Look at Apache's Piped Logs feature > that sends log entries to an external process for logging. Should be > relatively simple to pipe it to something that enters the information into > a MySQL DB. I bet something exists that does just that somewhere. > > -Rasmus
I made a little C program to do this a couple of years ago. I'm not very good at C but if you want the source anyway, just email me.
Incidentally, the number of bytes transferred to the client is available in the Apache logging - check the Apache manual for the format specifier under the LogFormat directive.
jason
attached mail follows:
How can force my From: instead of the nobody
servername ?
attached mail follows:
From : Your Name <user
domain.com>
make sure you have the arrow things around it...
thats in your headers...
----- Original Message -----
From: "Mahmoud Kassem" <mahmoud
abkareno.com>
To: <php-general
lists.php.net>
Sent: Monday, August 13, 2001 4:20 PM
Subject: [PHP] Mail()
> How can force my From: instead of the nobody
servername ?
>
attached mail follows:
I have the arrows my code is :
$headers .= "Return-Path: <errors
abkareno.com>\n";
$headers .= "Errors-To: <errors
abkareno.com>\n";
$headers .= "X-Sender: Abkareno <webmaster
abkareno.com>\n";
$headers .= "From: \"".$fname." ".$lname."\" <".$emailfrom.">\n";
$headers .= "Reply-To: ".$fname." ".$lname." <".$emailfrom.">\n";
$headers .= "Content-Type: text/html; charset=iso-8859-1\n";
$headers .= "X-Mailer: Abkareno\n";
$headers .= "X-Authenticated-IP: [".$REMOTE_ADDR."]\n";
if ($prom == 1) {
$headers .= "X-Priority: 2\n";
$headers .= "Importance: High\n\n";
mail("$emailto_owner"."<".$emailto.">","$subject","$message","$headers");
and still I get the email from NO BODY <nobody
servername.com>
-----Original Message-----
From: ReDucTor [mailto:sjdtmv
tpg.com.au]
Sent: Monday, August 13, 2001 9:25 AM
To: Mahmoud Kassem; php-general
lists.php.net
Subject: Re: [PHP] Mail()
>From : Your Name <user
domain.com>
make sure you have the arrow things around it...
thats in your headers...
----- Original Message -----
From: "Mahmoud Kassem" <mahmoud
abkareno.com>
To: <php-general
lists.php.net>
Sent: Monday, August 13, 2001 4:20 PM
Subject: [PHP] Mail()
> How can force my From: instead of the nobody
servername ?
>
attached mail follows:
THe same .. did not make a difference ..
for php.ini settings : I am on a virtual hosting .. so I do not have access to the php.ini file
-----Original Message-----
From: karthik [mailto:karthik
ccipl.com]
Sent: Friday, July 13, 2001 9:43 AM
To: Mahmoud Kassem
Subject: Re: [PHP] Mail()
Hi
Try
mail("$emailto_owner"."<".$emailto.">",$subject,$message,$headers);
It worked for me when i had a similar problem. And do check the settings in php.ini for mails.
Karthik.
----- Original Message -----
From: "Mahmoud Kassem" <mahmoud
abkareno.com>
To: "ReDucTor" <sjdtmv
tpg.com.au>
Cc: <php-general
lists.php.net>
Sent: Monday, August 13, 2001 12:04 PM
Subject: RE: [PHP] Mail()
> I have the arrows
> my code is :
>
> $headers .= "Return-Path: <errors
abkareno.com>\n";
> $headers .= "Errors-To: <errors
abkareno.com>\n";
> $headers .= "X-Sender: Abkareno <webmaster
abkareno.com>\n";
> $headers .= "From: \"".$fname." ".$lname."\" <".$emailfrom.">\n";
> $headers .= "Reply-To: ".$fname." ".$lname." <".$emailfrom.">\n";
> $headers .= "Content-Type: text/html; charset=iso-8859-1\n";
> $headers .= "X-Mailer: Abkareno\n";
> $headers .= "X-Authenticated-IP: [".$REMOTE_ADDR."]\n";
> if ($prom == 1) {
> $headers .= "X-Priority: 2\n";
> $headers .= "Importance: High\n\n";
>
> mail("$emailto_owner"."<".$emailto.">","$subject","$message","$headers");
>
>
> and still I get the email from NO BODY <nobody
servername.com>
> -----Original Message-----
> From: ReDucTor [mailto:sjdtmv
tpg.com.au]
> Sent: Monday, August 13, 2001 9:25 AM
> To: Mahmoud Kassem; php-general
lists.php.net
> Subject: Re: [PHP] Mail()
>
>
> >From : Your Name <user
domain.com>
>
> make sure you have the arrow things around it...
>
> thats in your headers...
> ----- Original Message -----
> From: "Mahmoud Kassem" <mahmoud
abkareno.com>
> To: <php-general
lists.php.net>
> Sent: Monday, August 13, 2001 4:20 PM
> Subject: [PHP] Mail()
>
>
> > How can force my From: instead of the nobody
servername ?
> >
>
>
>
> --
> 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:
Try using .htaccess or ini_set() - perhaps this will help you when on shared server.
regards, Maxim Maletsky
-----Original Message-----
From: Mahmoud Kassem [mailto:mahmoud
abkareno.com]
Sent: Monday, August 13, 2001 4:12 PM
To: karthik
Cc: php-general
lists.php.net
Subject: RE: [PHP] Mail()
THe same .. did not make a difference ..
for php.ini settings : I am on a virtual hosting .. so I do not have access to the php.ini file
-----Original Message-----
From: karthik [mailto:karthik
ccipl.com]
Sent: Friday, July 13, 2001 9:43 AM
To: Mahmoud Kassem
Subject: Re: [PHP] Mail()
Hi
Try
mail("$emailto_owner"."<".$emailto.">",$subject,$message,$headers);
It worked for me when i had a similar problem. And do check the settings in php.ini for mails.
Karthik.
----- Original Message -----
From: "Mahmoud Kassem" <mahmoud
abkareno.com>
To: "ReDucTor" <sjdtmv
tpg.com.au>
Cc: <php-general
lists.php.net>
Sent: Monday, August 13, 2001 12:04 PM
Subject: RE: [PHP] Mail()
> I have the arrows
> my code is :
>
> $headers .= "Return-Path: <errors
abkareno.com>\n";
> $headers .= "Errors-To: <errors
abkareno.com>\n";
> $headers .= "X-Sender: Abkareno <webmaster
abkareno.com>\n";
> $headers .= "From: \"".$fname." ".$lname."\" <".$emailfrom.">\n";
> $headers .= "Reply-To: ".$fname." ".$lname." <".$emailfrom.">\n";
> $headers .= "Content-Type: text/html; charset=iso-8859-1\n";
> $headers .= "X-Mailer: Abkareno\n";
> $headers .= "X-Authenticated-IP: [".$REMOTE_ADDR."]\n";
> if ($prom == 1) {
> $headers .= "X-Priority: 2\n";
> $headers .= "Importance: High\n\n";
>
> mail("$emailto_owner"."<".$emailto.">","$subject","$message","$headers");
>
>
> and still I get the email from NO BODY <nobody
servername.com>
> -----Original Message-----
> From: ReDucTor [mailto:sjdtmv
tpg.com.au]
> Sent: Monday, August 13, 2001 9:25 AM
> To: Mahmoud Kassem; php-general
lists.php.net
> Subject: Re: [PHP] Mail()
>
>
> >From : Your Name <user
domain.com>
>
> make sure you have the arrow things around it...
>
> thats in your headers...
> ----- Original Message -----
> From: "Mahmoud Kassem" <mahmoud
abkareno.com>
> To: <php-general
lists.php.net>
> Sent: Monday, August 13, 2001 4:20 PM
> Subject: [PHP] Mail()
>
>
> > How can force my From: instead of the nobody
servername ?
> >
>
>
>
> --
> 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-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:
Good work Kyle!
"Kyle Smith" <dbzno1fan
hotmail.com> wrote in message
news:OE35BHZXFZ0stgr3SU00000a791
hotmail.com...
My first WORKING SCRIPT!!!
http://www.stupeedstudios.f2s.com/index.php
-lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!
ICQ: 115852509
MSN: dbzno1fan
hotmail.com
AIM: legokiller666
attached mail follows:
as cold fusion (custom tags), can i made some component to reuse in all my script ?
is a function visible every where in PHP ?
can i developp a script with a name, and call this script by an include function and passing parameters ?
attached mail follows:
> as cold fusion (custom tags), can i made some component to reuse in all my > script ?
<?custom_tag()?>
> is a function visible every where in PHP ?
Yes
> can i developp a script with a name, and call this script by an include > function and passing parameters ?
You don't need to pass parameters since included files share the same symbol table as the file they were included from. You simply define you variable, then do the include and inside the include file you can access the variable.
eg.
$a = 123; include 'something.php';
Inside something.php you can then access $a
-Rasmus
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
attached mail follows:
On Fri, Aug 10, 2001 at 01:29:26PM -0400, Kyle Mathews wrote: > Hello: > > I'm looking for a good way to pull information from a static HTML file for > dumping into a database. > I need to pull the information from a META tag, and from within two comments > in the HTML file. > I know this can be done with regular expressions, but I'm not really sure > where to start or how to do it. > > <META name="CATEGORY" CONTENT="Test Content"> > > I need to pull the CONTENT information from this META tag. > > <!-- STORY START --> > > Story contents > > <!-- STORY END --> > > Then pull the information from between these two comments. > > Any help, and/or example code would help a lot.
This is for an exact match of your example above: preg_match ("/<META[^>]+CONTENT=\"([^\"]+)\"/", $string, $matches)
If you don't know if it's in upper and/or lower case: preg_match ("/<meta[^>]+content=\"([^\"]+)\"/i", $string, $matches)
--* 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:
On Fri, Aug 10, 2001 at 03:24:07PM -0700, Evan Nemerson wrote: > Try messing with the query string, and emulate a GET request. For instance > > $uri = "http://www.somewhere.com/secure.php?username=bob&password=linuxrocks"; > $theFile = implode("\n",file($uri)); > echo $theFile;
Using/emulating GET for security isn't realy a very smart thing to do. Everyone can just use the URL as you show it. Using POST isn't completely waterproof either, but at least you don't just give a way your security information.
--* 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 folks.
Can someone tell me what ISAPI is?
I've requested how I could run PHP faster, if 20 USER's access my files at the same time.
In my case, PHP run's the php.exe (ca. 5 MB) every time seperatly, and this eats my win-resources!!!!!
Someone guides me to use it as an ISAPI module.... but WHAT is that? and HOW can I do that under my win-operation system.
Thank's for any help!
Tribun (Patrick)
--- mp3o.net
attached mail follows:
On Monday 13 August 2001 08:46, Tribun wrote: > Hi folks. > > Can someone tell me what ISAPI is?
It's microsoft's API for running software in IIS.
> I've requested how I could run PHP faster, if 20 USER's access my files at > the same time.
Using ISAPI means that php stays alive while the server is alive, so there is no overhead in starting and closing down php.exe on each request. There is a perfomance benefit, although once the script is actually going the speed is the same. i.e. the speed benefit is a fixed amount of time per script. This means you'll notice the speedup much more on shorter scripts.
Now the bad news. The PHP ISAPI module is not very stable. For me, it won't work for more than a couple of requests without falling over. Others report more success.
If you want the speed benefit of a server API version, plus stability, change from IIS to Apache and run the Apache module version of PHP.
Cheers
-- Phil Driscoll
attached mail follows:
Hi all,
I tried to find an answer to this but nothing seemed to work.
I need to build php 4.0.6 with imap support. I'm running redhat 7.1 and have build and installed the imap-2000-9 rpm's (including devel), php will build correctly but complains about an undefined symbol mxdriver.
Has the library changed ? Is the lib it is looking for in the wrong spot ?
Have a linked it wrong ??
Jason
attached mail follows:
Hi, I`m using function posix_getpwnam. Its works correctly. But The result for param passwd is only "x". I know why is it. Because i have save unix users passwords in shadow file,not in passwd file, there is only "x". Is there some function,which param is encrypted(MD5) password in PHP?
I need: User puts password,and I will compare these password with password in shadow?
Thank you very much
Tomas
attached mail follows:
Hello Tomá¹,
Monday, August 13, 2001, 10:23:16 AM, you wrote:
TK> Hi, TK> I`m using function posix_getpwnam. Its works correctly. But The result for TK> param passwd is only "x". I know why is it. Because i have save unix users TK> passwords in shadow file,not in passwd file, there is only "x". TK> Is there some function,which param is encrypted(MD5) password in PHP?
TK> I need: User puts password,and I will compare these password with password TK> in shadow?
TK> Thank you very much
TK> Tomas
You can use function md5() and than you can compare users password in passwd file with password submited to form.
I hope it helps
-- Best regards, Daniel mailto:danielrezny.sk
attached mail follows:
Hmm well I has this problem on a FreeBSD box and as soon as I moved it to a RedHat7 box it worked.
Jon Farmer Systems Programmer Entanet International Ltd www.enta.net Tel 01952 428969 Mob 07968 524175
-----Original Message-----
From: Richard Lynch [mailto:ceo
l-i-e.com]
Sent: 12 August 2001 22:41
To: php-general
lists.php.net
Subject: [PHP] Re: Socket problem
Anybody else using 10000 on that machine yet?
netstat -a
-- 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: Jon Farmer <jonfarmer
enta.net> Newsgroups: php.general To: PHP General Mailing List <php-general
lists.php.net> Sent: Friday, August 10, 2001 10:58 AM Subject: Socket problem
> Hi, > > I playing with the socket examples off php.net > > When I try the talkback example I get the following error > > bind() failed: reason: Can't assign requested address > > I am setting $address to the ip of the machine and using port 10000 > > Any ideas? > > Regards > > Jon > > > Jon Farmer > Systems Programmer > Entanet International Ltd www.enta.net > Tel 01952 428969 > Mob 07968 524175
-- 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! Renze, Thanks a lot for u'r help. I am in vacation up to now. Now i am trying with u'r solution. I am getting the following error. I am sending the file also.
Warning: Cannot send session cache limiter - headers already sent in c:\www\authentication.php on line 34
File:authentication.php <?php header ("Cache-Control: no-cache, must-revalidate"); header ("Pragma: no-cache");
error_log ("emp_id: $emp_id", 0); error_log ("Lastname: $emp_pass", 0);
// 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');
$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; }
?>
Thanks and regards
-Balaji
----- Original Message -----
From: Renze Munnik
To: Balaji Ankem
Cc: php-general
lists.php.net
Sent: Friday, August 10, 2001 5:41 PM
Subject: Re: [PHP] plz check the warning message
On Fri, Aug 10, 2001 at 04:42:48PM +0530, Balaji Ankem wrote: > Is there anyway to restrict the reposting?? Means after pressing > logout button we shouldn't allow the user to go back or reposting > the data again and getting session again.
Okay... I've figured out two 'solutions'. But... I must say: They're not pretty. Actually you can't prevent it. But:
Option 1 -------- You can set a cookie after logging in. The authorization page should check for that cookie. It should not exist in order to login. The login page (where one gives his username/password) should remove that cookie if it exists. This is, though, a _very_ ugly solution and using cookies for security isn't realy the best thing to do. So actually I wouldn't encourage you to use this.
Option 2 -------- Another solution is to redirect to a different page. I created the following example:
=====[ PHP code ]===== // File: login.php <HTML> <HEAD> <TITLE>Login Test</TITLE> </HEAD> <BODY> <FORM method="post" action="submit-login.php"> <INPUT type="text" name="firstname"> <INPUT type="text" name="lastname"> <BR> <INPUT type="submit"> </FORM> </BODY> </HTML>
// File: submit-login.php <? /* Here you should do things with the provided data... For the example I only write it to the log. */ error_log ("Firstname: $firstname", 0); error_log ("Lastname: $lastname", 0);
/* Here's where you redirect */ header ("Location: logged-in.php"); ?>
// File: logged-in.php /* Whatever you want! */
=====[ end of code ]=====
After pushing the submit-button, the data will be submitted to submit-login.php. There you handle the login-procedure. After that, you automatically redirect to a different page (logged-in.php in my example). That's you you show eg 'You are logged in now'. If you reload that page, nothing realy happens. If you push 'Back', you end up on login.php again.
Uptil now this is the best option I've come up with.
Hope it works for what you had in mind.
--
* 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:
On Mon, Aug 13, 2001 at 02:01:59PM +0530, Balaji Ankem wrote: > Hi! Renze, > Thanks a lot for u'r help. I am in vacation up to now. > Now i am trying with u'r solution. I am getting the following error. > I am sending the file also. > > Warning: Cannot send session cache limiter - headers already sent in c:\www\authentication.php on line 34 > > > File:authentication.php > <?php > header ("Cache-Control: no-cache, must-revalidate"); > header ("Pragma: no-cache"); > > error_log ("emp_id: $emp_id", 0); > error_log ("Lastname: $emp_pass", 0); > > // 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'); > > $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; > } > > ?>
Well... You can't sent any headers after some output has already been sent. I didn't take a very good look at your code, but looking at the warning you get and the position of session_start() in your code, I'd say you have to move the session_start() up. You can best start your code with session_start() and then the rest of your script.
--* 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:
I'm quite happy with SiteTurn. You can check them out through www.siteturn.com
Pere
attached mail follows:
Hi there there is something missing in the documentation..... in this case is about mysql here is the source that i paste from the website -------------------------------------- $link = mysql_connect("mysql_host", "mysql_login", "mysql_password") or die ("Could not connect"); print ("Connected successfully"); mysql_select_db ("my_database") or die ("Could not select database"); $query = "SELECT * FROM my_table"; $result = mysql_query ($query) or die ("Query failed"); ---------------------------------------
as i see the $link that do mysql_connect had been state but never been call in the progress such as mysql_select_db("my_database") [ sould be mysql_select_db("my_database",$link) ] so i assume that there wouldn't be any connection to mysql.....
sorry if i'm wrong but for the newbies it's can be a miss guide
Thanks in Advance Yamin Prabudy
attached mail follows:
Date: Mon, 13 Aug 2001 01:51:26 -0700 (PDT) From: Rasmus Lerdorf <rasmus
php.net>
To: Yamin Prabudy <yamin
pro.net.id>
cc: <php-general
lists.php.net>
Message-ID: <Pine.LNX.4.33.0108130150570.1239-100000
rasmus.php.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: Re: [PHP] something about the documentation
The $link argument is optional. If you don't specify one it will just use the last one created.
-Rasmus
On Mon, 13 Aug 2001, Yamin Prabudy wrote:
> Hi there there is something missing in the documentation..... > in this case is about mysql > here is the source that i paste from the website > -------------------------------------- > $link = mysql_connect("mysql_host", "mysql_login", "mysql_password") > or die ("Could not connect"); > print ("Connected successfully"); > mysql_select_db ("my_database") > or die ("Could not select database"); > > $query = "SELECT * FROM my_table"; > $result = mysql_query ($query) > or die ("Query failed"); > --------------------------------------- > > as i see the $link that do mysql_connect had been state but never been call in the progress such as mysql_select_db("my_database") [ sould be mysql_select_db("my_database",$link) ] > so i assume that there wouldn't be any connection to mysql..... > > sorry if i'm wrong > but for the newbies it's can be a miss guide > > Thanks in Advance > Yamin Prabudy > >
attached mail follows:
Hi - All db users read this !!
I know it download it twice because in Netscape it take half of the time and also I see it start in the left bottom bar.
I read that IE first read the headers fully ( including the file ) and then ask it again for opening. While Netscape read the file only once.
Any ideas ? If I download from db twice while using IE means that all php servers that serve file from phtml cause the same problem, and that's a Major Problem :(
Every one in the list that use db to store files should try to download the files with IE and Mozilla while measuring the time its take !!!
Ill probably open a bug if no one will have idea how to disable double reading of the file or how to guess when IE read the headers and when its reading the file itself.
> How do you know it downloads them twice? What are you seeing?
>
> Also, if you want it downloaded, Content-type should be
> application/octet-stream. Perhaps that's causing the browser snag it and
> try to display it on top of the download... Sounds like how MS would code
> it.
>
> > Hi All
> >
> > I store files on MYSQL server but when I try to pull them out ( show
them
> on
> > screen or download ) with IE it download them twice before showing them
up
> > :(
> >
> > I played with the headers (adding, removing) with no success.
> > by the way in Netscape its work fine.
> >
> > here is the last code tried:
> >
> > <?
> > $query = "select * from files where issue_id='$id'";
> > $result = mysql_query ($query)
> > or die ("Invalid query");
> >
> > $data =
MYSQL_RESULT($result,0, "file_data");
> > $type =
MYSQL_RESULT($result,0, "file_type");
> > $file_name =
MYSQL_RESULT($result,0, "file_name");
> > $file_size =
MYSQL_RESULT($result,0, "file_size");
> >
> > // # To force save file
> > file://header("Content-disposition: attachment;
> filename=\"$file_name\"");
> >
> > Header("Content-type: $type");
> > header("Content-Length: $file_size");
> > header("Content-Disposition: inline; filename=$file_name");
> >
> > echo $data;
> > ?>
> >
> > --------------------------
> > Canaan Surfing Ltd.
> > Internet Service Providers
> > Ben-Nes Michael - Manager
> > Tel: 972-4-6991122
> > http://sites.canaan.co.il
> > --------------------------
attached mail follows:
why don't you do some testing first. write these two lines:
<?
mail(
'your.own
email.com',
'visiting myself',
"Sucked off $PHP_SELF on $HTTP_USER_AGENT
);
sleep(2); // just for the sake of it
?>
go to the page with several different browsers and catch your emails, see how many times it loads it.
Cheers, Maxim Maletsky
www.PHPBeginner.com
-----Original Message-----
From: Ben-Nes Michael [mailto:miki
canaan.co.il]
Sent: Monday, August 13, 2001 5:56 PM
To: Richard Lynch; php-general
lists.php.net
Subject: [PHP] IE Download twice from DB - MAJOR disaster to db users
Importance: High
Hi - All db users read this !!
I know it download it twice because in Netscape it take half of the time and also I see it start in the left bottom bar.
I read that IE first read the headers fully ( including the file ) and then ask it again for opening. While Netscape read the file only once.
Any ideas ? If I download from db twice while using IE means that all php servers that serve file from phtml cause the same problem, and that's a Major Problem :(
Every one in the list that use db to store files should try to download the files with IE and Mozilla while measuring the time its take !!!
Ill probably open a bug if no one will have idea how to disable double reading of the file or how to guess when IE read the headers and when its reading the file itself.
> How do you know it downloads them twice? What are you seeing?
>
> Also, if you want it downloaded, Content-type should be
> application/octet-stream. Perhaps that's causing the browser snag it and
> try to display it on top of the download... Sounds like how MS would code
> it.
>
> > Hi All
> >
> > I store files on MYSQL server but when I try to pull them out ( show
them
> on
> > screen or download ) with IE it download them twice before showing them
up
> > :(
> >
> > I played with the headers (adding, removing) with no success.
> > by the way in Netscape its work fine.
> >
> > here is the last code tried:
> >
> > <?
> > $query = "select * from files where issue_id='$id'";
> > $result = mysql_query ($query)
> > or die ("Invalid query");
> >
> > $data =
MYSQL_RESULT($result,0, "file_data");
> > $type =
MYSQL_RESULT($result,0, "file_type");
> > $file_name =
MYSQL_RESULT($result,0, "file_name");
> > $file_size =
MYSQL_RESULT($result,0, "file_size");
> >
> > // # To force save file
> > file://header("Content-disposition: attachment;
> filename=\"$file_name\"");
> >
> > Header("Content-type: $type");
> > header("Content-Length: $file_size");
> > header("Content-Disposition: inline; filename=$file_name");
> >
> > echo $data;
> > ?>
> >
> > --------------------------
> > Canaan Surfing Ltd.
> > Internet Service Providers
> > Ben-Nes Michael - Manager
> > Tel: 972-4-6991122
> > http://sites.canaan.co.il
> > --------------------------
-- 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:
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 !
----- Original Message -----
From: "Maxim Maletsky" <maxim
japaninc.com>
To: "'Ben-Nes Michael'" <miki
canaan.co.il>; "Richard Lynch"
<ceo
l-i-e.com>; <php-general
lists.php.net>
Sent: Monday, August 13, 2001 12:12 PM
Subject: RE: [PHP] IE Download twice from DB - MAJOR disaster to db users
>
> why don't you do some testing first.
> write these two lines:
>
> <?
>
> mail(
> 'your.own
email.com',
> 'visiting myself',
> "Sucked off $PHP_SELF on $HTTP_USER_AGENT
> );
>
> sleep(2); // just for the sake of it
>
> ?>
>
> go to the page with several different browsers and catch your emails, see
> how many times it loads it.
>
>
> Cheers,
> Maxim Maletsky
>
> www.PHPBeginner.com
>
>
>
>
> -----Original Message-----
> From: Ben-Nes Michael [mailto:miki
canaan.co.il]
> Sent: Monday, August 13, 2001 5:56 PM
> To: Richard Lynch; php-general
lists.php.net
> Subject: [PHP] IE Download twice from DB - MAJOR disaster to db users
> Importance: High
>
>
> Hi - All db users read this !!
>
> I know it download it twice because in Netscape it take half of the time
and
> also I see it start in the left bottom bar.
>
> I read that IE first read the headers fully ( including the file ) and
then
> ask it again for opening.
> While Netscape read the file only once.
>
> Any ideas ?
> If I download from db twice while using IE means that all php servers that
> serve file from phtml cause the same problem, and that's a Major Problem
:(
>
> Every one in the list that use db to store files should try to download
the
> files with IE and Mozilla while measuring the time its take !!!
>
> Ill probably open a bug if no one will have idea how to disable double
> reading of the file or how to guess when IE read the headers and when its
> reading the file itself.
>
> > How do you know it downloads them twice? What are you seeing?
> >
> > Also, if you want it downloaded, Content-type should be
> > application/octet-stream. Perhaps that's causing the browser snag it
and
> > try to display it on top of the download... Sounds like how MS would
code
> > it.
> >
> > > Hi All
> > >
> > > I store files on MYSQL server but when I try to pull them out ( show
> them
> > on
> > > screen or download ) with IE it download them twice before showing
them
> up
> > > :(
> > >
> > > I played with the headers (adding, removing) with no success.
> > > by the way in Netscape its work fine.
> > >
> > > here is the last code tried:
> > >
> > > <?
> > > $query = "select * from files where issue_id='$id'";
> > > $result = mysql_query ($query)
> > > or die ("Invalid query");
> > >
> > > $data =
MYSQL_RESULT($result,0, "file_data");
> > > $type =
MYSQL_RESULT($result,0, "file_type");
> > > $file_name =
MYSQL_RESULT($result,0, "file_name");
> > > $file_size =
MYSQL_RESULT($result,0, "file_size");
> > >
> > > // # To force save file
> > > file://header("Content-disposition: attachment;
> > filename=\"$file_name\"");
> > >
> > > Header("Content-type: $type");
> > > header("Content-Length: $file_size");
> > > header("Content-Disposition: inline; filename=$file_name");
> > >
> > > echo $data;
> > > ?>
> > >
> > > --------------------------
> > > Canaan Surfing Ltd.
> > > Internet Service Providers
> > > Ben-Nes Michael - Manager
> > > Tel: 972-4-6991122
> > > http://sites.canaan.co.il
> > > --------------------------
>
>
>
> --
> 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 have a server running SuSE Linux Pro V7.0 (with security patches) , Apache 1.3.19 , and PHP 3.0.17-dev. The database engine I am using is MySQL 3.22.32 (not relevant for this problem though).
I am trying to get file uploads working to the server, I currently have a page which is written in PHP to dynamically create a form complete with file input field. Form is set to "multipart/form-data" encoding type and is displayed OK in the browser. The form has a valid php file included in the action part of the form tag. I have set the upload_tmp_dir variable in the php3.ini file to a valid pathname with the relevant permissions set.
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.
Has anyone else had this problem? Is there something I need to switch on
in either apache or PHP to support file upload?
I have tried looking at the file upload tutorial in the PHP manual and it is the same as I am trying to implement, seems like my system isn't happy somewhere...!
Any help would be appreciated.
Thanks
Martin
attached mail follows:
Hello everyone,
Has anyone used php to implement SMS (short message service) on a site? I found something on simplewire.com but I was wondering what other options are available? I couldn't find anything in the archives or on php.net so I appreciate any help or leads in this area. --ahmad
attached mail follows:
oh dear.
Steve
"Zerosumzero
Yahoo.Com" <zerosumzero
yahoo.com> wrote in message
news:B7A404C0.64C6%zerosumzero
yahoo.com...
> Okay I got it working!
>
> http://www.futurebird.com/wordstream/index.php3
>
> go on give it a try!
>
> Susan
>
>
> --
> susan
futurebird.com
> http://futurebird.diaryland.com
>
>
attached mail follows:
Please help me. How can I run mysql daemon on RedHat Linux. I install db with script mysql_install_db.
roman
attached mail follows:
if you mean how do you get mysqld to startup automatically then you need to call
mysql.server start
at bootup
Regards
Jon
Jon Farmer Systems Programmer Entanet International Ltd www.enta.net Tel 01952 428969 Mob 07968 524175
-----Original Message-----
From: Roman [mailto:rduriancik
indprop.gov.sk]
Sent: 13 August 2001 11:55
To: Php-General
Subject: [PHP] MySQL
Please help me. How can I run mysql daemon on RedHat Linux. I install db with script mysql_install_db.
roman
-- 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! friend, I want to start session if authentication is succesfull means if he is a valid user. Then what i have to do Renze??
Thanks in advance.
With warm regards
-Balaji
----- Original Message -----
From: Renze Munnik
To: Balaji Ankem
Cc: php-general
lists.php.net
Sent: Monday, August 13, 2001 2:04 PM
Subject: Re: [PHP] plz check the warning message
On Mon, Aug 13, 2001 at 02:01:59PM +0530, Balaji Ankem wrote: > Hi! Renze, > Thanks a lot for u'r help. I am in vacation up to now. > Now i am trying with u'r solution. I am getting the following error. > I am sending the file also. > > Warning: Cannot send session cache limiter - headers already sent in c:\www\authentication.php on line 34 > > > File:authentication.php > <?php > header ("Cache-Control: no-cache, must-revalidate"); > header ("Pragma: no-cache"); > > error_log ("emp_id: $emp_id", 0); > error_log ("Lastname: $emp_pass", 0); > > // 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'); > > $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; > } > > ?>
Well... You can't sent any headers after some output has already been sent. I didn't take a very good look at your code, but looking at the warning you get and the position of session_start() in your code, I'd say you have to move the session_start() up. You can best start your code with session_start() and then the rest of your script.
--
* 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:
On Mon, Aug 13, 2001 at 04:33:49PM +0530, Balaji Ankem wrote: > Hi! friend, > I want to start session if authentication is succesfull means if he is a valid user. > Then what i have to do Renze?? > > Thanks in advance. > > With warm regards > -Balaji
I think (haven't got time to test it) you should move the two header()-lines down. Just put them right before you want to sent some output. Or, ofcourse, right behind the session_start(). Think that should do the job. You just have to keep in mind, that no output should be sent before you try to send headers and that session_start() should be as close as possible to the start of your script.
--* 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:
lines in the acceso.php file:
27 session_name(primera); 28 session_start(); 29 session_register("sesionvar"); 30 $HTTP_SESSION_VARS["sesionvar"] = "fulanito";
what I get in the browser:
Warning: Cannot send session cookie - headers already sent by (output started at /public_html/php/acceso.php:8) in /public_html/php/acceso.php on line 28
Warning: Cannot send session cache limiter - headers already sent (output started at /public_html/php/acceso.php:8) in /public_html/php/acceso.php on line 28
some help please thanks in advance
attached mail follows:
Did you make sure everything below is BEFORE the html tag?
Also you can just set the variable $sesionvar like this:
$sesionvar = "fulanito"; instead of $HTTP_SESSION_VARS["sesionvar"] = "fulanito";
> lines in the acceso.php file:
>
> 27 session_name(primera);
> 28 session_start();
> 29 session_register("sesionvar");
> 30 $HTTP_SESSION_VARS["sesionvar"] = "fulanito";
>
> what I get in the browser:
>
> Warning: Cannot send session cookie - headers already sent by (output
> started at /public_html/php/acceso.php:8) in /public_html/php/acceso.php on
> line 28
>
> Warning: Cannot send session cache limiter - headers already sent (output
> started at /public_html/php/acceso.php:8) in /public_html/php/acceso.php on
> line 28
>
> some help please
> thanks in advance
>
>
> --
> 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,
> <input type="checkbox" name="sif_<? echo $wponud[6]; ?>" value="1">
I'd do it like this: <inpuut type="checkbox" name="magazines[]" Value="<?php echo $wpound[6]; >?"> Now you have an array containing all the checked magazines. To get and write them into the DB you could use implode() in combination with a field of the type SET or do a while (list($key,$value)=each($magazines)) { Do some query stuff with your primary key in $value; }
cheers Johannes
attached mail follows:
Ok. Richard was right, the php code was placed in the middle of the html. I place it at the beguining oh the file (before html) and it works. Thanks
Thanks also Daniel for your advice: "first use session_start() and than session_name"
> Did you make sure everything below is BEFORE the html tag? > Also you can just set the variable $sesionvar like this: > $sesionvar = "fulanito"; > instead of > $HTTP_SESSION_VARS["sesionvar"] = "fulanito";
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]