[PHP] Problem: Sybase, PHP and multiple result sets
I have started working with Sybase lately, and it has come to my knowledge that a single query can return multiple result sets in Sybase, especially when using stored procedures. Now, in ASP (sorry...), there are calls that allow retrieving the next result set from the current result set. So in effect the result sets are a linked list and you can access all of them. In PHP, however, the result set returned is the first one, and I don't see any method for retrieving the next result set. Does anybody know of such a method? Does anybody have a suggestion for workaround? Basically, in most of these cases, the important result set is actually the last one, not the first, as the intermediate result sets are mostly temporary results. Herouth -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] `pwd` - what does this mean?
Hi Guys, I actually know what it means. Well, I think it means the current directory? Anyway... what exactly is it and where can I find some more information about it? I couldn't find much on php.net - also, is there any other ones(whatever it is) like this? Thanks. Scott. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: searching arrays
Hi Richard, Thanks a lot for your prompt reply!! I get a parse-error, however, on line 77 (marked below): function search_the_array($array) { global $search_tmp; $result = array_search($search_tmp, $array, TRUE); reset($array); Line77:while (!($result === FALSE) (list($k, $v) = each($array)) { // Or maybe you wanted ereg($search_tmp, $v) here... $result = ereg($v, $search_tmp) ? $k : FALSE; } return ' '.$result; // extra space needed before the key } Any idea as to how this could be solved? TIA, Raphael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: `pwd` - what does this mean?
my guess would be Parent Working Directory, but i'm not sure... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] `pwd` - what does this mean?
how about typing man pwd on a unix box? -Original Message- From: Scott Mebberson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 15 August 2001 4:08 PM To: [EMAIL PROTECTED] Subject: [PHP] `pwd` - what does this mean? Hi Guys, I actually know what it means. Well, I think it means the current directory? Anyway... what exactly is it and where can I find some more information about it? I couldn't find much on php.net - also, is there any other ones(whatever it is) like this? Thanks. Scott. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: `pwd` - what does this mean?
pass working directory [or] path to working directory. PWD is a unix command See man pwd for more details. eg http://campuscgi.princeton.edu/man?pwd#toc3 -Original Message- From: Raphael Pirker [mailto:[EMAIL PROTECTED]] Sent: August 15, 2001 2:49 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: `pwd` - what does this mean? my guess would be Parent Working Directory, but i'm not sure... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: php upload on MAC
Jason wrote: I wrote a script that clients can upload files to our server and download files but there is one small problem. Mac users can't upload all of their files. I am guess there is no file extensions. Anyone have any ideas? Jason Well, in Mac, there are indeed no mandatory file extensions. The file type is kept in a record in the filesystem, as four bytes of information. This information is not passed along as the file is uploaded. However, the file upload mechanism requires that the browser should send the MIME type of the uploaded file. This information is available to PHP, and, depending on the fidelity of the browsers your users use, it can give you useful information. Herouth -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: `pwd` - what does this mean?
I typed it on my server (SunOS 5.7) and it said, it returns the current working directory. So this is a unix command executed from PHP? Is there any other useful unix commands which can be executed from PHP? Does anybody have a list? Scott Mebberson [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi Guys, I actually know what it means. Well, I think it means the current directory? Anyway... what exactly is it and where can I find some more information about it? I couldn't find much on php.net - also, is there any other ones(whatever it is) like this? Thanks. Scott. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: `pwd` - what does this mean?
actually says: pwd - print name of current/working directory in the man page (c: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 15 August 2001 4:18 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] Re: `pwd` - what does this mean? pass working directory [or] path to working directory. PWD is a unix command See man pwd for more details. eg http://campuscgi.princeton.edu/man?pwd#toc3 -Original Message- From: Raphael Pirker [mailto:[EMAIL PROTECTED]] Sent: August 15, 2001 2:49 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: `pwd` - what does this mean? my guess would be Parent Working Directory, but i'm not sure... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Problem: Sybase, PHP and multiple result sets
The ability to select a set from a previously selected set is possible in Sybase because the database supports creation of temporary tables and the select insert. PHP (which is often packaged with MySQL) does not attempt to mix database (SQL) with it's own scripting language (unless someone is working on this). ASP on the other hand will sell you anything that consumes resources thereby encouraging you to buy the bigger software, requiring bigger hardware (An old IBM marketing plan, and my personal opinion). When you talk about a result set in PHP you must be referring to what is returned by MySQL, not PHP. Perhaps someday MySQL will have temp tables and SELECT INSERT capability. On the other had PHP does a very nice job of looping thru the result set. Warren Vail -Original Message- From: Herouth Maoz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 14, 2001 11:35 PM To: [EMAIL PROTECTED] Subject:[PHP] Problem: Sybase, PHP and multiple result sets I have started working with Sybase lately, and it has come to my knowledge that a single query can return multiple result sets in Sybase, especially when using stored procedures. Now, in ASP (sorry...), there are calls that allow retrieving the next result set from the current result set. So in effect the result sets are a linked list and you can access all of them. In PHP, however, the result set returned is the first one, and I don't see any method for retrieving the next result set. Does anybody know of such a method? Does anybody have a suggestion for workaround? Basically, in most of these cases, the important result set is actually the last one, not the first, as the intermediate result sets are mostly temporary results. Herouth -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] `pwd` - what does this mean?
On 15-Aug-2001 Scott Mebberson wrote: Hi Guys, I actually know what it means. Well, I think it means the current directory? It executes the Unix command pwd. pwd - print working (current) directory. Anyway... what exactly is it and where can I find some more information about it? I couldn't find much on php.net man pwd - also, is there any other ones(whatever it is) like this? man -k | grep (1) Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Problem: Sybase, PHP and multiple result sets
On Wednesday 15 August 2001 10:07, Warren Vail wrote: The ability to select a set from a previously selected set is possible in Sybase because the database supports creation of temporary tables and the select insert. No, you seem to have missed my point entirely. So I'll explain in a little more detail. I run a stored procedure. Let's assume I run it from the interactive utility and not from PHP for the moment. SP_SOMETHING_OR_OTHER PARAM1 PARAM2 PARAM3 The database returns: foo bar === === 1020 3040 field1 field2 field3 == == == string bla 15 nothing bla 12 As you can see, it returns TWO result sets. One with two numeric columns. The next with three columns, the first two string and the last numeric. This is, of course, just an example. Now back to the web interface. If I use PHP, I get only the first result set. That is, I write something along the lines of: $rs = sybase_query( SP_SOMETHING_OR_OTHER PARAM1 PARAM2 PARAM3, $conn ); while ( $row = sybase_fetch_row( $rs ) ) { echo $row[0]; // and so on } This will only display the results of the first result set - the one with the two fields, foo and bar. There is no way for me to reach the second table generated by the query. This is supposed to be the significant table. Now, in ASP, there is something like set rs = rs.NextResultSet Which sets the rs to the second result set, the one with the three fields of mixed types, at which point you loop, just like above, and retrieve the new information. This method or an equivalent of it is not in the PHP documented set of Sybase functions. I hope I made myself clearer. And by the way, you don't have to sell me on the uselessness of ASP, the general uselessness of Microsoft etc. - I don't use any Microsoft products, even at work. Herouth -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] `pwd` - what does this mean?
Thanks for your reply but what does this (man -k | grep (1)) do? Thanks Don Read [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On 15-Aug-2001 Scott Mebberson wrote: Hi Guys, I actually know what it means. Well, I think it means the current directory? It executes the Unix command pwd. pwd - print working (current) directory. Anyway... what exactly is it and where can I find some more information about it? I couldn't find much on php.net man pwd - also, is there any other ones(whatever it is) like this? man -k | grep (1) Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] urgant reply soon
hi, i am facing problem while using the following code even the socket dosent work i am using php 4... web server xitami os min ME note :- what is GD . how to check it exist or not in the below code i am get fatel error(function imagecreate() not found) //// ?php header(Content-type: image/gif); $im = ImageCreate(100,20); $red=ImageColorAllocate($im,255,0,0); $white=ImageColorAllocate($im,255,255,255); ImageString($im,3,3,3,Ashok,$white); ImageGif($red); ImageDestroy($im); ? //// _ For Rs. 2,000,000 worth of Aptech scholarships click below http://clients.rediff.com/clients/aptechsch/index1.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: `pwd` - what does this mean?
On Wed, 15 Aug 2001 16:25, Scott Mebberson wrote: I typed it on my server (SunOS 5.7) and it said, it returns the current working directory. So this is a unix command executed from PHP? Is there any other useful unix commands which can be executed from PHP? Does anybody have a list? Well there's the Read Manual command, rm :-) But seriously, you can execute _any_ operating system command (that the webserver user has rights to) with exec(), system() or backticks. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA I wish I had something to write with, Tom said pensively. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: searching arrays
On Wed, 15 Aug 2001 16:17, Raphael Pirker wrote: Hi Richard, Thanks a lot for your prompt reply!! I get a parse-error, however, on line 77 (marked below): function search_the_array($array) { global $search_tmp; $result = array_search($search_tmp, $array, TRUE); reset($array); Line77:while (!($result === FALSE) (list($k, $v) = each($array)) { // Or maybe you wanted ereg($search_tmp, $v) here... $result = ereg($v, $search_tmp) ? $k : FALSE; } return ' '.$result; // extra space needed before the key } Any idea as to how this could be solved? TIA, Raphael A quick count seems to show a different number of left and right parentheses in that line. Match your brackets and you should be OK. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA I only have diamonds, clubs and spades, said Tom heartlessly. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] compression help
It is possible for me to use the zlib library to compress multiple files in a gz file and after get the original files by decompress it? What i can do now is just compress / decompress a single file only with zlib library. TIA kin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] session security issue
On Tue, Aug 14, 2001 at 02:32:03PM -0700, David Price wrote: Sean, That is a very interesting suggestion. How would you call that using PHP? Thanks, David Price $HTTP_SERVER_VARS{SSL_SESSION_ID} Another thing I found with phpinfo() is $HTTP_SERVER_VARS{UNIQUE_ID}. I don't know (yet) was it is, but it sounds usable, doesn't it? -- * RzE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] urgant reply soon
On Wed, 15 Aug 2001 17:13, ashok sundaram wrote: hi, i am facing problem while using the following code even the socket dosent work i am using php 4... web server xitami os min ME note :- what is GD . how to check it exist or not in the below code i am get fatel error(function imagecreate() not found) //// ?php header(Content-type: image/gif); $im = ImageCreate(100,20); $red=ImageColorAllocate($im,255,0,0); $white=ImageColorAllocate($im,255,255,255); ImageString($im,3,3,3,Ashok,$white); ImageGif($red); ImageDestroy($im); ? //// Check the settings in your php.ini file in the section Windows Extensions and make sure the line extension=php_gd.dll exists - remove the ; at the beginning of the line if it is there. Check you have the dll and restart your server. To tell what features your installation has, use phpinfo() -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Useless Invention: Strap-on portable chairs. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP and Java InputStream object
Is it possible use php to read a file and then using it to construct a java.InputStream object? TIA Kiat Kin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] a bit off the list but should be easy
Hi people It is about html, that when I go to some sites that ask me to download their font like Japanese or chinese font, in order to read their language, what do they put in the page for that kind of detection? Jack [EMAIL PROTECTED] Love your enemies, it will drive them nuts
RE: [PHP] a bit off the list but should be easy
Most people do it like this Specify the charset in the document. e.g. Simplified Chinese meta http-equiv=content-type content=text/html; charset=gb2312 Traditional Chinese meta http-equiv=content-type content=text/html; charset=big5 You can also specify the language type in the web server - have a look at your apache settings. Doing it via the charset= method is better though imho. Note that the download font thing is Internet Exploder Specific. Internet Exploder also has a few issues with different charsets. Also note that *all* html documents should have a specified charset - even the plain english ones. Most of the html on the internet is coded wrongly, this does not make it correct. I do a lot of simplified chinese development, being located in Shanghai, China. Cheers, Lawrence. -Original Message- From: Jack [mailto:[EMAIL PROTECTED]] Sent: August 16, 2001 4:21 AM To: [EMAIL PROTECTED] Subject: [PHP] a bit off the list but should be easy Hi people It is about html, that when I go to some sites that ask me to download their font like Japanese or chinese font, in order to read their language, what do they put in the page for that kind of detection? Jack [EMAIL PROTECTED] Love your enemies, it will drive them nuts -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] a bit off the list but should be easy
Thanks :-) that is really helpful. Jack [EMAIL PROTECTED] Love your enemies, it will drive them nuts - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, August 15, 2001 3:33 AM Subject: RE: [PHP] a bit off the list but should be easy Most people do it like this Specify the charset in the document. e.g. Simplified Chinese meta http-equiv=content-type content=text/html; charset=gb2312 Traditional Chinese meta http-equiv=content-type content=text/html; charset=big5 You can also specify the language type in the web server - have a look at your apache settings. Doing it via the charset= method is better though imho. Note that the download font thing is Internet Exploder Specific. Internet Exploder also has a few issues with different charsets. Also note that *all* html documents should have a specified charset - even the plain english ones. Most of the html on the internet is coded wrongly, this does not make it correct. I do a lot of simplified chinese development, being located in Shanghai, China. Cheers, Lawrence. -Original Message- From: Jack [mailto:[EMAIL PROTECTED]] Sent: August 16, 2001 4:21 AM To: [EMAIL PROTECTED] Subject: [PHP] a bit off the list but should be easy Hi people It is about html, that when I go to some sites that ask me to download their font like Japanese or chinese font, in order to read their language, what do they put in the page for that kind of detection? Jack [EMAIL PROTECTED] Love your enemies, it will drive them nuts -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Income on the Net!
Here is an opportunity that you can take up FREE. If you join as an affiliate, we'll teach you how to build a profitable business on the Internet, using our system to create an income stream and earn income globally, 24 hours a day. Don't let this opportunity slip past you - our organization is already well over 2 million strong and growing at around 6,000 each day! Join us and let's work together to get a share of all those members. Just hit: mailto:[EMAIL PROTECTED]?Subject=Opportunity To be removed from this list, hit: mailto:[EMAIL PROTECTED]?Subject=Remove -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] button on PHP page
Hi How do i use a form button to call a php function? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] important linuxtoday article: Will Open Source Lose the Battle for the web?
hmm just read the controversial linuxtoday article http://linuxtoday.com/news_story.php3?ltsn=2001-08-13-009-20-OP an excerpt: but when will PHP grow to become something more than a web scripting language? Where is the PHP enterprise component architecture? What about clustering and failover? Where are the WSDL and UDDI implementations? Don't show me bits and pieces here and there. Show me a framework. Show me a reference implementation. Comments on the article? -- Vincent [EMAIL PROTECTED] Xaymaca Studios http://www.blendermania.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: to include php file into html file
Hi Jack! There you must have missunderstod something. PHP is not JavaScript. PHP is only interpreted if used in a file with the depending suffix. (php3, php, asp.) If you want to include a php-file into another file this destination-file also has to be a php-file. JavaScript can´t use PHP. To include one php-file into another use include() or requires(). Examples and hints to this functions could be found in the PHP-Manual. Robert Jack [EMAIL PROTECTED] schrieb im Newsbeitrag 02ff01c1259a$ebec2e80$[EMAIL PROTECTED]">news:02ff01c1259a$ebec2e80$[EMAIL PROTECTED]... Hi people I have tried to include php file into html page using the syntax below and it said syntax error at this part when the page is loaded. What is wrong with calling php file this way? Or is there any other way to call php file from html page? *** html body script language='JavaScript' src='/include/adjs.php/script /body /html *** Jack [EMAIL PROTECTED] Love your enemies, it will drive them nuts -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] select problem
I have mysql in redhat linux and apache 1.3.20 with module php 4.0.6 but I have error in my select, connect to the database is ok. In apache and mysql uder windows working this script OK but no in linux. What's wrong ? @$spojenie = mysql_connect("localhost","user","password"); if (!$spojenie) : echo "Chyba pri konektne na databazu !!!"; exit; endif; mysql_select_db("Patenty",$spojenie); $podmienka = "Cislo_dokumentu BETWEEN 238000 AND 238023"; $tried = "Cislo_dokumentu"; if ($podmienka !="") @$vysledok = mysql_query("SELECT * FROM patent WHERE $podmienka ORDER BY $tried",$spojenie); else @$vysledok = mysql_query("SELECT * FROM patent ORDER BY $tried",$spojenie); if (!$vysledok): echo "Error.BR\n"; exit; endif; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: button on PHP page
Hi Michael, If you use a form then all elements of the form (text-boxes, checkboxex etc.) automatically exist as variables in the file which ist specified as action of the form. To use it in the way you want it might be the right way to specifiy the file, which contains the form, itself as action ( e.g. form action=?php echo $PHP_SELF ?) Robert Michael McNeice [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi How do i use a form button to call a php function? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Onclick and PhP
When a page is loaded the php code is being executed, is this also possible for an onclick event? If so how do I do that? tnx! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Onclick and PhP
On Wed, Aug 15, 2001 at 11:45:03AM +0200, Flugel wrote: When a page is loaded the php code is being executed, is this also possible for an onclick event? If so how do I do that? tnx! No. PHP is server-side, not client-side like onclick (JS). The only way to do things like that is: onclick=window.location.href='blahblahblah.php'; -- * RzE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Onclick and PhP
Is it also possible for the output of that php-page (MySQL query) to be displayed in a layer on the page where the button is located? Renze Munnik [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Wed, Aug 15, 2001 at 11:45:03AM +0200, Flugel wrote: When a page is loaded the php code is being executed, is this also possible for an onclick event? If so how do I do that? tnx! No. PHP is server-side, not client-side like onclick (JS). The only way to do things like that is: onclick=window.location.href='blahblahblah.php'; -- * RzE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Explode Your Business!
Re: [PHP] Onclick and PhP
On Wed, Aug 15, 2001 at 11:56:42AM +0200, Flugel wrote: Is it also possible for the output of that php-page (MySQL query) to be displayed in a layer on the page where the button is located? Should be... But unfortunately I don't have enough time to figure it out for you at the moment. Sorry! -- * RzE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re[2]: [PHP] Onclick and PhP
Try this page. It is a hack but I think it does what you want it to. !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 3.2 Final//EN HTML HEAD /HEAD BODY BGCOLOR=#FF TEXT=#00 LINK=#FF VLINK=#80 ALINK=#FF00FF BACKGROUND=? ? function theAnswer($action) { if($action == show) return 42; return ; } ? This is a page with a button on it. When you press it you willget something in the layer. BR INPUT TYPE=button VALUE=Show onClick=location.href='? echo $PHP_SELF; ??action=show' DIV STYLE=position : absolute; left : 150px; top; 250px; width : 200px; height : 200px; background : #FF; color : #FF ? echo theAnswer($action); ? /DIV /BODY /HTML -- Kind regards, Morten Winkler -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] important linuxtoday article: Will Open Source Lose the Battle for the web?
hmm just read the controversial linuxtoday article http://linuxtoday.com/news_story.php3?ltsn=2001-08-13-009-20-OP SNIP Comments on the article? A few. But I saw you can give comments below the article mentioned above. Please please please leave this discussion there. It's endless and pretty useless. Might attract A LOT of traffic on this list. I don't intend to spend any more time on it. Bye, B. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] a bottle in the sea...
Hello ! I've read a lot of web, news and archives for two days and i've not resolve my problem. Here it is : Configuration : Apache 1.3.20 (Win32) / PHP 4.0.5 / MySQL 3.23.39 / Windows 2000 Pro (SP2 and update ok). Services : Apache and MySQL runs as services under 'toto' account. Note : i use apache with php module As written in http://www.mysql.com/doc/A/c/Access_denied.html, i've checked all my mySQL configuration and it seems good. I can log on my database with mysql -u toto -p12345 titi and it works fine. as they said : If you are able to connect using the mysql client, there is a problem with your program and not with the access privileges. Note : * select host,user from mysql.user gives (localhost,root) and (localhost,toto) * select host,db,user from db gives (localhost,toto,titi) [I've removed anonymous users and hosts that are not 'localhost'] So look at the (very simple !) HTML/PHP : htmlheadtitletry/title/head body ?php $dbhost=localhost; $dbuser=toto; $dbpass=12345; $dbname=titi; $conn = mysql_connect($dbhost,$dbuser,$dbpass) or die(bad Connection); mysql_select_db($dbname,$conn) or die(titi database not found); mysql_close($conn); ? /body/html and i have this message : Warning: MySQL Connection Failed: Access denied for user: 'toto@localhost' (Using password: NO) the only way to match this warning is to connect with mysql client without the password : mysql -u toto titi ERROR 1045: Access denied for user: 'dnd3e@localhost' (Using password: NO) [If it was a password that doesn't match i should find at the end (Using password: YES), isn't it ? and with same parameters, the mysql client connect without problems] I conclude that PHP script connect without the password argument ! As it seems impossible, i ask on this list some help thanks for your help regards, rashkatsa -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] error
Hi, How can I change this error message to my own message? Warning: fopen(publico/d/bibliografia.html,w+) - No such file or directory
Re: [PHP] session security issue
You need to check against a value that was registered as a session variable. There is no use in checking if some SSL variable is set. Here's a simplified version of my check_session function that I run at the top of every page that requires a session to be established. I also write to the session file on every click. This lets me know howmany sessions are actually active. I have a session deletion script that runs every minute to check the date of the session file, if it's older than a defined time it will remove the session file. The session deletion script is available at http://database.sf.net/ Any other ideas to make a session more secure? function check_session() { session_start(); if (session_is_registered(user_id)) { return TRUE; } else { header(Location: login.php); exit; } } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] error
Eduardo Kokubo wrote: Hi, How can I change this error message to my own message? Warning: fopen(publico/d/bibliografia.html,w+) - No such file or directory There are two possibilities: 1) Use @fopen() instead of fopen(). This will supress the error-output. If fopen returns false, you still know something went wrong. You don't know what went wrong, though (permission, file doesn't exist...). 2) Use output-buffering. This way, the error-message will not be sent to the browser but remain in the buffer. Just look into the buffer if there is an error and react. Also, you should erase the error-message from the buffer. regards Wagner -- Madness takes its toll. Please have exact change. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: Re[2]: [PHP] Onclick and PhP
Wow you're good!! Tnx that was exactly what I needed!! Thumbs up for Morten Winkler Jørgensen tnx again! Orv î?÷inklÏ ²ørÏkîskî [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Try this page. It is a hack but I think it does what you want it to. !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 3.2 Final//EN HTML HEAD /HEAD BODY BGCOLOR=#FF TEXT=#00 LINK=#FF VLINK=#80 ALINK=#FF00FF BACKGROUND=? ? function theAnswer($action) { if($action == show) return 42; return ; } ? This is a page with a button on it. When you press it you willget something in the layer. BR INPUT TYPE=button VALUE=Show onClick=location.href='? echo $PHP_SELF; ??action=show' DIV STYLE=position : absolute; left : 150px; top; 250px; width : 200px; height : 200px; background : #FF; color : #FF ? echo theAnswer($action); ? /DIV /BODY /HTML -- Kind regards, Morten Winkler -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] error
On Wed, Aug 15, 2001 at 02:08:39PM +0200, Alexander Wagner wrote: Eduardo Kokubo wrote: Hi, How can I change this error message to my own message? Warning: fopen(publico/d/bibliografia.html,w+) - No such file or directory There are two possibilities: 1) Use @fopen() instead of fopen(). This will supress the error-output. If fopen returns false, you still know something went wrong. You don't know what went wrong, though (permission, file doesn't exist...). 2) Use output-buffering. This way, the error-message will not be sent to the browser but remain in the buffer. Just look into the buffer if there is an error and react. Also, you should erase the error-message from the buffer. 3) Write your own error-handler: http://www.php.net/set_error_handler -- * RzE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: a bit off the list but should be easy
Jack [EMAIL PROTECTED] wrote in message 039301c125c7$d4c6c300$[EMAIL PROTECTED]">news:039301c125c7$d4c6c300$[EMAIL PROTECTED]... Hi people It is about html, that when I go to some sites that ask me to download their font like Japanese or chinese font, in order to read their language, what do they put in the page for that kind of detection? That's not the page - that's the browser (based on the charset the page defines). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] MySQL Multi-Table Select Query Problem
Hey folks, if you go to http://www.acnsnet.com/czc/show.php?state=Bayern You can see my problem with this query. This thing is killin me so if you have any ideas just shout. thanks, chuck Chuck's Top 10 Things to Remember and Think about! === 10. Please return stewardess to original upright position. 9. Fighting for peace is like fucking for virginity. 8. Never date someone because you're too lazy to commit suicide. 7. It is not the fall that kills you. it's the sudden stop at the end. 6. You can't have everything. Where would you put it all? 5. Real Windows Performance, on the next In Search Of. 4. 2 rules to success in life. 1. Don't tell people everything you know. 3. 24 hours in a day, 24 beers in a case. Coincidence? 2. 9 out of 10 men who try Camels prefer women. 1. Always borrow money from a pesimist. They never expect it back anyway. That's it! NO MORE! JEEZ! GET BACK TO WORK! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: MySQL Multi-Table Select Query Problem
Charles Williams [EMAIL PROTECTED] wrote in message 008801c12588$80bc7960$fe0aa8c0@chucks">news:008801c12588$80bc7960$fe0aa8c0@chucks... Hey folks, if you go to http://www.acnsnet.com/czc/show.php?state=Bayern You can see my problem with this query. This thing is killin me so if you have any ideas just shout. This looks like a case of poor database design... If you had a 'cities' table and referred to it from your 'restaurants', 'hotels', and 'clubs' tables, the query would be obvious. (It would slightly complicate the logic for adding restaurants, hotels, and clubs - but how often do you do that, compared to querying the database?) While you're doing that, I would consider having a 'states' table too - reduce the number of text comparisons... Luckily, a stop-gap is available... create and populate a temporary cities table, and get your data from that. CREATE TEMPORARY TABLE cities SELECT city FROM restaurant WHERE state='Bayern'; INSERT INTO cities SELECT city FROM hotels WHERE state='Bayern'; INSERT INTO cities SELECT city FROM clubs WHERE state='Bayern'; SELECT DISTINCT city FROM cities ORDER BY city; ... how's that? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] apache,php,mysql,flash
Hi, I have RH6.2, php4, MySQL and want to generate graphs with flash. I have done a graph with Flash5 and Micromedia Generator. This creates a .swt file which takes info from a text file and, i guess, generates a .swf with the graph. I want to allow users to type graph details through an admin area and then generate the text file with PHP. Problem is my server doesn't recognise .swt file and it doesn't generate .swf. I have checked Red Hat site and couldn't find a solution. It has to be that I haven't installed something but eaven after checking the Micromedia site I didn't find a solution. Has anyone got it to work? Regards Ajdin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Looking for link system
what kind of a link system do you mean? Like the categories search, or something else? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Regular Expression Problem and PHP 4 (urgent)
Actually I didn't pose my question correctly. I also needed to grep out the Link for use in JS during the process. I wrapped this in a class file and here is the entry that I ended up with. Thanks for the assist though... == function getPL($plric) { //variable set to add at the end of the RIC if it's a stock not a page $temp = B2; //find out if it's a stock by query for the period in the RIC if (eregi(\., $plric)) { //add B2 if it's a stock $plric = $plric + $temp; } //the data comes out of the server pipe delimited $pages = split(\|,`/mdsweb/cgi-bin/Snap_Pages -s 000.000.000.00 -p 34927 -r $plric`); $a=0; while ($pages[$a] != ) { $pages[$a] = htmlentities($pages[$a]); //replace spaces with nbsp; $pages[$a] = str_replace( , nbsp;, $pages[$a]); //find the left angle brackets $a1 = spliti(lt;, $pages[$a]); $b=0; while ($a1[$b] != ) { //if the resulting data has a right angle bracket if (eregi(gt, $a1[$b])) { $a2 = spliti(gt;, $a1[$b]); if (eregi(\., $a2[0])) { echo a class='small' href='http://server/php/QST/PageTest.php?plric=;; //this would be the raw RIC echo $a2[0],$tag; //put back the left angle bracket in the link echo 'lt;; echo $a2[0]; //put back the right angle bracket in the link echo gt;/a; $c=1; //echo the link itself while ($a2[$c]) { echo $a2[$c]; $c++; } } else { echo a class='small' href='http://server/php/QST/PageTest.php?plric=;; //this would be a Page request not a RIC echo $a2[0]; echo '; echo $a2[0]; echo /a; $c=1; while ($a2[$c]) { echo $a2[$c]; $c++; } } } else { echo $a1[$b]; } $b++; } echo br; $a++; } } Richard Lynch [EMAIL PROTECTED] wrote in message 00a001c1253f$53fad780$6401a8c0@Lynchux100">news:00a001c1253f$53fad780$6401a8c0@Lynchux100... blah blah blah blah blah Link blah blah blah blah Link I think I need to use eregi_replace to make the line look like this: blah blah blah blah blah a href='#'Link/a blah blah blah blah a href='#'Link/a Depending on how accurately you have stated the problem, this may work: $text = 'blah blah blah blah blah Link blah blah blah blah Link'; $text = str_replace('', a href='#'XX, $text); $text = str_replace('', /a, $text); $text = str_replace('XX', '', $text); -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] could i get a clue?
I don't think this is the only possible way. I have used an html IMG tag, then created something like a rollover effect that called a php file for the image. It was kind of like a stop light, the light was off until focus came off of a particular form element, javascript then updated the image href with a few extra arguments, then the light turned green or red. You can also use a javascript popup window to call a php script. I'm sure there are a few ways to do this too. Here's the javascript input type=text size=45 name=1_1_email value= tabindex=1 onChange='validate_email()'IMG SRC=./trans.gif NAME=animation width=10 height=10 align=middle SCRIPT function validate_email(){ document.animation.src = ./image.phtml?email= + document.forms[0].elements[1].value ; return true; } /SCRIPT here's the php ?php include(get_connected.func); // This script checks for the existence of an image file, and outputs it, // if the image is not found than it will output a generic image $yes_image = ./green.gif; $no_image = ./red.gif; header(Content-type: image/gif); $mysqlconn = new MySQL_class; $mysqlconn-Create($db); $select = SELECT COUNT(item_id) FROM mkt_question_response WHERE item_id = '.$HTTP_GET_VARS[email].' GROUP BY item_id; $mysqlconn-Query($select); if($mysqlconn-rows 0){ readfile($no_image); }else{ readfile($yes_image); } ? Robert Zwink http://www.zwink.net/daid.php -Original Message- From: Renze Munnik [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 14, 2001 11:30 AM To: marilyn manson; [EMAIL PROTECTED] Subject: Re: [PHP] could i get a clue? On Tue, Aug 14, 2001 at 10:18:18AM -0500, marilyn manson wrote: ok a basic question. perhaps I dont know enough about javascript but anyway.. I want to call a php script from javascript. Anybody have any hints for me? A link to a useful website would work as well. thanks mates -student of computer science FAIK the only possibility is to redirect to the PHP script. Then you'll get something like: window.location.href=myscript.php; -- * RzE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Looking for link system
On 8/15/2001 9:36 AM this was written: what kind of a link system do you mean? Like the categories search, or something else? Yeah, I found one: http://www.in-link.net/ -- Thomas Deliduka IT Manager - New Eve Media The Solution To Your Internet Angst http://www.neweve.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Need people's advice on a web registration system.
There is a real nice article about authorization at www.phpbuilder.com They claim its the same authorization library Sourceforge uses. Here's the direct link. http://www.phpbuilder.com/columns/tim2505.php3 Robert Zwink http://www.zwink.net/daid.php -Original Message- From: Jean-Arthur Silve [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 14, 2001 9:53 AM To: sunny AT wde; php Subject: Re: [PHP] Need people's advice on a web registration system. I think, when they register or log in the first time, ask to the user if they want you to remember them by placing a cookie.. Don't do it automaticaly ! Most people doesn't like that, and if they are not on their computer (web bar, or at the office...), they could not like this... At 11:43 14/08/01 +0100, sunny AT wde wrote: Hi all! I'm trying to build a registration system for a community site that I'm building, and was wondering if people could give me advice or tell me about problems they've been having?? I'm planning to let people register with a username and password (encrypted), and then make them login with that, and thus putting a cookie on their machine. If the cookie is detected the next time, they don't have to login, but if it is, then they do. Sounds pretty simple?? Any advice? TIA! sunny Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] could i get a clue?
On Wed, Aug 15, 2001 at 09:44:58AM -0400, Robert V. Zwink wrote: I don't think this is the only possible way. I have used an html IMG tag, then created something like a rollover effect that called a php file for the image. It was kind of like a stop light, the light was off until focus came off of a particular form element, javascript then updated the image href with a few extra arguments, then the light turned green or red. You can also use a javascript popup window to call a php script. I'm sure there are a few ways to do this too. Hmmm, yeah... Way-2-go! The popup is the same thing as I said. You just redirect to a different (PHP-)page. So... nothing new! And for your other solution. Very usefull. Especialy when you don't have images on your page! What are you gonna do then? Create an image from 1x1 that's transparent or something? Can't get any worse. That's the SiteStat/Nedstat style. Awful! Besides that... what if I want to do some _serious_ processing instead of 'drawing' an image? Then, if I use your solution, I always have to create (or redirect to) an image. Not to way to do it! -- * RzE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] different PHP platforms
I've been using PHP on Linux for about 2 years now, and have absolutely loved it. However, I've recently accepted a full time position developing icky ASP pages, and still use PHP on my own sites. I was wondering about using PHP on WIndows and IIS 5.0. Could somebody using the Windows version of PHP on IIS (preferably the ISAPI version) drop me a line and let me know how you like it? How is it different from the Linux vesion? How is it's COM support? Anything I should look out for? Thanx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Running PHP as CGI under apache
I'm trying to run a script as CGI under apache, instead of using the apache module, because the module is safe-mode enabled and I need to bypass that for one script. If you put this script into a file (.cgi) and give it executable permissions, you can run it from the command line PHP CODE START #!/usr/bin/php ?php print Hello; ? PHP CODE END and the Content-Type header is added by PHP. But when I put it in my cgi-bin directory it would not execute from a browser - I got internal server error. The error log said Premature end of script headers. Has anybody been able to find a way round this problem? Running PHP NOT as a module? Thanks a lot. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] apache,php,mysql,flash
Do you have Macromedia Generator installed on your server? It's responsible for taking the .swt and generating the .swf output. - Tim On 15 Aug 2001 14:28:24 +0100, AJDIN BRANDIC wrote: Hi, I have RH6.2, php4, MySQL and want to generate graphs with flash. I have done a graph with Flash5 and Micromedia Generator. This creates a .swt file which takes info from a text file and, i guess, generates a .swf with the graph. I want to allow users to type graph details through an admin area and then generate the text file with PHP. Problem is my server doesn't recognise .swt file and it doesn't generate .swf. I have checked Red Hat site and couldn't find a solution. It has to be that I haven't installed something but eaven after checking the Micromedia site I didn't find a solution. Has anyone got it to work? Regards Ajdin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: apache processes memory use
Well, Thank you for the info. When I'm on the server by myself, there's no problem, the processes hanging around really don't matter the program runs fine. When I put over into public use on a (I assume) heavily utilized server I get emalloc errors. The 2 systems were made the same. I seem to have got it working for now. Unfortunately when I can use a database isn't up to me, so I guess I'll just keep tweaking things until I get the go ahead. Thank you, again 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. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] apache,php,mysql,flash
Hi, NO this is what i am trying to find out. where can i download it from (for RD6.2 and Aache 1.3.12). I have tried RH site but no joy. regards Ajdin On 15 Aug 2001, Tim wrote: Do you have Macromedia Generator installed on your server? It's responsible for taking the .swt and generating the .swf output. - Tim On 15 Aug 2001 14:28:24 +0100, AJDIN BRANDIC wrote: Hi, I have RH6.2, php4, MySQL and want to generate graphs with flash. I have done a graph with Flash5 and Micromedia Generator. This creates a .swt file which takes info from a text file and, i guess, generates a .swf with the graph. I want to allow users to type graph details through an admin area and then generate the text file with PHP. Problem is my server doesn't recognise .swt file and it doesn't generate .swf. I have checked Red Hat site and couldn't find a solution. It has to be that I haven't installed something but eaven after checking the Micromedia site I didn't find a solution. Has anyone got it to work? Regards Ajdin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] something like SSI ?
include(/path/to/the/include/file.inc); Original Message: - From: Martin [EMAIL PROTECTED] Date: Wed, 15 Aug 2001 03:21:42 +0200 To: [EMAIL PROTECTED] Subject: [PHP] something like SSI ? Ok, this may seem like a dumb newbie question... Is there an function like ASP's Server Side Include in PHP ? Or what is best to use instead, fread ? /marco -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] Mail2Web - Check your email from the web at http://www.mail2web.com/ . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] could i get a clue?
// Besides that... what if I want to do some _serious_ processing // instead of 'drawing' an image? Actually you just readfile an existing image, how much processing does that involve? Not too much. // The popup is the same thing as I said. You just redirect to a // different (PHP-)page. So... nothing new! For future reference: window.location.href=myscript.php != window.open('./myscript.php','mywindow','width=400,height=400,scrollbars=yes ') No offense intended, just wanted to show some alternatives. I'm sure there are more. Robert V. Zwink http://www.zwink.net/daid.php -Original Message- From: Renze Munnik [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 15, 2001 9:54 AM To: Robert V. Zwink; marilyn manson; [EMAIL PROTECTED] Subject: Re: [PHP] could i get a clue? On Wed, Aug 15, 2001 at 09:44:58AM -0400, Robert V. Zwink wrote: I don't think this is the only possible way. I have used an html IMG tag, then created something like a rollover effect that called a php file for the image. It was kind of like a stop light, the light was off until focus came off of a particular form element, javascript then updated the image href with a few extra arguments, then the light turned green or red. You can also use a javascript popup window to call a php script. I'm sure there are a few ways to do this too. Hmmm, yeah... Way-2-go! The popup is the same thing as I said. You just redirect to a different (PHP-)page. So... nothing new! And for your other solution. Very usefull. Especialy when you don't have images on your page! What are you gonna do then? Create an image from 1x1 that's transparent or something? Can't get any worse. That's the SiteStat/Nedstat style. Awful! Besides that... what if I want to do some _serious_ processing instead of 'drawing' an image? Then, if I use your solution, I always have to create (or redirect to) an image. Not to way to do it! -- * RzE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] could i get a clue?
On Wed, Aug 15, 2001 at 10:20:39AM -0400, Robert V. Zwink wrote: // Besides that... what if I want to do some _serious_ processing // instead of 'drawing' an image? Actually you just readfile an existing image, how much processing does that involve? Not too much. I didn't say that your construction doesn't work, but it's not the way to develop your sites. By using horrible constructions you can make 'good-working' site, but that doesn't make it a good site. You should always avoid using such terrible constructions. I mean... why creating an image if you never intended to do anything with images? Just because you want to have some weird construction on your site and you can't think of anything else, soon enough? // The popup is the same thing as I said. You just redirect to a // different (PHP-)page. So... nothing new! For future reference: window.location.href=myscript.php != window.open('./myscript.php','mywindow','width=400,height=400,scrollbars=yes ') It's the same kind of construction. You redirect the user to a completely different page. No offense intended, None taken... and none intended... -- * RzE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] apache,php,mysql,flash
There are open source flash software around try here http://www.openswf.org/ There is at least one alternative to MM's Generator I believe Best regards Nigel -Original Message- From: AJDIN BRANDIC [mailto:[EMAIL PROTECTED]] Sent: 15 August 2001 15:15 To: Tim Cc: [EMAIL PROTECTED] Subject: Re: [PHP] apache,php,mysql,flash Hi, NO this is what i am trying to find out. where can i download it from (for RD6.2 and Aache 1.3.12). I have tried RH site but no joy. regards Ajdin On 15 Aug 2001, Tim wrote: Do you have Macromedia Generator installed on your server? It's responsible for taking the .swt and generating the .swf output. - Tim On 15 Aug 2001 14:28:24 +0100, AJDIN BRANDIC wrote: Hi, I have RH6.2, php4, MySQL and want to generate graphs with flash. I have done a graph with Flash5 and Micromedia Generator. This creates a .swt file which takes info from a text file and, i guess, generates a .swf with the graph. I want to allow users to type graph details through an admin area and then generate the text file with PHP. Problem is my server doesn't recognise .swt file and it doesn't generate .swf. I have checked Red Hat site and couldn't find a solution. It has to be that I haven't installed something but eaven after checking the Micromedia site I didn't find a solution. Has anyone got it to work? Regards Ajdin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Mail method?
Hi guys, Is there anything I should configure or set up on the server to make the mail method work? There is nothing about it in the manual (or I just haven't found it?). Thanks Tamas Bucsesz Bucsu
Re: [PHP] apache,php,mysql,flash
You have to buy Generator from Macromedia. It's not free. (in fact, it's pretty expensive :) There are some open/free alternatives out there, but there weren't direct replacements last time I evaluated them. There's also the ming extension for PHP which lets you generate a whole SWF movie at runtime. - Tim On 15 Aug 2001 15:15:20 +0100, AJDIN BRANDIC wrote: Hi, NO this is what i am trying to find out. where can i download it from (for RD6.2 and Aache 1.3.12). I have tried RH site but no joy. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Mail method?
Is it not working for you? Do you have an smtp server of some sort set up? If you're using Win98/NT/2000, you can specify an smtp server to use (usually your ISP's). If you're using *nix, install sendmail. Good luck, Tyler Longren Captain Jack Communications [EMAIL PROTECTED] www.captainjack.com On Wed, 15 Aug 2001 16:38:49 +0200 Tamas Bucsu [EMAIL PROTECTED] wrote: Hi guys, Is there anything I should configure or set up on the server to make the mail method work? There is nothing about it in the manual (or I just haven't found it?). Thanks Tamas Bucsesz Bucsu -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] `pwd` - what does this mean?
At 02:37 AM 8/15/2001, Scott Mebberson wrote: man pwd learn linux/unix. ~kurth Hi Guys, I actually know what it means. Well, I think it means the current directory? Anyway... what exactly is it and where can I find some more information about it? I couldn't find much on php.net - also, is there any other ones(whatever it is) like this? Thanks. Scott. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] could i get a clue?
This particular application is designed to assist someone working on data entry, and is currently in production. She inputs 100's of mail-in reply cards into a database using a php webpage. The first field of the form is for the email address listed on the reply card. If the email address is already in the database, the person doing data entry will see an image of a red light, if the email address is not in the database the person doing data entry will see an image of a green light. Kind of weird, true, but exactly what she wanted. Why should the person doing data entry have to type in email address, mailing address, first name, last name, etc. just to get an error saying duplicate entry found? This way she can choose to replace the record or just skip it depending on the results (red or green). The changing image increases her productivty by decreasing time spent inputing duplicate data. And also is one possible answer to the question, How do I access php from JavaScript. I fail to see how this is a horrible construction. Solves a problem with minimal input from user, quickly, and completely. How is this horrible? Its a functional tool, that is used ever day with 0 complaints. Horrible? Inigo: You keep using that word. I do not think it means what you think it means. Robert Zwink http://www.zwink.net/daid.php -Original Message- From: Renze Munnik [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 15, 2001 10:30 AM To: Robert V. Zwink Cc: marilyn manson; [EMAIL PROTECTED] Subject: Re: [PHP] could i get a clue? On Wed, Aug 15, 2001 at 10:20:39AM -0400, Robert V. Zwink wrote: // Besides that... what if I want to do some _serious_ processing // instead of 'drawing' an image? Actually you just readfile an existing image, how much processing does that involve? Not too much. I didn't say that your construction doesn't work, but it's not the way to develop your sites. By using horrible constructions you can make 'good-working' site, but that doesn't make it a good site. You should always avoid using such terrible constructions. I mean... why creating an image if you never intended to do anything with images? Just because you want to have some weird construction on your site and you can't think of anything else, soon enough? // The popup is the same thing as I said. You just redirect to a // different (PHP-)page. So... nothing new! For future reference: window.location.href=myscript.php != window.open('./myscript.php','mywindow','width=400,height=400,scrollbars=yes ') It's the same kind of construction. You redirect the user to a completely different page. No offense intended, None taken... and none intended... -- * RzE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] libphp_java.so and APC
Does anyone know where I can get a copy of liphp_java.so that is not dependent upon zend? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] insertion question
My experience, at least from Oracle and SQLServer, is that very large tables (many millions of records) is not really a problem as long as you design and index well. Where you'll run into problems is when you try to join 2 very large tables together on the fly. This is where you'll need to do prejoins or look into the whole db wharehouse/OLAP design methodology. So I recommend you use one large table with 3 columns (or 4 if you need the source file info or some surrogate key). This will be a much sleeker and flexible db design, and it sounds like you will not be doing any joins between 2 or more large tables any way. Johan Alfredeen PongWorld.com -Original Message- From: Pétur Björn Thorsteinsson [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 14, 2001 11:49 AM To: [EMAIL PROTECTED] Subject: [PHP] insertion question I have to store a whole lot of text files into a database, each one containing 3 columns containing numbers and about 2500 lines. I was wondering if anyone knew which would be the best way to store these files, having one big table with each row containing the contents of the files, or making one table for each file and inserting each line of the file into its respective row in the database. The database will probably become pretty big and I'm looking for the option that won't slow it down too much. -petur -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Execute a PHP script from unix (crontab)
Hi. How can I execute a php script from the unix? like pearl it's (pearl file), but in unix we don't have a executable of php, it's a module ,right? I should compile the script first? I want this to add to crontab to make backup of my mysql automaticly. thanks. Augusto -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Date function
Hello, I'm pulling a date out of MySQL as 2001-10-18. How do I make it print October 18 in php? Thanks much --Mike __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Execute a PHP script from unix (crontab)
do you mean perl?!? - Original Message - From: Augusto Cesar Castoldi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 16, 2001 1:04 AM Subject: [PHP] Execute a PHP script from unix (crontab) Hi. How can I execute a php script from the unix? like pearl it's (pearl file), but in unix we don't have a executable of php, it's a module ,right? I should compile the script first? I want this to add to crontab to make backup of my mysql automaticly. thanks. Augusto -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] need real expert (geting outer files) *english/german*
Hi all. I habe a strange problem! I try to get a URL like: www.server.com?var=xyz the problem is, that this is very good restricted by serverside. But now I already get the file, and no more the error-message, but the problem is, that the file will not completly load. this means, I receive the file, but only the first 4188 bytes from 11988 bytes. If I call the site with a BROWSER, I'll get the full file, but it is nessessary to have this page into a string, to read out a specific position. what could that be..? where is the problem? does anybody know such a problem??? please help me. If someone believes to have an answer, feel free to mail me any detailer questions. thanks for all help. Tribun (Patrick Lehnen) --- mp3o.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Date function
?php $date = 2001-10-18; $montharray = array(Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec); $datedata = explode(-, $date); echo $montharray[$datedata[1]+1]. .$datedata[2]. .$datedata[0]; ? - Original Message - From: Mike Mike [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 16, 2001 1:08 AM Subject: [PHP] Date function Hello, I'm pulling a date out of MySQL as 2001-10-18. How do I make it print October 18 in php? Thanks much --Mike __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Date function
I use $date = explode(-, $msql_date); $date = date(d F,mktime(0,0,0,$date[1],$date[2],$date[0])); At 08:08 AM 8/15/01 -0700, Mike Mike wrote: Hello, I'm pulling a date out of MySQL as 2001-10-18. How do I make it print October 18 in php? Thanks much --Mike __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] security with email data entries
Hi group! i have this script to read data in POP emails and put them in a database. I would like to know if anybody knows how people would try to get around the tests I've build in. - normal registration by web form (password scrambled), with confirmation through email response - the first header starting with 'From:' in the mail is scanned for a the email addtess and then i check whether the email address is in the database - the mail contains the non-scrambled username and password, which are also checked - there must be a magic word in the email subject (to prevent SPAM mail confusing my script) Oh and I intend only to disclose the email address to people i know. thanks, Chris -- C.Hayes Droevendaal 35 6708 PB Wageningen the Netherlands -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] a bottle in the sea...
and i have this message : Warning: MySQL Connection Failed: Access denied for user: 'toto@localhost' (Using password: NO) Hmmm i have the same problem every time i install mysql and php and somehow it disappears after a while. I dunno what i did to deserve that. $sql_host = 'localhost'; $sql_user = 'root'; $sql_pass = '12345'; So maybe the user toto is not known to MySQL? Read the mysql security section on adding users and giving them rights. Chris PS dear list, please don't flame me for using root as username, it's just for a windows system at home. -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- ...for the future I see it as important that biologists show economists that economy has to adapt to ecology. Ecologists are too timid because they understand there are multiple causes everywhere. That makes them modest. Economists don't have that problem - they always think about single cause-single result. It is very important that economists also learn to understand the concept of multiple causes. Toos van Noordwijk-van Veen Chris Hayes - Droef 99 - 6708 PS Wageningen - NL- [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] different PHP platforms
I was wondering about using PHP on WIndows and IIS 5.0. Could somebody using the Windows version of PHP on IIS (preferably the ISAPI version) drop me a line and let me know how you like it? How is it different from the Linux vesion? How is it's COM support? Anything I should look out for? I use win98, php4, Apache, MySQL. Tried to set up php and mysq and apache under Suse but failed miserably. * file security is different * in your code you may be calling some non-php unix function. * i have to be online to use the mail function (i then use the SMTP of my ISP, specified in php.ini). * i don't know IIS, i know PWS is not very nice and Apache is better. Until now the combination i use is remarkably stable. No idea on COM. Chris -- C.Hayes Droevendaal 35 6708 PB Wageningen the Netherlands -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] need real expert (geting outer files) *english/german*
server.com?var=xyz would put in the get var and set it to xyz and it would give you $var = xyz you don't need the slash.. - James ReDucTor Mitchell - Original Message - From: Tribun [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 16, 2001 1:11 AM Subject: [PHP] need real expert (geting outer files) *english/german* Hi all. I habe a strange problem! I try to get a URL like: www.server.com?var=xyz the problem is, that this is very good restricted by serverside. But now I already get the file, and no more the error-message, but the problem is, that the file will not completly load. this means, I receive the file, but only the first 4188 bytes from 11988 bytes. If I call the site with a BROWSER, I'll get the full file, but it is nessessary to have this page into a string, to read out a specific position. what could that be..? where is the problem? does anybody know such a problem??? please help me. If someone believes to have an answer, feel free to mail me any detailer questions. thanks for all help. Tribun (Patrick Lehnen) --- mp3o.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] weird array behaviour
I have a function which returns a mulit-dimensional array, but the array which is returned doesn't work for some reason :/ If i print the array within the function using while (list($key) = each($myArray)) { while (list($key2, $value2) = each($myArray[$key])) { print $key . : . $key . : . $value; } } it works fine but doing the same thing after the array has been returned jus yields -- Warning: Variable passed to each() is not an array or object in ... refering to $myArray[$key]; even though if i print $myArray[$key] it tells me that it's an Array :/ Thanks. Nick. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] security with email data entries
well you add to your .forward file or .qmail-default file if you use qmail to exec it(sends the email) then you do something like this.. ?php $fp = fopen(php://stdin, r); while(!feof($fp)) { $buffer = fgets($fp); if(eregi(From:, $buffer)) $from = chop($buffer); if(eregi(To:, $buffer)) $to = chop($buffer); if(eregi(Subject:, $buffer)) $subject = chop($buffer); if(eregi(Reply-to, $buffer)) $replyto = chop($buffer); if(empty(chop($buffer))) $getmessage = 1; if($getmessage == 1) $message .= $buffer; } fclose($fp); //write $from to d/b //write $message to d/b if needed ? - Original Message - From: Chris Hayes [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 16, 2001 1:20 AM Subject: [PHP] security with email data entries Hi group! i have this script to read data in POP emails and put them in a database. I would like to know if anybody knows how people would try to get around the tests I've build in. - normal registration by web form (password scrambled), with confirmation through email response - the first header starting with 'From:' in the mail is scanned for a the email addtess and then i check whether the email address is in the database - the mail contains the non-scrambled username and password, which are also checked - there must be a magic word in the email subject (to prevent SPAM mail confusing my script) Oh and I intend only to disclose the email address to people i know. thanks, Chris -- C.Hayes Droevendaal 35 6708 PB Wageningen the Netherlands -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] need real expert (geting outer files) *english/german*
hi Patrick, your question is not entirely clear. I try to get a URL like: www.server.com?var=xyz i would recommend www.server.com/x.php?var=xyz as with a link as www.server.com you are relying on the server (by the way, which server do you use and is the error only at home or only online or...?) to find a standard file in the root directory of www.server.com. And i'm not sure the ?var=xyz is being passed on to that file then. the problem is, that this is very good restricted by serverside. But now I already get the file, and no more the error-message, but the problem is, that the file will not completly load. this means, I receive the file, but only the first 4188 bytes from 11988 bytes. please tell us the error message and what do you mean by getting the file: do you mean you get any php output? where does it stop? If I call the site with a BROWSER, I'll get the full file, but it is nessessary to have this page into a string, to read out a specific position. so, how do you 'call the site' else than with a browser? do you mean ftp? what could that be..? where is the problem? does anybody know such a problem??? please help me. If someone believes to have an answer, feel free to mail me any detailer questions. thanks for all help. Tribun (Patrick Lehnen) --- mp3o.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- C.Hayes Droevendaal 35 6708 PB Wageningen the Netherlands -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] need real expert (geting outer files) *english/german*
-Original Message- From: Chris Hayes [mailto:[EMAIL PROTECTED]] Subject: Re: [PHP] need real expert (geting outer files) hi Patrick, your question is not entirely clear. I try to get a URL like: www.server.com?var=xyz i would recommend www.server.com/x.php?var=xyz as with a link as www.server.com you are relying on the server (by the way, which server do you use and is the error only at home or only online or...?) to find a standard file in the root directory of www.server.com. And i'm not sure the ?var=xyz is being passed on to that file then. AFAIK, apache (at least) will honor this syntax and give the arguments to the index file for the directory -- look in httpd.conf to find out what files are index files. perhaps the problem with your script is that index.php is not being loaded properly by apache (or does not exist) etc. etc... (or perhaps you're not fread()ing enough of the return data back into your script). there could be a million things going on... but, as a first step, take chris's suggestion and fully specify the filename like so http://www.server.com/index.php?var=xyz -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] weird array behaviour
Nick, I also have noticed weird behavior with multi (or 2D) arrays. Read more on the manual board about arrays. However, I have finally figured out something that works. Be careful of you you define the subarray, assign values, and read the array. Here's what works for me: Creating: (you could also use array_push(), but I don't think that is supported by PHP3) $myarray = array(); $myarray[] = array(); Assigning: $myarray[$i][$j] = some value; (j can be blank or i and j can be hardcoded integers). Reading (this was the most tricky for me): returning $myarray[$i][$j] didn't seem to work (although the manual says it should). It seems to work when $i and $j are hardcoded integers, ie $myarray[0][1] When $i and $j must be variables like your $key and $value, I finally went with nested for loops (this works): function print_array2D($array) { if(gettype($array)==array) { $maxi = count($array) - 1; reset($array); for ($i=0; $i=$maxi; $i++) { echo lib$i:/b ; $subarray = $array[$i]; for ($j=0; $j2; $j++) { echo $subarray[$j] ; } echo /li; } } else { echo $array; } } Johan -Original Message- From: Nick Davies [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 15, 2001 9:33 AM To: [EMAIL PROTECTED] Subject: [PHP] weird array behaviour I have a function which returns a mulit-dimensional array, but the array which is returned doesn't work for some reason :/ If i print the array within the function using while (list($key) = each($myArray)) { while (list($key2, $value2) = each($myArray[$key])) { print $key . : . $key . : . $value; } } it works fine but doing the same thing after the array has been returned jus yields -- Warning: Variable passed to each() is not an array or object in ... refering to $myArray[$key]; even though if i print $myArray[$key] it tells me that it's an Array :/ Thanks. Nick. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Apache virtual hosts php
anyone know the permissions that need to be set on sub-directories of apache when you are using virtual hosts? The reason I ask is I keep getting a 403 forbidden you do not have permission to access / on this server and i'd really like to check to see if my install of PHP is working correctly. Thanks... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Execute a PHP script from unix (crontab)
From: Augusto Cesar Castoldi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 16, 2001 1:04 AM Subject: [PHP] Execute a PHP script from unix (crontab) How can I execute a php script from the unix? like perl it's (perl file), but in unix we don't have a executable of php, it's a module ,right? Same idea as Perl, start with a shebang line to tell it where to find the interpreter: #!/usr/local/bin/php ?php // your script here... ? I should compile the script first? Nope, no need... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Mail method?
Tamas Bucsu [EMAIL PROTECTED] wrote in message 006d01c12597$ff50f670$9200020a@domain1">news:006d01c12597$ff50f670$9200020a@domain1... Is there anything I should configure or set up on the server to make the mail method work? There is nothing about it in the manual (or I just haven't found it?). In php.ini, you have to set 'SMTP' and 'sendmail_from' (Win) or 'sendmail_path' (*nix). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Apache virtual hosts php
755 :) Kunal - Original Message - From: Jay Paulson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 15, 2001 9:26 PM Subject: [PHP] Apache virtual hosts php anyone know the permissions that need to be set on sub-directories of apache when you are using virtual hosts? The reason I ask is I keep getting a 403 forbidden you do not have permission to access / on this server and i'd really like to check to see if my install of PHP is working correctly. Thanks... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Execute a PHP script from unix (crontab)
Hi First get your PHP script working correctly...;-) The use crontab to run lynx (as a browser that runs the PHP script for you). Here's an example crontab line (works for me) that even gets lynx to handle an .htaccess protected_dir ;-): 5 5 * * * /usr/local/bin/lynx -dump -nolog -auth=userid:passwd httpd://mydomain.com/protected_dir//myphpscript.php /dev/null Hope that helps, Tom Henry Reductor wrote: do you mean perl?!? - Original Message - From: Augusto Cesar Castoldi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 16, 2001 1:04 AM Subject: [PHP] Execute a PHP script from unix (crontab) Hi. How can I execute a php script from the unix? like pearl it's (pearl file), but in unix we don't have a executable of php, it's a module ,right? I should compile the script first? I want this to add to crontab to make backup of my mysql automaticly. thanks. Augusto -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Execute a PHP script from unix (crontab)
Hi, There are basically two ways of doing this. Use lynx : lynx --dump http_address_to_file or Compile php as a cgi binary. You should select them based on your need. Kunal - Original Message - From: Hugh Bothwell [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 15, 2001 9:30 PM Subject: Re: [PHP] Execute a PHP script from unix (crontab) From: Augusto Cesar Castoldi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 16, 2001 1:04 AM Subject: [PHP] Execute a PHP script from unix (crontab) How can I execute a php script from the unix? like perl it's (perl file), but in unix we don't have a executable of php, it's a module ,right? Same idea as Perl, start with a shebang line to tell it where to find the interpreter: #!/usr/local/bin/php ?php // your script here... ? I should compile the script first? Nope, no need... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] HTTP Authentication
Hi, I am using PHP to send a header to the browser requestiing authentication. On a successful login i am tracking inactivity by the client and want to expire the login once a timeout period is reached. Problem is if the session expires and the user just refreshes then the orignal login details are passed to the script. How do I get the client to forget the previous login details? Regards Jon -- Jon Farmer Systems Programmer, Entanet www.enta.net Tel 01952 428969 Mob 07968 524175 PGP Key available, send blank email to [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Creating a javascript array from database data
Hi there, Well after a few hours roaming around various websites I am at a loss. Here is what I am trying to do: 1) Access a MySQL database which contains 1 table 2) Read the records from this table 3) Store the values returned from this table into javascript array elements, ie, if I get the values dog, cat and cow back I want these stored in an array as such: myArray[0] = valueReturned1 myArray[1] = valueReturned2 myArray[2] = valueReturned3 You get the idea. Problem being that I cannot work out how to implement the javascript section of this. At the moment my php script writes the values returned from the database to screen but I require these to be stored in a javascript array. Please can someone help me before I go mad :) Here is my current .php script: -- html head titleMenus test/title /head body bgcolor=white ?php $dbhost = 'localhost'; $dbuser = 'guest'; $dbpass = 'guest'; $dbname = 'IFE'; $dbtable = 'menus'; //-- DATABASE CONNECTION // mysql_connect($dbhost,$dbuser,$dbpass) or die (Unable to connect to database); mysql_select_db($dbname) or die (Unable to select database); $sql= SELECT * FROM $dbtable; $result = mysql_query($sql); $number = mysql_numrows($result); $i = 0; if ($number == 0) print Error - No records found; elseif ($number 0) { while ($i $number) { $text = mysql_result($result, $i, name); print $text; $i++; } } mysql_free_result($result); mysql_close(); ? /body /html -- Thanks, Neil Email: [EMAIL PROTECTED] [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Creating a javascript array from database data
-- while you are looping through the date jump in and out of php like this to populate the javascript array script language=Javascript function DataArray() { a = new Array() ? while ($i $number) { $text = mysql_result($result, $i, name); ? a[?=$i?] = ?=$text? ? $i++; } ? } HTH Jon Jon Farmer Systems Programmer, Entanet www.enta.net Tel 01952 428969 Mob 07968 524175 PGP Key available, send blank email to [EMAIL PROTECTED] -Original Message- From: Neil Freeman [mailto:[EMAIL PROTECTED]] Sent: 15 August 2001 17:16 To: PHP General Subject: [PHP] Creating a javascript array from database data Hi there, Well after a few hours roaming around various websites I am at a loss. Here is what I am trying to do: 1) Access a MySQL database which contains 1 table 2) Read the records from this table 3) Store the values returned from this table into javascript array elements, ie, if I get the values dog, cat and cow back I want these stored in an array as such: myArray[0] = valueReturned1 myArray[1] = valueReturned2 myArray[2] = valueReturned3 You get the idea. Problem being that I cannot work out how to implement the javascript section of this. At the moment my php script writes the values returned from the database to screen but I require these to be stored in a javascript array. Please can someone help me before I go mad :) Here is my current .php script: -- html head titleMenus test/title /head body bgcolor=white ?php $dbhost = 'localhost'; $dbuser = 'guest'; $dbpass = 'guest'; $dbname = 'IFE'; $dbtable = 'menus'; //-- DATABASE CONNECTION // mysql_connect($dbhost,$dbuser,$dbpass) or die (Unable to connect to database); mysql_select_db($dbname) or die (Unable to select database); $sql= SELECT * FROM $dbtable; $result = mysql_query($sql); $number = mysql_numrows($result); $i = 0; if ($number == 0) print Error - No records found; elseif ($number 0) { while ($i $number) { $text = mysql_result($result, $i, name); print $text; $i++; } } mysql_free_result($result); mysql_close(); ? /body /html -- Thanks, Neil Email: [EMAIL PROTECTED] [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Apache virtual hosts php
cool.. now i have the permissions set correctly (which is a great thing! thanks).. but i still get the 403 error... hmm.. you think it has to do with the fact that i'm having to type in the ip address of the server? the dns hasn't been set up yet to point to the server so i'm having to use the ip address to reach it.. but it seems to me that the default virtual host should at least show up when i put in the ip address right? thanks... - Original Message - From: Kunal Jhunjhunwala [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 15, 2001 10:59 AM Subject: Re: [PHP] Apache virtual hosts php 755 :) Kunal - Original Message - From: Jay Paulson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 15, 2001 9:26 PM Subject: [PHP] Apache virtual hosts php anyone know the permissions that need to be set on sub-directories of apache when you are using virtual hosts? The reason I ask is I keep getting a 403 forbidden you do not have permission to access / on this server and i'd really like to check to see if my install of PHP is working correctly. Thanks... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Apache virtual hosts php
Which dir have you chmoded to 755? Is it the public dir or the main user dir? you have to chmod the main user dir. Kunal - Original Message - From: Jay Paulson [EMAIL PROTECTED] To: Kunal Jhunjhunwala [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, August 15, 2001 9:55 PM Subject: Re: [PHP] Apache virtual hosts php cool.. now i have the permissions set correctly (which is a great thing! thanks).. but i still get the 403 error... hmm.. you think it has to do with the fact that i'm having to type in the ip address of the server? the dns hasn't been set up yet to point to the server so i'm having to use the ip address to reach it.. but it seems to me that the default virtual host should at least show up when i put in the ip address right? thanks... - Original Message - From: Kunal Jhunjhunwala [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 15, 2001 10:59 AM Subject: Re: [PHP] Apache virtual hosts php 755 :) Kunal - Original Message - From: Jay Paulson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 15, 2001 9:26 PM Subject: [PHP] Apache virtual hosts php anyone know the permissions that need to be set on sub-directories of apache when you are using virtual hosts? The reason I ask is I keep getting a 403 forbidden you do not have permission to access / on this server and i'd really like to check to see if my install of PHP is working correctly. Thanks... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] RE: could i get a clue?
No sure how you mean 'calling' the script... but in addition to using something like document.location='myscript.php' It would theoretically be possible to pass javascript variables to a PHP script in the same way by using something like var foo = Some Text; var bar = Some other text; document.location = 'myscript.php?foo=' + foo + 'bar=' + bar; And although it's not exactly 'calling' a script from Javascript, you can use PHP to generate your script on the fly... handy if you need to do something with data from a database within a Javascript. (Not sure what that would be, but it might come in handy.) -Andy -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 14, 2001 8:19 PM To: [EMAIL PROTECTED] Subject: Re: could i get a clue? ok a basic question. perhaps I dont know enough about javascript but anyway.. I want to call a php script from javascript. Anybody have any hints for me? A link to a useful website would work as well. thanks mates -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Creating a javascript array from database data
The thing to ALWAYS remember when working with both PHP and JavaScript is that PHP is Server-Side and JavaScript is Client-Side. What this mean is practical terms is that when going from JavaScript to PHP you have to submit or redirect back to the server... and when going from PHP to JavaScript (Like you are trying to do here) you have to make sure your PHP outputs JavaScript. So instead of printing $text you need to actually print the JavaScript... So in your case change the middle of your script to something like: $number = mysql_numrows($result); $i = 0; if ($number == 0) print Error - No records found; else { echo Script Language=\JavaScript\\n; echo text = new Array(; while ($i $number) { $text = mysql_result($result, $i, name); print \$text\; $i++; if ($i $number) print ,; else print )\n; } echo /Script\n; } } Note: This is my quick *untested* fix done by modifying your code as little as possible. I would suggest you use mysql_fetch_row and use your loop to parse it rather than making several calls to mysql_result (especially if you are ever going to have more than a few entries in the DB). Sheridan Saint-Michel Website Administrator FoxJet, an ITW Company www.foxjet.com - Original Message - From: Neil Freeman [EMAIL PROTECTED] To: PHP General [EMAIL PROTECTED] Sent: Wednesday, August 15, 2001 11:16 AM Subject: [PHP] Creating a javascript array from database data Hi there, Well after a few hours roaming around various websites I am at a loss. Here is what I am trying to do: 1) Access a MySQL database which contains 1 table 2) Read the records from this table 3) Store the values returned from this table into javascript array elements, ie, if I get the values dog, cat and cow back I want these stored in an array as such: myArray[0] = valueReturned1 myArray[1] = valueReturned2 myArray[2] = valueReturned3 You get the idea. Problem being that I cannot work out how to implement the javascript section of this. At the moment my php script writes the values returned from the database to screen but I require these to be stored in a javascript array. Please can someone help me before I go mad :) Here is my current .php script: -- html head titleMenus test/title /head body bgcolor=white ?php $dbhost = 'localhost'; $dbuser = 'guest'; $dbpass = 'guest'; $dbname = 'IFE'; $dbtable = 'menus'; file://-- DATABASE CONNECTION // mysql_connect($dbhost,$dbuser,$dbpass) or die (Unable to connect to database); mysql_select_db($dbname) or die (Unable to select database); $sql= SELECT * FROM $dbtable; $result = mysql_query($sql); $number = mysql_numrows($result); $i = 0; if ($number == 0) print Error - No records found; elseif ($number 0) { while ($i $number) { $text = mysql_result($result, $i, name); print $text; $i++; } } mysql_free_result($result); mysql_close(); ? /body /html -- Thanks, Neil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Question about PHP and images
I wanted to call a PHP-Skript through a img-Tag and PHP sends a image back. How can I do that? Schrotty.* I'm German, so please be patient with my English. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: javascript reference (slightly ot)
Try searching for javascript and reference on Google for online references. If you want a decent book, get something like JavaScript: The Definitive Guide by David Flanagan, published by O'Reilly. Regardless, pay attention to flags stating IE or Netscape only! :) -Al (used to use your handle lemming *way* back when) On Tue, 14 Aug 2001 22:58:44 -0300, [EMAIL PROTECTED] (Christian Dechery) wrote: Sorry for the OT but, but I'm struggling to get my forms to have a good validation in JavaScript. Does anyone know a complete reference to JavaScript, like, with all objects, it's functions, parameters and etc... that would help a lot.. Thanks... Christian Dechery (lemming) http://www.tanamesa.com.br Gaita-L Owner / Web Developer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Help, I'm so close!!!
Hello, Using cURL: I have been working for some time to get my PHP program to login to an https site and now that it logs in I cant figure out how to do a post to the site while I am logged in. After I use curl to login I do another curl session to try and emulate a form post. But when I get the results it is just the login page. Does anyone know how after my script logs in to a site I can run another curl post while I am logged in? Thank you, Brandon Orther WebIntellects Design/Development Manager [EMAIL PROTECTED] 800-994-6364 www.webintellects.com
[PHP] Looking for the cookies a site sends.
Does anyone know of a tool that lets me see the cookies a site sends my browser?