php-general Digest 18 Sep 2004 16:26:53 -0000 Issue 3003
php-general Digest 18 Sep 2004 16:26:53 - Issue 3003 Topics (messages 197082 through 197111): Re: thumbnail of webpage 197082 by: Curt Zirzow 197083 by: Brad Pauly 197089 by: Jason Wong 197091 by: francesco[AT]automationsoft[DOT]biz 197095 by: Brian V Bonini How to re-code? 197084 by: John Taylor-Johnston 197087 by: Jason Wong Re: create and read array 197085 by: John Holmes Re: DROP TABLE IF EXISTS 197086 by: Jason Wong Re: very interesting post problem 197088 by: QT How does work shorten url services? 197090 by: Henri Marc 197092 by: Ramil Sagum 197098 by: Octavian Rasnita 197102 by: Henri Marc 197106 by: Jason Wong Re: mysql_connect does not connect 197093 by: Sam Hobbs 197094 by: Sam Hobbs 197096 by: Sam Hobbs 197097 by: Sam Hobbs 197099 by: raditha dissanayake 197100 by: Sam Hobbs 197101 by: Jason Wong 197103 by: Sam Hobbs 197104 by: Sam Hobbs 197105 by: Daniel Schierbeck 197107 by: Tom Rogers Can't maintain session across domains 197108 by: Brian Dunning 197109 by: Marek Kilimajer Re: Dissappearing instance variables; Bug or Feature? 197110 by: Marek Kilimajer no ciphers supported in phpinfo() 197111 by: Jose Ramirez 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] -- ---BeginMessage--- * Thus wrote Michael Mao: Is there a way to capture a snapshot of a html page and save it as a jpg using php? As you can see this isn't an easy task. One possiblity is to ask the mozilla/gecko developers if it would be possible to to create a library that would render a page into a bitmap. If that is the case then PHP would be able to do what you need very easily. Curt -- The above comments may offend you. flame at will. ---End Message--- ---BeginMessage--- Michael Mao wrote: Is there a way to capture a snapshot of a html page and save it as a jpg using php? This is a bit of a hack, but kinda neat if you don't mind setting it up. I'm sure you could use php to call a script anyway. Heh. http://www.livejournal.com/users/brad/2015327.html - Brad ---End Message--- ---BeginMessage--- On Saturday 18 September 2004 09:48, Vail, Warren wrote: I have been looking into this over the last week and have come up blank as well. A semi-workable was posted in the archives some months ago. Twice. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Ingrate, n.: A man who bites the hand that feeds him, and then complains of indigestion. */ ---End Message--- ---BeginMessage--- Hi Michael, read this (in italian) http://forum.html.it/forum/showthread.php?s=threadid=694523highlight=pillo la+upload - Original Message - From: Michael Mao [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, September 18, 2004 1:54 AM Subject: [PHP] thumbnail of webpage Is there a way to capture a snapshot of a html page and save it as a jpg using php? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ---End Message--- ---BeginMessage--- On Fri, 2004-09-17 at 22:22, raditha dissanayake wrote: Michael Mao wrote: Is there a way to capture a snapshot of a html page and save it as a jpg using php? This is something that's very very hard to do with PHP but can be easily done with Java. Have not tried this but how about using 'import' which is part of the ImageMagick package? According to the man page: NAME import - capture some or all of an X server screen and save the image to a file. SYNOPSIS import [ options ... ] file DESCRIPTION Import reads an image from any visible window on an X server and out-puts it as an image file. You can capture a single window, the entire screen, or any rectangular portion of the screen. Use display for redisplay, printing, editing, formatting, archiving, image processing, etc. of the captured image. The target window can be specified by id, name, or may be selected by clicking the mouse in the desired window. If you press a button and then drag, a rectangle will form which expands and contracts as the mouse moves. To save the portion of the screen defined by the rectan- gle, just release the button. The keyboard bell is rung once at the beginning of the screen capture and twice when it
Re: [PHP] DROP TABLE IF EXISTS
On Saturday 18 September 2004 10:56, John Taylor-Johnston wrote: MySQL question: What's it doing here? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Democracy is the name we give the people whenever we need them. -- Arman de Caillavet, 1913 */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to re-code?
You have started a new thread by taking an existing posting and replying to it while you changed the subject. That is bad, because it breaks threading. Whenever you reply to a message, your mail client generates a References: header that tells all recipients which posting(s) your posting refers to. A mail client uses this information to build a threaded view (tree view) of the postings. With your posting style you successfully torpedoed this useful feature; your posting shows up within an existing thread it has nothing to do with. Always do a fresh post when you want to start a new thread. To achieve this, click on New message instead of Reply within your mail client, and enter the list address as the recipient. You can save the list address in your address book for convenience. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] very interesting post problem
Thank you, But I don't understand what you mean with body of the post message. Would you explain more or to give an example. Best Regards Raditha Dissanayake [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] QT wrote: Dear Sirs, I need to post 3 string data to destination adres. But I see first time, the name of the variables are same such as DATA. I ask the destination ovner is there any error. Should be the form fields name such as DATA1, DATA2 and DATA3. You appear to be posting to a servlet and according to my understanding the following will be collapsed. $str = DATA=abcDATA=123DATA=xxx Ie only DATA=xxx will be visible to the servlet $len = strlen($str); $p = POST /httpsmspp/servlet/sms HTTP/1.0\r\n; But you are using post. If you add the DATA items to the body of the post message they will be individually accessible by the servlet. -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 128 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] thumbnail of webpage
On Saturday 18 September 2004 09:48, Vail, Warren wrote: I have been looking into this over the last week and have come up blank as well. A semi-workable was posted in the archives some months ago. Twice. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Ingrate, n.: A man who bites the hand that feeds him, and then complains of indigestion. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How does work shorten url services?
Hello, I know that some web sites offer a service to shorten long url. It is very useful when your site is hosted by your Internet provider for example, and that you have a long url. Or when you want to send it in an e-mail. tinyurl.com does that for example. The principle is that you enter your long url in their form and it gives you a shorten url like tinyurl.com/h4599 I was wondering how it works. I think it must use PHP. I see two possibilities. First is that the site creates an html page with a redirect header, like META HTTP-EQUIV=REFRESH CONTENT=0;URL=... But then it would mean that the site needs to host thousands of web pages for all its users. The second choice is to create a simple database with two fields. The first is the long url and the second is the shorten. So, when someone try tinyurl.com/h4599 it sends it to the real site. But is it possible for a web site to capture all the possible urls that it has created then compare it to its database? Because it has not created a webpage h4599.html for example, then the site should show a 404 page. Thanks for your help. Vous manquez despace pour stocker vos mails ? Yahoo! Mail vous offre GRATUITEMENT 100 Mo ! Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/ Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. A télécharger gratuitement sur http://fr.messenger.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] thumbnail of webpage
Hi Michael, read this (in italian) http://forum.html.it/forum/showthread.php?s=threadid=694523highlight=pillo la+upload - Original Message - From: Michael Mao [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, September 18, 2004 1:54 AM Subject: [PHP] thumbnail of webpage Is there a way to capture a snapshot of a html page and save it as a jpg using php? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How does work shorten url services?
On Sat, 18 Sep 2004 10:49:34 +0200 (CEST), Henri Marc [EMAIL PROTECTED] wrote: Hello, The principle is that you enter your long url in their form and it gives you a shorten url like tinyurl.com/h4599 I was wondering how it works. I think it must use PHP. It would use a feature of an HTTP server such as Apache -- URL rewriting Basically, you can make rules such that urls like http://tinyurl.com/h4599 become http://tinyurl.com/index.php?id=h4599 you would then handle it from there. But this is off topic :) ramil http://ramil.sagum.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql_connect does not connect
Curt Zirzow [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] * Thus wrote Sam Hobbs: And the relevant portion of that says external access, which is not applicable here. I do not see anything else on that page that is relevant. what is relevant? only the last one? :sigh: I don't know. Ask them, not me. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql_connect does not connect
Curt Zirzow [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Um.. you do realize you have more problems than php not being able to connect to the database. This is the type of unproductive comment that causes problems. The only reason you are saying this is because you are desperate to make me wrong. You have exhausted reasonable comments and must resort to unreasonable ones. That sure is a problem here. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] thumbnail of webpage
On Fri, 2004-09-17 at 22:22, raditha dissanayake wrote: Michael Mao wrote: Is there a way to capture a snapshot of a html page and save it as a jpg using php? This is something that's very very hard to do with PHP but can be easily done with Java. Have not tried this but how about using 'import' which is part of the ImageMagick package? According to the man page: NAME import - capture some or all of an X server screen and save the image to a file. SYNOPSIS import [ options ... ] file DESCRIPTION Import reads an image from any visible window on an X server and out-puts it as an image file. You can capture a single window, the entire screen, or any rectangular portion of the screen. Use display for redisplay, printing, editing, formatting, archiving, image processing, etc. of the captured image. The target window can be specified by id, name, or may be selected by clicking the mouse in the desired window. If you press a button and then drag, a rectangle will form which expands and contracts as the mouse moves. To save the portion of the screen defined by the rectan- gle, just release the button. The keyboard bell is rung once at the beginning of the screen capture and twice when it completes. -- s/:-[(/]/:-)/g BrianGnuPG - KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu == gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC Key Info: http://gfx-design.com/keys Linux Registered User #339825 at http://counter.li.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql_connect does not connect
Jason Wong [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Being obstinate and contrarian does nothing to help resolve your problem. This is more unnecessary and unproductive comments. Since you did not have something relevant and productive to say the best thing to do is say nothing. I hope the moderators agree. Would I be correct if I paraphrased the above as: The wrong way to get Sam Hobbs to try something that might help in solving his problem: [JD] The firewall might be blocking your attempts to connect to mysql. Try disabling it. [SH] Yeah and what makes you think that? I KNOW the firewal has nothing to do with it. Get real (and go away). The right way to get Sam Hobbs to try something that might help in solving his problem: [JD] The firewall has nothing to do with your problem. But try disabling it anyway. [SH] Yeah that sounds reasonable. Thanks, I'll try that. How silly is that? You paraphrased version is not accurate. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql_connect does not connect
Steve Brown [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Sam, if you wouldn't mind answering a question: are you still unable to connect to your mysql server? I am able to connect now. I'm sorry that you feel its a time-consuming process. I'm sorry that you are confused about the involvement of the firewall. I'm sorry that you feel you know better than everyone on this list. Just try this and prove us wrong. The problem is that people's insistance. It was people's reaction when I said I thought it was not relevant. There was a lot of stuff said that was unnecessary. People could have simply said to try it, without the criticism. To the extent that I was wrong, the apporopriate thing to do is to state whatever facts are relevant and then give me a chance to use that information. I have posted over 12,000 messages in the CodeGuru.com Visual C++ forum, and about 99% of the messages were efforts to help people. I know that there are people that will not listen. When a person will not listen, it is a big mistake to insult them. The attitude in this group would cause a serious flame war if someone were truly not listening. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How does work shorten url services?
I don't think those sites use mod_rewrite because an URl can be anything, including: http://www.oijoij.com/eorier/eoroeir/oier/eorij.pl?terer=wer4334oijo=werooj=123# (or much more complicated urls). Those sites (because there are more) just put the urls in a database, and assign an ID to each one. Then, a program (that can be made in any language) queries the database for the given ID, and get the long URL. Then it redirects to that URL and that's all. I have made such a program in perl but it is very very simple. Teddy - Original Message - From: Ramil Sagum [EMAIL PROTECTED] To: Henri Marc [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday, September 18, 2004 2:29 PM Subject: Re: [PHP] How does work shorten url services? On Sat, 18 Sep 2004 10:49:34 +0200 (CEST), Henri Marc [EMAIL PROTECTED] wrote: Hello, The principle is that you enter your long url in their form and it gives you a shorten url like tinyurl.com/h4599 I was wondering how it works. I think it must use PHP. It would use a feature of an HTTP server such as Apache -- URL rewriting Basically, you can make rules such that urls like http://tinyurl.com/h4599 become http://tinyurl.com/index.php?id=h4599 you would then handle it from there. But this is off topic :) ramil http://ramil.sagum.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql_connect does not connect
Sam Hobbs wrote: I have posted over 12,000 messages in the CodeGuru.com Visual C++ forum, Do you have a life ? -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 128 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql_connect does not connect
Matthew Sims [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] You should check as XP SP2 firewall is turned on by default. http://support.microsoft.com/default.aspx?kbid=842242 Saying You should check assumes I did not check. I did check. I said as far as I know it is off. I am sorry that that does not state explicitly that I checked, but if I had not checked it then I would have stated explicitly that I did not. What I meant is that I don't see anything saying that the firewall is on. When I go to whereever it is that the firewall is configured, it is off. The only reason I am confused is because there are events in the security log complaining about use of some ports and I don't understand that. The messages seem to be produced in spite of the Windows firewall being off. I did explicitly turn off the Windows firewall soon after installing ZoneAlarm over two years ago and again after SP2 was installed. Note that XP has always had a firewall, it just has been improved and made reasonably useful in SP2. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql_connect does not connect
On Saturday 18 September 2004 21:04, Sam Hobbs wrote: Steve Brown [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Sam, if you wouldn't mind answering a question: are you still unable to connect to your mysql server? I am able to connect now. Would you mind spilling the beans? I'm sure everyone is dying to know what the resolution of this thread is. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Of course there's no reason for it, it's just our policy. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How does work shorten url services?
Hello, Those sites (because there are more) just put the urls in a database, and assign an ID to each one. Then, a program (that can be made in any language) queries the database for the given ID, and get the long URL. Then it redirects to that URL and that's all. Ok, it is like I thought, but if it is made in PHP is there a way to catch all the ID sent to the main page of tinyurl.com and then query the database? Like I said before, when someone type in its browser the url tinyurl.com/h4599 how tinyurl (or other similar services), are able to get the ID, what is the command? I hope I'm clear :-/ Vous manquez despace pour stocker vos mails ? Yahoo! Mail vous offre GRATUITEMENT 100 Mo ! Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/ Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. A télécharger gratuitement sur http://fr.messenger.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql_connect does not connect
That is the type of comment that causes problems. Reasonable and knowledgable people know it is not true and saying it just causes problems. Of course, many people would advise to just ignore comments such as that and I will in the future. I just want to make it clear for the benefit of others that this is the type of comments that has caused problems. Jason Davidson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Windows XP Firewall, or any other firewall for that matter must be off. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mysql_connect does not connect
Jason Wong [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Unfortunately (fortunately?) there are packages out there which install all Apache/MySQL/PHP for you or whatever. So unless you state which package you're using then typical is still meaningless. It's just helpful when posting to provide as much _relevant_ info as possible. I am sorry I did not know anything about the other packages. I assumed it was clear that I meant the installation provided by MySQL from there web site. I had no way of knowing that I needed to state what package. The MySQL documentation mentions only two ways of installing MySQL; either manually or by using the installation program they provide. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql_connect does not connect
Sam Hobbs wrote: Steve Brown [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Sam, if you wouldn't mind answering a question: are you still unable to connect to your mysql server? I am able to connect now. I'm sorry that you feel its a time-consuming process. I'm sorry that you are confused about the involvement of the firewall. I'm sorry that you feel you know better than everyone on this list. Just try this and prove us wrong. The problem is that people's insistance. It was people's reaction when I said I thought it was not relevant. There was a lot of stuff said that was unnecessary. People could have simply said to try it, without the criticism. To the extent that I was wrong, the apporopriate thing to do is to state whatever facts are relevant and then give me a chance to use that information. I have posted over 12,000 messages in the CodeGuru.com Visual C++ forum, and about 99% of the messages were efforts to help people. I know that there are people that will not listen. When a person will not listen, it is a big mistake to insult them. The attitude in this group would cause a serious flame war if someone were truly not listening. I'm SO not listening to you... ;) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How does work shorten url services?
On Saturday 18 September 2004 21:23, Henri Marc wrote: Ok, it is like I thought, but if it is made in PHP is there a way to catch all the ID sent to the main page of tinyurl.com and then query the database? If your webserver is apache you could use its rewrite engine to ensure that all requests to http://example.com/ gets processed by php (see apache docs). Like I said before, when someone type in its browser the url tinyurl.com/h4599 how tinyurl (or other similar services), are able to get the ID, what is the command? Then in php process the request (look in $_SERVER). -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* panic(esp_handle: current_SC == penguin within interrupt!); 2.2.16 /usr/src/linux/drivers/scsi/esp.c */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] mysql_connect does not connect
Hi All, I don't normally bother with these kind of meaningless threads as they waste valuable electrons but I did find this interesting http://www.urban75.com/Mag/troll.html PS This is not a dig at you Jason, it's just your post is the only one I didn't delete :) -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Can't maintain session across domains
I'm hosting on PowWeb where you have a different domain for SSL pages. I'm trying to pass the user from the www.mydomain.com pages to the mydomain.secure.powweb.com pages to complete a credit card transaction, so I pass sid=xx as a GET param on the link that jumps them to the new domain. This works on my development server and on another domain, but it's not working here (just dumps them to the login page on the secure domain). Any suggestions? - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't maintain session across domains
Brian Dunning wrote: I'm hosting on PowWeb where you have a different domain for SSL pages. I'm trying to pass the user from the www.mydomain.com pages to the mydomain.secure.powweb.com pages to complete a credit card transaction, so I pass sid=xx as a GET param on the link that jumps them to the new domain. This works on my development server and on another domain, but it's not working here (just dumps them to the login page on the secure domain). Any suggestions? Check session.save_path setting on both domains. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Dissappearing instance variables; Bug or Feature?
In PHP4 $this-one = $one; assigns a *copy* of $one to $this-one. You need to use $this-one = $one; The code will work as expected in PHP5 (and zend.ze1_compatibility_mode set to off). Ryan Briones wrote: This is a scaled down example of something I'm doing in some code. The results are very funky. I guess I could understand this happening if $two was out of scope when print_r($this) was called in One()...actually no I couldn't. ?php Class One { function One() { $this-test = array(); $two = new Two( $this ); print_r( $this ); } function set( $index, $value ) { $this-test[$index] = $value; } } Class Two { var $one = null; function Two( $one ) { $this-one = $one; $this-one-set( 'foo', 1 ); print_r($this); } } $obj = new One; ? OUTPUT: two Object ( [one] = one Object ( [test] = Array ( [foo] = 1 ) ) ) one Object ( [test] = Array ( ) ) This only happens if you assign the reference passed to the second class as an instance variable. If you call the reference directly, the variable persists. ie: ?php Class One { function One() { $this-test = array(); $two = new Two( $this ); print_r( $this ); } function set( $index, $value ) { $this-test[$index] = $value; } } Class Two { var $one = null; function Two( $one ) { $one-set( 'foo', 1 ); } } $obj = new One; ? OUTPUT: one Object ( [test] = Array ( [foo] = 1 ) ) Any Ideas? Ryan Briones -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] no ciphers supported in phpinfo()
I compiled mcrypt and php without problem, but phpinfo() shows there are no supported ciphers and modes; following a suggestion I try to change mode to 755 on libdirs (/usr/local/libmcrypt, /usr/local/libcrypt), but nothing happens. Please help! -- José M. Ramirez -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] use php to download mysql table
Hi, Does anyone have any sample code that will download a mysql table to an excel file? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] use php to download mysql table
On Sat, 18 Sep 2004 10:13:47 -0700, AMC [EMAIL PROTECTED] wrote: Does anyone have any sample code that will download a mysql table to an excel file? http://sourceforge.net/projects/psxlsgen/ -- Greg Donald http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re[2]: [PHP] mysql_connect does not connect
I may be unnaturally ugly (to the extent my mother cried when she held me), and so i have a little extra hair here and there.. and my hands are like hams.. but im no troll :P :P Jason Tom Rogers [EMAIL PROTECTED] wrote: Hi All, I don't normally bother with these kind of meaningless threads as they waste valuable electrons but I did find this interesting http://www.urban75.com/Mag/troll.html PS This is not a dig at you Jason, it's just your post is the only one I didn't delete :) -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql_connect does not connect
oh booh, i replied to that, explicitly detailing you can simply allow an open port for mysql rather than drop the whole firewall. Yes this type of comment cuases problems, or in your case, fixes your problem... at least your mysql connection one. so are you saying im unreasonable, and unknowledgable, me, the person who although blasted with a few emails, telling me i dont understand how localhost works, had the correct solution to your problem .. thanks sam, glad to be of service. BTW, good posts on PHP Internals, have you noticed that the whole world is irrelevent and unreasonable, well, except for you Jason Sam Hobbs [EMAIL PROTECTED] wrote: That is the type of comment that causes problems. Reasonable and knowledgable people know it is not true and saying it just causes problems. Of course, many people would advise to just ignore comments such as that and I will in the future. I just want to make it clear for the benefit of others that this is the type of comments that has caused problems. Jason Davidson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Windows XP Firewall, or any other firewall for that matter must be off. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] filtering out text in a string
Hi there, I want to filter out ip adresses out of a given text string. They are inside a logfile and values are seperated by tabs. I tryed sub_str which works fine if you know the length of the characters. In case of the ip adress this is not the case, since they are sometimes shorter than others. Has anybody an idea how to filter the ip adress out? Maybe magically with any regex or somehow with tab recognicion. This is an example of parts of the text 20:03:20[MSG] 192.168.0.129 bla bla I am stuck here, maybe someone has a good idea or knows how to do that. Thank you in advance, Merlin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] filtering out text in a string
Search preg_replace or preg_match in the manual. Jason Merlin [EMAIL PROTECTED] wrote: Hi there, I want to filter out ip adresses out of a given text string. They are inside a logfile and values are seperated by tabs. I tryed sub_str which works fine if you know the length of the characters. In case of the ip adress this is not the case, since they are sometimes shorter than others. Has anybody an idea how to filter the ip adress out? Maybe magically with any regex or somehow with tab recognicion. This is an example of parts of the text 20:03:20[MSG] 192.168.0.129 bla bla I am stuck here, maybe someone has a good idea or knows how to do that. Thank you in advance, Merlin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] filtering out text in a string
On Sunday 19 September 2004 02:40, Merlin wrote: I want to filter out ip adresses out of a given text string. They are inside a logfile and values are seperated by tabs. I tryed sub_str which works fine if you know the length of the characters. In case of the ip adress this is not the case, since they are sometimes shorter than others. Has anybody an idea how to filter the ip adress out? Maybe magically with any regex or somehow with tab recognicion. This is an example of parts of the text 20:03:20[MSG] 192.168.0.129 bla bla I am stuck here, maybe someone has a good idea or knows how to do that. A dumb regex like this: (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) ought to be sufficient. It does not check for the validity of the address but it probably shouldn't matter too much assuming the program providing the logs can be relied upon. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Sex appeal is 50% what you've got and 50% what people think you've got -- Murphy's Laws on Sex n7 */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] sleep() and Max Execution Time
I just recently learned the power of flushing to the browser and have been playing around with it and have found a few useful actions of it. However, one annoying thing is keeping me down: the max execution time. I know I can change the default setting in the ini but I might need to span this script on another server where I may not have the power to do that. Whenever I go into a loop, and then go sleep(1) or so, after about 30 executions the script will just stop running. Is there any way to get around this or to increase the time or something? Stephen Craton IM: [EMAIL PROTECTED] http://www.melchior.us -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sleep() and Max Execution Time
On Sat, 18 Sep 2004 14:19:55 -0500, Stephen Craton [EMAIL PROTECTED] wrote: I know I can change the default setting in the ini but I might need to span this script on another server where I may not have the power to do that. Whenever I go into a loop, and then go sleep(1) or so, after about 30 executions the script will just stop running. Is there any way to get around this or to increase the time or something? http://us2.php.net/manual/en/function.set-time-limit.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mysql_connect does not connect
This has got to be one of the funniest threads I've seen on the PHP list in a really long time. However, unless someone can come up with more humorous replies, I vote that it be killed. -Ed -Original Message- From: Jason Davidson [mailto:[EMAIL PROTECTED] Sent: Saturday, September 18, 2004 10:35 AM To: Sam Hobbs; [EMAIL PROTECTED] Subject: Re: [PHP] mysql_connect does not connect oh booh, i replied to that, explicitly detailing you can simply allow an open port for mysql rather than drop the whole firewall. Yes this type of comment cuases problems, or in your case, fixes your problem... at least your mysql connection one. so are you saying im unreasonable, and unknowledgable, me, the person who although blasted with a few emails, telling me i dont understand how localhost works, had the correct solution to your problem .. thanks sam, glad to be of service. BTW, good posts on PHP Internals, have you noticed that the whole world is irrelevent and unreasonable, well, except for you Jason Sam Hobbs [EMAIL PROTECTED] wrote: That is the type of comment that causes problems. Reasonable and knowledgable people know it is not true and saying it just causes problems. Of course, many people would advise to just ignore comments such as that and I will in the future. I just want to make it clear for the benefit of others that this is the type of comments that has caused problems. Jason Davidson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Windows XP Firewall, or any other firewall for that matter must be off. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] sleep() and Max Execution Time
Thanks, I had a look at this but it doesn't seem that it will solve my issues, since it just adds on the time the script runs but still limits it. Any suggestions? :: -Original Message- :: From: Andrew Kreps [mailto:[EMAIL PROTECTED] :: Sent: Saturday, September 18, 2004 14:35 :: To: Stephen Craton; PHP List :: Subject: Re: [PHP] sleep() and Max Execution Time :: :: On Sat, 18 Sep 2004 14:19:55 -0500, Stephen Craton :: [EMAIL PROTECTED] wrote: :: I know I can change the default setting in the ini but I might need to :: span :: this script on another server where I may not have the power to do :: that. :: Whenever I go into a loop, and then go sleep(1) or so, after about 30 :: executions the script will just stop running. :: :: Is there any way to get around this or to increase the time or :: something? :: :: :: http://us2.php.net/manual/en/function.set-time-limit.php :: :: -- :: PHP General Mailing List (http://www.php.net/) :: To unsubscribe, visit: http://www.php.net/unsub.php :: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sleep() and Max Execution Time
Please do not top post. On Sunday 19 September 2004 04:19, Stephen Craton wrote: :: Whenever I go into a loop, and then go sleep(1) or so, after about 30 :: executions the script will just stop running. Thanks, I had a look at this but it doesn't seem that it will solve my issues, since it just adds on the time the script runs but still limits it. Any suggestions? RTFM again. Each time you invoke that function it _resets_ the timer. So just stick it in the loop to have it continually reset. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* The meeting of two personalities is like the contact of two chemical substances: if there is any reaction, both are transformed. -- Carl Jung */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sleep() and Max Execution Time
On Sat, 18 Sep 2004 15:19:29 -0500, Stephen Craton [EMAIL PROTECTED] wrote: Thanks, I had a look at this but it doesn't seem that it will solve my issues, since it just adds on the time the script runs but still limits it. Any suggestions? The manual states that if you pass set_time_limit a 0, it will not limit the runtime of the script. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Query takes terribly long
On Sat, 18 Sep 2004 22:25:12 +0200, Dirk Schippers [EMAIL PROTECTED] wrote: with indexes: id = primary, putdatetime, userid, {put,front,topcategory,approvedby} and review. If I want to know the 30 most recently added and approved items, I do the following simple query: SELECT id FROM story WHERE put=1 AND front=1 AND topcategory=1 ORDER BY putdatetime DESC LIMIT 0,30 I couldn't help but notice that your query isn't specifying that the records you want are approved. Does your query time improve if you add approvedby to the query? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] math in PHP
Hi! I have been trying to make some sort of calculator in PHP, but I have stumbled on a problem... I have been make some kind of dynamical calculator, unlike most I have seen, that had $value1 [math operator] $value2 strict, but a calculator, that can calculate basically anything ( even something like (5*(8-3)+2*(4-1))^3 ), and can be put in as string variable... I have tried things like this: $var = 1+1+1+1; echo $var + 0; //returns 1 or $var = 1+1+1+1; echo eval(\$var;); //returns blank or $var = 1+1+1+1; echo (int) $var; //returns 1 things like that... Now my question is: is it possible to calculate the value of the string somehow? Thanks. Stormy. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP5 Book Recommendation?
Hi all, Can someone recommend a decent PHP5 book? In particular, I'm interested in Classes and OOP. I consider myself an above average PHP4 developer, so I'm definitely not looking for a beginner book, BUT I have ZERO experience with OOP (in any language), so I'd like a book that can teach me everything I need to know about OOP one step at a time, geared towards good OOP design, and PHP5-specific OOP problems. TIA, --- Justin French http://indent.com.au -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: math in PHP
$var = 1+2+3+4+5; // should be 15 eval('$result = ('.$var.');'); echo $result; // returns 15 --- could also be written as: eval(\$result = ($var);); but that's not the point ;) Whitehawk Stormchaser wrote: Hi! I have been trying to make some sort of calculator in PHP, but I have stumbled on a problem... I have been make some kind of dynamical calculator, unlike most I have seen, that had $value1 [math operator] $value2 strict, but a calculator, that can calculate basically anything ( even something like (5*(8-3)+2*(4-1))^3 ), and can be put in as string variable... I have tried things like this: $var = 1+1+1+1; echo $var + 0; //returns 1 or $var = 1+1+1+1; echo eval(\$var;); //returns blank or $var = 1+1+1+1; echo (int) $var; //returns 1 things like that... Now my question is: is it possible to calculate the value of the string somehow? Thanks. Stormy. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] List Etiquette
Hi, After googling 'Web Etiquette, Top Posting', I still am puzzled why some people on this list insist that top posting is bad form, rather than personal preference. The arguments seem to be balanced on either side. Checking the list's archives, I noticed that those who object to top posting almost invariably top-post their objection (perhaps for added emphasis, who knows). Further, after searching the list's archives on the subject, I noted that the archives are organized by latest response = oldest (the original message); that is, the archives, in effect 'top-post' all threads: latest first (on top of the list) and the oldest (at the bottom of the list). Seems to me much easier to scan the Subject, see how it's developing by reading the reply on the top, rather than have to wade through even snipped old material. I've been on this list, on-and-off, for a few years, and somehow I must have missed the discussion on the unwritten rule of bottom-posting. Perhaps someone could enlighten me with a url? Regards, Andre -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP5 Book Recommendation?
--- Justin French [EMAIL PROTECTED] wrote: Can someone recommend a decent PHP5 book? I think Upgrading to PHP 5 is a particularly good book: http://www.oreilly.com/catalog/upgradephp5/ Chris = Chris Shiflett - http://shiflett.org/ PHP Security - O'Reilly Coming December 2004 HTTP Developer's Handbook - Sams http://httphandbook.org/ PHP Community Site http://phpcommunity.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] List Etiquette
--- Andre Dubuc [EMAIL PROTECTED] wrote: After googling 'Web Etiquette, Top Posting', I still am puzzled why some people on this list insist that top posting is bad form, rather than personal preference. I don't think these two things are mutually exclusive. Yes, there is a difference between fact and opinion, but if you assume that every opinion is not worth abiding by, you would do many things the wrong way. :-) The arguments seem to be balanced on either side. I don't think popularity is a good basis of comparison. If this were your method of comparison, I bet you would conclude that Microsoft Windows is the most secure operating system. However, if you only listen to the world's top security professionals, I bet you would come to the conclusion that something like OpenBSD is the most secure operating system. You just have to learn who to listen to. Further, after searching the list's archives on the subject, I noted that the archives are organized by latest response = oldest Yes, and this should make it abundantly clear that most archives expect the reader to be able to discern the context from any email message, and this is the key point. For example, if this email that I am writing is the first (or only) message that someone reads in this thread, the context is still very clear. The relevant parts of your email to which I am replying are included, and I reply after them. The discussion is preserved, and the reader doesn't have to constantly scroll back and forth to discern the flow of conversation. I've been on this list, on-and-off, for a few years, and somehow I must have missed the discussion on the unwritten rule of bottom-posting. Perhaps someone could enlighten me with a url? Your searches should have yielded plenty of resources to read. This is obviously not a rule; it's simply a best practice. On other mailing lists, poor email formatting is probably not noticed as often, but this list has a large proportion of programmers, and programmers tend to be very specific about details. In fact, I bet a lot of people on this list could debate what is the best length for a line in an email, what is the best format for attribution, and things like that. But, for those who care, including only the relevant bits of the message to which you are replying and replying in the order that the conversation is taking place are practices that are rarely disputed. Hope that helps. Chris = Chris Shiflett - http://shiflett.org/ PHP Security - O'Reilly Coming December 2004 HTTP Developer's Handbook - Sams http://httphandbook.org/ PHP Community Site http://phpcommunity.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] List Etiquette
On Sunday 19 September 2004 05:37, Andre Dubuc wrote: After googling 'Web Etiquette, Top Posting', I still am puzzled why some people on this list insist that top posting is bad form, rather than personal preference. The arguments seem to be balanced on either side. - Top posting means one cannot reply point by point like I'm doing here. - Top posting (usually) leaves a whole load of crap at the bottom of the post which the person doing the top posting is (invariably) too lazy to trim. Bad for everyone on the list and an ongoing waste of bandwidth and space on the archives. - Top posting means if you've jumped into the middle of a thread you would have to scroll backwards and forwards to figure out what was going on. Checking the list's archives, I noticed that those who object to top posting almost invariably top-post their objection (perhaps for added emphasis, who knows). When I do it it's for the emphasis. Further, after searching the list's archives on the subject, I noted that the archives are organized by latest response = oldest (the original message); that is, the archives, in effect 'top-post' all threads: latest first (on top of the list) and the oldest (at the bottom of the list). It seems you're confused. The way the posts are sorted has no bearing on contents of the individual posts. Most archives allow you to sort the list of posts in various ways. Seems to me much easier to scan the Subject, see how it's developing by reading the reply on the top, rather than have to wade through even snipped old material. And if you jumped into the middle of the thread, how would you know what was going on without scrolling down to find out? Wouldn't you agree that it's easier to read something point by point whereby you can easily see the context, instead of reading a sentence at the top of the post then scrolling down to find out what that sentence was about in the context of the original post? I've been on this list, on-and-off, for a few years, and somehow I must have missed the discussion on the unwritten rule of bottom-posting. Perhaps someone could enlighten me with a url? I don't have a URL but I'm sure if you search the archives thoroughly you will find several intensive discussions on this subject. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Most people's favorite way to end a game is by winning. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: use php to download mysql table
Amc wrote: Hi, Does anyone have any sample code that will download a mysql table to an excel file? Thanks - http://www.dbtools.com.br/ - zerof -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: use php to download mysql table
try: header('Content-type: application/vnd.ms-excel'); echo 'table'; $result = mysql_query('...'); while($row = mysql_fetch_array($queryResult)){ echo 'tr'; foreach($row as $cell) { echo 'td'.$cell.'/td'; } echo '/tr'; } echo '/table'; exit; ? Amc wrote: Hi, Does anyone have any sample code that will download a mysql table to an excel file? Thanks - http://www.dbtools.com.br/ - zerof -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] List Etiquette
*RUH ROH* Better watch out, top posting is an extremely unpopular discussion. Some members of the list will attempt to lambaste you and tell you that because the rules are written, then they must be the final word. Feel free to post however you please, while the dogs might bark loudly, they are at a safe distance. You'll notice that many, many people top post. Some people top post, some bottom post, and almost everyone at some point interlace posts. Don't forget that at one time people thought the world was flat because people said it was so, of course we know better now, but change usually comes at the price of old customs, and some old dogs hate new tricks. Happy top posting, Rob. On Sat, 2004-09-18 at 17:37, Andre Dubuc wrote: Hi, After googling 'Web Etiquette, Top Posting', I still am puzzled why some people on this list insist that top posting is bad form, rather than personal preference. The arguments seem to be balanced on either side. Checking the list's archives, I noticed that those who object to top posting almost invariably top-post their objection (perhaps for added emphasis, who knows). Further, after searching the list's archives on the subject, I noted that the archives are organized by latest response = oldest (the original message); that is, the archives, in effect 'top-post' all threads: latest first (on top of the list) and the oldest (at the bottom of the list). Seems to me much easier to scan the Subject, see how it's developing by reading the reply on the top, rather than have to wade through even snipped old material. I've been on this list, on-and-off, for a few years, and somehow I must have missed the discussion on the unwritten rule of bottom-posting. Perhaps someone could enlighten me with a url? Regards, Andre -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] List Etiquette
On Sat, 2004-09-18 at 18:11, Jason Wong wrote: On Sunday 19 September 2004 05:37, Andre Dubuc wrote: After googling 'Web Etiquette, Top Posting', I still am puzzled why some people on this list insist that top posting is bad form, rather than personal preference. The arguments seem to be balanced on either side. - Top posting means one cannot reply point by point like I'm doing here. I think the argument was top posting versus bottom posting. Not top posting versus interlacing. If you have no need to reply point to point then there is no reason I can see why top posting is unsuitable. - Top posting (usually) leaves a whole load of crap at the bottom of the post which the person doing the top posting is (invariably) too lazy to trim. Bad for everyone on the list and an ongoing waste of bandwidth and space on the archives. Plenty of people bottom post without trimming. - Top posting means if you've jumped into the middle of a thread you would have to scroll backwards and forwards to figure out what was going on. When I'm reading about one topic and a reference is made to another topic, I don't want to read all about the reference. If I do, I'll go read the history... the post quoted below a top post is generally history, and many poeple will read it if they find they don't hav enough information from the top post. Why should I read and re-read over and over again just because someone is bottom posting. More often than not, people scroll past the quote and just read the bottom post. Now if you top post, I don't need to scroll. Checking the list's archives, I noticed that those who object to top posting almost invariably top-post their objection (perhaps for added emphasis, who knows). When I do it it's for the emphasis. So it's ok to top post when emphasizing your response? ;) Further, after searching the list's archives on the subject, I noted that the archives are organized by latest response = oldest (the original message); that is, the archives, in effect 'top-post' all threads: latest first (on top of the list) and the oldest (at the bottom of the list). It seems you're confused. The way the posts are sorted has no bearing on contents of the individual posts. Most archives allow you to sort the list of posts in various ways. Seems to me much easier to scan the Subject, see how it's developing by reading the reply on the top, rather than have to wade through even snipped old material. And if you jumped into the middle of the thread, how would you know what was going on without scrolling down to find out? Well i would do exactly that... scroll down... is that so hard? Wouldn't you agree that it's easier to read something point by point whereby you can easily see the context, instead of reading a sentence at the top of the post then scrolling down to find out what that sentence was about in the context of the original post? Yes, but once again this isn't bottom posting, point by point is interlacing which is completely different. I've been on this list, on-and-off, for a few years, and somehow I must have missed the discussion on the unwritten rule of bottom-posting. Perhaps someone could enlighten me with a url? I don't have a URL but I'm sure if you search the archives thoroughly you will find several intensive discussions on this subject. I'll say no more on this thread, I just like to ensure the pro-top-posters get heard along with the pro-bottom-posters. I strongly believe all of this IS indeed personal preference. I've even seen a message where you (Jason) have top posted and it wasn't about top posting :) Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] List Etiquette
On Sunday 19 September 2004 06:33, Robert Cummings wrote: [snip] Happy top posting, Have fun driving on the wrong side of the road. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Bunker's Admonition: You cannot buy beer; you can only rent it. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] List Etiquette
On Sunday 19 September 2004 06:46, Robert Cummings wrote: I think the argument was top posting versus bottom posting. Not top posting versus interlacing. If you have no need to reply point to point then there is no reason I can see why top posting is unsuitable. I think you're splitting hair here. I've never seen a post where someone responds point by point but places their response above the point they're responding to. Furthermore just because you have no need to reply point by point for that particular post, someone using your post as a basis for reply might want to. Now they would have to clear out stale signatures and whatever crap then rearrange the message so it makes sense. Again, a mailing list is not a one to one medium. Following some well established guidelines makes everyone's lives easier. When in your own private drive no one cares which side of the road you drive on, but it's usually safer and more convenient for everyone if you drove on the correct side of the road when on public roads and highways. Plenty of people bottom post without trimming. See archives. Well i would do exactly that... scroll down... is that so hard? You're missing the point. Completely. Yes, but once again this isn't bottom posting, point by point is interlacing which is completely different. See above. I'll say no more on this thread, I just like to ensure the pro-top-posters get heard along with the pro-bottom-posters. I strongly believe all of this IS indeed personal preference. I've even seen a message where you (Jason) have top posted and it wasn't about top posting :) The only times when I consciously top post (on a fairly) consistent basis is when pointing out someone has hijacked a thread. Otherwise if you had a link handy I would love see where/when I made such a stupid mistake. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* A real diplomat is one who can cut his neighbor's throat without having his neighbour notice it. -- Trygve Lie */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Browser caching problem.
I'm using this code to dynamically retrieve windows media files and send it to the browser. I thought the cache header would prevent the file from being cached. The only problems is the .wmv file still ends up in my IE temp files folder. How can I prevent this from happening? ?php require_once(../admin/constant.php); header(Content-Type: video/x-ms-wmv); header(Last-Modified: . gmdate(D, d M Y H:i:s) . GMT); header(Expires: Mon, 26 Jul 1997 05:00:00 GMT); header(Cache-Control: no-store, no-cache, must-revalidate); header(Cache-Control: post-check=0, pre-check=0, false); header(Pragma: no-cache); $file = DATAURL . /media/ . $_GET['mediafile']; ? ASX VERSION=3.0 ENTRY REF HREF =?php echo $file; ? / /ENTRY /ASX __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] List Etiquette
OK, Jason. I'm throughly confused. You say: Top posting means one cannot reply point by point like I'm doing here. then you state: Wouldn't you agree that it's easier to read something point by point whereby you can easily see the context, instead of reading a sentence at the top of the post then scrolling down to find out what that sentence was about in the context of the original post? I suppose each to their own. I'm glad that this list is not as trigger-happy as some I've been on. I still don't see what all the fuss is about . . . but then again, I'm slow. . . . Regards and thanks for the clarifications, Andre -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP and extern link
Hello, I want to write a script which does the following: You enter http://www.test.com/test.php?number=123456 and the script shows the site https://www.domain.com/direct_access.do?usert=testpassword=testnumber=123456 It's important that the password is not shown to everyone. I tried fopen() and anything like that but it didn't work. Any solution ? Thanks. Martin Justra -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Browser caching problem.
On Sunday 19 September 2004 07:12, Daniel Guerrier wrote: I'm using this code to dynamically retrieve windows media files and send it to the browser. I thought the cache header would prevent the file from being cached. The only problems is the .wmv file still ends up in my IE temp files folder. How can I prevent this from happening? Don't give them the file in the first place? If you're trying to prevent someone from saving the file and playing it back at a later date then I think you'll need to stream the file. Have a look on the MS site. Note that no matter what you do, if someone is determined enough they'll still be able to capture the contents. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Indecision is the true basis for flexibility. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and extern link
On Sunday 19 September 2004 07:07, Martin Justra wrote: I want to write a script which does the following: You enter http://www.test.com/test.php?number=123456 and the script shows the site https://www.domain.com/direct_access.do?usert=testpassword=testnumber=123 456 Did you want to a) redirect the user to https://www.domain.com/... or b) display the contents of https://www.domain.com/...? It's important that the password is not shown to everyone. I tried fopen() and anything like that but it didn't work. If it's (b) you're after then fopen() is one of the possible solutions. So HOW did it not work? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* over in west Philadelphia a puppy is vomiting ... */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] List Etiquette
On Sat, 2004-09-18 at 18:46, Jason Wong wrote: On Sunday 19 September 2004 06:33, Robert Cummings wrote: [snip] Happy top posting, Have fun driving on the wrong side of the road. What side is that? Doesn't it depend on national preference? Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] List Etiquette
On Sunday 19 September 2004 07:40, Robert Cummings wrote: Have fun driving on the wrong side of the road. What side is that? Doesn't it depend on national preference? Not personal preference for certain. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* E = MC ** 2 +- 3db */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Browser caching problem.
I am streaming it. That code is in an .asx metafile. I assume it is supposed to work like a .ram for real media. Microsoft suggests using an asx file to stream media. It does stream, I just do not want it to be cached in my IE temp files. --- Jason Wong [EMAIL PROTECTED] wrote: On Sunday 19 September 2004 07:12, Daniel Guerrier wrote: I'm using this code to dynamically retrieve windows media files and send it to the browser. I thought the cache header would prevent the file from being cached. The only problems is the .wmv file still ends up in my IE temp files folder. How can I prevent this from happening? Don't give them the file in the first place? If you're trying to prevent someone from saving the file and playing it back at a later date then I think you'll need to stream the file. Have a look on the MS site. Note that no matter what you do, if someone is determined enough they'll still be able to capture the contents. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Indecision is the true basis for flexibility. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ___ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] List Etiquette
On Sat, 2004-09-18 at 19:42, Jason Wong wrote: On Sunday 19 September 2004 07:40, Robert Cummings wrote: Have fun driving on the wrong side of the road. What side is that? Doesn't it depend on national preference? Not personal preference for certain. But definitely there's not global consensus. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How can I re-code?
I had an $array, with a list of authors and an entry number. Below is the code I used. Now I have compiled it all into a table. I don't know how to re-code these lines: foreach (array_count_values ($authors) as $author=$count) foreach ($author_list[$author] as $ausid) ---new code--- $myconnection = mysql_connect($server,$user,$pass); mysql_select_db($db,$myconnection); $news = mysql_query(select ccl_id,AUS from $table ORDER by AUS); while ($mydata = mysql_fetch_object($news)) { ?? foreach (array_count_values ($authors) as $author=$count) { ?? foreach ($author_list[$author] as $ausid) { } } } -- My old code - foreach (array_count_values ($authors) as $author=$count) { echo tr; echo th$author/th; echo th.$count. records found/trouvés)/th; echo/tr\n; echo tr bgcolor=\#F5F5F5\tdnbsp;/td; echo td align=\left\; $temp = ; foreach ($author_list[$author] as $ausid) { $temp .= $ausid, ; } $temp = substr($temp, 0, -2);#delete , echo $temp/td; echo /tr\n; } -- John Taylor-Johnston - °v° Bibliography of Comparative Studies in Canadian, Québec and Foreign Literatures /(_)\ Université de Sherbrooke ^ ^ http://compcanlit.ca/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to re-code?
Jason, I agree. Sorry. I sent it as a new message. I will try again, John Jason Wong wrote: You have started a new thread by taking an existing posting and replying to it while you changed the subject. That is bad, because it breaks threading. Whenever you reply to a message, your mail client generates a References: header that tells all recipients which posting(s) your posting refers to. A mail client uses this information to build a threaded view (tree view) of the postings. With your posting style you successfully torpedoed this useful feature; your posting shows up within an existing thread it has nothing to do with. Always do a fresh post when you want to start a new thread. To achieve this, click on New message instead of Reply within your mail client, and enter the list address as the recipient. You can save the list address in your address book for convenience. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Infinate looping
Hello, I recently posted on the whole sleep() issue with max execution time thing but now I'm past that and actually concerned about webserver ability. Here's what I'm doing in a nutshell: Loop infinitely, checking for changes to a database, flushing the data, sleep, and repeat the loop. It all goes well and I'm getting it to work correctly. However, I'm not sure on the impact on my webserver. I've been running tests, monitoring my server's CPU and memory usage and there is very little difference between before, during, and after I run the infinite loop. However, what has me concerned is that I can't go to any other page on my web server while the loop is in progress. For example, if my loop is running, and I try opening phpMyAdmin for instance, it'll just sit and wait to load and never actually do anything. I pretty much know it's the infinite loop's issue since it only happens when I'm running it. Is this a bad thing such that I can't work around it or is it some sort of configuration issue in my Apache or PHP config? I would test it on my publication server but I don't want to annoy my fellow shared server people if this does indeed cause issues. Any help here would be appreciated... Stephen Craton IM: [EMAIL PROTECTED] http://www.melchior.us -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Associative Array Benchmarking
Although I'm not certain how well known this is, I thought I'd share this with everyone who might have wondered if there was a benefit to using or not using quotes when referencing associative arrays. While benchmarking a few different array sorting options, I had used in_array and search_array. I noticed that one was more than 30% faster than the other. On further investigation I realized I had used quotes one one and not the other. Benchmark results: Function assocArrayWithQuotes() ran 50 times in 4.4331 seconds. Function assocArrayWithoutQuotes() ran 50 times in 6.4170 seconds. The only difference in the two functions is the use of quotes, one with and the other without. Flame at will.
Re: [PHP] List Etiquette
On Sunday 19 September 2004 07:52, Robert Cummings wrote: But definitely there's not global consensus. I really shouldn't be indulging you as it's pretty obvious you're only here for a vigorous debate (that's my euphemism for an argument - the not so nice meaning of argument). The OP asked for the pros and cons of top posting vs bottom posting. I responded with some reasons why top posting is bad. What did you come up with? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Rune's Rule: If you don't care where you are, you ain't lost. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Associative Array Benchmarking
On Sunday 19 September 2004 09:33, bskolb wrote: Although I'm not certain how well known this is, I thought I'd share this with everyone who might have wondered if there was a benefit to using or not using quotes when referencing associative arrays. You should be using single quotes rather than no quotes. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* If a program actually fits in memory and has enough disk space, it is guaranteed to crash. -- Murphy's Computer Laws n5 */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] List Etiquette
Most mail programs have their default settings set for top posting ... while most news clients are set for bottom posting which way is the most preferable depends on what's most useful for your reply ... but those that enjoy mixing top and bottom posting are the daft ones ... once a thread goes into top posting, it's easier to simply continue that way ... otherwise it gets utterly confusing But some kinds of replies, especially to long windy posts, are better made at the bottom or inline ... or a mix especially lists like this one where it's alot of programming code, are usually easier to read when bottom/inline posted while regular commentary lists benefit more from the top posting ... There's advantages and disadvantages to both principles, and some people prefer one over the other ... but it's really depending on the actual content and nature of the discussion whether the one is preferable to each other... In either method, learn to trim, and everyone will be much happier nomatter how you reply ... any properly configured signature will be removed automatically by a properly written client program ... but the rest of the crud you really need to peel out with manual labour ... Rene At 00:33 19-09-2004, Robert Cummings wrote: *RUH ROH* Better watch out, top posting is an extremely unpopular discussion. Some members of the list will attempt to lambaste you and tell you that because the rules are written, then they must be the final word. Feel free to post however you please, while the dogs might bark loudly, they are at a safe distance. You'll notice that many, many people top post. Some people top post, some bottom post, and almost everyone at some point interlace posts. Don't forget that at one time people thought the world was flat because people said it was so, of course we know better now, but change usually comes at the price of old customs, and some old dogs hate new tricks. Happy top posting, Rob. -- Rene Brehmer aka Metalbunny If your life was a dream, would you wake up from a nightmare, dripping of sweat, hoping it was over? Or would you wake up happy and pleased, ready to take on the day with a smile? http://metalbunny.net/ References, tools, and other useful stuff... Check out the new Metalbunny forums at http://forums.metalbunny.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] List Etiquette
At 01:40 19-09-2004, Robert Cummings wrote: On Sat, 2004-09-18 at 18:46, Jason Wong wrote: On Sunday 19 September 2004 06:33, Robert Cummings wrote: [snip] Happy top posting, Have fun driving on the wrong side of the road. What side is that? Doesn't it depend on national preference? When I overtake others, I usually take to the other lane ... is that the wrong side, or the right side of the road, for what I'm doing ? Rene -- Rene Brehmer aka Metalbunny If your life was a dream, would you wake up from a nightmare, dripping of sweat, hoping it was over? Or would you wake up happy and pleased, ready to take on the day with a smile? http://metalbunny.net/ References, tools, and other useful stuff... Check out the new Metalbunny forums at http://forums.metalbunny.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] List Etiquette
PHP Warning: Missing forest, too many trees. Lots of you are good coders, I've seen you devote immense time and enegry to crafting informative and helpful posts for years, let's just move on and read messages using incredibly normal skills like short-term memory and index finger dexterity for your mouse scroll button. to Andre: it doesn't matter whether you bottom OR top post, the only universally important etiquette is to trim all previous replies that you are not *directly* responding to (establishing context), and then it won't matter which side of the post you put your reply. The main point is don't make people read stuff that is irrelevant, they don't like that. Greg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] List Etiquette
On Sat, 2004-09-18 at 22:02, Jason Wong wrote: On Sunday 19 September 2004 07:52, Robert Cummings wrote: But definitely there's not global consensus. I really shouldn't be indulging you as it's pretty obvious you're only here for a vigorous debate (that's my euphemism for an argument - the not so nice meaning of argument). The OP asked for the pros and cons of top posting vs bottom posting. I responded with some reasons why top posting is bad. What did you come up with? I wasn't going to say any more about the top/bottom-post issue and my last two responses weren't about the original topic (though they might have been related in generic principle)... but since you've asked directly I'll respond... I came up with reasons why he should feel free to do what he prefers. Many people here top post, so get over it. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] List Etiquette
-Original Message- What side is that? Doesn't it depend on national preference? When I overtake others, I usually take to the other lane ... is that the wrong side, or the right side of the road, for what I'm doing ? Depends on your perspective :P hehe -Ed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php