[PHP] subscript my mail-id for php
can you subscribe my mail-id for Php general mailing lists satish -- 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] Double Click
Use something like this script language="JavaScript" var submitcount=0; function checkSubmit(s) if (submitcount == 0) { submitcount++; s.value = " Sending... "; return true; } else { alert("This form has already been submitted. Thanks!"); return false; } } /script input type="button" value="Proceed" name="send" onClick="if (checkSubmit(this.form.send)) this.form.submit();" And of course you should verify the id field in tha data base as Joe said. Ovidiu -Original Message- From: Fabian Fabela [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 28, 2001 8:16 AM To: [EMAIL PROTECTED] Subject: [PHP] Double Click Hi, I have a page, and when I have to add a product I use a form, many people are used to make double click in every task, so when the product is sent with a double click in the send button, the program send it twice to the data base. What can I do to prevent this? Thank you. Fabian Fabela [EMAIL PROTECTED] www.vacagorda.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] subscribe my mail-id for php mailing lists
can you subscribe my mail-id for php general mailing lists satish -- 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] LDAP Listing
This is a small test I wrote a couple of days ago that does just that. Hope it works for you. /Fredrik ?php $ldapserver = "orchide.habeebee.com"; $basedn = "dc=habeebee, dc=com"; $dir =ldap_connect($ldapserver);// Connect to server if ($dir) { ldap_bind($dir); // Bind to the server $result = ldap_search($dir, $basedn, "sn=*"); // query connection, set the base and look for any sn $info = ldap_get_entries($dir, $result); // The results get sent to the $info object for ($i=0; $i$info["count"]; $i++) { // Count is a ldap feature that contains the length of the resultset echo $info[$i]["cn"][0];// choose any parameter you want see here } ldap_close($dir); } ? Ursprungligt meddelande Mike Tuller [EMAIL PROTECTED] skrev 2001-02-28, kl. 01:31:09 angende mnet [PHP] LDAP Listing: I want to create a list of everyone on the LDAP server, and none of the examples I have in my books seems to work. What functions should I use to connect to the server, and list users in the LDAP to create a phone book type list to print out? Could someone also give me some sort of example that I can look at? Mike Tuller -- 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] what is wrong with this sniplet?
people, I tried to write out email using sniplet below, the email will write out the hyper link so that reciever can click on the link to go to the page. What happen is that the reciever recieve the actual link instead of the hyper link I made, so I wonder what did I do wrong. I have mad sure that the email software I used to test can read html format ( I use outlook express). $mailTo = "[EMAIL PROTECTED]"; $mailSubject = "test"; $mailBody= "Dear sir, \n\n"; $mailBody= "Below is the link you can click on, \n\n"; $mailBody .= "htmlbodyPlease Click a href=\"www.php.net\"Here/a/body/html to view the request details"; $mailHeaders = "From: [EMAIL PROTECTED]\n"; mail($mailTo, $mailSubject, $mailBody, $mailHeaders); Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you set for yourself"
[PHP] curl functions problems
Hi, I have problem when using curl function to redirect to page. I use it when I need to check for valid informations on the and because there are passwords, I don't want to send it via GET in url. So I use curl to redirect to the originating page. The script's name is saveplacer.php. I use this code: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"$HTTP_REFERER"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $poststring = "placerid=$placerid" .. "" . "pwd=$pwd" ); curl_exec ($ch); curl_close ($ch); Redirecting works, desired page shows up, but in browser's urlbar I get http://mydomain/mysite/saveplacer.php and not http://mydomain/mysite/add1.php as expected. I have checked the script for empty spaces, headers, but nothing there. It shows the add1.php script and url is different. Has anyone experienced this? I use Apache 1.3.17/PHP 4.0.4Pl1 on Windoze 2000 Pro. Even I don't think it's anything to do with the problem. -- 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] Exception Handling in php
I think that would be nice to have a try-catch to better control of the code. Ovidiu -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 27, 2001 9:09 PM To: kevin1; [EMAIL PROTECTED] Subject: Re: [PHP] Exception Handling in php Addressed to: kevin1 [EMAIL PROTECTED] [EMAIL PROTECTED] ** Reply to note from kevin1 [EMAIL PROTECTED] Tue, 27 Feb 2001 08:10:05 -0500 Is there any equivalent to Java's try-catch or Perl's eval{BLOCK}if($@) structure in PHP? No. There has been some discussion about adding it on the developers list, but I don't expect to see it any time soon. Rick Widmer Internet Marketing Specialists http://www.developersdesk.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] ++$i and $i++ whatz the difference?
one is post-increment, and one is pre-increment: POST-increment ($i++) $i = 1; print $i++; print "\n" print $i; prints : 1 2 becuase $i is printed out and *then* it is incremented, so the next print statement prints out the incremented value, not the print $i++; statement PRE-increment (++$i) $i = 1; print ++$i; print "\n" print $i; prints : 2 2 becuase $i is incremented, and *then* printed out. -Original Message- From: Dhaval Desai [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 27, 2001 23:50 To: [EMAIL PROTECTED] Subject: [PHP] ++$i and $i++ whatz the difference? Hi! I have a simple question. Please see the code below: ?php for($i=0; $i=10; $i++) { echo "$ibr"; } ? Now, See this code: ?php for($i=0; $i=10; ++$i) { echo "$ibr"; } ? I get the same out put from both the Scrits. What's the difference then anywayz? Thank You! Dhaval Desai __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.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] Caller's __LINE__
Hello. I want to make a small function that sends a debug message: function debuginfo($msg) { echo"bthe message is $msg, at line" . __LINE__ . " /bbr"; } in my code: line 1 line 2 line x: debuginfo("hello!!!"); is there is anyway to show the caller's line number? in this case 'x' ? -- 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] Caller's __LINE__
In article 97ifmk$p85$[EMAIL PROTECTED], [EMAIL PROTECTED] ("elias") wrote: function debuginfo($msg) { echo"bthe message is $msg, at line" . __LINE__ . " /bbr"; } in my code: line 1 line 2 line x: debuginfo("hello!!!"); is there is anyway to show the caller's line number? in this case 'x' ? Pass __LINE__ to the function as one of its arguments: function debuginfo($msg, __LINE__) { echo"bthe message is $msg, at line" . __LINE__ . " /bbr"; } -- CC -- 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] what is wrong with this sniplet?
Hi Jacky, The problem is a HTML one. Use "http://" followed by the address in your a href tag. Regards, @lvin -Original Message- From: Jacky [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 5:40 AM To: [EMAIL PROTECTED] Subject: [PHP] what is wrong with this sniplet? people, I tried to write out email using sniplet below, the email will write out the hyper link so that reciever can click on the link to go to the page. What happen is that the reciever recieve the actual link instead of the hyper link I made, so I wonder what did I do wrong. I have mad sure that the email software I used to test can read html format ( I use outlook express). $mailTo = "[EMAIL PROTECTED]"; $mailSubject = "test"; $mailBody= "Dear sir, \n\n"; $mailBody= "Below is the link you can click on, \n\n"; $mailBody .= "htmlbodyPlease Click a href=\"www.php.net\"Here/a/body/html to view the request details"; $mailHeaders = "From: [EMAIL PROTECTED]\n"; mail($mailTo, $mailSubject, $mailBody, $mailHeaders); Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you set for yourself" -- 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] what is wrong with this sniplet?
Sorry, It was the mistyping. i actually put http:// in the a href. I just forgot to type it in the mail. So what else could it be? Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you set for yourself" - Original Message - From: Alvin Tan [EMAIL PROTECTED] To: Jacky [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, February 28, 2001 3:39 AM Subject: RE: [PHP] what is wrong with this sniplet? Hi Jacky, The problem is a HTML one. Use "http://" followed by the address in your a href tag. Regards, @lvin -Original Message- From: Jacky [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 5:40 AM To: [EMAIL PROTECTED] Subject: [PHP] what is wrong with this sniplet? people, I tried to write out email using sniplet below, the email will write out the hyper link so that reciever can click on the link to go to the page. What happen is that the reciever recieve the actual link instead of the hyper link I made, so I wonder what did I do wrong. I have mad sure that the email software I used to test can read html format ( I use outlook express). $mailTo = "[EMAIL PROTECTED]"; $mailSubject = "test"; $mailBody= "Dear sir, \n\n"; $mailBody= "Below is the link you can click on, \n\n"; $mailBody .= "htmlbodyPlease Click a href=\"www.php.net\"Here/a/body/html to view the request details"; $mailHeaders = "From: [EMAIL PROTECTED]\n"; mail($mailTo, $mailSubject, $mailBody, $mailHeaders); Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you set for yourself" -- 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] what is wrong with this sniplet?
I am not sure but I think may be it is because whatever the mail() write out in the body part will be recognised as text message, so even if we try to make it to write out the HTML syntax, it won't work. It could be real stupid to make such a notice but I can't think of anything else. Can you? Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you set for yourself" - Original Message - From: Alvin Tan [EMAIL PROTECTED] To: Jacky [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, February 28, 2001 3:39 AM Subject: RE: [PHP] what is wrong with this sniplet? Hi Jacky, The problem is a HTML one. Use "http://" followed by the address in your a href tag. Regards, @lvin -Original Message- From: Jacky [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 5:40 AM To: [EMAIL PROTECTED] Subject: [PHP] what is wrong with this sniplet? people, I tried to write out email using sniplet below, the email will write out the hyper link so that reciever can click on the link to go to the page. What happen is that the reciever recieve the actual link instead of the hyper link I made, so I wonder what did I do wrong. I have mad sure that the email software I used to test can read html format ( I use outlook express). $mailTo = "[EMAIL PROTECTED]"; $mailSubject = "test"; $mailBody= "Dear sir, \n\n"; $mailBody= "Below is the link you can click on, \n\n"; $mailBody .= "htmlbodyPlease Click a href=\"www.php.net\"Here/a/body/html to view the request details"; $mailHeaders = "From: [EMAIL PROTECTED]\n"; mail($mailTo, $mailSubject, $mailBody, $mailHeaders); Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you set for yourself" -- 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] what is wrong with this sniplet?
From: Jacky [mailto:[EMAIL PROTECTED]] people, I tried to write out email using sniplet below, the email will write out the hyper link so that reciever can click on the link to go to the page. What happen is that the reciever recieve the actual link instead of the hyper link I made, so I wonder what did I do wrong. I have mad sure that the email software I used to test can read html format ( I use outlook express). $mailTo = "[EMAIL PROTECTED]"; $mailSubject = "test"; $mailBody= "Dear sir, \n\n"; $mailBody= "Below is the link you can click on, \n\n"; $mailBody .= "htmlbodyPlease Click a href=\"www.php.net\"Here/a/body/html to view the request details"; $mailHeaders = "From: [EMAIL PROTECTED]\n"; mail($mailTo, $mailSubject, $mailBody, $mailHeaders); You need to tell the mail reader that the message is HTML, using a Content-Type header. Plus your message is not well-formed HTML anyway (message should be an HTML document, not HTML inside plain text). Try this: ?php $mailTo = "[EMAIL PROTECTED]"; $mailSubject = "test"; $mailBody= "htmlbodyDear sir, \n\n"; $mailBody .= "Below is the link you can click on, \n\n"; $mailBody .= "Please Click a href=\"http://www.php.net\"Here/a to view the request details/body/html"; $mailHeaders = "From: mailto:[EMAIL PROTECTED]\n"; $mailHeaders .= "Content-Type: text/html\n"; mail($mailTo, $mailSubject, $mailBody, $mailHeaders); ? Cheers Simon Garner -- 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] Getting form name
Hi Is there a way I can get the name of the form that has been posted? Looking at the form vars I don't see a name var or such in there. TIA M@ -- 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] Caller's __LINE__
Better still - use the set_error_handler() to define an error handler that will output your debug statement and create your dbug message using trigger_error(). Your registered error_handler will automatically receive line number, file name and some other useful parameters. -Original Message- From: CC Zona [mailto:[EMAIL PROTECTED]] Sent: 28 February 2001 09:37 To: [EMAIL PROTECTED] Subject: Re: [PHP] Caller's __LINE__ In article 97ifmk$p85$[EMAIL PROTECTED], [EMAIL PROTECTED] ("elias") wrote: function debuginfo($msg) { echo"bthe message is $msg, at line" . __LINE__ . " /bbr"; } in my code: line 1 line 2 line x: debuginfo("hello!!!"); is there is anyway to show the caller's line number? in this case 'x' ? Pass __LINE__ to the function as one of its arguments: function debuginfo($msg, __LINE__) { echo"bthe message is $msg, at line" . __LINE__ . " /bbr"; } -- CC -- 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] Getting form name
From: "Matt Williams" [EMAIL PROTECTED] Hi Is there a way I can get the name of the form that has been posted? Looking at the form vars I don't see a name var or such in there. TIA M@ The NAME attribute of the FORM element is intended for scripting purposes only. But you should be able to achieve the desired effect with a hidden INPUT element: form name="someform" method="POST" input type="hidden" name="formname" value="someform" /form Cheers Simon Garner -- 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] Another question about using shmop!
On Wednesday 28 February 2001 00:15, you wrote: Does it provide a faster performance, if I use these rather than store things in mysql DB, I know this might be stupid, but I have to make sure this. I belive shared memory is *much* faster than MySQL. Well, I'd say it depends. For only a bit of simple data it's fine. But for more the optimizations of a database (indices etc) may make the db faster (remember most of the DB will be in RAM as well). And a database is just *much* simpler and safer to use. Shared memory is not for the faint of heart. I can't think of any more, but that's mostly because I consider shared memory "too tricky for me" and have never played with it... -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) CPU not found. retry, abort, ignore? -- 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] Getting form name
Thanks Simon. You would have though as it there they would make it part of the form. thanks again. M@ -- 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] File downloading?
On Wednesday 28 February 2001 01:06, you wrote: Great, thanks. I looked at the file(), but it sounded like is was just for local file use. oops, should've been include(). Sorry :) include () is surely wrong for that. fpassthru (as someone else mentioned), file() and (my personal favourite) readfile() are the functions of choice -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) CPU not found. retry, abort, ignore? -- 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] multiple databases
I'd like to run this past anyone who'd care to comment before I get too far down the track I'm considering taking with a PHP web portal site. Is it a wise idea to have a PHP web application running on multiple databases? Everything I've done to date has run off one database, no matter how large it got. With the current small portal site, the idea is to break a monolithic database up into around 10 smaller databases, each of which should be able to be backed up to a floppy. Not all databases are called on each page, but up to 6 or so could be. What are the performance implications (slower, obviously, but 10 times slower?). Performance beyond what the human mind can perceive is not relevant to me. Should I use mysql_connect or mysql_pconnect for each db connection ? Should I be careful to use mysql_close with each connection? Any advice appreciated. Mick -- 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] Move a file from dir to another or delete file..?
On Wednesday 28 February 2001 06:51, you wrote: Well I would like to move a file from one directoy to another using php and a web browser. I could just find a function to move an uploaded file but not a normal file which is allready there in some directory. look at the filesystem functions: rename () (or safer: copy()+unlink()) unlink() -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) CPU not found. retry, abort, ignore? -- 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] what is wrong with this sniplet?
On Wednesday 28 February 2001 22:40, you wrote: people, I tried to write out email using sniplet below, the email will write out the hyper link so that reciever can click on the link to go to the page. What happen is that the reciever recieve the actual link instead of the hyper link I made, so I wonder what did I do wrong. I have mad sure that the email software I used to test can read html format ( I use outlook express). $mailTo = "[EMAIL PROTECTED]"; $mailSubject = "test"; $mailBody= "Dear sir, \n\n"; $mailBody= "Below is the link you can click on, \n\n"; $mailBody .= "htmlbodyPlease Click a href=\"www.php.net\"Here/a/body/html to view the request details"; $mailHeaders = "From: [EMAIL PROTECTED]\n"; mail($mailTo, $mailSubject, $mailBody, $mailHeaders); Add a "Content-Type: text/html" to $mailHeaders ( add a http:// to the link) -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) CPU not found. retry, abort, ignore? -- 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] multiple databases
From: "Michael Hall" [EMAIL PROTECTED] I'd like to run this past anyone who'd care to comment before I get too far down the track I'm considering taking with a PHP web portal site. Is it a wise idea to have a PHP web application running on multiple databases? Everything I've done to date has run off one database, no matter how large it got. With the current small portal site, the idea is to break a monolithic database up into around 10 smaller databases, each of which should be able to be backed up to a floppy. Not all databases are called on each page, but up to 6 or so could be. What are the performance implications (slower, obviously, but 10 times slower?). Performance beyond what the human mind can perceive is not relevant to me. Should I use mysql_connect or mysql_pconnect for each db connection ? Should I be careful to use mysql_close with each connection? Any advice appreciated. Mick Do you mean 10 different database servers, or 10 databases on the one server? As far as I know, separate databases on the one server give the same performance as separate tables in one database. With separate database servers you will run into new problems such as: -) additional connection overhead for each server, if you need to access more than one server in a page -) can't combine data from servers, e.g. can't JOIN tables Persistent connections may or may not help. Using persistent connections could negate the connection time overhead, but you get a memory overhead instead - if you have 40 connections open, there's got to be 40 mysqld processes (threads?) running too. Cheers Simon Garner -- 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] multiple databases
Do you mean 10 different database servers, or 10 databases on the one server? 10 databases on the one server. As far as I know, separate databases on the one server give the same performance as separate tables in one database. Music to my ears. With separate database servers you will run into new problems such as: -) can't combine data from servers, e.g. can't JOIN tables OK ... I didn't realise I could join tables across seperate databases. Anywhere where joins are necessary, I'm using the one database. Thanks Mick -- 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] multiple databases
From: "Michael Hall" [EMAIL PROTECTED] Do you mean 10 different database servers, or 10 databases on the one server? 10 databases on the one server. As far as I know, separate databases on the one server give the same performance as separate tables in one database. Music to my ears. Well, I'm pretty sure on that, but don't quote me ;-) If you think about it though, each table is just a set of files in a directory with the name of the database. It should not be any slower to access a table in one directory compared to a table in another directory (unless you split those directories onto separate physical disks or somesuch - but you could do the same thing using symlinks and one database). As for implementation in your script, you do not need to reconnect to access a different database; just do mysql_select_db("dbname") to switch between the databases. Or use mysql_db_query("dbname", "query"). However, there is probably no point in using 10 different databases - save yourself some complication and just use one. With separate database servers you will run into new problems such as: -) can't combine data from servers, e.g. can't JOIN tables OK ... I didn't realise I could join tables across seperate databases. Anywhere where joins are necessary, I'm using the one database. Thanks Mick Indeed you can: 7.19 SELECT Syntax "You can refer to a column as col_name, tbl_name.col_name, or db_name.tbl_name.col_name." http://www.mysql.com/doc/S/E/SELECT.html Cheers Simon Garner -- 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] Revised [PHP] COM and PHP
On Mon, Feb 05, 2001 at 03:05:24PM -0500, Conover, Ryan wrote: I have been trying the following example from the PHP developer's cookbook and it keeps giving me the following error. Parse error: parse error in c:\Inetpub\wwwroot/temp.php on line 5 ? //line 1 $excel_handle = new COM("excel.application"); //line2 $excel_handle-Visible = false; //line3 $worksheet = $excel_handle-workbooks-add(); //line4 $worksheet-Cells(1,1)-value = "Name"; //line5 $worksheet-SaveAs("temp.xls"); //line6 $excel_handle-quit(); //line7 //line8 ? //line9 Anyone that has Com and PHP experience help please I didn't test it in PHP (only in wscript.exe), but it seems the example is wrong. It should be (line 4 - 4a, 4b): excel_handle = new COM("Excel.Application"); //line2 excel_handle.Visible = true; //line3 workbook = excel_handle.Workbooks.Add(); //4a worksheet=workbook.WorkSheets.Add(); //4b worksheet.Cells(1,1).Value = "Name"; //line5 worksheet.SaveAs("temp.xls"); //line6 excel_handle.quit(); //line7 This seems 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]
Re: [PHP] what is wrong with this sniplet?
You don't need to write a href=. for outlook , if you put space before and after URL unless you want to send HTML mail. Outlook thinks it's a URL if you write correct URL and many other UMA treats URL or Email address as link. i.e. www.php.net is not correct URL, my outlook express thinks it is a URL though... http://www.php.net/ is correct URL and you should be able to click it to open it. If you want to send HTML mail, take a look at whole HTML formatted mail including headers in your mail box. You will get how to compose HTML formatted mail. Regards, -- Yasuo Ohgaki - Original Message - From: "Jacky" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 01, 2001 6:40 AM Subject: [PHP] what is wrong with this sniplet? people, I tried to write out email using sniplet below, the email will write out the hyper link so that reciever can click on the link to go to the page. What happen is that the reciever recieve the actual link instead of the hyper link I made, so I wonder what did I do wrong. I have mad sure that the email software I used to test can read html format ( I use outlook express). $mailTo = "[EMAIL PROTECTED]"; $mailSubject = "test"; $mailBody= "Dear sir, \n\n"; $mailBody= "Below is the link you can click on, \n\n"; $mailBody .= "htmlbodyPlease Click a href=\"www.php.net\"Here/a/body/html to view the request details"; $mailHeaders = "From: [EMAIL PROTECTED]\n"; mail($mailTo, $mailSubject, $mailBody, $mailHeaders); Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you set for yourself" -- 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] Hebrew websites transition with php3 ..
Hey! I've just joined this mailing-list, therefore, first of all, I would like to say hello to everybody. Now, regarding the issue.. As some of you might know, handling with Hebrew websites is rather difficult. Hebrew words often come-out in reversed order (i.e. 'lmth' instead of 'html'). I'm working on a php3 script which would help me do the following - Load an existing HTML file which consists Hebrew words (as well as English words and HTML tags), then reversing the Hebrew words back to order. The problem I'm dealing with is how to reverse only the Hebrew words and not the entire document, which contains HTML tags and English words as well. The function 'hebrev()' does the process of reversing, but it reverses tags as well. I would really appreciate it, if anyone will find some spare time to help me. Thank you in advance - Aviv Revach XOR-Coders Mega Programming Resource Site! - http://members.xoom.com/xorcoders/ -- 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] optimal way of counting votes in online poll
Hi all! I have a question as to the optimal method of counting and storing votes in an online poll. Once a user answers the poll by clicking on one of three options, I am performing a query on a table which holds values for each option. Currently I - query the table to get the current count - increment the count by 1 - UPDATE the table with the new value I wonder: what happens if two users submit the answer simulatneously, and the answer is the same. Will only of those votes register? Or will the SQL somehow be "queued" so that both are counted? If the former - is there any other, better way to do this? I am using mySQL as the database, and PHP to process the form and execute the query. Please CC your response to the address above also. TIA Vikram Vaswani -- 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] found a bug with File Uploads..
Hi! I think I just found a bug in php. I try to upload a file of size 37.0 K and you know what happens.,, The browser takes its own time..and the stupid thing doesnot upload the file. If I upload a file of size 2k then it uploads.. I have specified the file size in the form as : FORM ENCTYPE="multipart/form-data" ACTION="upload.php" METHOD="POST" INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="10" In Php.ini file I have found 8M is the maximum size.. I am running php 4.0.3pl1 wioth Apache on Windows 98. I also have a server on Cqhost.com I have seen the same happen there,.too... Is this a bug or a problem..?? Please Reply Cheers!~ Dhaval Desai __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.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] optimal way of counting votes in online poll
From: "Vikram Vaswani" [EMAIL PROTECTED] Hi all! I have a question as to the optimal method of counting and storing votes in an online poll. Once a user answers the poll by clicking on one of three options, I am performing a query on a table which holds values for each option. Currently I - query the table to get the current count - increment the count by 1 - UPDATE the table with the new value I wonder: what happens if two users submit the answer simulatneously, and the answer is the same. Will only of those votes register? Or will the SQL somehow be "queued" so that both are counted? And so you should wonder :) You have created a race condition - if the table is updated between your SELECT and your UPDATE, then your UPDATE will be using incorrect values. The solution is very simple - instead of querying the current value and incrementing it in PHP, let MySQL do the work: UPDATE polls SET votecount=votecount+1 WHERE pollid=$poll There are all sorts of manipulations you can do to the data during queries, and they're all usually much better than trying to do the same thing in your application. http://www.mysql.com/doc/F/u/Functions.html Cheers Simon Garner -- 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] multiple databases
On Wednesday 28 February 2001 09:42, you wrote: Is it a wise idea to have a PHP web application running on multiple databases? Everything I've done to date has run off one database, no If you get *really much* traffic, it's wise to split things up to 2 or 3 databases (each on a dedicated machine): * Normal data * Session data * evtl. Cached pages / parts each of which should be able to be backed up to a floppy. Not all If each part fits on a floppy, forget it. For these sizes it'n not worth the effort (and can, in fact, slow down things) -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) CPU not found. retry, abort, ignore? -- 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: while loop and modulus?
you don't need to, but if you really want to ... echo "table border=\"0\"\n"; echo "tr\n"; $photocount = 0; while($row = mysql_fetch_array($result)) { $smallpic = $row['smallpic']; echo "td$smallpic/td\n"; if (($photocount % 3) == 2) { echo "/tr\ntr\n"; } $photocount++; } // this should add empty cells until the row is complete while ($photocount % 3) { echo("td/td"); $photocount++; } echo "/tr\n"; echo "/table"; Tim Ward -Original Message- From: James, Yz [mailto:[EMAIL PROTECTED]] Sent: 27 February 2001 19:18 To: [EMAIL PROTECTED] Subject: while loop and modulus? OK, using this code: ? echo "table border=\"0\"\n"; echo "tr\n"; $photocount = 0; while($row = mysql_fetch_array($result)) { $smallpic = $row['smallpic']; echo "td$smallpic/td\n"; if (($photocount % 3) == 2) { echo "/tr\ntr\n"; } $photocount++; } echo "/tr\n"; echo "/table"; ? And 8 photos in the table, I'm getting this output: table border="0" tr tdsm982438092.gif/td tdsm982437452.gif/td tdsm982439016.gif/td /tr tr tdsm982529915.gif/td tdsm983222652.gif/td tdsm983222686.gif/td /tr tr tdsm983222868.gif/td tdsm983222919.gif/td /tr /table Great, except it's missing an end cell, and after a few hours fiddling about with code last night, I still didn't get any further in working out how I was going to echo a table cell even if data's missing. So, any help would be appreciated. Apologies for what're probably "easy" questions. I slog away at work all day, come back hoping to get something productive done on this, and the ol'brain won't take it. Frustrating, to say the least. James. -- 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] illegal string index
Hi, I made a site that uses the following code: $id = base64_decode($go);// decoding ID $DataBaseNaam = "teller";// name of DB include('connect.inc.php3');// connection to DB $query = "select * from kl".$id;//query $result = mysql_db_query($DataBaseNaam, $query);// getting ResultSet $t=0; while ($waarden = mysql_fetch_array($result))// extracting ata from RS { $ip[$t] = $waarden[ip];// IP value (varchar) -- This line generates the problem..? $datum[$t] = $waarden[datum];// date value (integer) $urlprov[$t] = $waarden[urlprov];// URL value (varchar) $t++; } On a locale machine (using PHP4) I didn't have any problems, but on internet (using PHP 3.0.16) I got the warning "illegal string index on line ..." I only get this warning if I want to extract IP numbers from my DB. Does anyone knows why I get this warning ? Thanks, Eelco -- 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] Members area
Brandon, The tutorials are there - look for them. They collectively describe all that you want to do vis-a-vis database manipulation. Miles At 06:58 PM 2/27/01 -0800, you wrote: Yea i cant find a good Tut, ok... i have a members directory with the inside that folder is status, goodies, ect and i want to get the information out my database for that specific member, how would i connect to my database, what would i select from "members" (my database) to get the field for that one person, so i can put there infomation when the logg in the members area Miles Thompson wrote: Brandon, It's a little confusing. Are you saying: 1. You have the members area - a directory, what? 2. You have created a database containing your members information. and now you: 3. Want to know how to connect to the database? 4. Add information to the database about the members? 5. Have the members add information to the database? Which database are you using? What kind of information do you want to capture? We need more information - Miles Thompson PS Have you looked at the PHP database tutorials at various php sites, like www.thickbook.com, devshed, php essentials, php builder etc.? /mt At 05:34 PM 2/27/01 -0800, Brandon Feldhahn wrote: Hi, eveyone, my name is brandon, and i made a members area for my site, a database driven http authentication and a database for all my members i got everything working but how do i make a database connection that recieve the infomation for that user that has loggin into the members area. If i wasen clear enough just tell me. -- 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: Move a file from dir to another or delete file..?
-Original Message- From: Dhaval Desai [mailto:[EMAIL PROTECTED]] Sent: 28 February 2001 05:51 To: [EMAIL PROTECTED] Subject: Move a file from dir to another or delete file..? Hi! Well I would like to move a file from one directoy to another using php and a web browser. I could just find a function to move an uploaded file but not a normal file which is allready there in some directory. I haven't tried it but would rename work?, i.e. rename("old_path/file.txt", "new_path/file.txt") Is there any way I can move a file from one directory to another and also is tehre any way I can delete a particluar file in a directory.. unlink(); Thank You! Cheers!~ Dhaval Desai __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html -- 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] Hebrew websites transition with php3 ..
Hi Aviv Let me give you a small tip about Hebrew on the net. The proper Hebrew code which was adopted by the Israeli Institute of Standards is the Logical standard. This standard is automatically supported by IE 4.x and 5.x and also by Netscape 6.x. The percentage of not IE4.x or 5.x users in Israel is less than 3%. 3 of the major portals in Israel (Walla, Nana and MSN) are already moving to logical Hebrew. So why use Visual Hebrew? In case you decide to go with Visual in any case, did you try hebrevc()? Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: Aviv Revach [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 27, 2001 1:43 PM To: [EMAIL PROTECTED] Subject: [PHP] Hebrew websites transition with php3 .. Hey! I've just joined this mailing-list, therefore, first of all, I would like to say hello to everybody. Now, regarding the issue.. As some of you might know, handling with Hebrew websites is rather difficult. Hebrew words often come-out in reversed order (i.e. 'lmth' instead of 'html'). I'm working on a php3 script which would help me do the following - Load an existing HTML file which consists Hebrew words (as well as English words and HTML tags), then reversing the Hebrew words back to order. The problem I'm dealing with is how to reverse only the Hebrew words and not the entire document, which contains HTML tags and English words as well. The function 'hebrev()' does the process of reversing, but it reverses tags as well. I would really appreciate it, if anyone will find some spare time to help me. Thank you in advance - Aviv Revach XOR-Coders Mega Programming Resource Site! - http://members.xoom.com/xorcoders/ -- 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] Hebrew websites transition with php3 ..
Hey! Thank you for the quick reply. I do have some questions regarding your answer. From what I know and have seen so far, there are more than just 3% Internet users in Israel which use Netscape 4.x (I use it myself...). Are you sure that I should just ignore these people, and just use logical Hebrew? Also, quite a lot of people started using Opera lately.. (ain't speaking about Israeli users). Does Opera supports Logical Hebrew? If so, from which version? Best Regards - Aviv Revach At 15:20 28/02/01 +0200, Boaz Yahav wrote: Hi Aviv Let me give you a small tip about Hebrew on the net. The proper Hebrew code which was adopted by the Israeli Institute of Standards is the Logical standard. This standard is automatically supported by IE 4.x and 5.x and also by Netscape 6.x. The percentage of not IE4.x or 5.x users in Israel is less than 3%. 3 of the major portals in Israel (Walla, Nana and MSN) are already moving to logical Hebrew. So why use Visual Hebrew? In case you decide to go with Visual in any case, did you try hebrevc()? Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: Aviv Revach [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 27, 2001 1:43 PM To: [EMAIL PROTECTED] Subject: [PHP] Hebrew websites transition with php3 .. Hey! I've just joined this mailing-list, therefore, first of all, I would like to say hello to everybody. Now, regarding the issue.. As some of you might know, handling with Hebrew websites is rather difficult. Hebrew words often come-out in reversed order (i.e. 'lmth' instead of 'html'). I'm working on a php3 script which would help me do the following - Load an existing HTML file which consists Hebrew words (as well as English words and HTML tags), then reversing the Hebrew words back to order. The problem I'm dealing with is how to reverse only the Hebrew words and not the entire document, which contains HTML tags and English words as well. The function 'hebrev()' does the process of reversing, but it reverses tags as well. I would really appreciate it, if anyone will find some spare time to help me. Thank you in advance - Aviv Revach XOR-Coders Mega Programming Resource Site! - http://members.xoom.com/xorcoders/ -- 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] XOR-Coders Mega Programming Resource Site! - http://members.xoom.com/xorcoders/ -- 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] webmin like tools in php
are there tools like webmin (web based admin tools) in php? http://www.webmin.com/webmin/ tks mitch -- 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 iPlanet on Solaris
I got the latest snapshot of php to compile on solaris (4.0.4pl1 wouldn't). Anyways I edited the mime.types and obj.conf as described in the installation instructions, but right now it's trying to download the test.php file I created instead of processing. Is there anything not in the documentation that I need to add. thanks, evan -- 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] Problems with PHP4 CGI binary
Hi, I'm having problems with the PHP CGI binary (version 4.0.4pl1). The bug is basically the bug reported here: http://bugs.php.net/bugs.php?id=8506 It's exactly the same problem, replicated, now we need the CGI binary version working, not only does this look very unprofessional on the sites, but it means cookies cannot work. This has been reported last December and it's a fairly serious problem (basically makes the CGI binary close to unuseable for us) Does anyone know of a fix, I tried messing around with Actions and AddHandlers in Apache but to no avail. Would anyone have an inkling as to what I might be doing wrong? Or is it just a bug that needs to be fixed asap? Phil. -- 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] POST Referral
getenv('REQUEST_METHOD'); .matt - Original Message - From: "Boget, Chris" [EMAIL PROTECTED] To: "Php (E-mail)" [EMAIL PROTECTED] Sent: Wednesday, February 28, 2001 2:49 PM Subject: [PHP] POST Referral Is it possible, in PHP, for a page to determine if it was accessed via a form's submission (POST/GET)? IOW, if you click on a link to get to a page, you can find out (usually; I know it's not 100%) what page the user was at before when s/he clicked the link by accessing the $HTTP_REFERER variable. Is there any way to do the same type of check but determine if it was due to the submission of a form (instead of by a link as $HTTP_REFERER would suggest)? Thanks! Chris -- 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 small Q
Hi, Does the extension of files that are require()-d or include()-d in PHP have to be ".inc"? Can it be ".php"? All examples seem to show this extension as ".inc". Could there be any problems if the extension is kept ".php"? -- Regards, Harshdeep Singh Jawanda. -- 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] formating output
I am developing a site which will have a web based admin panel, just now you can alter the scrolling headlines through the panel. But I want to be able to let the user modify, delete and create new headline, this isnt proble but i dong know how to format the output. What i want is for it to dispaly the headlines that are in the table be it 2 or 5 how do i take info from a table and get it to echo the code as many times as needed(dependingon the headlines in the table) so the code would be like this but how do i also stop it from displaying the same fields ie exact same headline link etc. and how do i get this so that 3 news stories = 3 lines code myScroller1.addItem("b? echo "$headline" ; ?a href='? echo "$newslink"; ?' latest news news/a, news news news/b"); Hope you understand it, I dont think i do. George -- 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 small Q
It can bee .poopoo if you want it to be :-) - Original Message - From: "Harshdeep S Jawanda" [EMAIL PROTECTED] To: "PHP General" [EMAIL PROTECTED] Sent: Wednesday, February 28, 2001 10:04 AM Subject: [PHP] A small Q Hi, Does the extension of files that are require()-d or include()-d in PHP have to be ".inc"? Can it be ".php"? All examples seem to show this extension as ".inc". Could there be any problems if the extension is kept ".php"? -- Regards, Harshdeep Singh Jawanda. -- 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] Caller's __LINE__
Pass __LINE__ to the function as one of its arguments: function debuginfo($msg, __LINE__) { echo"bthe message is $msg, at line" . __LINE__ . " /bbr"; } that won't work since __LINE__ returns the exact line where it's used... so it will always show the line of the function header... . 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]
Re: [PHP] A small Q
Harshdeep S Jawanda's [[EMAIL PROTECTED]] 20 lines of wisdom included: :Hi, : :Does the extension of files that are require()-d or include()-d in PHP :have to be ".inc"? Can it be ".php"? : :All examples seem to show this extension as ".inc". Could there be any :problems if the extension is kept ".php"? No problems at all, only reason I would recommend a different extension is that you can disallow the viewing of the included files in apache with the extension ".inc" as follows: Files ~ "\.inc$" Order allow,deny Deny from all /Files Regards, Phil. -- 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] interpolating functions into here-docs
How would this be done? -- 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 small Q
Harshdeep S Jawanda wrote: Hi, Does the extension of files that are require()-d or include()-d in PHP have to be ".inc"? Can it be ".php"? All examples seem to show this extension as ".inc". Could there be any problems if the extension is kept ".php"? I don't know what examples you mean, but: the name of the included/required file in PHP does not matter. However the best thing is always to use the extention "*.php" to make sure the files are always going thru the PHP interpreter, even when someone access them directly by its URL. Robert -- 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 printing
Hello php-general, Hi, I'm working with php4 and mysql on a suse 6.3 I made a program for an ISP that creates accounts, clients, payments, invoices. Everymonth they need to print like a quote (a list of every non paid thing) its ok, I could do that, I mean in the screen... Is it possible to print it in a printer automatically? I mean.. I dont want to view it on the screen.. I want it to print all the records alone Can you help me??? Thanks -- Best regards, fano mailto:[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-CVS] cvs: php4 /sapi/apache2filter README apache_config.c config.m4 php_apache.h sapi_apache2.c
sas Wed Feb 28 06:03:58 2001 EDT Modified files: /php4/sapi/apache2filterREADME apache_config.c config.m4 php_apache.h sapi_apache2.c Log: Make the module compile again with the latest httpd-2.0 cvs. Index: php4/sapi/apache2filter/README diff -u php4/sapi/apache2filter/README:1.6 php4/sapi/apache2filter/README:1.7 --- php4/sapi/apache2filter/README:1.6 Mon Dec 11 00:05:53 2000 +++ php4/sapi/apache2filter/README Wed Feb 28 06:03:58 2001 @@ -36,8 +36,8 @@ At the end of conf/httpd.conf, add: Files *.php -AddOutputFilter PHP -AddInputFilter PHP +SetOutputFilter PHP +SetInputFilter PHP /Files That's it. Now start bin/httpd. Index: php4/sapi/apache2filter/apache_config.c diff -u php4/sapi/apache2filter/apache_config.c:1.9 php4/sapi/apache2filter/apache_config.c:1.10 --- php4/sapi/apache2filter/apache_config.c:1.9 Sun Feb 25 22:07:35 2001 +++ php4/sapi/apache2filter/apache_config.c Wed Feb 28 06:03:58 2001 @@ -62,12 +62,12 @@ str_len = strlen(name); - if (zend_hash_find(d-config, name, str_len + 1, (void **) pe) == SUCCESS) { + if (zend_hash_find(d-config, (char *) name, str_len + 1, (void **) pe) == +SUCCESS) { if (pe-status status) return NULL; } - zend_hash_update(d-config, name, strlen(name) + 1, e, sizeof(e), + zend_hash_update(d-config, (char *) name, strlen(name) + 1, e, sizeof(e), NULL); return NULL; } Index: php4/sapi/apache2filter/config.m4 diff -u php4/sapi/apache2filter/config.m4:1.1 php4/sapi/apache2filter/config.m4:1.2 --- php4/sapi/apache2filter/config.m4:1.1 Thu Oct 26 10:55:05 2000 +++ php4/sapi/apache2filter/config.m4 Wed Feb 28 06:03:58 2001 @@ -28,7 +28,6 @@ APXS_INCLUDEDIR=`$APXS -q INCLUDEDIR` APXS_CFLAGS=`$APXS -q CFLAGS` AC_ADD_INCLUDE($APXS_INCLUDEDIR) - AC_ADD_INCLUDE($APXS_INCLUDEDIR/apr) if `echo $APXS_CFLAGS|grep USE_HSREGEX/dev/null`; then APACHE_HAS_REGEX=yes fi Index: php4/sapi/apache2filter/php_apache.h diff -u php4/sapi/apache2filter/php_apache.h:1.7 php4/sapi/apache2filter/php_apache.h:1.8 --- php4/sapi/apache2filter/php_apache.h:1.7Sun Feb 25 22:07:35 2001 +++ php4/sapi/apache2filter/php_apache.hWed Feb 28 06:03:58 2001 @@ -21,7 +21,7 @@ typedef struct php_struct { int state; - ap_bucket_brigade *bb; + apr_bucket_brigade *bb; ap_filter_t *f; /* Length of post_data buffer */ int post_len; Index: php4/sapi/apache2filter/sapi_apache2.c diff -u php4/sapi/apache2filter/sapi_apache2.c:1.25 php4/sapi/apache2filter/sapi_apache2.c:1.26 --- php4/sapi/apache2filter/sapi_apache2.c:1.25 Sun Feb 25 22:07:35 2001 +++ php4/sapi/apache2filter/sapi_apache2.c Wed Feb 28 06:03:58 2001 @@ -46,8 +46,8 @@ static int php_apache_sapi_ub_write(const char *str, uint str_length) { - ap_bucket *b; - ap_bucket_brigade *bb; + apr_bucket *b; + apr_bucket_brigade *bb; php_struct *ctx; uint now; SLS_FETCH(); @@ -56,10 +56,10 @@ if (!str_length) return 0; - bb = ap_brigade_create(ctx-f-r-pool); + bb = apr_brigade_create(ctx-f-r-pool); while (str_length 0) { now = MIN(str_length, 4096); - b = ap_bucket_create_transient(str, now); + b = apr_bucket_transient_create(str, now); AP_BRIGADE_INSERT_TAIL(bb, b); str += now; str_length -= now; @@ -161,16 +161,16 @@ php_apache_sapi_flush(void *server_context) { php_struct *ctx = server_context; - ap_bucket_brigade *bb; - ap_bucket *b; + apr_bucket_brigade *bb; + apr_bucket *b; /* Send a flush bucket down the filter chain. The current default * handler seems to act on the first flush bucket, but ignores * all further flush buckets. */ - bb = ap_brigade_create(ctx-f-r-pool); - b = ap_bucket_create_flush(); + bb = apr_brigade_create(ctx-f-r-pool); + b = apr_bucket_flush_create(); AP_BRIGADE_INSERT_TAIL(bb, b); if (ap_pass_brigade(ctx-f-next, bb) != APR_SUCCESS) { php_handle_aborted_connection(); @@ -221,21 +221,21 @@ }; -module MODULE_VAR_EXPORT php4_module; +AP_MODULE_DECLARE_DATA module php4_module; #define INIT_CTX \ if (ctx == NULL) { \ /* Initialize filter context */ \ SG(server_context) = ctx = apr_pcalloc(f-r-pool, sizeof(*ctx)); \ - ctx-bb = ap_brigade_create(f-c-pool); \ + ctx-bb = apr_brigade_create(f-c-pool); \ } -static int php_input_filter(ap_filter_t *f, ap_bucket_brigade *bb, +static int php_input_filter(ap_filter_t *f,
[PHP] include_once
Redhat 6.1 Linux PHP 4.0.4pl1 Apache 1.3.14 Anyone using "include_once"? I'm executing a PHP script "A.php" by referring to it in my Netscape browser URL - script A.php does an include_once of "B.php" - B.php contains a database connect function that does a connect to an Oracle database. I purposely brought down the Oracle database to force a connect error. I have an "error_log" statement in the connect failure that prints to our webserver error log - the connect error was reported fine. ***THEN, I added more text to the error_log output for that connect failure, but the new text is *NOT* appearing in any subsequent connect failures. Why won't my new text appear in the error? I've tried changing the "include_once" to "include", and the same thing happened. I even tried restarting the webserver, but it had no affect. This is driving me nuts! Help please. TIA. -- Hardy Merrill Mission Critical Linux, Inc. http://www.missioncriticallinux.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-CVS] cvs: php4 /sapi/apache2filter apache_config.c sapi_apache2.c
sas Wed Feb 28 06:11:35 2001 EDT Modified files: /php4/sapi/apache2filterapache_config.c sapi_apache2.c Log: Now it actually loads, but it segfaults upon a request. Index: php4/sapi/apache2filter/apache_config.c diff -u php4/sapi/apache2filter/apache_config.c:1.10 php4/sapi/apache2filter/apache_config.c:1.11 --- php4/sapi/apache2filter/apache_config.c:1.10Wed Feb 28 06:03:58 2001 +++ php4/sapi/apache2filter/apache_config.c Wed Feb 28 06:11:34 2001 @@ -150,7 +150,7 @@ phpapdebug((stderr, "Creating new config (%p) for %s\n", newx, dummy)); zend_hash_init(newx-config, 0, NULL, NULL, 1); - apr_register_cleanup(p, newx, destroy_php_config, NULL); + apr_pool_cleanup_register(p, newx, destroy_php_config, NULL); return (void *) newx; } Index: php4/sapi/apache2filter/sapi_apache2.c diff -u php4/sapi/apache2filter/sapi_apache2.c:1.26 php4/sapi/apache2filter/sapi_apache2.c:1.27 --- php4/sapi/apache2filter/sapi_apache2.c:1.26 Wed Feb 28 06:03:58 2001 +++ php4/sapi/apache2filter/sapi_apache2.c Wed Feb 28 06:11:34 2001 @@ -60,7 +60,7 @@ while (str_length 0) { now = MIN(str_length, 4096); b = apr_bucket_transient_create(str, now); - AP_BRIGADE_INSERT_TAIL(bb, b); + APR_BRIGADE_INSERT_TAIL(bb, b); str += now; str_length -= now; } @@ -171,7 +171,7 @@ bb = apr_brigade_create(ctx-f-r-pool); b = apr_bucket_flush_create(); - AP_BRIGADE_INSERT_TAIL(bb, b); + APR_BRIGADE_INSERT_TAIL(bb, b); if (ap_pass_brigade(ctx-f-next, bb) != APR_SUCCESS) { php_handle_aborted_connection(); } @@ -184,7 +184,7 @@ ctx = SG(server_context); - apr_puts(msg, ctx-f-r-server-error_log); + apr_file_puts(msg, ctx-f-r-server-error_log); } static sapi_module_struct apache2_sapi_module = { @@ -339,7 +339,7 @@ /* If we have received all data from the previous filters, * we "flatten" the buckets by creating a single string buffer. */ - if (ctx-state == 1 apr_bucket_IS_EOS(AP_BRIGADE_LAST(ctx-bb))) { + if (ctx-state == 1 APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(ctx-bb))) { int fd; zend_file_handle zfd; smart_str content = {0}; @@ -401,18 +401,18 @@ skip_execution: #define NO_DATA "php_filter did not get ANY data" eos = apr_bucket_transient_create(NO_DATA, sizeof(NO_DATA)-1); - AP_BRIGADE_INSERT_HEAD(bb, eos); + APR_BRIGADE_INSERT_HEAD(bb, eos); ok: php_apache_request_dtor(f SLS_CC); SG(server_context) = 0; /* Pass EOS bucket to next filter to signal end of request */ eos = apr_bucket_eos_create(); - AP_BRIGADE_INSERT_TAIL(bb, eos); + APR_BRIGADE_INSERT_TAIL(bb, eos); return ap_pass_brigade(f-next, bb); } else - ap_brigade_destroy(bb); + apr_brigade_destroy(bb); return APR_SUCCESS; } @@ -432,7 +432,7 @@ tsrm_startup(1, 1, 0, NULL); sapi_startup(apache2_sapi_module); apache2_sapi_module.startup(apache2_sapi_module); - apr_register_cleanup(pchild, NULL, php_apache_server_shutdown, NULL); + apr_pool_cleanup_register(pchild, NULL, php_apache_server_shutdown, NULL); php_apache_register_module(); } -- PHP CVS 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] Retrieving Version numbers.
Hey all, New to the list. The only reason I joined was because searching the = archive is a joke. Try to search for something using more than one word = and you get it all. hehe. Anyway, I tryed a search and didn't find anything on this so here goes. I need to retrieve the version number from differant programs. example: = "perl -v", or "sendmail -bt -d0", etc.. The problem is that (for example perl) the program returns a bunch of BS = that isn't needed. Does anyone know of a way to access this info = easily? Maybe capture the return in a string and then parse to the = numbers? Not sure how I should do this. Any info would be helpful. = Thanks. Chuck
[PHP-CVS] cvs: php4 /sapi/apache2filter README sapi_apache2.c
sas Wed Feb 28 06:19:16 2001 EDT Modified files: /php4/sapi/apache2filterREADME sapi_apache2.c Log: httpd-2.0 cvs seems to be busted. I'm getting very strange backtraces and the header filter still seems to be broken. Will try later. Index: php4/sapi/apache2filter/README diff -u php4/sapi/apache2filter/README:1.7 php4/sapi/apache2filter/README:1.8 --- php4/sapi/apache2filter/README:1.7 Wed Feb 28 06:03:58 2001 +++ php4/sapi/apache2filter/README Wed Feb 28 06:19:15 2001 @@ -1,6 +1,6 @@ WHAT IS THIS? -It is an output filter for Apache 2.0. +This module exploits the layered I/O support in Apache 2.0. HOW DOES IT WORK? Index: php4/sapi/apache2filter/sapi_apache2.c diff -u php4/sapi/apache2filter/sapi_apache2.c:1.27 php4/sapi/apache2filter/sapi_apache2.c:1.28 --- php4/sapi/apache2filter/sapi_apache2.c:1.27 Wed Feb 28 06:11:34 2001 +++ php4/sapi/apache2filter/sapi_apache2.c Wed Feb 28 06:19:15 2001 @@ -54,7 +54,7 @@ ctx = SG(server_context); - if (!str_length) return 0; + if (str_length == 0) return 0; bb = apr_brigade_create(ctx-f-r-pool); while (str_length 0) { -- PHP CVS 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 / mySQL Problem
Hello, First a bit of background, I'm running apache 1.3.12, php 4.03 and MySQL 3.23.22 under the Windows platform. My problem is simply that when I write stuff to database tables full stops are represented as copyright symbols when I view the data again. This is probably me just being stupid - I'm guessing I've overlooked something obvious. If you need more information just ask me, Thanks in advance, Michael Gorner. -- 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] PHP and printing
Hi, I'm working with php4 and mysql on a suse 6.3 I made a program for an ISP that creates accounts, clients, payments, invoices. Everymonth they need to print like a quote (a list of every non paid thing) its ok, I could do that, I mean in the screen... Is it possible to print it in a printer automatically? I mean.. I dont want to view it on the screen.. I want it to print all the records alone Can you help me??? e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] Well, you could simply use a shell script use something like mylsq -psomepassword dbname -H -e "SQL-QUERY" | html2ps | lpr -H puts out HTML-format -e executes the query in "" html2ps formats the output to postscript, which is printed via lpr... works fine with me... you could simply include this in your crontab -- 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] mySQL table joins are slow, need rebuild?
It also seems you have a semicolon in your query, mysql_query() specifically states not to have on at the end of your queries, so I am guessing this may be a factor... Steve Joe Stump wrote: You need to remember a few things when it comes to joins: the joined fields must be the EXACT same definition - example: a join on id int(9) and id int(3) will NOT be optimized - more: a join on id char(9) and id int(9) is REALLY NOT optimized :O) We have an accounts table with userID as the key char(15) (don't ask, it's an old design made by a former employee) which has roughly 1.6 million rows in it. We regularily do joins on it with other tables that have thousands of records in less than .05 seconds. This sounds like a table structure problem to me. --Joe On Tue, Feb 27, 2001 at 02:21:53PM -0800, Jason wrote: hi, i have a query that is comparing a table with 1235 rows with another that has 635 rows. The query looks like this: $res = mysql_query("select cust_info.ID, cust_info.first_name, cust_info.last_name, cust_info.address, cust_info.datestamp from cust_info, cust_order_info where cust_info.ID=cust_order_info.cust_id order by $mainsort" . $order . ";"); The parse time with the join is 19 seconds. I have to do a join because there a different methods that the user must be able to sort by. The parse time on the cust_info table alone, with a order by is .95 seconds. Now, we have a RPM binary of mySQL, and when performing the query, not only is it slow, but sometimes will dump its core. Does anyone see anything wrong with the query, or should we consider building the source on our box.. or? 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] -- --- Joe Stump, PHP Hacker, [EMAIL PROTECTED] -o) http://www.miester.org http://www.care2.com /\\ "It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V --- -- 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] How to disable some functions?
Hi, I've heard that it is possible, for security reasons, to disable such functions like phpinfo(). How can I do this? Greets, Batonik -- 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] include_once
Solved - I was changing a copy of the code that the webserver was NOT looking at. "include_once" works fine. Appologies. -- Hardy Merrill Mission Critical Linux, Inc. http://www.missioncriticallinux.com Hardy Merrill [[EMAIL PROTECTED]] wrote: Redhat 6.1 Linux PHP 4.0.4pl1 Apache 1.3.14 Anyone using "include_once"? I'm executing a PHP script "A.php" by referring to it in my Netscape browser URL - script A.php does an include_once of "B.php" - B.php contains a database connect function that does a connect to an Oracle database. I purposely brought down the Oracle database to force a connect error. I have an "error_log" statement in the connect failure that prints to our webserver error log - the connect error was reported fine. ***THEN, I added more text to the error_log output for that connect failure, but the new text is *NOT* appearing in any subsequent connect failures. Why won't my new text appear in the error? I've tried changing the "include_once" to "include", and the same thing happened. I even tried restarting the webserver, but it had no affect. This is driving me nuts! Help please. TIA. -- Hardy Merrill Mission Critical Linux, Inc. http://www.missioncriticallinux.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] -- Hardy Merrill Mission Critical Linux, Inc. http://www.missioncriticallinux.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] PHP and SVG
Even though the WC3 hasn't fully finalized the spec for SVG, it's still a viable option for doing some dynamic graphics work using the Adobe plugin. Has anybody been messing around with generating dynamic SVG code with PHP? I haven't done so yet but it's certainly on my 'to do' list. We do a simple drawing program for schools which exports SVG, and I had toyed with the idea of generating an SVG extension module for PHP, however I couldn't dream up many functions which you couldn't easily implement in php itself. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- 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] redefine constants
why can't I redefine __LINE__? like define(LN,__LINE__); it's a rather big constant to put in code to generate my error messages, I was thinking more of L, or LN... but if I redefine it, it assumes the value of de redefine() line of code... so it's not really redefining a constant it's only atributing LN the value of __LINE__... and in the manual I saw examples where redefining constants were used... . 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]
Re: [PHP] Retrieving Version numbers.
On Wed, 28 Feb 2001, ACNS-ONLINE Webmaster wrote: I need to retrieve the version number from differant programs. example: = "perl -v", or "sendmail -bt -d0", etc.. The problem is that (for example perl) the program returns a bunch of BS = that isn't needed. Does anyone know of a way to access this info = easily? I.e. with perl try using: perl -e 'print $]' In other cases "preg_match" would be helpful, I guess. Greets, Batonik -- 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] user_error() default error type
Can't I change the default value for error type in user_error or trigger_error? I wanted to echo an error everytime a query failed because of syntax errors so I'd to something like: $q="select * from bogustable"; mysql_query($q) or trigger_error(mysql_error()." in ".$q,E_USER_ERROR); - ^^^ kinda BIG don't u think? this would do exactly what I need when an query fails cuz of syntax error: - echoes the error, the query and the line of code - stop the execution of the script I NEED all of those, and that E_USER_ERROR in every call is making that function call get huge. Isn't there a way I can't default it to that instead of E_USER_NOTICE (which doesn't really help)... . 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]
RE: [PHP] redefine constants
define() gives you a literal copy of the value of the second parameter. In this case your second parameter is __LINE__. The value of __LINE__ represents the current line number of the define statement. Once defined the value assigned remains constant, irrespective of whether or not __LINE__ changes later on. You could 'redefine' the value - but you'd just get the line number of the redefinition. You really want a reference (pointer) to the __LINE__ constant, however, you can't have references to constants. So, you just plain can't do it. If you think about it, this is a pain only with the parser 'constants', you wouldn't need a reference to your own constants as they never change. -Original Message- From: Christian Dechery [mailto:[EMAIL PROTECTED]] Sent: 28 February 2001 16:13 To: [EMAIL PROTECTED] Subject: [PHP] redefine constants why can't I redefine __LINE__? like define(LN,__LINE__); it's a rather big constant to put in code to generate my error messages, I was thinking more of L, or LN... but if I redefine it, it assumes the value of de redefine() line of code... so it's not really redefining a constant it's only atributing LN the value of __LINE__... and in the manual I saw examples where redefining constants were used... . 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 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] Test. Please, ignore!
php-general, Test. Please, ignore! -- Regards, Alex mailto:[EMAIL PROTECTED] May all your Internet Dreams come true! http://www.intellinetusa.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] Pluralize a word for searching a database
Has anyone every written a function in php to pluralize an english word, particularly when searching a database? function pluralize($word){ return array of pluralized words; } Any help would be appreciated. Seems like their might be a nice regex waiting to handle this? Thanks! Robert Zwink http://zwink.levitate.org -- 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] iPlanet issue...
I just noticed a problem with iPlanet... Appearently once I got php working, then I tried geting things working on multiple virtual domains. So this is what happens. Using the standard test.php ?php phpinfo(); ?. The script works from the root directory of each virtual domain. What doesn't work is and directory's under the root directory. basicly returns a error message that says it cannot find the file, and that's due to the fact that it's looking at the following line in the obj.conf file. This is for the main one. Nametrans fn="document-root" root="/usr/netscape/server4/docs" Then I change it to reflect it for the virtual domain and it works for that virtual domain, but no others and then all of the sudden if there's anything on the main page, ofcourse that doesn't work. help. evan -- 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] How to disable some functions?
Batonik's [[EMAIL PROTECTED]] 15 lines of wisdom included: :Hi, : : I've heard that it is possible, for security reasons, to disable :such functions like phpinfo(). How can I do this? You can edit the sources... PHP4: $PHP_BASE_DIR/ext/standard/basic_functions.c You're looking for a struct called function_entry basic_functions[] On my version (4.0.4-pl1) it's on line 91. Your functions are listed there.. for example, delete line "PHP_FE(time, NULL)" which is on line 100 on my version disables the time function. However, why you want to disable functions is beyond me, to make PHP "safe" you're going to have to disable a LOT of functions.. There might be some PHP4 way to disable functions, I think there might be some way to do it from php.ini, but I can't find it offhand. Phil. -- 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] redefine constants
consants must be scalar, they can not be references. http://php.net/manual/en/function.define.php what your looking for is this. ?php define(LN, __LINE__); ? this is invalid syntax though, I dont know how to answer your question though, sorry :( -- Chris Lee Mediawaveonline.com ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120 [EMAIL PROTECTED] "Christian Dechery" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... why can't I redefine __LINE__? like define(LN,__LINE__); it's a rather big constant to put in code to generate my error messages, I was thinking more of L, or LN... but if I redefine it, it assumes the value of de redefine() line of code... so it's not really redefining a constant it's only atributing LN the value of __LINE__... and in the manual I saw examples where redefining constants were used... . 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] Manuel Lemos's PHP POP3 class
anyone using this class: whats a good way to extact the address of who sent the mail and stick it in a variable,in order to reply? -- 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] formating output
some code snipits would help, but lets see what we can do. I like arrays, they work for me, there are lots of ways todo things, arrays will help. echo "b{$headline[0]}/ba href='{$newslink[0]}'Latest news/a blah blahbr \n"; echo "b{$headline[1]}/ba href='{$newslink[1]}'Latest news/a blah blahbr \n"; echo "b{$headline[2]}/ba href='{$newslink[2]}'Latest news/a blah blahbr \n"; you can also accompish this nicer with a foreach loop foreach($headline as $pos = $val) echo "b{$headline[$pos]}/ba href='{$newslink[$pos]}'Latest news/a blah blahbr \n"; more info at http://php.net/manual/en/control-structures.foreach.php email me with more questions, I am eager to help -- Chris Lee Mediawaveonline.com ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120 [EMAIL PROTECTED] ""george"" [EMAIL PROTECTED] wrote in message 97j42g$314$[EMAIL PROTECTED]">news:97j42g$314$[EMAIL PROTECTED]... I am developing a site which will have a web based admin panel, just now you can alter the scrolling headlines through the panel. But I want to be able to let the user modify, delete and create new headline, this isnt proble but i dong know how to format the output. What i want is for it to dispaly the headlines that are in the table be it 2 or 5 how do i take info from a table and get it to echo the code as many times as needed(dependingon the headlines in the table) so the code would be like this but how do i also stop it from displaying the same fields ie exact same headline link etc. and how do i get this so that 3 news stories = 3 lines code myScroller1.addItem("b? echo "$headline" ; ?a href='? echo "$newslink"; ?' latest news news/a, news news news/b"); Hope you understand it, I dont think i do. George -- 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-CVS] cvs: php4 /ext/midgard attachment.c
davidg Wed Feb 28 07:50:06 2001 EDT Modified files: /php4/ext/midgard attachment.c Log: function reference: attachments Index: php4/ext/midgard/attachment.c diff -u php4/ext/midgard/attachment.c:1.6 php4/ext/midgard/attachment.c:1.7 --- php4/ext/midgard/attachment.c:1.6 Tue Feb 27 17:00:31 2001 +++ php4/ext/midgard/attachment.c Wed Feb 28 07:50:06 2001 @@ -1,4 +1,4 @@ -/* $Id: attachment.c,v 1.6 2001/02/28 01:00:31 davidg Exp $ +/* $Id: attachment.c,v 1.7 2001/02/28 15:50:06 davidg Exp $ Copyright (C) 1999 Jukka Zitting [EMAIL PROTECTED] Copyright (C) 2000 The Midgard Project ry Copyright (C) 2000 Emile Heyns, Aurora SA [EMAIL PROTECTED] @@ -70,7 +70,7 @@ (*name)-value.str.val); } -MGD_FUNCTION(ret_type, oop_attachment_create, (type param)) +MGD_FUNCTION(int, oop_attachment_create, (string name, string title, string mimetype, +[int score])) { zval *self; zval **zv_table, **zv_id; @@ -192,7 +192,7 @@ mgd_free_pool(pool); } -MGD_FUNCTION(ret_type, oop_attachment_list, (type param)) +MGD_FUNCTION(mixed, oop_attachment_list, ([string sort])) { zval *self, **zv_table, **zv_id, **zv_order; char *order = NULL; @@ -229,7 +229,7 @@ (*zv_table)-value.str.val, (*zv_id)-value.lval); } -MGD_FUNCTION(ret_type, open_attachment, (type param)) +MGD_FUNCTION(int, open_attachment, ([int id, [string mode]])) { int pid; int ptable; @@ -330,7 +330,7 @@ mgd_release(res); } -MGD_FUNCTION(ret_type, get_attachment, (type param)) +MGD_FUNCTION(mixed, get_attachment, (int id)) { zval **id; zval *self; @@ -338,11 +338,6 @@ CHECK_MGD; switch (ZEND_NUM_ARGS()) { - /* EEH/TODO: Why this? - case 0: - php_midgard_bless(return_value, MidgardAttachment); - return; - */ case 1: if (zend_get_parameters_ex(1, id) != SUCCESS) WRONG_PARAM_COUNT; break; @@ -359,7 +354,7 @@ php_midgard_get_object(return_value, MIDGARD_OBJECT_BLOBS, aid); } -MGD_FUNCTION(ret_type, serve_attachment, (type param)) +MGD_FUNCTION(bool, serve_attachment, (int id)) { midgard_res *res; const char *location, *mimetype; @@ -450,7 +445,7 @@ RETVAL_TRUE; } -MGD_FUNCTION(ret_type, stat_attachment, (type param)) +MGD_FUNCTION(mixed, stat_attachment, (int id)) { midgard_res *res; const char *location; @@ -537,7 +532,7 @@ #endif } -MGD_FUNCTION(ret_type, delete_attachment, (type param)) +MGD_FUNCTION(bool, delete_attachment, (int id)) { int pid; int ptable; @@ -610,7 +605,7 @@ mgd_release(res); } -MGD_FUNCTION(ret_type, update_attachment, (type param)) +MGD_FUNCTION(bool, update_attachment, (int id, string name, string title, string +mimetype, [int score, [int author]])) { zval **id, **name, **title, **mimetype, **score, **author, *self; int ptable, pid; -- PHP CVS 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] illegal string index
I usually put '' around my indexs if they are not numeric, sometimes I dont have to sometimes I do, so I allways do. $ip[$t] = $waarden['ip']; another note is check if there are any NULL entries in the 'ip' field in your db. if a field is NULL then php does not create that index. and you will get an undefined index error. mysql alter table TABLE_NAME change VAR_NAME VAR_NAME varchar(255) NOT NULL ; please email me if you have more questions or comments, I am interested in knowing how this works for you -- Chris Lee Mediawaveonline.com ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120 [EMAIL PROTECTED] ""E. Uytterhoeven"" [EMAIL PROTECTED] wrote in message 97ir7c$e8v$[EMAIL PROTECTED]">news:97ir7c$e8v$[EMAIL PROTECTED]... Hi, I made a site that uses the following code: $id = base64_decode($go);// decoding ID $DataBaseNaam = "teller";// name of DB include('connect.inc.php3');// connection to DB $query = "select * from kl".$id;//query $result = mysql_db_query($DataBaseNaam, $query);// getting ResultSet $t=0; while ($waarden = mysql_fetch_array($result))// extracting ata from RS { $ip[$t] = $waarden[ip];// IP value (varchar) -- This line generates the problem..? $datum[$t] = $waarden[datum];// date value (integer) $urlprov[$t] = $waarden[urlprov];// URL value (varchar) $t++; } On a locale machine (using PHP4) I didn't have any problems, but on internet (using PHP 3.0.16) I got the warning "illegal string index on line ..." I only get this warning if I want to extract IP numbers from my DB. Does anyone knows why I get this warning ? Thanks, Eelco -- 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] found a bug with File Uploads..
try droping the max_file_size entry, does it help? I run on linux and my file uploads work from all browsers but opera. input type=hidden name='MAX_FILE_SIZE' value='10' is a silly thing php has added, the only purpose I could ever see for this is to prevent people from uploading 3G files, but if this is the case, should the security not be server side, vs client side? as you mentioned, modify php.ini to change your limit. does anyone know another use for this ? -- Chris Lee Mediawaveonline.com ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120 [EMAIL PROTECTED] "Dhaval Desai" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi! I think I just found a bug in php. I try to upload a file of size 37.0 K and you know what happens.,, The browser takes its own time..and the stupid thing doesnot upload the file. If I upload a file of size 2k then it uploads.. I have specified the file size in the form as : FORM ENCTYPE="multipart/form-data" ACTION="upload.php" METHOD="POST" INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="10" In Php.ini file I have found 8M is the maximum size.. I am running php 4.0.3pl1 wioth Apache on Windows 98. I also have a server on Cqhost.com I have seen the same happen there,.too... Is this a bug or a problem..?? Please Reply Cheers!~ Dhaval Desai __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.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] Caller's __LINE__
On Wed, 28 Feb 2001, Christian Dechery wrote: Pass __LINE__ to the function as one of its arguments: function debuginfo($msg, __LINE__) { echo"bthe message is $msg, at line" . __LINE__ . " /bbr"; } that won't work since __LINE__ returns the exact line where it's used... so it will always show the line of the function header... . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer Okay, simple enough. Pass __LINE__ as one of its arguments and just use a real variable name on the function declaration. function debuginfo($msg, $line_num) { echo"bthe message is $msg, at line $line_num /bbr"; } debuginfo($msg, __LINE__); This will probably result in a line number that is one integer bigger than what you want. For instance the error happened on line 40 and you are actually calling this function on line 42. You can then just substract 2 from that and you will get the real line number. It's ugly, but works (or should anyway ;). Regards, Joao -- Joo Prado Maia [EMAIL PROTECTED] http://phpbrasil.com - php com um jeitinho brasileiro -- Contribua com o projeto de traduo do manual online do PHP http://phpbrasil.com/traducao.php -- -- 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] function not working?
your function function display_contents($table,$session) { $count = 0; $result = mysql_query( "SELECT * FROM $table WHERE session = '$session'"); while($row = mysql_fetch_array($result)) { $result_inv = mysql_query( "SELECT * FROM retailseafood WHERE pid = '{$row['items']}' "); $row_inventory = mysql_fetch_array($result_inv); $contents['items'][$count] = $row_inventory['pid']; $contents['price'][$count] = $row_inventory['price']; $contents['total'][$count] = $row_inventory['price'] * $row['quantity']; $count ++; } $total = $this-cart_total($table, $session); $contents['final'] = $total; return $contents; } looks ok, there are some code snippits missing ($this-cart_total()) but I'll assume its rudamentry. the code you are missing is how your accually calling your function a href="cart.php?action=display"View Contents Of Cart/A is a url, you forgot to include the src of cart.php to see where you are accually calling the function. cart.php ?php if ($action == 'display') display_contents('some_table', $sessionID); ? please email me if you have more questions or comments. -- Chris Lee Mediawaveonline.com ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120 [EMAIL PROTECTED] "Kurth Bemis" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... i can't get his function to work. i pass the correct data to it...but no results heres the function function display_contents($table,$session) { $count = 0; $result = mysql_query( "SELECT * FROM $table WHERE session='$session'"); while($row = mysql_fetch_array($result)){ $result_inv = mysql_query( "SELECT * FROM retailseafood WHERE pid='$row[items]'"); $row_inventory = mysql_fetch_array($result_inv); $contents[ "items"][$count] = $row_inventory[pid]; $contents[ "price"][$count] = $row_inventory[price]; //$contents[ "quantity"][$count] = $row[quantity]; $contents[ "total"][$count] = ($row_inventory[price] * $row[quantity]); $count ++; } $total = $this-cart_total($table,$session); $contents[ "final"] = $total; return $contents; } // return number of items in cart and heres what i do to call the function A href="cart.php?action=display"View Contents Of Cart/A what or where am i doing/going wrong? ~kurth -- 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] putenv() question.
Hi, I am wondering about putenv(). I would like to set an environment variable in php and then have that variable available to a Perl script. I am doing something like this. The php file: ? $myName = "carter"; putenv("A_NAME=$myName"); ? Then in the Perl script: #!/usr/bin/perl print "Content-type: text/html\n\n"; print $ENV{'A_NAME'}; exit; I think I may be misunderstanding how environment variables work. Any thoughts? Carter -- 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] second select how???
Hello all, I have a dynamic select box, according information in database, but I want to restrict a second select box with the choice made in the first select box, but my problem is that I only know the value of the first one after submit form. It is possible to know a choice of a select box without submited ?? T.Y. Best Regards Miguel Loureiro [EMAIL PROTECTED]
Re: [PHP] re:mod_dav and dreamweaver 4.0
Not DreamWeaver specifically- but to make sure the problem is DreamWeaver and not something else, try connecting with a different webDAV client. I can personally vouch for Goliath under Mac OS and DAVExplorer under x86 Linux (DAVExplorer requires you have the JRE installed- and that java is in your path. DAVExplorer also works on Wndows). On Wednesday, February 28, 2001, at 07:59 PM, Joseph H Blythe wrote: Hello, Sorry if this is a little off topic but has anyone successfully used mod_dav with dreamweaver 4.0, I have mod_dav setup but am having trouble connecting to it via dreamweaver. If anyone has successfully used this could they email me privately, as I don't want to waste any more bandwidth on this list. Cheers, Joseph -- 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] -=-=-=-=-=-=-=-=-=-=-=-=-=-=- Michael A. Peters Abriasoft Senior Developer http://www.abriasoft.com/ (510) 623-9726x357 Fax: (510) 249-9125 -- 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] PHP single user??
sounds like a db prodblem, vs php. could be wrong. check your config file. for the max users. -- Chris Lee Mediawaveonline.com ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120 [EMAIL PROTECTED] "Todd Cary" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am having a very strange problem: PHP 4.0.4 on a NT 4 platform with IIS 5 is only allowing one surfer to do a DB Select. If the DB is busy with the first user, the page is not available to other users. And I have no problems with Win 2K. Am I missing something very obvious? Todd -- Todd Cary Ariste Software [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] second select how???
Mmhmm...onChange() event...it's javascript. Go to webmonkey.com and search for it. They have a cute little tutorial about how to do that. Good luck. Jason - Original Message - From: Miguel Loureiro [EMAIL PROTECTED] To: php-gen [EMAIL PROTECTED] Sent: Wednesday, February 28, 2001 12:50 PM Subject: [PHP] second select how??? Hello all, I have a dynamic select box, according information in database, but I want to restrict a second select box with the choice made in the first select box, but my problem is that I only know the value of the first one after submit form. It is possible to know a choice of a select box without submited ?? T.Y. Best Regards Miguel Loureiro [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] found a bug with File Uploads..
Hi , in fact it doesn't do much ( at least on the couple browser I tested it) : whatever you put as a limit the file will upload ... this is a p.. in the a... because if you do the check on the server it can only be done when the upload is complete : pretty unfair to tell the user that he has no more space when he spent 20 minutes uploading a file ( we use audio files and they might be fairly big) but apart from that I recently upgraded to 4.04pl1 and I have the same problem (which didn't happen before) that is described by Dhaval , running on Linux (RHT 7.0 with plenty'o patch ... , Apache 1.3.14) ... changing the max file size doesn't do much :-( the uploaded file seems to have 'type multipart...' and other junk caracters added at the beginning of the file after the copy (which returns a success error code !!!) it seems to be a bug in 4.04pl1 help -- Thierry TABARD Digital Sound Planet http://www.digitalsoundplanet.com ""Chris Lee"" [EMAIL PROTECTED] wrote in message 97jbpe$m17$[EMAIL PROTECTED]">news:97jbpe$m17$[EMAIL PROTECTED]... try droping the max_file_size entry, does it help? I run on linux and my file uploads work from all browsers but opera. input type=hidden name='MAX_FILE_SIZE' value='10' is a silly thing php has added, the only purpose I could ever see for this is to prevent people from uploading 3G files, but if this is the case, should the security not be server side, vs client side? as you mentioned, modify php.ini to change your limit. does anyone know another use for this ? -- Chris Lee Mediawaveonline.com ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120 [EMAIL PROTECTED] "Dhaval Desai" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi! I think I just found a bug in php. I try to upload a file of size 37.0 K and you know what happens.,, The browser takes its own time..and the stupid thing doesnot upload the file. If I upload a file of size 2k then it uploads.. I have specified the file size in the form as : FORM ENCTYPE="multipart/form-data" ACTION="upload.php" METHOD="POST" INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="10" In Php.ini file I have found 8M is the maximum size.. I am running php 4.0.3pl1 wioth Apache on Windows 98. I also have a server on Cqhost.com I have seen the same happen there,.too... Is this a bug or a problem..?? Please Reply Cheers!~ Dhaval Desai __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.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] PHP and iPlanet on Solaris
Sounds like the server doesn't have or recognize the mime type, ala on apache in srm.conf: application/x-httpd-php3 phtml php3 php I'm not familiar with iPlanet but on apache I would check the mime type definition, apache httpd.conf and make sure to restart the server to reload. On Wed, 28 Feb 2001, Montgomery-Recht, Evan wrote: Date: Wed, 28 Feb 2001 09:33:26 -0500 From: "Montgomery-Recht, Evan" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP] PHP and iPlanet on Solaris I got the latest snapshot of php to compile on solaris (4.0.4pl1 wouldn't). Anyways I edited the mime.types and obj.conf as described in the installation instructions, but right now it's trying to download the test.php file I created instead of processing. Is there anything not in the documentation that I need to add. thanks, evan -- 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] Kelly 303-444-1671 Boulder, Colorado -- 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] exchange data between javascript php!
Hi! i want to when i click on a button, i execute some php syntax ! i also want to give a php variable to a javascript function Thanks _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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] Pulling my hair out over Netscape...
Hello everyone... I've been developing a PHP app here for a while now, and I have been encountering some most frustrating situations in which something will work in IE but not Netscape. Some of this seems to be IE's allowances for sloppy coding... :) But here's a new one. I have a form, that if you were to submit this form once, it will always retain the same value. I.E. I enter a value, hit OK. Then I press the back button. Then I enter a DIFFERENT value, and hit OK. The SAME value is passed to the PHP script! I'm using the post method, and I haven't found a way to shake this yet! This is afflicting Netscape 4.7 and Netscape 6. Driving me crazy Thanks in advance, Michael -- 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 Digest 28 Feb 2001 17:54:33 -0000 Issue 539
php-general Digest 28 Feb 2001 17:54:33 - Issue 539 Topics (messages 41953 through 42047): Move a file from dir to another or delete file..? 41953 by: Dhaval Desai 41954 by: Simon Garner 41957 by: Yasuo Ohgaki 41982 by: Christian Reiniger 41997 by: Tim Ward Double Click 41955 by: Fabian Fabela 41956 by: Joe Stump 41962 by: Ovidiu EFTIMIE function not working? 41958 by: Kurth Bemis 42037 by: Chris Lee ++$i and $i++ whatz the difference? 41959 by: Dhaval Desai 41960 by: Jay Klehr 41968 by: ..s.c.o.t.t.. subscript my mail-id for php 41961 by: B Satish , Gurgaon subscribe my mail-id for php mailing lists 41963 by: B Satish , Gurgaon Re: LDAP Listing 41964 by: Fredrik Wahlberg what is wrong with this sniplet? 41965 by: Jacky 41971 by: Alvin Tan 41972 by: Jacky 41973 by: Jacky 41974 by: Simon Garner 41983 by: Christian Reiniger 41988 by: Yasuo Ohgaki curl functions problems 41966 by: Dezider Góra Re: Exception Handling in php 41967 by: Ovidiu EFTIMIE Caller's __LINE__ 41969 by: elias 41970 by: CC Zona 41976 by: Neil Kimber 42010 by: Christian Dechery 42036 by: Joao Prado Maia Getting form name 41975 by: Matt Williams 41977 by: Simon Garner 41979 by: Matt Williams Re: Another question about using shmop! 41978 by: Christian Reiniger Re: File downloading? 41980 by: Christian Reiniger multiple databases 41981 by: Michael Hall 41984 by: Simon Garner 41985 by: Michael Hall 41987 by: Simon Garner 41993 by: Christian Reiniger Re: Revised [PHP] COM and PHP 41986 by: Daniel Tryba Hebrew websites transition with php3 .. 41989 by: Aviv Revach 41998 by: Boaz Yahav 41999 by: Aviv Revach optimal way of counting votes in online poll 41990 by: Vikram Vaswani 41992 by: Simon Garner found a bug with File Uploads.. 41991 by: Dhaval Desai 42035 by: Chris Lee 42043 by: TTT Re: while loop and modulus? 41994 by: Tim Ward illegal string index 41995 by: E. Uytterhoeven 42034 by: Chris Lee Re: Members area 41996 by: Miles Thompson webmin like tools in php 42000 by: Mitchell Hagerty PHP and iPlanet on Solaris 42001 by: Montgomery-Recht, Evan 42045 by: Kelly Corkill PHP and SVG 42002 by: Joe Sheble (Wizaerd) 42022 by: Phil Driscoll Problems with PHP4 CGI binary 42003 by: Philip Reynolds POST Referral 42004 by: Boget, Chris 42005 by: Matt A small Q 42006 by: Harshdeep S Jawanda 42008 by: Matt 42009 by: Clayton Dukes 42011 by: Philip Reynolds 42013 by: Robert Vetter formating output 42007 by: george 42033 by: Chris Lee interpolating functions into here-docs 42012 by: kevin1 PHP and printing 42014 by: fano 42018 by: Michael Meinl include_once 42015 by: Hardy Merrill 42021 by: Hardy Merrill Retrieving Version numbers. 42016 by: ACNS-ONLINE Webmaster 42024 by: Batonik PHP / mySQL Problem 42017 by: Michael Gorner Re: mySQL table joins are slow, need rebuild? 42019 by: Steve Segarra How to disable some functions? 42020 by: Batonik 42030 by: Philip Reynolds redefine constants 42023 by: Christian Dechery 42026 by: Neil Kimber 42031 by: Chris Lee user_error() default error type 42025 by: Christian Dechery Test. Please, ignore! 42027 by: Alex Puritche Pluralize a word for searching a database 42028 by: Robert V. Zwink iPlanet issue... 42029 by: Montgomery-Recht, Evan Manuel Lemos's PHP POP3 class 42032 by: Adrian Murphy putenv() question. 42038 by: Carter Comunale second select how??? 42039 by: Miguel Loureiro 42042 by: Jason Jacobs Re: re:mod_dav and dreamweaver 4.0 42040 by: Michael A. Peters Re: PHP single user?? 42041 by: Chris Lee Re: [PHP-WIN] Re: [PHP] Revised [PHP] COM and PHP 42044 by: Alain Samoun exchange data between javascript php! 42046 by: kaab kaoutar Pulling my hair out over Netscape... 42047 by: Jackson, Michael Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- Hi! Well I would like to move a file from one directoy to another using php and a web browser. I could just find a function to move an uploaded file but not a normal file which is allready there in some directory. Is there any way I can move a
Re: [PHP] Pulling my hair out over Netscape...
On Wed, 28 Feb 2001, Jackson, Michael wrote: I.E. I enter a value, hit OK. Then I press the back button. Then I enter a DIFFERENT value, and hit OK. The SAME value is passed to the PHP script! I'm using the post method, and I haven't found a way to shake this yet! This is afflicting Netscape 4.7 and Netscape 6. Driving me crazy Maybe try setting headers like "Expires" or "Cache-Control"? Greets, Batonik -- 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] sitemap script
Does anybody know of a sitemap script written in php? I appreciate any hint. Ali -- 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] How to insert time and date into mysql?
How can I insert time and date into mysql table, if the table i have to insert has a field of type time, and a field of type date. Then how can I insert it in PHP, if I use time() function?? -- 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] sitemap script
try freshmeat.org http://freshmeat.net/projects/phpsitemapper/ hope it helps :) tim - Original Message - From: "Ali" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 28, 2001 1:16 PM Subject: [PHP] sitemap script Does anybody know of a sitemap script written in php? I appreciate any hint. Ali -- 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 an array parser
I am looking for somthing that will parse a multidimentional array of any size, and return a key / value listing for debugging Example: if I have an array such as... $arr[name] = dallas $arr[address][city] = austin $arr[address][state] = Texas $arr[somthing][somthing_else][blah1]= some_value1 $arr[somthing][somthing_else][blah2]= some_value2 $arr[somthing][somthing_else][blah3]= some_value3 I would want the result to be displaied as: -- 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] sitemap script
ahh my mistake .net, you know what i mean :) tim.. - Original Message - From: "Tim O'Callaghan" [EMAIL PROTECTED] To: "Ali" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, February 28, 2001 1:19 PM Subject: Re: [PHP] sitemap script try freshmeat.org http://freshmeat.net/projects/phpsitemapper/ hope it helps :) tim - Original Message - From: "Ali" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 28, 2001 1:16 PM Subject: [PHP] sitemap script Does anybody know of a sitemap script written in php? I appreciate any hint. Ali -- 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] Need an array parser(CONT)
I am looking for somthing that will parse a multidimentional array of any size, and return a key / value listing for debugging Example: if I have an array such as... $arr[name] = dallas $arr[address][city] = austin $arr[address][state] = Texas $arr[somthing][somthing_else][blah1]= some_value1 $arr[somthing][somthing_else][blah2]= some_value2 $arr[somthing][somthing_else][blah3]= some_value3 I would want the result to be displaied as: ARR name --- dallas address --- city --- austin address --- state --- Texas somthing --- somthing_else --- blah1 --- some_value1 somthing --- somthing_else --- blah1 --- some_value1
Re: [PHP] Pulling my hair out over Netscape...
At 18:57 28.02.2001, Jackson, Michael said: [snip] Hello everyone... I've been developing a PHP app here for a while now, and I have been encountering some most frustrating situations in which something will work in IE but not Netscape. Some of this seems to be IE's allowances for sloppy coding... :) But here's a new one. I have a form, that if you were to submit this form once, it will always retain the same value. I.E. I enter a value, hit OK. Then I press the back button. Then I enter a DIFFERENT value, and hit OK. The SAME value is passed to the PHP script! I'm using the post method, and I haven't found a way to shake this yet! This is afflicting Netscape 4.7 and Netscape 6. Driving me crazy [snip] I'm not sure if any values get passed to PHP at all... Netscape is very cache-inclined, so it is likely that you're seeing the cached output of your previous query. There are several methods to overcome this situation: (1) HTTP cache headers (see RFC2616, ftp://ftp.isi.edu/in-notes/rfc2616.txt): Cache-Control: no-cache (HTTP/1.1) Pragma: no-cache (HTTP/1.0) (2) Expires headers Expires: Sat, 1 Jan 2000 00:00 + Or use the META HTTP-EQUIV fields. Note as a side effect that using the "Expires" header will keep a lot of search engines from indexing the result page. Another method is using a random value as SEARCH parameter, e.g. http://www.myhost.com/myapp.php?rv=0987412...other parameters Your application must ensure that the random value is as random as possible. This makes the URL "unique" and will bypass any ill-behaved cache (it won't help if the user hits the back button, of course...) ...ebird O Ernest E. Vogelsinger (\)http://www.1-at-web.at/ ^ ICQ# 13394035 -- 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] Pluralize a word for searching a database
I don't think you can since the plural form of English words can vary, woman, women, families, family, foot, feet, church, churches, sheep, sheep, road, roads... ? rm --- "Robert V. Zwink" [EMAIL PROTECTED] wrote: Has anyone every written a function in php to pluralize an english word, particularly when searching a database? function pluralize($word){ return array of pluralized words; } Any help would be appreciated. Seems like their might be a nice regex waiting to handle this? Thanks! Robert Zwink http://zwink.levitate.org -- 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] __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.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] Need an array parser(CONT)
At 21:33 28.02.2001, Dallas K. said: [snip] I am looking for somthing that will parse a multidimentional array of any size, and return a key / value listing for debugging Example: if I have an array such as... $arr[name] = dallas $arr[address][city] = austin $arr[address][state] = Texas $arr[somthing][somthing_else][blah1]= some_value1 $arr[somthing][somthing_else][blah2]= some_value2 $arr[somthing][somthing_else][blah3]= some_value3 I would want the result to be displaied as: ARR name --- dallas address --- city --- austin address --- state --- Texas somthing --- somthing_else --- blah1 --- some_value1 somthing --- somthing_else --- blah1 --- some_value1 [snip] Not tested, but try this as an example: ?php function showArray($name, $value) { if (is_array($value)) { if (strlen($name)) $name .= " --- "; while (list($key, $data) = each ($value)) $result .= showArray($name . $key, $data); } else $result = "$name --- $value\n"; return $result; } $a = array("name" = "dallas", "address" = array("city" = "austin", "state" = "Texas"), "something" = array("something else" = array("blah1", "some_value1", "blah2", "some_value2"))); print(showArray(null, $a); ? this should recursively go into multi-dimensional arrays and construct an output similar to your requirements. ...ebird O Ernest E. Vogelsinger (\)http://www.1-at-web.at/ ^ ICQ# 13394035 -- 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] Developer certifications
Does anyone know of a company which is offering or planning to offer PHP developer certifications? Arguments against certification programs aside[1], there are a lot of companies which prefer certified developers, even to the point of assuming a project done in ASP will be better than the same thing done in PHP simply because the ASP developers are Microsoft certified. While this seems like an interesting sideline for a company like Zend, I'm also somewhat curious about whether an "Open Source" test could be developed. It'd certainly have to be quite different from normal tests and that move away from easily memorized answers would probably be a very good thing. [1] We've all heard them before. I'm personally in favor only of certifications like certain devilishly hard Cisco exams which measure more than multiple-choice memory. -- 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] Developer certifications
Brainbench, www.brainbench.com offers many online certifications, including one in PHP. = Original Message From [EMAIL PROTECTED] (Chris Adams) = Does anyone know of a company which is offering or planning to offer PHP developer certifications? Arguments against certification programs aside[1], there are a lot of companies which prefer certified developers, even to the point of assuming a project done in ASP will be better than the same thing done in PHP simply because the ASP developers are Microsoft certified. While this seems like an interesting sideline for a company like Zend, I'm also somewhat curious about whether an "Open Source" test could be developed. It'd certainly have to be quite different from normal tests and that move away from easily memorized answers would probably be a very good thing. [1] We've all heard them before. I'm personally in favor only of certifications like certain devilishly hard Cisco exams which measure more than multiple-choice memory. -- 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]