|
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: Fri Aug 10 2001 - 03:26:17 CDT
php-general Digest 10 Aug 2001 08:26:17 -0000 Issue 807
Topics (messages 62043 through 62132):
½ß¼î º£³Ê±¤°í Á¦¾ÈÀÔ´Ï´Ù.
62043 by: ÆÄÆ®³Ê
Re: PHP in corporate settings?
62044 by: Sheridan Saint-Michel
62098 by: Evan Nemerson
62099 by: Maxim Maletsky
array issues
62045 by: Jerry Lake
62088 by: Richard Baskett
Problems with exec
62046 by: Arne
Printing
62047 by: Fernando Avila
62122 by: elias
62124 by: Renze Munnik
Any ideas if a form needs a signature?
62048 by: Chris
Re: newest PHP compile won't see pg_connect()
62049 by: Richard Lynch
Re: field sizes
62050 by: Richard Lynch
Re: web hosting
62051 by: Richard Lynch
Re: is there a performance hit using flush() ?
62052 by: Richard Lynch
Re: pursing a text file
62053 by: Richard Lynch
Re: Problems...
62054 by: Richard Lynch
Re: spell checker
62055 by: Richard Lynch
Re: Cannot Set ExpireTime in a cookie
62056 by: Richard Lynch
Re: charset win1251
62057 by: Richard Lynch
62128 by: Maxim Derkachev
Re: Form call a function on submit
62058 by: Richard Lynch
Re: Premature end of script headers:
62059 by: Richard Lynch
Re: Strange session problems. Please help.
62060 by: Richard Lynch
Re: Form POST problem with Netscape 6
62061 by: Richard Lynch
62090 by: Peter S. Fekkes
Re: Paypal & instant payment notification
62062 by: Richard Lynch
Re: rename problem...
62063 by: Richard Lynch
Re: Return Adress
62064 by: Richard Lynch
Re: how 2 read an non-existing file?! (I need help)
62065 by: Richard Lynch
Re: register_shutdown_function and a MySQL query keeping connection with browser.
62066 by: Richard Lynch
Re: help, weird include problem with functions
62067 by: Richard Lynch
Re: correct date (cont.)
62068 by: Richard Lynch
Re: Upload of files gives Mimetype on header
62069 by: Richard Lynch
Re: PHP_SELF and mod_rewrite
62070 by: Richard Lynch
Re: 3rd include
62071 by: Richard Lynch
Re: Rewriting a textfile for import into a db..
62072 by: Richard Lynch
Re: PHP Configuration issues in IIS 5.0 in win2k
62073 by: Richard Lynch
Re: IE Download twice from DB
62074 by: Richard Lynch
Re: Header error!
62075 by: Richard Lynch
Re: Kill all line brk's and white space on output?
62076 by: Richard Lynch
Re: IP security check
62077 by: Richard Lynch
Re: RANDOM
62078 by: Richard Lynch
Re: Sending information to a script on another host....
62079 by: Richard Lynch
Re: exec a perl script
62080 by: Richard Lynch
Re: Determining browser encryption strength
62081 by: Richard Lynch
62127 by: Sean C. McCarthy
Re: Database Stored Procedure Result
62082 by: Richard Lynch
Re: htaccess & php
62083 by: Richard Lynch
Re: Hi all! How to rite a cmp function for usort()?
62084 by: Richard Lynch
Re: enabling Sessions
62085 by: Richard Lynch
Re: User authentication
62086 by: Richard Lynch
Re: apache processes & memory use
62087 by: Richard Lynch
Re: development to ISP migration headache
62089 by: KLL
Image header problems
62091 by: Hugh Danaher
62093 by: Corin Rathbone
62097 by: Maxim Maletsky
open_basedir and safemode-ish things
62092 by: Chris Cameron
Re: Image header problems--SOLVED!
62094 by: Hugh Danaher
evaluate data taken from db
62095 by: Jason Dulberg
Question about security: writing images to a directory (chmod 777)
62096 by: SED
How to copy files from one directory to another directory through php on linux platform??
62100 by: Balaji Ankem
62101 by: Alexander Wagner
62102 by: Balaji Ankem
Re: Sorting Dates in this format: Jul 21 2001
62103 by: David Robley
62105 by: Maxim Maletsky
62109 by: David Robley
62110 by: Maxim Maletsky
Site to fund PHP + open source expansion
62104 by: Evan Nemerson
readfile("ftp://....");
62106 by: David Minor
Re: Today's joke INDO-PAK WAR
62107 by: Shashwat Nagpal
HELP...session
62108 by: Yamin Prabudy
62117 by: karthik
Why can't this code display my result?
62111 by: Ardani Sarjito
62113 by: David Robley
62114 by: John Meyer
Difference between win98 and win2000
62112 by: ...
62121 by: elias
Can't display my result yet....
62115 by: Ardani Sarjito
62123 by: David Robley
want to download as much porn as you want?
62116 by: phugs.php-homepage.de ()
Help required on creating session
62118 by: Balaji Ankem
I found the problem!!!!
62119 by: Ardani Sarjito
Re: Emulating a POST
62120 by: elias
Re: MySQL connection
62125 by: B. van Ouwerkerk
Re: CGI error
62126 by: Phil Driscoll
Problem generating pdf with pdflib. Please help
62129 by: Dezider Góra
problem with session start
62130 by: Balaji Ankem
62131 by: Andras Balogh
PHP.exe EAT's my win resources... (!)
62132 by: Tribun
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:
mail ½ß¼îÀÇ º£³Ê ±¤°í ¾î¶°½ÅÁö¿ä?
¾È³çÇϼ¼¿ä. ½ß¼î Á¦ÈÞÆÄÆ®³Ê ´ã´çÀÚÀÔ´Ï´Ù.
ǫǫ Âî´Â ´õÀ§¿¡µµ ¾ðÁ¦³ª ½ß¼îÀÇ È«º¸¸¦ À§ÇØ ¾Ö½áÁּż °¨»çµå¸³´Ï´Ù.
8¿ùºÎÅÍ ½ß¼îÀÇ ÆÄÆ®³Ê ¼öÀͱÝÀÌ ÀλóµÇ¾î ÆÄÆ®³Ê´Ô²² µå¸®´Â ±Ý¾×ÀÌ ´õ ¸¹¾ÆÁ³½À´Ï´Ù.
Áö±Ý ¹Ù·Î ½ß¼îÀÇ »çÀÌÆ®·Î ¿À½Ã¸é ¼öÀÍ±Ý ÃÖÇÏ 30%¸¦ µå¸®°í ÀÖ½À´Ï´Ù. °Å±â¿¡ ¸ÅÃâ ´ëºñ Àμ¾Æ¼ºê±îÁö ÁøÇàÁßÀ̶ø´Ï´Ù. ½ß¼î »çÀÌÆ®¿¡¼ ÆÄÆ®³Ê Á¦ÈÞ ¹öưÀ» »¡¸® Ŭ¸¯À» Çϼ¼¿ä.
À̹ø±âȸ¿¡ ÈξÀ ´õ ³ô¾ÆÁø Ä¿¹Ì¼ÇÀ¸·Î ÆÄÆ®³Ê´ÔÀÇ ¼öÀͱÝÀ» ÆÅÆÅ ì±â½Ã±â ¹Ù¶ø´Ï´Ù. ^^
¾Æ·¡ÀÇ Ç¥¸¦ Âü°í Çϼ¼¿ä. ÇöÀç ÆÄÆ®³Ê »çÀÌÆ®´Â ÀÌÀü »çÀÌÆ®¿Í ´Ù¸¨´Ï´Ù. À¯ÀÇÇϼ¼¿ä!!
»çÀÌÁî 468 * 60
Ƽ¼ÅÃ÷¿¡ °ú³á À̹ÌÁö°¡ ±×·ÁÁø ¿ÊÀ» ÀÔÀº ¿©ÀÎÀÌ µîÀåÇÏ¿©
¹Ýº¹µÇ´Â °ú³áÀÇ ¿òÁ÷ÀÓÀ» ³ëÃâ½ÃÄѼ ½Ã¼±À» ÁýÁßÇÏ·Á´Â Àǵµ.
»çÀÌÁî 468 * 60
ÀÚ½ÅÀÇ ÃëÇâ´ë·Î °ñ¶óº¼¼ö ÀÖ´Â ½ß¼î !! '¹Ì¼º³âÀÚÀÇ ¼ÕÀÌ ´êÁö ¾Ê´Â °÷'¿¡ °³ÀçÇØ ÁÖ¼¼¿ä^^;
»çÀÌÁî 468 * 60 'Á¦´ë·Î ÂïÀÚ'¶ó´Â ¸ðÅäÀÇ º£³Ê¿¡ À̹ø ½ß¼îÀÇ À̺¥Æ®¸¦ Ãß°¡ÇÑ ³»¿ë
»çÀÌÆ®¸¦ ¿î¿µÇÏ½Ã¸é¼ ¼öÀÍÀ» ¾òÀ¸½Ã°í ½ÍÀ¸½Ê´Ï±î? ½ß¼î°¡ µµ¿Í µå¸®°Ú½À´Ï´Ù.
ÃÖ´ëÇÑ ÆÄÆ®³Ê·Î µî·ÏÇϽŠȸ¿ø´ÔµéÀ» À§Çؼ ¿½ÉÈ÷ ÇϰڽÀ´Ï´Ù. ½ß¼îÀÇ ³ô¾ÆÁø Ä¿¹Ì¼Ç°ú
½ß¼îÀÇ ºê·£µå¸¦ Çѹø ¹Ð¾î Áֽʽÿä. ¼º½É²¯ ÀÏÇϰڽÀ´Ï´Ù.
ȸ¿ø ÀÎÁ¤±â°£ÀÌ 30ÀÏ·Î µÇ¾ú½À´Ï´Ù. ¡Ú¡Ú ÀÌÀü ÆÄÆ®³Ê »çÀÌÆ®´Â À̰÷¿¡ °¡¼¼¿ä. ¡Ú¡Ú
ÀÌÀü ÆÄÆ®³Ê »çÀÌÆ®´Â º¯µ¿»çÇ×ÀÌ ¾ø½À´Ï´Ù.
ÀÌÁ¦ ȸ¿ø´Ô°ú ½ß¼î´Â °¡À»À» ÁغñÇØ¾ß µË´Ï´Ù. ²À ½ß¼îÀÇ º£³Ê¸¦ ´Þ¾ÆÁÖ¼¼¿ä.^^
Good luck! ÆÄÆ®³Ê °¡ÀÔ ¹®ÀÇ : partner
sshow.co.kr Çã°¡¾øÀÌ ¸ÞÀÏÀ» º¸³»µå·Á Á˼ÛÇÕ´Ï´Ù. ±ÍÇÏÀÇ »çÀÌÆ®¿¡ ÇÊ¿äÇÑ º£³Ê°¡ µÇ¾úÀ¸¸é ¹Ù¶ø´Ï´Ù. Copyright ¨Ï 2000-2001. Ssangshow.co.kr Co.,Ltd. All rights reserved.
attached mail follows:
I am talking about the JDK... or the compiler and the JVM.
I don't think the language itself can be copyrighted as it falls under a
"method of operation" which (in the US at least) is not copyrightable
(Correct me if I am wrong. IANAL)
Since you mentioned Kaffe I visited their homepage www.kaffe.org
Kaffe is an Open Source Java Clone, and while I salute their efforts, they
are not at a level to be competitive with Sun as of yet (Their site
indicates
that PARTS of Kaffe are now compatible with JDK 1.2 Sun has already
released JDK 1.3 and JDK 1.4 Beta)
Basically, at the moment, if you want to use Java Source in your commercial
product you have the option of paying Sun royalties or using OSS
alternatives
which are months or years behind. The fact that you have to pay royalties
to
Sun for any type of project violates the first rule of Open Source (Which
can
be viewed with this link http://www.opensource.org/docs/definition.html
which
Rasmus was kind enough to provide =P ) and means that Java is not Open
Source... which was my original point =)
You may also want to read this story, which was a link in Kaffe's liscensing
FAQ
http://www.zdnet.com/eweek/stories/general/0,11011,1013904,00.html
Sheridan Saint-Michel
Website Administrator
FoxJet, an ITW Company
www.foxjet.com
----- Original Message -----
From: Mark Maggelet <maggelet
mminternet.com>
To: <webmaster
foxjet.com>; <php-general
lists.php.net>
Sent: Thursday, August 09, 2001 2:42 PM
Subject: Re: [PHP] PHP in corporate settings?
> On Thu, 09 Aug 2001 14:30:43 -0500, Sheridan Saint-Michel
> (webmaster
foxjet.com) wrote:
> >Bzzzt...Wrong! But thank you for playing. If you read the FAQ on
> >Sun's "Open Source" website not only do they admit Java is not
> >open source, but they sort of tip toe around whether or not it ever
> >will be.
>
> well, I think it depends on if you're talking about java the
> language, java the jvm, or java the bytecode compiler. which of these
> do you need to be open source. I know of at least one open source jvm
> (kaffe), and I believe IBM may have released an open source compiler
>
> >http://www.sunsource.net/faq.html#Java
> >
> >Sheridan Saint-Michel
> >Website Administrator
> >FoxJet, an ITW Company
> >www.foxjet.com
> >
> >
> ><Snip>
> >> Just one point Java is actually open source, because you can get
> >>the
> >> source code for the JVM. It is not GPL what means that if you want
> >>to
> >> make money with it you have to pay for it (but after all Sun is a
> >> bussiness, and bussiness are for making money).
> ><Snip>
> >> Sean C. McCarthy
> >> SCI, S.L. (www.sci-spain.com)
attached mail follows:
Bill has hit it right on! Programmers all over the world have already
recognized that PHP is a superior language, and open-source is not the root
of all evil (as M$ would have us believe). However, many (most?) execs do not
listen to reason, but rather only to TV and glossy ads. Therefore, I propose
we fight fire with fire!
Lets band together and form a web site not altogether unlike LinuxFund.org.
However, instead of development of new technology, our site could focus on
the spread of PHP, or perhaps open source technology. Get our own credit
card, ask for donations, be those donations money or time.
We could use this money to fund ad-campaigns. Ad-campaigns targeted not at
programmers who already know the merit of PHP (and open-source in general),
but rather the "Big Corporate Executive" who has the power to make or break
PHP.
The ads could go in magazines like Forbes, Fortune, etc. instead of Open
Magazine.
If you are interested in this, either helping make the site, providing
expertise in other areas (such as marketing), or would just be willing to
make a donation, visit a page I just set up:
http://www.coeus-group.com/AdCamp.php . I'll consider this post to be a kind
of market analysis. I sincerly hope that you are as interested- and willing-
as I.
Evan Nemerson
evan
coeus-group.com
attached mail follows:
I think this is a good contribution to the war we are to win.
PHPBeginner.com might be of some help to the project.
Sincerely,
Maxim Maletsky
Founder, Chief Developer
PHPBeginner.com (Where PHP Begins)
maxim
phpbeginner.com
www.phpbeginner.com
-----Original Message-----
From: Evan Nemerson [mailto:evan
coeus-group.com]
Sent: Friday, August 10, 2001 10:04 AM
To: billfarr
ages.com; php-general
lists.php.net
Subject: Re: [PHP] Re: PHP in corporate settings?
Bill has hit it right on! Programmers all over the world have already
recognized that PHP is a superior language, and open-source is not the root
of all evil (as M$ would have us believe). However, many (most?) execs do
not
listen to reason, but rather only to TV and glossy ads. Therefore, I propose
we fight fire with fire!
Lets band together and form a web site not altogether unlike LinuxFund.org.
However, instead of development of new technology, our site could focus on
the spread of PHP, or perhaps open source technology. Get our own credit
card, ask for donations, be those donations money or time.
We could use this money to fund ad-campaigns. Ad-campaigns targeted not at
programmers who already know the merit of PHP (and open-source in general),
but rather the "Big Corporate Executive" who has the power to make or break
PHP.
The ads could go in magazines like Forbes, Fortune, etc. instead of Open
Magazine.
If you are interested in this, either helping make the site, providing
expertise in other areas (such as marketing), or would just be willing to
make a donation, visit a page I just set up:
http://www.coeus-group.com/AdCamp.php . I'll consider this post to be a kind
of market analysis. I sincerly hope that you are as interested- and willing-
as I.
Evan Nemerson
evan
coeus-group.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:
I believe that there is a better way to do what I am trying to do here. I have an online form to enter interviews into a MySQL db
right now it is like this
<input type="text" name="q1" size="100"> <input type="text" name="a1" size="100">
<input type="text" name="q2" size="100"> <input type="text" name="a2" size="100">
etc... each going to their own spot in the table.
with this $query = "insert into interviews(id,interviewed,interviewer,q1,a1,q2,a2,q3,a3,q4,a4,q5,a5,q6,a6,q7 ,a7,q8,a8,q9,a9,q10,a10,interview_date) values('','$interviewed','interviewer','$q1','$a1','$q2','$a2','$q3','$a3',' $q4','$a4','$q5','$a5','$q6','$a6','$q7','$a7','$q8','$a8','$q9','$a9','$q10 ','$a10',NOW())";
I think it would be easier if I could put them into arrays like this <input type="text" name="q[]" size="100">
I'm just not sure how to go about the insert statement then the retrieval and formatting for the web.
any thoughts or advise is appreciated.
Jerry Lake Interface Engineering Technician
attached mail follows:
try
html code <input type="text" name="q[]" size="100"> <input type="text" name="a[]" size="100">
php code $values = "'','$interviewed','$interviewer'," for ($i=0; $i<10; $i++) { $qtemp .= "'".q[$i]."',"; $atemp .= "'".a[$i]."',"; } $fields = "id,interviewed,interviewer,q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,a1,a2,a3,a4,a5,a6 ,a7,a8,a9,a10,interview_date";
$query = "INSERT INTO interviews ($fields) VALUES ($values $qtemp $atemp NOW())";
There is probably a better way, but I didnt have any sleep last night and it's probably showing up in my code :) Of course if there is a variable amount of questions and answers they can submit then you would do it a bit differently. The for statement would have something like $i<count($q) for the second arguement and you could dynamically create the $fields variable.
Rick
> I believe that there is a better way to do what I am trying to
> do here. I have an online form to enter interviews into a MySQL db
>
> right now it is like this
>
> <input type="text" name="q1" size="100">
> <input type="text" name="a1" size="100">
>
> <input type="text" name="q2" size="100">
> <input type="text" name="a2" size="100">
>
> etc... each going to their own spot in the table.
>
> with this
> $query = "insert into
> interviews(id,interviewed,interviewer,q1,a1,q2,a2,q3,a3,q4,a4,q5,a5,q6,a6,q7
> ,a7,q8,a8,q9,a9,q10,a10,interview_date)
> values('','$interviewed','interviewer','$q1','$a1','$q2','$a2','$q3','$a3','
> $q4','$a4','$q5','$a5','$q6','$a6','$q7','$a7','$q8','$a8','$q9','$a9','$q10
> ','$a10',NOW())";
>
>
> I think it would be easier if I could put them into arrays
> like this
> <input type="text" name="q[]" size="100">
>
> I'm just not sure how to go about the insert statement then the retrieval
> and formatting for the web.
>
> any thoughts or advise is appreciated.
>
> Jerry Lake
> Interface Engineering Technician
>
>
> --
> 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,
i have some problems with "exec". i am using win2000, apache and latest php version. always 'unable to fork' . what´s the problem?
thanks for help, arne
attached mail follows:
Hello php-general,
I made a system in php and mysql for a corp. This system controls the payment of the customers, so i need to print the quote of each payment. Is there anyway to do this with php? I mean.. Printing quotes from a web browser, besides that i also need something to print from this system, but in this case the monthly resume of each customer's account.
Can you help me?
Thanks
-- Best regards, Fernando mailto:fanointer-k.com.ar
attached mail follows:
Can't the operator request a report and hit the Print button in his browser? You also make sure that the report looks nice when printed from the browser.
"Fernando Avila" <fano
inter-k.com.ar> wrote in message
news:3511198562.20010809183959
inter-k.com.ar...
> Hello php-general,
>
> I made a system in php and mysql for a corp.
> This system controls the payment of the customers, so i need to print
> the quote of each payment. Is there anyway to do this with php?
> I mean.. Printing quotes from a web browser, besides that i also need
> something to print from this system, but in this case the monthly
> resume of each customer's account.
>
>
> Can you help me?
>
>
> Thanks
>
> --
> Best regards,
> Fernando mailto:fano
inter-k.com.ar
>
>
attached mail follows:
On Thu, Aug 09, 2001 at 06:39:59PM +0100, Fernando Avila wrote: > Hello php-general, > > I made a system in php and mysql for a corp. > This system controls the payment of the customers, so i need to print > the quote of each payment. Is there anyway to do this with php? > I mean.. Printing quotes from a web browser, besides that i also need > something to print from this system, but in this case the monthly > resume of each customer's account.
Using PHP you can't print client-side. Either the user should press the print-button (just like elias already mentioned), or you should use JavaScript (window.print()).
--* 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 am digitalizing a companies Application in an online system. The problem is that companies they deal with require the app to be signed. Obviously an online application cannot be signed conventionally. Does anyone know of a way or a work-around to accomplish this?
attached mail follows:
> the "frozen local.inc" aberration was a result of a strange "include_file=" > path something like this - ".:/usr/local/lib/php" - evidently PHPLIB won't > traverse to the second path iteration? Anyone know anything about this?
Try "./:/usr/local/lib/php" . alone may not be enough for some reason beyond my ken...
-- 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 am curious about how to best define the size of fields in mysql. Is > there some size that are better used than others? > > For example without thinking about it to much I would tend to size > fields in multiples of 10 - 20, 50, 100, 200 etc... Is this the best > answer?
If there are better sizes, they'd be at 4, 8, 16, 32, 64, etc which are more amenable to computers than humans...
I don't think it matters, though, for your varchar fields.
Even if it did make a difference, it's more important to have fields the right size for the DATA than for the performance.
I'm betting you'd have to be talking about MILLIONS of rows before the field size would make a significant performance difference, if every.
TIP: The way to worry about performance for any kind of application that is not completely unblazed territory (where *NO* man has gone before) is to: Not worry about it except to follow general rules of thumb that everybody else is following. Then test your app to see if it's fast enough. If it's not, then profile pieces until you find out *WHERE* it's not fast enough for significant chunks of processing time. Fix that part.
90% of your performance is being done in 10% of your code. Optimize that 10%, and you either are done, or you are in very big trouble. Optimizing anything else before that 10% is just a waste of your time and resources.
-- 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:
Like, if you're really the only user, just throw Apache/MySQL/PHP on your desktop/laptop and develop there...
You'll still need to find a host with the features you need, but now you have three months to do the research.
-- 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: Damiano Ferrari <damianoferrari
hotmail.com> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Sunday, August 05, 2001 5:53 AM Subject: Re: [PHP] web hosting
> Obviously, dedicated hosting is something that I am considering. But given > that the application I am writing won't be ready for at least 3 months, I'd > feel a bit stupid to spend $300+/month when the only user will be me and > maybe another person. Furthermore, my current web host sys admin stated that > he has been compiling PHP in the same way for the last 3 years and has never > had a problem, therefore he will not make any change. I don't believe that > is too smart a choice in a field where everything changes continuously (if > car dealers had his same policy, we'd still be buying Ford T...). Thanks for > your suggestion though :-) > > Damiano > > "Tim" <infoz
earthlink.net> wrote in message > news:997007880.8998.13.camel
deli.lan... > > If you want the freedom to do anything you want to your very own server > > (i.e. not shared with a bunch of other people) then something like > > http://www.rackspace.com is an alternative (although it costs more :). > > > > - Tim > > > > On 04 Aug 2001 23:26:44 -0500, Damiano Ferrari wrote: > > > Since I am tired of switching from one web host to another because of > the > > > limitations that are imposed... does anybody know of a host provider > that > > > supports PHP & MySQL and that, differently from my current host, will > also > > > allow me to upload files and install the IMAP functions? > > > > > >
attached mail follows:
> I am looping through a few thousand records and would like to display > the results every loop. Eg: > > while($row = mysql_fetch_object($sql)): > echo "Hi $row->name<br>"; > flush(); > endwhile; > > A simple example - but you see what I am trying to achieve. Perhaps a > more realistic example is displaying the results of a mail program as > it fires off mail to hundreds of members in a database. > > Will this slow down the execution of the script at all - or much?
Probably not.
All it should do, I would think, would maybe send out more and smaller TCP/IP packets than normal...
If you're really concerned, why not do:
$rowcount = 0; while (...){ $rowcount++; if ($rowcount % 50 == 0){ flush(); } }
That will flush every 50 records, which is about a screen-ful, and have virtually no overhead.
You should play with it all three ways to see if it makes any difference.
Probably you won't be able to tell.
In fact, if you have these rows in a table, your output to the browser is irrelevant. The browser waits for the closing TABLE tag, and then decides how to layout the table, and then displays it, and all the flushing in the world won't matter.
flush() is more useful if you are sending very little (or no) data with long processing involved or in between each datum. I've only found flush() useful in the real world when I'm doing something to every record with nothing to really output, and so I output a "." so they know I'm not dead.
-- 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:
> $message = $buffer; > echo $message; <it will work if I add this echo but this is
You want:
$message .= $buffer;
This *APPENDS* $buffer to $message. Before you were wiping out each line after you got it. Your echo will now show 1 line, then 2 lines, then 3 lines, etc as the message "builds", but the mail() will work.
And you need "\r\n" for any place you want a newline.
So, probably:
$message .= "$buffer\r\n";
is your final code.
Actually, you could optimize it a bit by use fread($fp, filesize($path)) and suck the whole file in as one big chunk of text.
Only matters if he's sending lots of email though, and that will choke the mail() function anyway. See Manuel Lemos' UpperDesign.com mail class for how to spew mass quantities of email out.
Oh yeah: It's called "pArsing" with an "A". I think I like pursing better, though :-)
-- 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:
Get rid of the Content-type for now, and see if you have any error messages...
You'll need Content-type to make it work, but if you have a PHP error message on any of the subsequent lines, they don't make a valid image.
You could also re-direct errors to the Apache log (or other) and view that as a better long-term but slightly higher implementation-cost solution.
-- 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: Oòkó?öårzòËèkó <Lietuva
xxx.lt> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Sunday, August 05, 2001 7:18 PM Subject: Problems...
> Sveiki, php-general, > > I have win32, apache, PHP 4.0.6. > I want to work with graphic files (GD). > There is lines in my php.ini: > > extension_dir = c:\php\extensions > > extension=php_gd.dll > > I have this script: > <?php > Header( "Content-type: image/jpeg"); > /* Header( "Content-type: image/gif"); */ > $image = imagecreate(200,200); > $maroon = ImageColorAllocate($image,100,0,0); > $white = ImageColorAllocate($image,255,255,255); > $green = ImageColorAllocate($image,0,100,0); > ImageFilledRectangle($image,0,0,200,200,$white); > ImageRectangle($image,10,10,190,190,$maroon); > ImageFilledRectangle($image,50,70,150,150,$maroon); > ImageJPEG($image); > /*ImageGIF($image); */ > ImageDestroy($image); > ?> > > But nothing hapens.... > Where am I making a mistake? Help me, please > > ____________________________ > 2001.08.06, pirmadienis > Marius Pertravèius > iCQ: #125733984 > Lietuva
xxx.lt >
attached mail follows:
Running a spell-checker and highlighting problems with a web-interface for the original author to decide what to do is probably the ideal middle ground...
It's not a trivial HTML/browser interface to write, but it shouldn't kill you to do it.
If you don't have pspell/aspell/ispell/uspell/weallspell compiled in, you *MIGHT* be able to compile it dynamically and use dl() to load it, if your ISP was not competent enough to turn that off... At least, I *think* that's a true statement...
-- 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: Michael Hall <admin
mulga.com.au> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Monday, August 06, 2001 12:02 AM Subject: Re: [PHP] spell checker
> Justin: > > IMHO it would be very difficult to build/use a reliable > spell checker that worked automatically. Natural languages are just too complex > and ambiguous. Look at how often something like Word or Star Office gets things > wrong. 'Hare' is not spelled wrong unless you meant to write 'hair', for > example. And spell checkers can't deal with scrambled syntax, etc. > > Go for a human editor if you want something approaching 100% reliability. > > Mick > > > On Mon, 06 Aug 2001, Justin French wrote: > > Hi, > > > > I know this is a biggie, but has anyone attempted to write a > > spell check (preferably english) in PHP? > > > > I'd LOVE something that can spell-check user-submitted text > > somehow, becuase I'm writing a fully dynamic news-based site, > > and the only downfall to the site could be bad content, since > > it's being supplied by writers world-wide, submitted dynamically. > > > > My other option is to have an editor approve each article > > before publishing, but I thought i'd at least ASK if nyone's > > attempted it. > > > > Justin French > > > > -- > > 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 > -- > Michael Hall > mulga.com.au > admin
mulga.com.au > ph/fax (+61 8) 8953 1442 > ABN 94 885 174 814
attached mail follows:
> I discovered that the bit that Internet Explorer 4.0 didn't recognize a > cookie as valid when I included an expiration time.
> This Doesn't Work: > setcookie ("ArtPrintSession",$SessionID,time()+3600);
> What's the bug???
IE.
IE read the spec about "optional arguments" and decided that if you wanted to provide an expiration time, you had to provide a path as well.
Try: setcookie ("ArtPrintSession",$SessionID,time()+3600, '/');
Moral: Microsoft can't even follow their *OWN* specs, much less somebody else's.
-- 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 finished English version of my site and wanted to start Russian > part but realized that MySQL server returnes all data in koi-8r > charset which is not very comfortable for some of the users, > specially I know that A LOT of russians using Opera brawser older > versions of which do not support koi-8 Any one knows how to > convert koi-8 results of MySQL to win1251?
Try these:
http://php.net/manual/en/function.convert-cyr-string.php
http://php.net/manual/en/function.recode-string.php
http://php.net/manual/en/function.setlocale.php
-- 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:
Hello BRACK,
Thursday, August 09, 2001, 10:19:46 PM, you wrote: B> I finished English version of my site and wanted to start Russian B> part but realized that MySQL server returnes all data in koi-8r B> charset which is not very comfortable for some of the users, B> specially I know that A LOT of russians using Opera brawser older B> versions of which do not support koi-8 Any one knows how to B> convert koi-8 results of MySQL to win1251?
It depends. What charset is your data in? If you DB's data is already in koi-8r, ther only thing you can do at the database level is to use a query: SET CHARACTER SET koi8_cp1251 and then execute your queries. All the data will be converted to win1251 codepage on the fly. Alternately, you can place all the data to the database in 1251 charset, and then compile mysqld with option --with-charset=cp1251 (used in ./configure) Then you'll have all the data returned in cp1251, and mysql will sort all the text data using that charset. To have the data returned in koi-8 in this case you'll have to issue a query SET CHARACTER SET cp1251_koi8
By the way, there's not so many russians, if any, using the old Opera browsers :)
-- Best regards, Maxim Derkachev mailto:max.derkachevbooks.ru System administrator & programmer, Symbol-Plus Publishing Ltd. phone: +7 (812) 324-53-53 www.books.ru, www.symbol.ru
attached mail follows:
> Is it possible to have a form submit button call a function. Like for > updating a record in a database or for deleting data. Rather than a > new page or with PHP_SELF
Not really.
PHP lives on the server. The HTML and its submit button live on the browser.
Any functions in the PHP script that existed before the browser got the HTML are long-gone and dead by the time the user clicks the button.
So if you want anything to change on the server as a result of their click, you pretty much need to contact the server somehow, and access a URL to do it.
That generally means you want to send back a whole new web page to tell them it worked (or failed).
If for some really weird reason you don't wanna do that, you probably *COULD* use onClick and some JavaScript (unreliable) to access a PHP URL and execute your delete, but not have the form page change at all. Can't think of a valid human-interface need for this, but it might be possible to do.
-- 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:
> writing to a flat file I am getting 500 error with Apache. I know the path > is correct and when I delete the file.txt and try to write to it. A new file > is created but no writing. What does Premature end of script headers: mean?
It means "Check your Apache error_log files because PHP and/or Apache died a horrible death."
If there's nothing there, it means "Read the instructions on http://bugs.php.net about generating a back-trace".
:-)
-- 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:
Are there any firewalls involved?
If so, it's possible that some sort of authentication algorithm for packet routing is breaking at some point that's not directly related to the sessions, but to the header-forwarding -- Or even a badly-broken HTTP cache on the firewalls.
Of course, if it's a badly-broken cache on Optus, you're screwed.
-- 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: By Proxy <byproxy1
optushome.com.au> Newsgroups: php.general To: php general list <php-general
lists.php.net> Sent: Thursday, August 08, 2002 8:54 AM Subject: Strange session problems. Please help.
> 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:
Use IE long enough to find out what the output is...
Or, log output to a file as well as the browser.
Or... Is this thing taking more than 30 seconds to run?
-- 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: Peter Fekkes <pfekkes
nan-cuna.nl> Newsgroups: php.general To: php <php-general
lists.php.net> Sent: Thursday, August 09, 2001 11:20 AM Subject: Form POST problem with Netscape 6
> Hi, > > I use a few forms on my websites, one of them is to log in onto the site. > > These sites all work well in MSIE and Netscape 3 and 4.7 BUT in Netscap 6 > (6.0, 6.01 and 6.1) there is a strange effect: The result page starts > loading but the loading is broken before the end of the page. The php > scrips are completed (results are in the database, emails are send out > etc.) and the page is generated but simply doesn't tranfer completely. > > For one form, the transfer always breaks at the same point, which is a > fferent point for different forms. > I cannot look into the transmitted source because netscape does a reload on > "view source" which is not performed for dynamic pages.... > > Anyone seen this before? Does anyone have a qlue where to look for? > (It looks to me like a header problem, but I have no idea what kind of > header problem..) > > Thanks in advance! > > Peter. >
attached mail follows:
Richard, Tanks for your thinking,
I have used the register_shutdown_function to test the reason for the break. This result in a normal shutdown, i.e. nothing wrong at the server side, the output is completely parsed. When I replace the form method POST into a GET everything works fine. With the POST it works fine with all browsers i've seen, except for netscape 6.
So my first impression was a bug in Netscape 6, but i've seen forms working in there.....
At 21:34 9-8-2001, Richard Lynch wrote: >Use IE long enough to find out what the output is... > >Or, log output to a file as well as the browser. > >Or... Is this thing taking more than 30 seconds to run? > >http://php.net/set_time_limit
-------------------------------------------------------- Jezelf ontwikkelen? Surf naar www.CoachPlaza.com -------------------------------------------------------- N O R A C H - New Organizational Approach Chain
"Wij helpen organisaties een gezond bedrijf te zijn door medewerkers die merkbaar plezier in hun werk hebben en wij zijn daar zelf een afspiegeling van".
Parkstraat 12 NL - 1544 AP Zaandijk Tel. 31 (0) 75 6404572 Fax 31 (0) 84 8678626 www.norach.com
attached mail follows:
> Actually it doesn't seem like too much of a hack, except that it seems > to be not a realtime operation (otherwise why would they need to contact > your script?).
They contact your script so you can do whatever *YOU* want for each transaction -- Log it, email the customer, ring a bell, whatever. They don't need to provide custom templates and database services to you on their site just so you can manage your customers.
I dunno what the lag is between a transaction and the POST they send out, but there's no reason to expect it's not as real-time as it gets. All they have to do is open up a connection to port 80 on your server and send a few POST headers. Sample code to do this abounds in the various PHP Code Archive sites, so if you wanna write your own PayPal, this would be an easy feature.
You are provided with a half of a key-pair to check back with their server that it's *REALLY* coming from them, and not some spoofer thief trying to fool your system into thinking they paid with PayPal when they didn't. So you send back your half of the key-pair, and they say "Yep, that's valid." and you *KNOW* it's a valid notification.
Of course, if somebody can hack into PayPal server and insert their own key-pair, you're screwed, but one would hope they're pretty up on security over there at PayPal, eh?
Whether you have a Shopping Cart or not is irrelevant -- If you want to provide people with the option of using PayPal, and you want to record their purchase in real-time instead of, err, doing it by hand when PayPal sends you some report or something, you want this instant payment notification stuff.
Don't have sample code, but it's basically just an fopen() to the URL they provide with the key they provide, and then examine the output for either: "Yes, that's valid." "No, that's not valid." "Our server is dead. Sorry." types of results.
If it's a "Yes", you mark the transaction as "Paid" or whatever your shopping cart does, and then ship the goods. If it's not valid, you log it, and tell the Customer their hack didn't work. If the server is dead, you tell the Customer there will be a short delay in verifiction, but they can check back in a half hour to be sure it all went through, and then retry in a few minutes or whatever.
-- 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:
> rename("document.htm", "testing.htm");
> Warning: Rename failed (Permission denied) in > C:\Inetpub\WEBS\mysko\uploads\rename.php on line 4
> The directoy has change permissions. What am i donig wrong...?
Change permissions for which user?
In Microsoft, that "Change Permission" in the web-root probably refers to their 'I_USR_machinename' user, but Apache is running as, say, 'nobody', who thus can't change it. Alter httpd.conf User= to be 'I_USR_xxx' where 'xxx' is whatever your machine is named. Actually, double-check that that's what is still set in the dialogs for anonymous access.
Also, does the *FILE* have any change permissions you can set? Or does MS not have that? If the file itself has permissions, it will over-ride those of the directory, presumably.
-- 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:
You also should use \r\n instead of just \n to be really spec.
Double-check RFC spelling of Reply-To: or Reply-to: Capitalization matters for email headers.
-- 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: <billfarr
ages.com> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Thursday, August 09, 2001 11:27 AM Subject: RE: [PHP] Return Adress
Hey, there...
I ran into this yesterday along with learning a heap more PHP. Adding a "Reply-To: xxx
yyy.dom" header seemed to work fine.
Hope this helps, Bill
-----Original Message----- From: Jean-Arthur Silve [mailto:jeanarthur
eurovox.fr] Sent: Thursday, August 09, 2001 5:23 AM To: php-general
lists.php.net Subject: [PHP] Return Adress
Hi !
I ve got a problem with the mail function :
My http server (Apache) is running as user "web" and php is compiled as a module.
When I send a mail with the mail function and, for example, the recipient does not exists, the return message is sent to web
mydomain.xxx
I would like the error messages are sent to another email adress.
I tried with the mail header "Return-path: anotheraddress
mydomain.xxx" but the error messages keep going to web
mydomain.xxx
My code is :
$head="From: ".$EMAILADMIN."\nReturn-Path: anotheraddress
mydomain.xxx\n"; mail($to,$sub,$msg,$head);
Is there a way to force the error messages to go to another email adress ? Another header ? If it's sendmail that change the return address, is there a way to prevent this ?
Thanks !
jean-arthur
--------------------------------------------------------------- EuroVox 4, place Félix Eboue 75583 Paris Cedex 12 Tel : 01 44 67 05 05 Fax : 01 44 67 05 19 Web : http://www.eurovox.fr ----------------------------------------------------------------
-- 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:
Yahoo *might* be "detecting" that you're not a "real" browser, since PHP probably sends different headers when you attempt to get the file dynamically than your browser sends when you type the URL.
So Yahoo may be denying you access when using PHP, but not from your browser.
There's nothing to stop you from writing some extra code and talking directly to their server and lying to them about what browser you are, however. I'm betting there's code in the code archives to show you how.
-- 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: Tribun <mail
tribun.de> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Thursday, August 09, 2001 4:33 AM Subject: how 2 read an non-existing file?! (I need help)
> the following problem: > > I want to read out, if the firstname is a boy's name or a girl's name... > > therefore I've written this code: (which allready works) > > ------------------ <snap> ------------------- > > $fp=fopen('http://www.vornamenlexikon.de/main/suchen.asp?kriterium=search&B1 > =Suchen&action=searchnow&searchby='.$name,"r"); > if($fp){ > $daten=fread($fp,100000); > fclose($fp); > $male='/m.gif'; > $female='/w.gif'; > if((strpos($daten,$female)>0)&&(strpos($daten,$male)>0)){ > if(strpos($daten,$male)>strpos($daten,$female))$result='w'; > else $result='m'; > }else if(strpos($daten,$female)>0)$result='w'; > else if(strpos($daten,$male)>0)$result='m'; > } > if(empty($result)){ > > $fp=fopen('http://www.kindername.de/'.strtolower(substr($name,0,1)).'-namen. > htm',"r"); > if($fp){ > $namen=array(); > $daten=fread($fp,100000); > fclose($fp); > > $daten=strstr($daten,'<font size="4" face="Verdana, Arial, Helvetica, > sans-serif"><B>VORNAMEN MIT'); > for($cnt=0;strpos($daten,'<tr>')>0;$cnt++){ > $daten=substr(strstr($daten,'<tr>'),4); > $tag=substr($daten,0,strpos($daten,'</tr>')); > if(strpos($tag,'</td>')>0){ > $x1=substr(strstr($tag,'<td>'),4); > while(strpos($x1,' ')>0)$x1=str_replace(' ',' ',$x1);//TAB > while(strpos($x1,' ')>0)$x1=str_replace(' ',' ',$x1);//DBLSPACE > $x1=trim($x1); > for($i=1;strpos($x1,'<td>')>0;$i++){ > > $field=strtolower(trim(strip_tags(substr($x1,0,strpos($x1,'</td>'))))); > if($i==1)$namen[$cnt]=array($field); > else if($i==2)$namen[$cnt]['gender']=trim($field); > else if($i==3){ > while(strpos($field,',')>0){ > array_push($namen[$cnt],substr($field,0,strpos($field,','))); > $field=substr(strstr($field,','),1); > } > array_push($namen[$cnt],$field); > }else if($i==4){ > if(in_array($name,$namen[$cnt]))$result=$namen[$cnt]['gender']; > } > $x1=substr(strstr($x1,'<td>'),4); > } } } } } > ------------------ </snap> ------------------- > > This code works, but I wanted to include another Datebase (Yahoo) > > So I included this function: > > ------------------ <snap> ------------------- > $fp=
fopen('http://babynames.pregnancy.yahoo.com/bnfname?n='.$name,"r"); > if($fp){ > $daten=fread($fp,10000); > fclose($fp); > $male='boy'; > $female='girl'; > if((strpos($daten,$female)>0)&&(strpos($daten,$male)>0)){ > if(strpos($daten,$male)>strpos($daten,$female))$result='w'; > else $result='m'; > }else if(strpos($daten,$female)>0)$result='w'; > else if(strpos($daten,$male)>0)$result='m'; > } > ------------------ </snap> ------------------- > > But this code has no effect. It returns only an Error (404) > > The reason therefore is, that the targetting URL does'nt > exist: > > Try this URL's > > http://babynames.pregnancy.yahoo.com/bnfname?n=Patrick > or > http://babynames.pregnancy.yahoo.com/bnfname.htm?n=Patrick > http://babynames.pregnancy.yahoo.com/bnfname.?n=Patrick > http://babynames.pregnancy.yahoo.com/bnfnameBLABLA?n=Patrick > > In a Browser its not nessesary to type in the correct Name > "bnfname". So you can add what ever you want, but the result > is the same (it works) > > But the problem is, to downloading this file, because then the reason > is an 404-Error (not existing) > > Does anybody know an answer to this problem??? > > How can I download this file anyway... and read out the information > I want? > > > > Thanks, > Tribun (Patrick) > --- > www.mp3o.net > > > PS: I know. its not the best english ;) > > >
attached mail follows:
Even if you could get it to work, you'd be in trouble, as the PHP interpreter will clean up after you and trash your MySQL connection when it finishes, and anything that didn't get done before that would not work.
You'll probably need to code this with two separate PHP files, one which calls the other using exec("/path/to/long.php &", $results, $errorcode);
Open the connection and do all the database stuff in long.php.
-- 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: Jeff Bearer <jbearer
tribweb.com> Newsgroups: php.general To: PHP-General <php-general
lists.php.net> Sent: Wednesday, August 08, 2001 4:33 PM Subject: register_shutdown_function and a MySQL query keeping connection with browser.
> I've been working with register_shutdown_function() to have the browser kick of a > long running script and move on to other tasks. I was having problems where the browser > would sit and spin untill the function was done running, then would display the page. > I tinkered with flush and fflush (i'm writing to a file also) but that didn't work either. > Flush showed me the screen, but the browser still keeps the connection open untill > the function was done running. It seems to be caused by the mysql query or result and the > loop of the result set. Below is some of the test script I put together. I'm using the > PEAR DB_mysql class. I'm using the sleep where the part of the real script takes some time > to run. > > Has anyone dealt with this before, does anyone have any ideas? The only idea I've thougt of > so far is to load the record set into a 2D array and then flush the result set. That might > allow the browser to disconnect before the time comsuming job starts. > > Any suggestions will be appriciated. > > > > > <?php > include "DB/mysql.php"; > $db=new DB_mysql; > $db->connect($dsn); > > echo "hello"; > register_shutdown_function("tester"); > exit; > > function tester(){ > global $db; > $sql="SELECT * FROM table"; > $result = $db->query($sql); > while($row = $result->fetchRow(2)){ > sleep(5); > } > } > ?> > > > > > -- > Jeff Bearer, RHCE > Webmaster > PittsburghLIVE.com
attached mail follows:
> <?php > function incl_common() > { > global $modroot; //modroot is defined as http://localhost/modules in a settings file > > echo "<br>$modroot from included"; //this echos "http://localhost/modules" properly > > > //the below throws the error, OpenDir: No such file or directory (error 2) in (this function file name) > //but I can replce the $modroot/common with a hard-coded path and it works fine. >
# Echo out exactly what you are passing to opendir(). # Try tacking on a "/" at the end?
$fullpath = "$modroot/common/"; echo "fullpath is $fullpath<BR>\n";
$handle=opendir($fullpath);
> while ($file = readdir($handle)) > { //load files in $directory into array > if ($file != ".." && $file != ".") > { > $files_to_include[count($files_to_include)] = $file; > } > } > > //clean up and sort > closedir($handle); > if (is_array($files_to_include)) > { > while (list ($key, $val) = each ($files_to_include)) > { > include "$modroot/common/$val"; > } > } > } > incl_common(); > ?>
attached mail follows:
> This should get me exactly 3 months later and also checks for if its a later
No, it won't on leap years, or during daylight savings time changes, etc.
Don't try to do the year/month calculation yourself.
Let PHP do it for you, and it will be correct. Every time.
$threemonths = mktim(0, 0, 0, date("m") + 3);
ACTUALLY, it would be even EASIER to use SQL to do this. Presumably MySQL will let you use things not unlike...
where registation_date + '3 months' <= now()
You're probably better off storing a registration_date and an interval than the deadline. Then, if you decide to extend everybody's 3 month freebie to 4 months, it's easy.
-- 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:
What version of PHP/Apache/etc are you using?...
What browser on what OS?
If it's consistently doing this for all browsers, you could write some code to check the uploaded file, and if it starts with "Content-type: ", strip off the lines.
Both GIF and JPEG files have distinctive starting characters, so you could even generalize it to strip off anything up to those characters.
> echo "<FORM ENCTYPE=\"multipart/form-data\" ACTION=\"$PHP_SELF\" > METHOD=\"POST\">"; > file://echo "<FORM ACTION=\"$PHP_SELF\" METHOD=\"POST\">"; > echo "<INPUT TYPE=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"10000000\">"; > echo "Send this file: <INPUT NAME=\"userfile\" TYPE=\"file\">"; > echo "<INPUT TYPE=\"submit\" name=\"upload\" VALUE=\"upload\">"; > echo "</FORM>"; > > if ($upload) { > echo "Userfile : $userfile<BR>"; > > if (is_uploaded_file($userfile)) { > copy($userfile, "/tmp/WynnBase.tmp"); > } else { > echo "Possible file upload attack: filename '$userfile'."; > } > > > } > > > >
attached mail follows:
Are all the mod_rewrite settings exactly the same?...
That would be my first guess.
-- 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: Geoff Caplan <geoff
productivity.co.uk> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Wednesday, August 08, 2001 3:55 PM Subject: PHP_SELF and mod_rewrite
> Hi folks > > Strange goings on with PHP_SELF and mod_rewrite > > On my development server, PHP_SELF gives me the original request url, before > it is rewritten. > > I have moved the app onto a shared production server, and now PHP_SELF is > givimg me the path AFTER it is rewritten. > > Which is the "correct" behaviour, and what is causing the "wrong" behaviour? > > Any advice much appreciated > > Geoff Caplan >
attached mail follows:
Huh?
Give a bug ID from http://bugs.php.net or something.
Got no idea what you're asking about.
-- 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: Drew P. Vogel <dvogel
intercarve.net> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Tuesday, August 07, 2001 8:50 PM Subject: 3rd include
> Has the "3rd include" bug (where variable definitions ar "lost" at the 3rd > include), been fixed yet? > > --Drew Vogel > > >
attached mail follows:
> 123|blah|foo|bar|etc > > To be formatted like: > > INSERT INTO Table VALUES (123,'blah','foo','bar','etc');
Assuming there are not | in the actual data:
<?php $path = "/path/to/file/to/import.txt"; # A few thousand entries is a bit much to suck in at once, but # it's a one-time hack, so who cares? $file = file($path) or die("Could not load file"); while (list(,$line) = each($file)){ $values = explode('|', $line); $query = "insert into into table values($values[0], '$values[1]', '$values[2]'..."; mysql_query($query) or die(mysql_error()); } ?>
You may want to add a line counter and output that with mysql_error() so you can quickly refer back to your data file to find a broken line...
-- 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 can't seem to get my win2000 box to recognize the .php files. It's coming up with an error,
What error is it coming up with?
>and just reading them as test.php.txt files in explorer. How do i get this to work. I believe
Change their name to not have .txt on the end, and stop using that stupid Notepad program to edit the PHP pages, which then saves them with foo.php.txt as the name of the files, unless you choose "Any File" from the popup for file type every time you save.
Get EditPlus, or PFE, or any of the other 10,000 text editors that people are now going to say is the "best" on Windows. Sigh.
>I've set everything up right. Could someone please email me with answers. Thanks
There are innumerable other things you could have done wrong that would show you PHP source instead of executing it, but you'd have to tell us how you configured IIS to do PHP.
-- 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:
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.
-- 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: Ben-Nes Michael <miki
canaan.co.il> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Thursday, August 09, 2001 6:41 AM Subject: IE Download twice from DB
> 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:
Check your error log to see if there's anything there about why PHP is dying.
Does it answer this right away, or take forever? If it takes about 10 seconds, your DNS could be messed up.
Can you run PHP from a DOS prompt on the same script? What comes out?
-- 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: Karthik <karthik
ccipl.com> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Tuesday, August 07, 2001 7:13 AM Subject: Header error!
Hi,
I am running PHP 4.06 on Windows 2000 with IIS 5. I am running PHP in CGI mode.
I seem to be getting "CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:
"
Why is this error happening ? Please dont ask me to shift to DLL mode of running PHP as it gives worse problems like access violations etc.
It would be really helpful if someone could tell me as to how correct the same.
Thanks, Karthik.
attached mail follows:
If you use fputs() you will be adding a blank line.
If you use fwrite() you won't.
If you want to suck in the file and remove line breaks, just use:
$text = str_replace("\n", '', $text);
-- 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: Marcus James Christian <marcus
mjchristianunlimited.com> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Tuesday, August 07, 2001 4:34 PM Subject: Q: Kill all line brk's and white space on output?
> Hello, > > I've got this cool auto add email mailing list that is simply a .txt > file that PHP writes to. > > So the visitor goes to a form types in their email addy and is > automatically added to the .txt file which is then read when the boss > wants to send out to the entire list. > > This thing works perfectly except for one prob. > > Every time some one adds them self to the list (mainly me testing right > now) their addy is added on the next line down yet when I view the code > I have NO \r or \n asking to add a line break. > > So my question is > > Is there a way to say ..."Write to the file emailaddys.txt and suck out > all line breaks, returns, and white space?" > > i.e. make sure each address butts itself up against the next with just > the comma separating them. > > > I know this would work because when I manually go to the .txt file and > delete the white space till all the email addy's are back to back this > app works great! > > Thank you in advance my friends > -Marcus > > -- > Marcus James Christian -- UNLIMITED > Multimedia Internet Design > http://mjchristianunlimited.com > >
attached mail follows:
> For secure payment pages, I need for the code to determine the persons IP > address, even if they have a "spoofer" running. Is this possible? Getting > around the spoofer in order to catch criminals using illegal credit card > #'s..
In addition to $REMOTE_ADDR, some firewalls provide an $X-Forwarded-For (or similar) header, if their goal is not to mask IPs in the first place. Might be worth recording those.
Bottom line, though, is that somebody that really wants to spoof their IP address, you'll never be able to back-track them.
-- 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:
>Could somebody please show me, send me an example or redirect me to a page which shows how to >show a random FLASH movie from a text file which contains different names of different movies >so that when i go on the page it shows lets say, 1 of the 5 movies in the text document.
<?php # Pick a movie, any movie: $path = "/path/to/your/text/file/of/movie/URLs.txt"; $movies = file($path) or die("Could not open $path for reading."); srand((double) microtime() * 1000000); $index = rand(0, count($movies)); $movie = $movies[$index];
# Output the HTML to show that movie: echo "<PARAM NAME=MOVIE NAME=$movie>"; ?>
There's a lot more HTML to do a SWF properly than that, though, no...?
You can put as many movies as you want in your text file.
-- 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:
You can use cURL, and must if it's an SSL server, or you can just fsockopen to their server on port 80 and send the stuff they expect.
See code archives for sample code.
-- 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: Tuesday, August 07, 2001 3:16 PM Subject: Sending information to a script on another host....
Hello,
I am trying to make a script that automates domain name registration. What I need my script to do is send information to a script that opensrs runs to activate a pending order. But I don't want to redirect the user there. I only want to send information there and then take the user to a friendly pretty place.
I have some reason to believe has to do with cURL, but not sure. I hope you understand what I am saying. Thanks Brandon
attached mail follows:
> $command ="/home/kyelateas/cgi-bin/test.pl"; > exec($command, $return, $status); > > if ($return) { > $return = implode("\n", $return); > print "<pre>Data = $return\n\nStatus = $status</pre>"; > } > else # > echo "No data returned"; echo "OS Error $status. Usually paths/permissions. See 'man errno' and count down.";
> describing the transaction. It works perfectly from the command line, but
Does it work perfectly from the command line if you su to "nobody" (or whomever PHP runs as) before you execute it? Is it world executable? Does it access resources such as PGP key-rings that "nobody" can/cannot access?
Are you sure you have the path correct? Do both Perl scripts have exactly the same #! at the beginning? Or is one relying on the .pl ending to be executed properly? (If that's even possible in Un*x.)
> lines of output. Why would this be any different for php? I know the > script that connects with the ecommerce server takes a bit longer. Could > that be the problem?
It would have to take > 30 seconds, and you'd probably get a PHP error message to that effect.
-- 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:
See browscap in PHP Manual, maybe.
-- 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: Bolivar Shagnasty <phpshagnasty
hotmail.com> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Tuesday, August 07, 2001 3:39 PM Subject: Determining browser encryption strength
> My web site it going to be the starting point with a link to an application > that only works with browser at 128bit strength. What I would like to do is > automatically determine if the user doesn't have a compatible browser and > then direct them where to get the correct browser. Does anyone know how I > might go about doing this? > > tia, > bol > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp >
attached mail follows:
Hi Bolivar,
Ciphering is something done at the network level when the connection is done. It is done exactly at the negotiation of the SSL session and it is done by the Server (Apache, IIS, ...). So you can use the information provided by the CGI Environment Variables of Apache (if it happens that you are using Apache) to determine the actual SSL enc method.
More precisely you can use the HTTPS_CIPHER, HTTPS_KEYSIZE and HTTPS_SECRETKEYSIZE to determine the different aspects of the actual encryption method used by the client. If you want 128bits that means Triple-DES for simetric encryption. If you do not have a strong know-how at SSL I recommend you these two links:
Intro to SSL http://developer.netscape.com/docs/manuals/security/sslin/index.htm
Apache-SSL doc http://www.apache-ssl.org/docs.html
Hope this helps you. Sean C. McCarthy SCI, S.L. (www.sci-spain.com)
Bolivar Shagnasty wrote:
>
> My web site it going to be the starting point with a link to an application
> that only works with browser at 128bit strength. What I would like to do is
> automatically determine if the user doesn't have a compatible browser and
> then direct them where to get the correct browser. Does anyone know how I
> might go about doing this?
>
> tia,
> bol
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
> --
> 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:
Have you tried http://php.net/odbc_result
-- 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: James Stevens <jstevens
endeavors.com> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Tuesday, August 07, 2001 11:38 AM Subject: Database Stored Procedure Result
> I use ODBC on a Win2K system to connect to a MS-SQL database. I use a stored > procedure in the database to add a record to a table. The stored procedure > returns a result code that is either the records ID or a -1 indication that > the record was not added. How do I check the return result in PHP using > ODBC? > > Thanks in advance > > James >
attached mail follows:
Also make sure you are running PHP as a Module and not CGI.
You can't do HTTP Authentication from inside PHP under CGI.
-- 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: Chris Kay <chriskay
ideal.net.au> Newsgroups: php.general To: <php-general
lists.php.net> Sent: Wednesday, August 08, 2001 6:49 PM Subject: htaccess & php
> > Hi > > My question is that i am about to start a database and i have been asked to > make the login/password like htaccess, now they also want to be able to > modify passwords ect.... so i was going to do it with mysql. > > I have seen or been told that there is something where you can use sql/php > and make it use something that look like htaccess but is not. > > is this true? > > if so where would i start looking for something along these lines.. > > Answers/Comments welcome > > > > ------------------------------------------------------------------------ > Chris Kay - Tech Support - IDEAL Internet > email: chriskay
ideal.net.au phone: +61 2 4628 8888 fax: +61 2 4628 8890 > ------------------------------------------------------------------------ >
attached mail follows:
>my ISP doesn´t support natcasesort(), >can anybody tell me how to write a cmp function? >I couldn´t find a documentaton about it.
function usort_text($value1, $value2){ if ($value1 == $value2){ $result = 0; } elseif ($value1 < $value2){ $result = -1; } else{ # $value1 > $value2 $result = 1; } return $result; }
You'll probably need more complex accessing/tests for the ==, <, and > expressions.
-- 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:
What does the script do and what part doesn't work?
-- 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: Efrem Radaelli <radaefrem
tin.it> Newsgroups: php.general To: [PHP] mailing list <php-general
lists.php.net> Sent: Tuesday, August 07, 2001 6:41 AM Subject: enabling Sessions
> Hi! > how i can enable session? > i have installed PHP4 and IIS 5.0 on W2K Server. > PHP scripts work correctly, but when i use session_start() > the same script don't work! > I must set same key in php.ini for enabling sessions? > or ..? > > thanks! > efrem > > PS: sorry for my poor english!
attached mail follows:
> I set up a user-auth script that checks $PHP_AUTH_USER & $PHP_AUTH_PW > against a db with login/pwd information, but on the server my site is hosted > this doens't work because PHP runns as cgi. > > How do I do this with PHP running as a cgi?
You can't.
You'll have to either: Re-code it to get different variables in a web FORM. Not use PHP at all, and use mod_auth_mysql Use .htaccess instead of PHP (only suitable for small # of users, probably)
I think it's a security issue that you'd be passing the username/password from Apache to the CGI in an insecure manner... Don't quote me on that though.
-- 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:
>watching apache processes (top), trying to track memory usage. It seems to vary size between >14M & 16M & vary RES from 12M to 14M. Is this varying normal? Is this size normal? (2400
Those numbers are normal and are inclusive of SHARED memory segments, so will add up way higher than actual memory usage. IE, they have virtually no real-world meaning.
>line program reading a 1400 row/29 col. spreadsheet into an array...yes, it is necessary to >have the whole thing in the array at one time, at least, I can't figure out a way not to.) I
For sure you could read one row at a time, put it into a database, and do virtually any sort of operation on it you could possibly need...
Way more efficient.
>would think the same program ran repeatedly should require approx. the same memory each
Give or take, but are there other pages being loaded/visited that use other resources, or are you the only surfer on this site?...
>time. Also, I seem to have apache processes hanging around for days. So that even running a >little 4 line echo/sleep/echo program will pick up one of these rogue process id's & then it >appears that the 4 line program is running at 14M/12M now, that's just not possible. Is it >normal for the process id's to hang around in sleep mode interminally like that? If I
They aren't really actively using all that RAM. It's shared. You can set max_requests and other fun things in httpd.conf to kill off the older httpd processes if you really think they're no good anymore. And if they're sleeping, they aren't really using much of anything anyway. They won't wake up until you have multiple hits at the same time asking them to do something. "Let the awake guy handle it" is their motto, until there's a request where nobody's awake and not busy.
> restart apache, the processes of course die, but I can't do that constantly. Is there a way >to free up the memory that I'm just not aware of? Or something I should be looking at that >I'm not? I'm at a loss, I'm more likely to blame my code (only my 2nd php program) than a >php/apache bug or something of the like. But I haven't a clue where to look. (changing the >way I handled the array slightly & using unset I did manage to save approx. 4M, but I'll need >to save more than that as the spreadsheet grows). Eventually it may all go into a database, >but not any time soon.
Change your mind about that last sentence. Throw it into a database one row at a time, and you'll save yourself a lot of headache. The database stuff in PHP really is that easy, that you don't want to do anything remotely like database work without 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
attached mail follows:
>>any ideas, oh gurus?
While I'm not a guru, here is some info that may help.
On webaxxs / olm standard account machines, this can't be done (at least that's the conclusion I have come to after many hours). Even using the files directive in the htaccess file won't the trick on their servers with php as a cgi.
You can get an RSE account from OLM.com - same company. PHP is set up as a module on their rse account and you can edit your httpd.conf file. Stick the location directive in there and you are good to go. It's a bit more expensive but you get a ton of options an flexability.
Another option is to find a flexable isp who offers php_mod and is willing to edit your virtual server settings in the .conf file. :)
Kevin
attached mail follows:
I want to generate an image using the following code, and think it should have worked. Unfortunately I get an error message saying the header info has already been sent, and the browser (IE5) doesn't print a picture just the characterset representing the picture. I think I've got it right, but obviously, I don't. Any help will be greatly appreciated.
1. 2. 3. <?php 4. print "jpeg format<br>"; 5. header("content-type: image/jpeg",replace); 6. $image=imagecreate(200,200); 7. $red=imagecolorallocate($image,255,0,0); 8. $blue=imagecolorallocate($image,0,0,255); 9. imagearc($image,99,99,180,180,0,360,$blue); 10. imagefill($image,99,99,$blue); 11. imagejpeg($image);
?> <html> <body>
<img src="test.php" alt="a php generated image"> </body> </html>
what I get is the following:
Warning: Cannot add header information - headers already sent by (output started at /www/ironorchid/stocks/test.php:3) in /www/ironorchid/stocks/test.php on line 5 ÿØÿàJFIFÿþ>CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), ... A printout of the jpeg file (I think) and a broken link icon.
attached mail follows:
Remove the line:
print "jpeg format<br>";
The error is because you have sent output to the browser before you are trying to send a header.
-----Original Message-----
From: Hugh Danaher [mailto:hdanaher
earthlink.net]
Sent: 09 August 2001 23:26
To: Php-General
Subject: [PHP] Image header problems
I want to generate an image using the following code, and think it should have worked. Unfortunately I get an error message saying the header info has already been sent, and the browser (IE5) doesn't print a picture just the characterset representing the picture. I think I've got it right, but obviously, I don't. Any help will be greatly appreciated.
1. 2. 3. <?php 4. print "jpeg format<br>"; 5. header("content-type: image/jpeg",replace); 6. $image=imagecreate(200,200); 7. $red=imagecolorallocate($image,255,0,0); 8. $blue=imagecolorallocate($image,0,0,255); 9. imagearc($image,99,99,180,180,0,360,$blue); 10. imagefill($image,99,99,$blue); 11. imagejpeg($image);
?> <html> <body>
<img src="test.php" alt="a php generated image"> </body> </html>
what I get is the following:
Warning: Cannot add header information - headers already sent by (output started at /www/ironorchid/stocks/test.php:3) in /www/ironorchid/stocks/test.php on line 5 ÿØÿàJFIFÿþ>CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), ...
A printout of the jpeg file (I think) and a broken link icon.
attached mail follows:
make it look this way:
1. <?php 2. 3. 4. # print "jpeg format<br>"; 5. header("content-type: image/jpeg",replace); 6. $image=imagecreate(200,200); 7. $red=imagecolorallocate($image,255,0,0); 8. $blue=imagecolorallocate($image,0,0,255); 9. imagearc($image,99,99,180,180,0,360,$blue); 10. imagefill($image,99,99,$blue); 11. imagejpeg($image); 12. ?>
The problem are outputs before header();
Yoroshiku, Maxim Maletsky
-----Original Message-----
From: Hugh Danaher [mailto:hdanaher
earthlink.net]
Sent: Friday, August 10, 2001 7:26 AM
To: Php-General
Subject: [PHP] Image header problems
I want to generate an image using the following code, and think it should have worked. Unfortunately I get an error message saying the header info has already been sent, and the browser (IE5) doesn't print a picture just the characterset representing the picture. I think I've got it right, but obviously, I don't. Any help will be greatly appreciated.
1. 2. 3. <?php 4. print "jpeg format<br>"; 5. header("content-type: image/jpeg",replace); 6. $image=imagecreate(200,200); 7. $red=imagecolorallocate($image,255,0,0); 8. $blue=imagecolorallocate($image,0,0,255); 9. imagearc($image,99,99,180,180,0,360,$blue); 10. imagefill($image,99,99,$blue); 11. imagejpeg($image);
?> <html> <body>
<img src="test.php" alt="a php generated image"> </body> </html>
what I get is the following:
Warning: Cannot add header information - headers already sent by (output started at /www/ironorchid/stocks/test.php:3) in /www/ironorchid/stocks/test.php on line 5 ÿØÿàJFIFÿþ>CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), ... A printout of the jpeg file (I think) and a broken link icon.
attached mail follows:
I looked through the archives, and tried finding info in the PHP manual, but haven't had much luck.
I'm looking for a way to restrict virtual host users to their specific little directory by putting a <Directory> thing in my httpd.conf.
It looked like open_basedir should do the trick, but it didn't, and obviously something's not quite right. My php.ini has: safe_mode = off safe_mode_exec_dir =
for safe mode stuff, while in a virtual host spot in my httpd.conf I have
<Directory "/home/www/chris/www"> php_admin_value open_basedir /home/www/chris/www </Directory>
This doesn't work. If anyone could let me know the proper format this is suppose to take, I'd be most appreciative.
Thanks, Chris
attached mail follows:
It worked!! but only after I removed the two blank lines above the <?php
start line too. Thank you very much.
----- Original Message -----
From: Corin Rathbone <corinrathbone
yahoo.com>
To: <hdanaher
earthlink.net>
Cc: <php-general
lists.php.net>
Sent: Thursday, August 09, 2001 3:40 PM
Subject: RE: [PHP] Image header problems
> Remove the line:
>
> print "jpeg format<br>";
>
> The error is because you have sent output to the browser before you are
> trying to send a header.
>
>
> -----Original Message-----
> From: Hugh Danaher [mailto:hdanaher
earthlink.net]
> Sent: 09 August 2001 23:26
> To: Php-General
> Subject: [PHP] Image header problems
>
>
> I want to generate an image using the following code, and think it should
> have worked. Unfortunately I get an error message saying the header info
> has already been sent, and the browser (IE5) doesn't print a picture just
> the
> characterset representing the picture. I think I've got it right, but
> obviously, I don't. Any help will be greatly appreciated.
>
>
>
> 1.
> 2.
> 3. <?php
> 4. print "jpeg format<br>";
> 5. header("content-type: image/jpeg",replace);
> 6. $image=imagecreate(200,200);
> 7. $red=imagecolorallocate($image,255,0,0);
> 8. $blue=imagecolorallocate($image,0,0,255);
> 9. imagearc($image,99,99,180,180,0,360,$blue);
> 10. imagefill($image,99,99,$blue);
> 11. imagejpeg($image);
>
> ?>
> <html>
> <body>
>
> <img src="test.php" alt="a php generated image">
> </body>
> </html>
>
>
>
> what I get is the following:
>
> Warning: Cannot add header information - headers already sent by (output
> started at /www/ironorchid/stocks/test.php:3) in
> /www/ironorchid/stocks/test.php on line 5
> ÿØÿàJFIFÿþ>CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), ...
>
> A printout of the jpeg file (I think) and a broken link icon.
>
>
>
> --
> 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 dynamic menu on my site where data is taken from a mysql db.
$cat="select * FROM categories c WHERE c.type='Earmold'"; $cats=mysql_query($cat); while ($row = mysql_fetch_array($cats)) { extract($row); echo "<a class=subnavlink href=\"?cid=$id&page=1\">$name</a> "; }
What I would like to do is turn off the link if the link is active in the browser. So if the url loaded in the browser is http://www.xyz.com/product.php?cid=1&page=1 for example, the link to that particular item is disabled in the menu.
Is something like this possible? Any help is appreciated!
Thanks.
__________________ Jason Dulberg Extreme MTB http://extreme.nas.net
attached mail follows:
For a job I'm working on I need to let PHP-code write images to a directory. To be able to do that I need to make this directory read- and writeable. Concerned about the security, is this directory open for anyone to write into it? (Let say PHP-code form another server?) If so, how can I solve this without this security-risk?
Thanks, SED
attached mail follows:
Hi! dearest friends, How to copy files from one directory to another directory through php on linux platform??
Thanks in advance.
Regards -Balaji
- text/plain attachment: Wipro_Disclaimer.txt
attached mail follows:
Balaji Ankem wrote: > Hi! dearest friends, > How to copy files from one directory to another directory through > php on linux platform??
- Be sure you have permission to read the files to be copied and to write into the destination-directory. This is rather UNIX-specific than related to PHP.
- Use copy() to copy the files. http://www.php.net/copy
- If you need to copy a complete directory without knowing the names of the files inside, use opendir() and readdir() to get those filenames. http://www.php.net/opendir http://www.php.net/readdir
regards Wagner
-- Madness takes its toll. Please have exact change.
attached mail follows:
Hi! dearest friends, How to copy files from one directory to another directory through php on linux platform??
Thanks in advance.
Regards -Balaji
- text/plain attachment: Wipro_Disclaimer.txt
attached mail follows:
On Tue, 7 Aug 2001 19:39, Chris wrote: > I have a bunch of dates like this: > Jul 24 2001 > Jul 31 2001 > Aug 7 2001 > > I need to sort it from oldest to newest, but I can't devise a way that > works. And they are text fields in MySQL so that won't sort it > correctly either. Can anyone point me in the right direction?
Two possible ways - one is to use Mysql date functions to create a sortable field and order your query by that field.
Or convert them to Unix timestamp with PHP using strtotime, then sort and display using date. The former would be preferable.
-- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIATaxes are not levied for the benefit of the taxed.
attached mail follows:
and the third option is:
strtotime()
read on about this magic function - will become your life(ass)-saver. www.php.net/strtotime
Sincerely,
Maxim Maletsky
Founder, Chief Developer
PHPBeginner.com (Where PHP Begins)
maxim
phpbeginner.com
www.phpbeginner.com
-----Original Message-----
From: David Robley [mailto:huntsman
www.nisu.flinders.edu.au]
Sent: Friday, August 10, 2001 12:34 PM
To: Chris; PHP (E-mail)
Subject: Re: [PHP] Sorting Dates in this format: Jul 21 2001
On Tue, 7 Aug 2001 19:39, Chris wrote: > I have a bunch of dates like this: > Jul 24 2001 > Jul 31 2001 > Aug 7 2001 > > I need to sort it from oldest to newest, but I can't devise a way that > works. And they are text fields in MySQL so that won't sort it > correctly either. Can anyone point me in the right direction?
Two possible ways - one is to use Mysql date functions to create a sortable field and order your query by that field.
Or convert them to Unix timestamp with PHP using strtotime, then sort and display using date. The former would be preferable.
-- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIATaxes are not levied for the benefit of the taxed.
-- 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 Fri, 10 Aug 2001 13:20, Maxim Maletsky wrote:
> and the third option is:
>
> strtotime()
>
> read on about this magic function - will become your life(ass)-saver.
> www.php.net/strtotime
>
>
> Sincerely,
>
> Maxim Maletsky
> Founder, Chief Developer
> PHPBeginner.com (Where PHP Begins)
> maxim
phpbeginner.com
> www.phpbeginner.com
>
>
>
> -----Original Message-----
> From: David Robley [mailto:huntsman
www.nisu.flinders.edu.au]
> Sent: Friday, August 10, 2001 12:34 PM
> To: Chris; PHP (E-mail)
> Subject: Re: [PHP] Sorting Dates in this format: Jul 21 2001
>
> On Tue, 7 Aug 2001 19:39, Chris wrote:
> > I have a bunch of dates like this:
> > Jul 24 2001
> > Jul 31 2001
> > Aug 7 2001
> >
> > I need to sort it from oldest to newest, but I can't devise a way
> > that works. And they are text fields in MySQL so that won't sort it
> > correctly either. Can anyone point me in the right direction?
>
> Two possible ways - one is to use Mysql date functions to create a
> sortable field and order your query by that field.
>
> Or convert them to Unix timestamp with PHP using strtotime, then sort
> and display using date. The former would be preferable.
Isn't that what I said? Or did I misunderstand myself :-)
-- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIAWaiter, there's no fly in my soup! - Kermit
attached mail follows:
oops, you're right. Sorry, haven't read your mail well enough. <sarcasm>if you'd put a few brackets like strtotime(), I would probably notice</sarcasm>
Sorry again, m
Sincerely,
Maxim Maletsky
Founder, Chief Developer
PHPBeginner.com (Where PHP Begins)
maxim
phpbeginner.com
www.phpbeginner.com
-----Original Message-----
From: David Robley [mailto:huntsman
www.nisu.flinders.edu.au]
Sent: Friday, August 10, 2001 1:47 PM
To: Maxim Maletsky; PHP (E-mail)
Subject: Re: [PHP] Sorting Dates in this format: Jul 21 2001
On Fri, 10 Aug 2001 13:20, Maxim Maletsky wrote:
> and the third option is:
>
> strtotime()
>
> read on about this magic function - will become your life(ass)-saver.
> www.php.net/strtotime
>
>
> Sincerely,
>
> Maxim Maletsky
> Founder, Chief Developer
> PHPBeginner.com (Where PHP Begins)
> maxim
phpbeginner.com
> www.phpbeginner.com
>
>
>
> -----Original Message-----
> From: David Robley [mailto:huntsman
www.nisu.flinders.edu.au]
> Sent: Friday, August 10, 2001 12:34 PM
> To: Chris; PHP (E-mail)
> Subject: Re: [PHP] Sorting Dates in this format: Jul 21 2001
>
> On Tue, 7 Aug 2001 19:39, Chris wrote:
> > I have a bunch of dates like this:
> > Jul 24 2001
> > Jul 31 2001
> > Aug 7 2001
> >
> > I need to sort it from oldest to newest, but I can't devise a way
> > that works. And they are text fields in MySQL so that won't sort it
> > correctly either. Can anyone point me in the right direction?
>
> Two possible ways - one is to use Mysql date functions to create a
> sortable field and order your query by that field.
>
> Or convert them to Unix timestamp with PHP using strtotime, then sort
> and display using date. The former would be preferable.
Isn't that what I said? Or did I misunderstand myself :-)
-- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIAWaiter, there's no fly in my soup! - Kermit
attached mail follows:
Much of this has already been posted, but it really needs top-level exposure.
Programmers all over the world have already recognized that PHP is a superior language, and open-source is not the root of all evil (as M$ would have us believe). However, many (most?) execs do not listen to reason, but rather only to TV and glossy ads. Therefore, I propose we fight fire with fire! Lets band together and form a web site not altogether unlike LinuxFund.org. However, instead of development of new technology, our site could focus on the spread of PHP, or perhaps open source technology. Get our own credit card, ask for donations, be those donations money or time.
We could use this money to fund ad-campaigns. Ad-campaigns targeted not at programmers who already know the merit of PHP (and open-source in general), but rather the "Big Corporate Executive" who has the power to make or break PHP. The ads could go in magazines like Forbes, Fortune, etc. instead of Open Magazine.
If you are interested in this, either helping make the site, providing expertise in other areas (such as marketing), or would just be willing to make a donation, please visit the web site I have set up at http://www.coeus-group.com/AdCamp.php . Just sign if you're interested, it's not binding you to anything!
I believe that we can really get some support for this. We might be able to get some big companies to help out (IBM, Sun, Zend, VA Linux, Netscape...), get a credit card like linuxfund, even set up a store! It's going to be lots of work, but I think it can be done!
attached mail follows:
will the readfile() function not accept a user/pass combination in an ftp
url? like:
readfile("host.com/path/to/file">ftp://user:pass
host.com/path/to/file");
I get two errors. The first is a file not found error. The second is a No Such file or directory error.
droppoing the user:pass section works just fine. Here's the code:
$ftp_server_path = "$ftphost/$ftppath/">ftp://$ftpuser:$ftppass
$ftphost/$ftppath/";
$i = $QUERY_STRING;
$url = $ftp_server_path.$leech_name[$i];
$filename = explode("/", $leech_name[$i]);
// start downloading file
Header("Content-Type: application/octet-stream");
Header("Content-Length: ".filesize($url));
Header("Content-Disposition: attachement; filename=$filename[1]");
header("Pragma: no-cache");
header("Expires: 0");
readfile($url);
I've also tried going the fopen(), fread() route with the same result.
Any ideas what I'm doing wrong? or if it's even possible? Thanks, David Minor
attached mail follows:
Today's Joke: INDO-PAK WAR ~~~~~~~~~~~~~
The cold war between US and USSR resulted in a system where if USA launched a Nuke-loaded missile, USSR's satellite were capable of informing the USSR army in 3 seconds, and in less than 45 seconds USSR would launch its counter-missile. US knew that and therefore never attempted to launch one.
INDO-PAK War......
Pak army decides to launch a Nuke-missile towards India... They don't need any permission from their government, and promptly launch the missile.
Indian technology is highly advanced. In less than 8 seconds, the Indian army detects it and decides to launch a missile in retaliation. But they need permission from the Government of India. They submit their request to the Indian President. The President forwards it to the Cabinet.
The Prime Minister calls an emergency Lok Sabha session after three days. When the LS meets, there are several walk-outs and severe protests by the opposition, so it is adjourned indefintely. However, the President asks for a quick decision.
The Pak missile, meanwhile, failed to take off due to unknown reasons. Their attempts for a launch are still on.
Meanwhile, the Indian ruling party is reduced to a minority because an outside party withdraws support. The President asks the PM to prove majority next week. The ruling party is unable to get a confidence vote, and a caretaker government is installed.
The acting PM decides to permit the armed forces to launch the Nuclear Missile. But the Election Commission says that a caretaker Government cannot take such a decision because elections are at the door and this decision will affect the swing of votes in the election. A public interest litigation (PIL) is filed in the supreme court of India, alleging misuse of power by the Election commission. Supreme Court comes to the rescue of the PM, and says acting PM is authorized to take this decision.
In between all this, one of the Pak missiles successfully takes off, and falls 367 miles away from the target. The Missile falls on a government building at 11:00 AM. But since no employees have reached work, there are no casualties.
The Pakistan army is now trying to get better technologies from China. US condemns use of a nuclear missile by Pakistan, and offers to send its seventh fleet to the Indian Ocean. The Indian government, wary of the move, declines.
Finally, the Indian government decides to launch a nuclear missile, after convening an all party meeting. It's been three months since the army first sought permission. Pro-humanity, anti-nuclear activists come on board against the government's decision. Human chains are being made in New York, LA and Washington for peace. Indians are sending protest email requesting that it be "forwarded to as many Indians as possible".
On the Pakistan side, missiles keep failing. At times they fail to take-off, at other times the payload gets detached from the missile during flight. Some missiles deviate from target due to high-speed winds blowing over Rajasthan, and have to be neutralized by Pakistan, as these missiles are now moving backwards towards Karachi.
Finally, a missile smuggled from USA is used. The Pakistan army is unable to understand its software, so it hits its original destination: Russia.
Russians successfully intercept the missile and in retaliation, launch a Nuclear missile towards Islamabad.
The missile hit the target and creates havoc. Pakistan cries for help. It asks for loans from IMF and the world bank. India expresses deep regrets for what has happened and sends in a million dollars worth of soap.
The War ends.
attached mail follows:
Hi there I need help about session
see i have a page (index.php) that used this session_start(); session_register(username); and i got input username
after the submit button is click i move into a frame pages......
then in the frame i define again session_start(); for each frame...i got two frame...... i intended to parse the username into my frame...but got nothing i intended to parse the username all over the pages (in frame) until he/she log out
can anyone help me with it
Thanks in Advance
Yamin Prabudy
attached mail follows:
Message-ID: <002301c12163$81d6c720$4814a8c0
prog6>
From: "karthik" <karthik
ccipl.com>
To: "Yamin Prabudy" <phplist
pro.net.id>,
<php-general
lists.php.net>
Date: Fri, 10 Aug 2001 11:42:56 +0530
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Subject: Re: [PHP] HELP...session
Hi,
I hope u r regisitering the session variable (i.e. username) on submit of index.php. If u r doing this then u can access the same by using $HTTP_SESSION_VARS['username'] assuming u r registering ur session variable as username.
I hope all the frames have session_start also.
karthik.
----- Original Message -----
From: "Yamin Prabudy" <phplist
pro.net.id>
To: <php-general
lists.php.net>
Sent: Friday, August 10, 2001 10:02 AM
Subject: [PHP] HELP...session
Hi there I need help about session
see i have a page (index.php) that used this session_start(); session_register(username); and i got input username
after the submit button is click i move into a frame pages......
then in the frame i define again session_start(); for each frame...i got two frame...... i intended to parse the username into my frame...but got nothing i intended to parse the username all over the pages (in frame) until he/she log out
can anyone help me with it
Thanks in Advance
Yamin Prabudy
attached mail follows:
hi everyone!
I'm new to PHP.
I don't know why I can't make this page work. it doesn't show my search result.
Any help would be appreciated. This script is driving me nuts! :-)
Thanks!
<?php $connect = mysql_connect("localhost","user_name","password"); $select_data = mysql_select_db("ardani_cd_collection"); $query = "SELECT * FROM main where description = '$song_title'"; $result = mysql_query($query);
while($row = mysql_fetch_row($result)) {echo "<table border='1'>","<TR>","<TD>",$row[1],"</TD>","<TD>",$row[2],"</TD>","<TD>",$ro w[3],"</TD>","<TD>",$row[4],"</TD>","<TD>",$row[5],"</TD>","</TR>","</table> ";} ?>
attached mail follows:
On Fri, 11 Feb 2000 09:36, Ardani Sarjito wrote: > hi everyone! > > I'm new to PHP. > > I don't know why I can't make this page work. > it doesn't show my search result. > > Any help would be appreciated. > This script is driving me nuts! :-) > > Thanks! > > <?php > $connect = mysql_connect("localhost","user_name","password"); > $select_data = mysql_select_db("ardani_cd_collection"); > $query = "SELECT * FROM main where description = '$song_title'"; > $result = mysql_query($query); > > while($row = mysql_fetch_row($result)) > {echo "<table > border='1'>","<TR>","<TD>",$row[1],"</TD>","<TD>",$row[2],"</TD>","<TD> >",$ro > w[3],"</TD>","<TD>",$row[4],"</TD>","<TD>",$row[5],"</TD>","</TR>","</t >able> ";} > ?>
1 Try echoing your query and pasting it into a mysql console and see what happens (if you have console access) or at least see if the echoed query is logical.
2 View the source and see if there is anything there
3 Use mysql_num_rows() and echo the number of rows returned.
-- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIAI have a 33.6Kbps modem and 1.5bps fingers
attached mail follows:
Could you please give us some error messages, please?
> <?php > $connect = mysql_connect("localhost","user_name","password"); > $select_data = mysql_select_db("ardani_cd_collection"); > $query = "SELECT * FROM main where description = '$song_title'"; > $result = mysql_query($query); > > while($row = mysql_fetch_row($result)) > {echo "<table > border='1'>","<TR>","<TD>",$row[1],"</TD>","<TD>",$row[2],"</TD>","<TD>",$ro > w[3],"</TD>","<TD>",$row[4],"</TD>","<TD>",$row[5],"</TD>","</TR>","</table> > ";} > ?>
attached mail follows:
My messageboard is working properly in Win98 Apache; However, it doesn't work properly under Win2000 with the same code. ( Problem: it can save the message but cannot read from file) I have a question....is there any difference between 98 and 2000? thx for your help....
...........nick
attached mail follows:
Message-ID: <20010810065702.88310.qmail
pb1.pair.com>
To: php-general
lists.php.net
From: "elias" <elias_bachaalany
yahoo.com>
Date: Fri, 10 Aug 2001 09:54:38 +0200
Subject: Re: Difference between win98 and win2000
In windows 2000 unless you set permission to write files you can't! I mean that you have to explicitly specify that a certain folder can be written to.
"..." <geteasy
seed.net.tw> wrote in message
news:001d01c1215b$0c7613d0$14794ad3
maidew3qujo5j0...
My messageboard is working properly in Win98 Apache;
However, it doesn't work properly under Win2000 with the same code.
( Problem: it can save the message but cannot read from file)
I have a question....is there any difference between 98 and 2000?
thx for your help....
...........nick
attached mail follows:
I'm back again!
What does this warning mean: Supplied argument is not a valid MySQL result resource
Thanks !
attached mail follows:
On Fri, 11 Feb 2000 10:14, Ardani Sarjito wrote: > I'm back again! > > What does this warning mean: > Supplied argument is not a valid MySQL result resource > > Thanks !
Try this resource :-)
http://au2.php.net/manual/en/faq.using.php#AEN61456
-- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIAThe days of the digital watch are numbered
attached mail follows:
Below is the result of your feedback form. It was submitted by
(phugs
php-homepage.de) on Friday, August 10, 2001 at 07:50:41
---------------------------------------------------------------------------
: Join for free Today. Free Memberships. Free Downloads. No Credit Cards Needed. HUGE Celebrity selection from Jennifer Lopez to Britney Spears. Also Specializing Streaming Video, Live sex shows for every desire! This isn't one of those crummy scams where you have to use a credit card! Take a look and you'll see. <a href="aol://2000:http://onesara4.devil.ru">Enter Here</a>
If you would like to be removed from this mailing list please <a href="mailto:removed
n2.com">Click Here!</a>
---------------------------------------------------------------------------
attached mail follows:
Hi! friends, i also want this feature.
Can u tell me how to start a session whenever the user logged in and how to end session after logout.
where i have to give these function names... session_start(); session_register(username);
Thanks in advance.
Regards
-Balaji
----- Original Message -----
From: Yamin Prabudy
To: php-general
lists.php.net
Sent: Friday, August 10, 2001 10:02 AM
Subject: [PHP] HELP...session
Hi there I need help about session
see i have a page (index.php) that used this session_start(); session_register(username); and i got input username
after the submit button is click i move into a frame pages......
then in the frame i define again session_start(); for each frame...i got two frame...... i intended to parse the username into my frame...but got nothing i intended to parse the username all over the pages (in frame) until he/she log out
can anyone help me with it
Thanks in Advance
Yamin Prabudy
- text/plain attachment: Wipro_Disclaimer.txt
attached mail follows:
Dear everyone who has been trying to help me.
THANKS ALOT!!!!!!
Sincerely, Ardani
attached mail follows:
hope this helps:
///
<?php
// simple post method
// version 1.0 by Andrus (andrus
vnet.ee)
// Disclaimer: // everyone can change or use this code however and wherever they want ;)
// send out "browser" headers function send_headers ($fp) { fputs ($fp, "Accept: */*\n"); fputs ($fp, "Accept-Language: en\n"); fputs ($fp, "Connection: Keep-Alive\n"); fputs ($fp, "User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)\n"); }
// post data and return reply
function post_data ($host, $url, $data) {
$fp =
fsockopen ($host, 80, $errno, $errstr, 120);
$ret = "";
if (strncasecmp ($url, "http://", 7) == 0) $url = substr
($url, 7);
$p = strpos ($url, '/');
if (empty ($p)) {
$req = "/";
} else {
$req = substr ($url, $p);
}
if ($fp) {
fputs ($fp, "POST $req HTTP/1.0\n");
send_headers ($fp);
fputs ($fp, "Content-type: application/x-www-form-urlencoded\n");
$out = "";
while (list ($k, $v) = each ($data)) {
if(strlen($out) != 0) $out .= "&";
$out .= rawurlencode($k). "=" .rawurlencode($v);
}
$out = trim ($out);
fputs ($fp, "Content-length: ".strlen($out)."\n\n");
fputs ($fp, "$out");
fputs ($fp, "\n");
while(!feof($fp)){
$ret .= fgets($fp,128);
}
fclose ($fp);
}
return $ret;
}
// example how to use:
// following code will post variables "login" and "pass" to server
"www.something.com" script "/submit.php"
$reply = post_data ("www.something.com", "/submit.php", array ("login" =>
$username, "pass" => $password));
?>
///
"Brandon Orther" <orther
webintellects.com> wrote in message
news:00cd01c1204b$d5cdb9b0$0a00a8c0
webintel...
> Hello,
>
> I have used perl to emulate a post with LWP:UserAgent I am looking for
> the same effect in php. Does anyone know how I can do this?
> Thank you
> Brandon
>
>
attached mail follows:
>If I use extention .inc for including my connection- >variables file then browser attempts to download this file which is >not better then first. I searched the net on this topic and found a >LOT of information about this problem and the best that I found is >here I just want you to be aware of this problem
It's common knowledge that you should NOT put your database user+PW into your HTML root. Using .inc means Apache (or whatever kind of server you're using) isn't going to parse the file through php.
This has been discussed on this and other php related lists.. just have a look in the archive and you'll see..
Don't want to sound nasty harsh or whatever you want to call it but I think most tutorials will say something about it. I would suggest you read those before you send messages to this or any other list.. The archive is a great resource too. Remember.. you're most certainly not the first person who uses PHP to connect to MySQL.. most if not all issues you think you have found has been seen by others. Searching the archive and reading tutorials will keep you from burning bandwith and space for a non-issue.
Have fun.
Bye,
B.
attached mail follows:
On Thursday 09 August 2001 17:21, cprenato
netscape.net wrote:
> After install PHP when I try to open in a URL the address:
> http://casa/IISSamples/Default/exemplo.php
> I receive the following error:
>
> Error 403 of HTTP
> 403.1 Forbided: forbided execution access
>
First experiment:
Put a file called test.htm in the same directory which contains any old html. Try to access that as http://casa/IISSamples/Default/test.htm
If that works OK, then the configuration of pws is wrong. I don't have PWS so I'm not sure of the user interface to configuring it, although if you installed php using the 'Installer' distribution, it will have configured PWS correctly.
Sometimes, PWS seems to get itself into a strage state where you can't get it to work no matter what you try. Some people have had success after reinstalling PWS. Others just dump it and use Xitami or Apache.
Cheers
-- Phil Driscoll
attached mail follows:
Hi all,
I'm experiencing strange problem. When I try to use verdana font, all national characters from codepage 1250 won't appear att all. Has anybody experienced this behaviour? I'm using pdflib 4.0.1, Mandrake 8.0, php 4.0.6. pdflib.upr is updated as required for my machine. I've converted verdana.ttf to verdana.afm on linux.
tia, Dezider.
attached mail follows:
Hi! friend, i got the following error when i am goint to start a session.
This is the file. and i got the following errors.
Warning: open(/tmp\sess_4a3f421e3a28de6801941743c0632862, O_RDWR) failed: m (2) in c:\www\login.php on line 2 Warning: open(/tmp\sess_4a3f421e3a28de6801941743c0632862, O_RDWR) failed: m (2) in Unknown on line 0 Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0
login.php
<?php session_start(); session_register(emp_id); ?>
<html> <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>
- text/plain attachment: Wipro_Disclaimer.txt
attached mail follows:
Hi,
You are on windows so the session.save_path should be changed in php.ini to "C:\temp" or "c:\php\temp" or any other temporary directory.
BW, Andras.
----- Original Message -----
From: "Balaji Ankem" <balaji.ankem
wipro.com>
To: <php-general
lists.php.net>
Cc: "Yamin Prabudy" <phplist
pro.net.id>
Sent: Friday, August 10, 2001 11:10 AM
Subject: [PHP] problem with session start
Hi! friend, i got the following error when i am goint to start a session.
This is the file. and i got the following errors.
Warning: open(/tmp\sess_4a3f421e3a28de6801941743c0632862, O_RDWR) failed: m (2) in c:\www\login.php on line 2 Warning: open(/tmp\sess_4a3f421e3a28de6801941743c0632862, O_RDWR) failed: m (2) in Unknown on line 0 Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0
login.php
<?php session_start(); session_register(emp_id); ?>
<html> <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>
----------------------------------------------------------------------------
----> -- > 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:
Tach!
Is that correct, that my php.exe opens each time when a user access a page (e.g. on my intranet-page) ??
Is there no way to say php.exe to run only one time and compile the files through this instance???
I've designed a intranet-platform for LAN-parties and at our last one, there were 505 guys, and ~30 accessed my pages at the same time, so the 2 gig-ram high-end-power PC was to slow to return the queries whitin the 180 sec. timeout...
(excause my bad english ;)
I hope, someone knows an answer...
10x !
Tribun
--- www.mp3o.netPS: the LAN-Party's HomePage is called: www.lankoeln.com (may be some other germans from cologne read this ;)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]