Re: [PHP] file_exists, is_readable effective UID/GID
On 10/24/07, Jim Lucas [EMAIL PROTECTED] wrote: Daniel Brown wrote: On 10/24/07, Manuel Vacelet [EMAIL PROTECTED] wrote: Hi all, file_exists and is_readable perfom there test with real UID/GID. Is there any functions that tests file existance with effective UID/GID ? Note: stat is not an option because it raises an E_WARNING if the file is not readable. Thanks, Manuel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php That's what you have things like ? ini_set(display_errors, off); ? what about doing it like this? ?php $filename = __FILE__; $stat_info = @stat($filename); if ( $stat_info ) { // do something... } The '@' will suppress the E_WARNING notice if stat fails the condition will fail. I much prefer the second solution (Jim's one) even if I find that php limitation amazing ! Thank you for your help. Cheers, Manuel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] output-buffer and memory-issue
--- Robert Cummings [EMAIL PROTECTED] schrieb: On Wed, 2007-10-24 at 21:07 +, Werner Schneider wrote: Hi, I got a strange problem: Using php 4.4.x, I capture the whole output for a webpage into the output-buffer by using ob_start and ob_get_clean, because I got to make some replacements in the html-code before sending the page to the browser. This worked fine with a small page, but now I got a page for which the html-code is about 280 KB (not too big I think). But I get an server-error 500 for this script on my linux-based webhoster. I tried to run it on an local WAMP-installation - it worked without error. I temporarly deleted some of the output - it worked without error. I turned of the output-buffering - it worked without error. ... Any idea what I could do next? I got no access to the apache error-log, but the error is definitely connected to the output buffer and how much I try to store in it. Any help is welcome. Use some random URL parameter and detect it in your script. When detected enabled display errors: ?php if( isset( $_GET['knjdcrksjhfcsjkhfndkf'] ) ) { ini_set( 'display_errors', 1 ); } ? Then see if you get any errors. Although, if you're seg faulting, you still won't see an error since the program just dies. Thanks for your reply. It seems that this is happening, becaus even with your code I get no errors. It could be as well that the script dies before the printing of the output buffer starts, because it could be that the error is printed to the output buffer as well. Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuchen Sie´s mit dem neuen Yahoo! Mail. www.yahoo.de/mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] output-buffer and memory-issue
Then see if you get any errors. Although, if you're seg faulting, you still won't see an error since the program just dies. Thanks for your reply. It seems that this is happening, becaus even with your code I get no errors. It could be as well that the script dies before the printing of the output buffer starts, because it could be that the error is printed to the output buffer as well. It seems that the error is not connected to the output-buffer, but to the preg_replace I do afterwards. I will start a new topic for that. Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuchen Sie´s mit dem neuen Yahoo! Mail. www.yahoo.de/mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Limitations of preg_replace?
Hi. Are there any limitations of preg_replace and is there a way to change them (for example with ini_set)? I got a php 4.4.7 on a linux-webhoster which crashes without error-message on this script: ?php $txt = ; for ($i = 0; $i 2000; $i++) { $txt .= a href=\helloworld.htm\ title=\my title\img src=\/mypic.jpg\/abr /\n; } $txt = preg_replace(/a(.*)href=\\\index.htm\/isU, a$1href=, $txt); print $txt; ? If I loop only 1000 times or don't use (.*)-$1 on the regular expression, it works. It works as well on a local WAMP-Installation. Any ideas about that? __ Ihre erste Baustelle? Wissenswertes für Bastler und Hobby Handwerker. www.yahoo.de/clever -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Ant in php
Hi folks, I have such a problem - I would like to launch SQL script using Ant. The problem is, that I don't use JDBC and Java and I wonder if it is possible to run such a script from Ant. I use MySQL database (and Prado framework). BTW: is this a good idea to use Ant with PHP or is there some similar tool to Ant, that works fine with PHP? Thanks in advance. -- View this message in context: http://www.nabble.com/Ant-in-php-tf4689539.html#a13403009 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Limitations of preg_replace?
On 25/10/2007, Werner Schneider [EMAIL PROTECTED] wrote: Hi. Are there any limitations of preg_replace and is there a way to change them (for example with ini_set)? I got a php 4.4.7 on a linux-webhoster which crashes without error-message on this script: ?php $txt = ; for ($i = 0; $i 2000; $i++) { $txt .= a href=\helloworld.htm\ title=\my title\img src=\/mypic.jpg\/abr /\n; } $txt = preg_replace(/a(.*)href=\\\index.htm\/isU, a$1href=, $txt); print $txt; ? If I loop only 1000 times or don't use (.*)-$1 on the regular expression, it works. It works as well on a local WAMP-Installation. Any ideas about that? Yeah, the backtrack limit. But 1. it's not configurable in PHP 4 2. You'd be better off writing your regexp so it doesn't have to backtrack all the way through a 150KB string. Try replacing .* with [^]* -robin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Slashes, include, AJAX?
Hi everybody! I'm building a small ajax app which consists of only 3 php files. index.php which contains all the app and has a couple of links. When a link is clicked an Ajax request is sent to the server (using prototype) to the url central.php with only one parameter 'id'. Depending on that parameter, central.php should look for the appropiate content, in this case link1.php. Then I return a JSON object with the things that should be updated on index.php So this is the pseudo-code: index.php html... body a href= onclick=[send the Ajax request using prototype with the id = 1]Link #1/a div id=theUpdatableDIV/div /body central.php html... body ?php [read the id parameter] switch(id){ case 1: //which is the only case for now!! //build the JSON object $output = array(title = Link #1 Title!, content=file_get_contents(link1.php));//here I read the last file which has the content to be updated asynchronously return [the JSON object based on $output]; break; } ? /body link1.php divWelcome to the content of link #1 which was updated using a href=ajax.orgajax/a/div the JSON object is formed ok, now, my problem is that link1.php outputs like this: divWelcome to the content of link #1 which was updated using a href=ajax.orgajax\/a\/div So at the moment I update the div id=theUpdatableDIV element on index.php, I get no real content, but a string with the strange slashes. I've tried: stripslashes, ereg_replace, str_replace and strtr to eliminate the wierd slashes. Can anybody tell how to do it right? Thank you! Balpo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Ant in php
On Thu, 2007-10-25 at 02:25 -0700, DCVer wrote: is this a good idea to use Ant with PHP or is there some similar tool to Ant, that works fine with PHP? Thanks in advance. What you really want to look at is Phing, not Ant. It is very similar and I use it extensively for my project(s). --Paul All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail from
in my php.ini, I have this set sendmail_from = [EMAIL PROTECTED] yet when I do this command :([EMAIL PROTECTED],TEST MAIL,TESTING MAIL); I get this message Warning: mail() [function.mail]: sendmail_from not set in php.ini or custom From: header missing in C:\Inetpub\wwwroot\intranet\test.php on line 4 -- Diana Castillo Tsanalytics S.A. Tel: 34 913 595 436 Fax: 34 913 595 439 Mov: 34 609 954 536 [EMAIL PROTECTED] www.tsanalytics.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] register globals not working
I have installed php v5 on a windowsXP PC. Server is Apache 2.2. Even though I have turned register globals on in the ini file, the php is still not allowing the use of $HTTP_GET_VARS (and probably other similier variables), and I am having to change my existing script to $_GET before they will run. Any idea why the directive is being ignored? Rodney Courtis On? Register globals is widely considered to be a security hazard. Ideally you should be using the $_GET etc variables instead. Anyhoo the $HTTP_*_VARS are (IIRC) controlled by the track_vars directive. So turn that on, restart Apache, and then try. -- Richard Heyes +44 (0)800 0213 172 http://www.websupportsolutions.co.uk Knowledge Base and HelpDesk software that can cut the cost of online support -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail from
in my php.ini, I have this set sendmail_from = [EMAIL PROTECTED] yet when I do this command :([EMAIL PROTECTED],TEST MAIL,TESTING MAIL); I get this message Warning: mail() [function.mail]: sendmail_from not set in php.ini or custom From: header missing in C:\Inetpub\wwwroot\intranet\test.php on line 4 And if instead of using the php.ini directive you use the fourth argument to mail()? Eg: ?php mail([EMAIL PROTECTED], TEST MAIL, TESTING MAIL, '[EMAIL PROTECTED]'); ? -- Richard Heyes +44 (0)800 0213 172 http://www.websupportsolutions.co.uk Knowledge Base and HelpDesk software that can cut the cost of online support -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] cant send mail
Using windows XP, when I try to send mail using 4 parameters, I get this : Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for [EMAIL PROTECTED] in C:\Inetpub\wwwroot\intranet\test.php on line 9 -- Diana Castillo Tsanalytics S.A. Tel: 34 913 595 436 Fax: 34 913 595 439 Mov: 34 609 954 536 [EMAIL PROTECTED] www.tsanalytics.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail from
Richard Heyes wrote: in my php.ini, I have this set sendmail_from = [EMAIL PROTECTED] yet when I do this command :([EMAIL PROTECTED],TEST MAIL,TESTING MAIL); I get this message Warning: mail() [function.mail]: sendmail_from not set in php.ini or custom From: header missing in C:\Inetpub\wwwroot\intranet\test.php on line 4 And if instead of using the php.ini directive you use the fourth argument to mail()? Eg: ?php mail([EMAIL PROTECTED], TEST MAIL, TESTING MAIL, '[EMAIL PROTECTED]'); ? Oops. That should be: ?php mail([EMAIL PROTECTED], TEST MAIL, TESTING MAIL, 'From: [EMAIL PROTECTED]'); ? -- Richard Heyes +44 (0)800 0213 172 http://www.websupportsolutions.co.uk Knowledge Base and HelpDesk software that can cut the cost of online support -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SMTP unable to relay
I have tried settiing my php.ini to SMTP = localhost as well as using the SMTP of my regular mail, and I keep on getting this. Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for [EMAIL PROTECTED] in C:\Inetpub\wwwroot\intranet\test.php on line 11 -- Diana Castillo Tsanalytics S.A. Tel: 34 913 595 436 Fax: 34 913 595 439 Mov: 34 609 954 536 [EMAIL PROTECTED] www.tsanalytics.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] how to restart php
How can I restart php so it takes changes in my php.ini without having to reboot my machine? I have windows XP -- Diana Castillo Tsanalytics S.A. Tel: 34 913 595 436 Fax: 34 913 595 439 Mov: 34 609 954 536 [EMAIL PROTECTED] www.tsanalytics.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to restart php
Diana wrote: How can I restart php so it takes changes in my php.ini without having to reboot my machine? I have windows XP You don't restart PHP, rather the web server whatever that may be. Usually it involves restarting the web server service. If you can, just restart the computer. -- Richard Heyes +44 (0)800 0213 172 http://www.websupportsolutions.co.uk Knowledge Base and HelpDesk software that can cut the cost of online support -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MySQL and SVN
Hi all! Maybe slightly off topic, but I would like to know how you guys handle mysql structures between different computers (and for that matter from the developer desktop to the stable server). I work on my home and my office computer with the same php projects. I keep all my php files on svn, so I just update and commit the first and last thing I do when I switch computer. The problem is when I've made a change in the structure of my mysql tables. I usually try to save a dump and ssh it to my server and download and import it on the other computer. But that feels clumsy, and if I've made changes on both computers I have no simple way to merge the structures like I can in svn. How do you handle this in your projects? Best Regards Emil Edeholt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: MySQL and SVN
Emil Edeholt schrieb: Hi all! Maybe slightly off topic, but I would like to know how you guys handle mysql structures between different computers (and for that matter from the developer desktop to the stable server). I work on my home and my office computer with the same php projects. I keep all my php files on svn, so I just update and commit the first and last thing I do when I switch computer. The problem is when I've made a change in the structure of my mysql tables. I usually try to save a dump and ssh it to my server and download and import it on the other computer. But that feels clumsy, and if I've made changes on both computers I have no simple way to merge the structures like I can in svn. How do you handle this in your projects? Best Regards Emil Edeholt Hi Emil, I use pear MDB2_Schema package to handle and manage my database structures. Another option would be http://dbdeploy.com/. There is also a pear proposal: http://pear.php.net/pepr/pepr-proposal-show.php?id=507. Both, very interesting components in the area of database deployment. Cheers, Jens -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to restart php
Hi Diana, To restart the IIS webserver with Windows XP: press Start, select Run, type IISreset HTH, Cor - Original Message - From: Richard Heyes [EMAIL PROTECTED] To: Diana [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Thursday, October 25, 2007 1:02 PM Subject: Re: [PHP] how to restart php Diana wrote: How can I restart php so it takes changes in my php.ini without having to reboot my machine? I have windows XP You don't restart PHP, rather the web server whatever that may be. Usually it involves restarting the web server service. If you can, just restart the computer. -- Richard Heyes +44 (0)800 0213 172 http://www.websupportsolutions.co.uk Knowledge Base and HelpDesk software that can cut the cost of online support -- 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] SMTP
I dont know what I did but now I get this message Failed to connect to mailserver at localhost port 25, verify your SMTP -- Diana Castillo Tsanalytics S.A. Tel: 34 913 595 436 Fax: 34 913 595 439 Mov: 34 609 954 536 [EMAIL PROTECTED] www.tsanalytics.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Question about time...
On Oct 24, 2007, at 6:10 PM, Instruct ICC wrote: I want to be able to display something like an image of a turkey during the month of november from now until I'm dead. And how will the application know when you are dead? Well, I code all of my applications to receive RFID signals, and I had a RFID transmitter embedded into me that gets powered by the electricity that my body generates, so when it can no longer get that signal, the application is designed to shut down and put up a message that says Due to the death of my creator I quit, have a nice day! :) -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 3251 132nd ave Holland, MI, 49424 www.raoset.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Question about time...
On Oct 24, 2007, at 9:01 PM, tedd wrote: At 3:10 PM -0700 10/24/07, Instruct ICC wrote: I want to be able to display something like an image of a turkey during the month of november from now until I'm dead. And how will the application know when you are dead? When you stop paying for hosting, the application get's the idea when it's bits go poof! If anyone ever noticed, my web site (http://sperling.com) has a tree on it that changes with the seasons. I use: $dates = getdate(); $month = $dates['mon']; $w = http://www.sperling.com/css/seasons/;; switch( $month ) { case 03: case 04: case 05: $var = $w . spring.jpg; break; case 06: case 07: case 08 : $var = $w . summer.jpg; break; case 09: case 10: case 11: $var = $w . fall.jpg; break; case 12: case 01: case 02: $var = $w . winter.jpg; $break; } echo($var); And this code is called from within my css file for a background image. Yes, I use variables in css. Cheers, tedd Hi tedd, That's actually where I got the idea, just couldn't remember who on what list said they did it :) using variables in css is it as easy as just putting in a quick ?PHP echo background: $date; ? in the css? or is it more complicated? -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 3251 132nd ave Holland, MI, 49424 www.raoset.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Question about time...
2007. 10. 25, csütörtök keltezéssel 09.01-kor Jason Pruim ezt írta: On Oct 24, 2007, at 9:01 PM, tedd wrote: At 3:10 PM -0700 10/24/07, Instruct ICC wrote: I want to be able to display something like an image of a turkey during the month of november from now until I'm dead. And how will the application know when you are dead? When you stop paying for hosting, the application get's the idea when it's bits go poof! If anyone ever noticed, my web site (http://sperling.com) has a tree on it that changes with the seasons. I use: $dates = getdate(); $month = $dates['mon']; $w = http://www.sperling.com/css/seasons/;; switch( $month ) { case 03: case 04: case 05: $var = $w . spring.jpg; break; case 06: case 07: case 08 : $var = $w . summer.jpg; break; case 09: case 10: case 11: $var = $w . fall.jpg; break; case 12: case 01: case 02: $var = $w . winter.jpg; $break; } echo($var); And this code is called from within my css file for a background image. Yes, I use variables in css. Cheers, tedd Hi tedd, That's actually where I got the idea, just couldn't remember who on what list said they did it :) using variables in css is it as easy as just putting in a quick ?PHP echo background: $date; ? in the css? or is it more complicated? you have to configure apache to handle css files as php files. also you have to send headers including content-type set to text/css and then you can script your css greets Zoltán Németh -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 3251 132nd ave Holland, MI, 49424 www.raoset.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] strange error
I'm getting this error on a php based ticket system we have. I don't see this on the old server running php4. This new server is running php5. PHP_Fatal_error:__Cannot_use_object_of_type_PEAR_Error_as_array_in_/srv/www/ virtual/support/mailparser.php_on_line_300/ The code in that section looks like this... function firstemail($addrs) { $name=; $structure = Mail_RFC822::parseAddressList($addrs); $ret= $structure[0]-mailbox.@.$structure[0]-host; ### line 300 is here... if ($ret==@localhost) $ret=; else $name=$structure[0]-personal; return array($ret,$name); } Any idea what may be the issue here? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] strange error
2007. 10. 25, csütörtök keltezéssel 09.15-kor Jeff Mckeon ezt írta: I'm getting this error on a php based ticket system we have. I don't see this on the old server running php4. This new server is running php5. PHP_Fatal_error:__Cannot_use_object_of_type_PEAR_Error_as_array_in_/srv/www/ virtual/support/mailparser.php_on_line_300/ The code in that section looks like this... function firstemail($addrs) { $name=; $structure = Mail_RFC822::parseAddressList($addrs); $ret= $structure[0]-mailbox.@.$structure[0]-host; ### line 300 is here... if ($ret==@localhost) $ret=; else $name=$structure[0]-personal; return array($ret,$name); } Any idea what may be the issue here? the class Mail_RFC822 encountered some error, and thus returned a PEAR_Error object. on the next line you try to access it as an array, which of course throws a fatal error. try to dump out the error object to see what is the pear error encountered. greets Zoltán Németh -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: SMTP
Diana schrieb: I dont know what I did but now I get this message Failed to connect to mailserver at localhost port 25, verify your SMTP Do you have a smtp server running on localhost? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Question about time...
On 10/25/07, Zoltán Németh [EMAIL PROTECTED] wrote: 2007. 10. 25, csütörtök keltezéssel 09.01-kor Jason Pruim ezt írta: On Oct 24, 2007, at 9:01 PM, tedd wrote: At 3:10 PM -0700 10/24/07, Instruct ICC wrote: I want to be able to display something like an image of a turkey during the month of november from now until I'm dead. And how will the application know when you are dead? When you stop paying for hosting, the application get's the idea when it's bits go poof! If anyone ever noticed, my web site (http://sperling.com) has a tree on it that changes with the seasons. I use: $dates = getdate(); $month = $dates['mon']; $w = http://www.sperling.com/css/seasons/;; switch( $month ) { case 03: case 04: case 05: $var = $w . spring.jpg; break; case 06: case 07: case 08 : $var = $w . summer.jpg; break; case 09: case 10: case 11: $var = $w . fall.jpg; break; case 12: case 01: case 02: $var = $w . winter.jpg; $break; } echo($var); And this code is called from within my css file for a background image. Yes, I use variables in css. Cheers, tedd Hi tedd, That's actually where I got the idea, just couldn't remember who on what list said they did it :) using variables in css is it as easy as just putting in a quick ?PHP echo background: $date; ? in the css? or is it more complicated? you have to configure apache to handle css files as php files. also you have to send headers including content-type set to text/css and then you can script your css greets Zoltán Németh -- Jason Pruim Raoset Inc. Technology Manager MQC Specialist 3251 132nd ave Holland, MI, 49424 www.raoset.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Or, in the event that you're unable to set MIME types and parsing, you can just add the appropriate style/style tags and then ? include('css/style.css'); ? -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 Give a man a fish, he'll eat for a day. Then you'll find out he was allergic and is hospitalized. See? No good deed goes unpunished -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: SMTP
On 10/25/07, Jens Kleikamp [EMAIL PROTECTED] wrote: Diana schrieb: I dont know what I did but now I get this message Failed to connect to mailserver at localhost port 25, verify your SMTP Do you have a smtp server running on localhost? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Diana, Try to keep all of the messages in a single thread so that people searching the archives can benefit from your solution as well. Check into the following: 1.) Is there an SMTP server running on port 25 on the local machine? 2.) Is there a firewall blocking incoming or outgoing connections on that port? 3.) Is PHP able to connect to any remote SMTP servers, or by domain name? -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 Give a man a fish, he'll eat for a day. Then you'll find out he was allergic and is hospitalized. See? No good deed goes unpunished -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Maximum function nesting level of '100' reached
What is the cause for that error: Fatal error: Maximum function nesting level of '100' reached, aborting! in /home/Projekte/spectral/modules/xml_mm/classes/xml_mm.class.php on line 118 Thank you! Sascha -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail from
On 10/25/07, Richard Heyes [EMAIL PROTECTED] wrote: Richard Heyes wrote: in my php.ini, I have this set sendmail_from = [EMAIL PROTECTED] yet when I do this command :([EMAIL PROTECTED],TEST MAIL,TESTING MAIL); I get this message Warning: mail() [function.mail]: sendmail_from not set in php.ini or custom From: header missing in C:\Inetpub\wwwroot\intranet\test.php on line 4 And if instead of using the php.ini directive you use the fourth argument to mail()? Eg: ?php mail([EMAIL PROTECTED], TEST MAIL, TESTING MAIL, '[EMAIL PROTECTED]'); ? Oops. That should be: ?php mail([EMAIL PROTECTED], TEST MAIL, TESTING MAIL, 'From: [EMAIL PROTECTED]'); ? -- Richard Heyes +44 (0)800 0213 172 http://www.websupportsolutions.co.uk Knowledge Base and HelpDesk software that can cut the cost of online support -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php It sounds like you need to restart IIS to allow the changes to php.ini to take effect. -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 Give a man a fish, he'll eat for a day. Then you'll find out he was allergic and is hospitalized. See? No good deed goes unpunished -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL and SVN
Hi, Thanks for your answer. Are you sugesting - what I think is called - a multi-master replication? Since I would like to keep two sources in sync and want to be able to make changes on both servers. I know very little about replication. Maybe I'm making a bigger problem of this than it would have to be. Best Regards Emil dordea cosmin wrote: consider replication Emil wrote: I would like to know how you guys handle mysql structures between different computers (and for that matter from the developer desktop to the stable server). I work on my home and my office computer with the same php projects. I keep all my php files on svn, so I just update and commit the first and last thing I do when I switch computer. The problem is when I've made a change in the structure of my mysql tables. I usually try to save a dump and ssh it to my server and download and import it on the other computer. But that feels clumsy, and if I've made changes on both computers I have no simple way to merge the structures like I can in svn. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Maximum function nesting level of '100' reached
Fatal error: Maximum function nesting level of '100' reached, aborting! in /home/Projekte/spectral/modules/xml_mm/classes/xml_mm.class.php on line 118 It seems pretty self explanatory. Do you have a lot of recursion? -- Richard Heyes +44 (0)800 0213 172 http://www.websupportsolutions.co.uk Knowledge Base and HelpDesk software that can cut the cost of online support -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Maximum function nesting level of '100' reached
On 10/25/07, Sascha Braun [EMAIL PROTECTED] wrote: What is the cause for that error: Fatal error: Maximum function nesting level of '100' reached, aborting! in /home/Projekte/spectral/modules/xml_mm/classes/xml_mm.class.php on line 118 [snip!] It means that PHP reached the maximum level of 100 nested function calls! Check line 118 of xml_mm.class.php and see what is causing it to go into an infinite loop. Also, if you have full access to that server, I'd recommend putting xdebug (by Derick Rethans, who also posts to this list). It'll create stack traces for you to more quickly and easily debug your project. -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 Give a man a fish, he'll eat for a day. Then you'll find out he was allergic and is hospitalized. See? No good deed goes unpunished -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Slashes, include, AJAX?
On 10/25/07, Rodrigo Poblanno Balp [EMAIL PROTECTED] wrote: Hi everybody! I'm building a small ajax app which consists of only 3 php files. index.php which contains all the app and has a couple of links. When a link is clicked an Ajax request is sent to the server (using prototype) to the url central.php with only one parameter 'id'. Depending on that parameter, central.php should look for the appropiate content, in this case link1.php. Then I return a JSON object with the things that should be updated on index.php So this is the pseudo-code: index.php html... body a href= onclick=[send the Ajax request using prototype with the id = 1]Link #1/a div id=theUpdatableDIV/div /body central.php html... body ?php [read the id parameter] switch(id){ case 1: //which is the only case for now!! //build the JSON object $output = array(title = Link #1 Title!, content=file_get_contents(link1.php));//here I read the last file which has the content to be updated asynchronously return [the JSON object based on $output]; break; } ? /body link1.php divWelcome to the content of link #1 which was updated using a href=ajax.orgajax/a/div the JSON object is formed ok, now, my problem is that link1.php outputs like this: divWelcome to the content of link #1 which was updated using a href=ajax.orgajax\/a\/div So at the moment I update the div id=theUpdatableDIV element on index.php, I get no real content, but a string with the strange slashes. I've tried: stripslashes, ereg_replace, str_replace and strtr to eliminate the wierd slashes. Can anybody tell how to do it right? how are you building the json object? i recommend json_encode(utf8_encode($dataToEncode)); if youre using php5. if youre using php4, try this: http://mike.teczno.com/JSON/JSON.phps also, you might want to check out firebug for firefox. it will let you easily analyze the interaction between the client and server. also, to verify that the json object youre generating is infact ok; run it through here: http://www.jslint.com/ -nathan
[PHP] MPEG Properties
Hello, all. Thanks for your help in advance. I'm trying to figure out how to get PHP to retrieve MPEG File Properties, specifically the length of the video file in seconds. Thanks, -B -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Question about time...
At 3:13 PM +0200 10/25/07, Zoltán Németh wrote: 2007. 10. 25, csütörtök keltezéssel 09.01-kor Jason Pruim ezt írta: That's actually where I got the idea, just couldn't remember who on what list said they did it :) using variables in css is it as easy as just putting in a quick ?PHP echo background: $date; ? in the css? or is it more complicated? you have to configure apache to handle css files as php files. also you have to send headers including content-type set to text/css and then you can script your css greets Zoltán Németh That's one way. Here's another: http://sperling.com/examples/pcss/ As Zoltán suggested, but didn't elaborate, you can drop a .htaccess file into your root directory that contains: FilesMatch \.(css|style)$ SetHandler application/x-httpd-php /FilesMatch and then use ?php whatever you want ? inside the css file. This makes things easier when trying to change constants like colors, or dealing with the box-model problem, or rules that are dependant upon other rules; or really neat automatic image width/height determinations for images on the fly (think about that). :-) There are a lot of opportunities to add functionality to css that apparently has not been addressed in any documentation I've been able to find. I can't be the first down this street, but for certain it hasn't been traveled often. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MPEG Properties
Check out ffmpeg-php http://sourceforge.net/projects/ffmpeg-php/ Miles On 10/25/07, Bill Medley [EMAIL PROTECTED] wrote: Hello, all. Thanks for your help in advance. I'm trying to figure out how to get PHP to retrieve MPEG File Properties, specifically the length of the video file in seconds. Thanks, -B -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Comment / Reply function
Hi there, I am trying to add a comment functionality to my PHP webapp that includes a reply possibility on each comment. Like on digg for example. I am new to AJAX, but would like to take this oportunity and to jump into cold water with that task now. I am asking this question here in the PHP forum, as I was thinking to do a for loop to include a form underneath each comment, but now it sounds rediculous to me. There must be a smarter way to do this. My goal is to use JQuery to show and hide a dialog box which contains the form to reply on the comments. Basicaly I managed to do this, but now I have a general understanding problem. Let's say there are 100 comments there and I want to have reply possiblity for each of them. Do I have to integrate the same code underneath each one? I would rather like to have a box in that is used for everyone of them. I believe this is somehow done with divs, but I do not know how. Here is my code: html head script src=/app_global/jquery-1.2.1.pack.js type=text/javascript/script script type=text/javascript $(document).ready(function() { $('#slickbox').hide(); $('a#reply').click(function() { $('#slickbox').toggle('slow'); return false; }); }); /script /head body a href=# id=replyReply/a div id=slickboxpSpace for reply box/div p next comment /body /html I would like to place a complex reply form into the id=slickbox, but here is where the problems starts. If I do this for all 100 comments the code will be way to much to load. Even if it is easy to do with PHP. There must be a smarter way to achieve this. Thank you for any help on this. I am pretty much stuck here. Best regards, Merlin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] show required row first and then other remaining rows
Hi, Consider the following case mysql select *from names; ++-++ | id | name| phone | ++-++ | 1 | sanju | 984565 | | 2 | sanjeev | 997223 | | 3 | puttu | 990058 | | 4 | raju| 944811 | ++-++ Now I want to display the row whose name is puttu (id=3) first and then want to display other rows in order (order by name) as follows ++-++ | id | name| phone | ++-++ | 3 | puttu | 990058 | | 4 | raju| 944811 | | 2 | sanjeev | 997223 | | 1 | sanju | 984565 | ++-++ Can somebody tell me is it possible. If its possible then please help me to solve this problem. Actually I am fetching all the rows from this table to my php page and there if I choose some name then that should appear at top and rest should be below in name order. Warm Regards, Sanjeev http://www.sanchanworld.com/ http://webdirectory.sanchanworld.com - Submit your website URL http://webhosting.sanchanworld.com - Choose your best web hosting plan
Re: [PHP] Ant in php
pscott wrote: On Thu, 2007-10-25 at 02:25 -0700, DCVer wrote: is this a good idea to use Ant with PHP or is there some similar tool to Ant, that works fine with PHP? Thanks in advance. What you really want to look at is Phing, not Ant. It is very similar and I use it extensively for my project(s). --Paul Thanks very much. Do you know how to run the SQL script using Phing (my script creates SQL databases in MySQL)? I would be graceful for hint. All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- View this message in context: http://www.nabble.com/Ant-in-php-tf4689539.html#a13413379 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] show required row first and then other remaining rows
Sanjeev N wrote: Hi, Consider the following case mysql select *from names; ++-++ | id | name| phone | ++-++ | 1 | sanju | 984565 | | 2 | sanjeev | 997223 | | 3 | puttu | 990058 | | 4 | raju| 944811 | ++-++ Now I want to display the row whose name is puttu (id=3) first and then want to display other rows in order (order by name) as follows ++-++ | id | name| phone | ++-++ | 3 | puttu | 990058 | | 4 | raju| 944811 | | 2 | sanjeev | 997223 | | 1 | sanju | 984565 | ++-++ Can somebody tell me is it possible. If its possible then please help me to solve this problem. Actually I am fetching all the rows from this table to my php page and there if I choose some name then that should appear at top and rest should be below in name order. SELECT * from names ORDER by name; Stephen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] show required row first and then other remaining rows
This should work: ORDER BY CASE WHEN id = 3 THEN 0 ELSE 1 END, name Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mail from
in my php.ini, I have this set sendmail_from = [EMAIL PROTECTED] The first thing I'd do is verify if the script is really using the php.ini you think it is by having the script output phpinfo. _ Peek-a-boo FREE Tricks Treats for You! http://www.reallivemoms.com?ocid=TXT_TAGHMloc=us
RE: [PHP] Question about time...
I want to be able to display something like an image of a turkey during the month of november from now until I'm dead. And how will the application know when you are dead? Well, I code all of my applications to receive RFID signals, and I had a RFID transmitter embedded into me that gets powered by the electricity that my body generates, so when it can no longer get that signal, the application is designed to shut down and put up a message that says Due to the death of my creator I quit, have a nice day! :) I'm not amused. http://zeitgeistmovie.com/ Way way way at the end. _ Climb to the top of the charts! Play Star Shuffle: the word scramble challenge with star power. http://club.live.com/star_shuffle.aspx?icid=starshuffle_wlmailtextlink_oct
[PHP] Executing PHP
Hi. Feel free to tell me this is a duh question. I don't know which PHP executable (php.exe, php-cgi.exe, php-win.exe) is being run - how can I tell? I am on a Win2k3 server running PHP5 (manual install) and IIS6. I've pointed to the php5isapi.dll in IIS. I'm assuming b/c I do this that I am using the php.exe. Thoughts? I've searched the PHP manual, but have had no luck. Thanks in advance, ~Philip
Re: [PHP] Slashes, include, AJAX?
Nathan Nobbe wrote: On 10/25/07, *Rodrigo Poblanno Balp* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi everybody! I'm building a small ajax app which consists of only 3 php files. index.php which contains all the app and has a couple of links. When a link is clicked an Ajax request is sent to the server (using prototype) to the url central.php with only one parameter 'id'. Depending on that parameter, central.php should look for the appropiate content, in this case link1.php. Then I return a JSON object with the things that should be updated on index.php So this is the pseudo-code: index.php html... body a href= onclick=[send the Ajax request using prototype with the id = 1]Link #1/a div id=theUpdatableDIV/div /body central.php html... body ?php [read the id parameter] switch(id){ case 1: //which is the only case for now!! //build the JSON object $output = array(title = Link #1 Title!, content=file_get_contents(link1.php));//here I read the last file which has the content to be updated asynchronously return [the JSON object based on $output]; break; } ? /body link1.php divWelcome to the content of link #1 which was updated using a href= ajax.org http://ajax.orgajax/a/div the JSON object is formed ok, now, my problem is that link1.php outputs like this: divWelcome to the content of link #1 which was updated using a href=ajax.org http://ajax.orgajax\/a\/div So at the moment I update the div id=theUpdatableDIV element on index.php, I get no real content, but a string with the strange slashes. I've tried: stripslashes, ereg_replace, str_replace and strtr to eliminate the wierd slashes. Can anybody tell how to do it right? how are you building the json object? i recommend json_encode(utf8_encode($dataToEncode)); if youre using php5. if youre using php4, try this: http://mike.teczno.com/JSON/JSON.phps also, you might want to check out firebug for firefox. it will let you easily analyze the interaction between the client and server. also, to verify that the json object youre generating is infact ok; run it through here: http://www.jslint.com/ -nathan Hi Nathan, I'm using php5, and I'm building the JSON object just like that, with the json_encode. The problem with using utf_encode apart from the original is that I get the \n\r for each line in the file read. Any suggestions? Thanx
[PHP] Re: Executing PHP
Philip Thompson wrote: Hi. Feel free to tell me this is a duh question. I don't know which PHP executable (php.exe, php-cgi.exe, php-win.exe) is being run - how can I tell? I am on a Win2k3 server running PHP5 (manual install) and IIS6. I've pointed to the php5isapi.dll in IIS. I'm assuming b/c I do this that I am using the php.exe. Thoughts? I've searched the PHP manual, but have had no luck. Thanks in advance, ~Philip Well, if you use the isapi then you're not using ANY of the ones you listed, you're using php5isapi.dll. The others are for various uses; the php-cgi.exe is meant to be used if you have php support via CGI instead of via the isapi (like you are). php.exe is a simple CLI, and php-win.exe is also a CLI but does not give any output, thus not showing any DOS windows (which php.exe DOES). http://www.php.net/features.commandline should give you more info - Tul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] cant send mail
Diana wrote: Using windows XP, when I try to send mail using 4 parameters, I get this : Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for [EMAIL PROTECTED] in C:\Inetpub\wwwroot\intranet\test.php on line 9 The SMTP server you are using is not configured to allow the machine you're running PHP on to send mail. This is not a PHP problem - speak to your mail server administrator. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Executing PHP
Philip Thompson wrote: Hi. Feel free to tell me this is a duh question. I don't know which PHP executable (php.exe, php-cgi.exe, php-win.exe) is being run - how can I tell? I am on a Win2k3 server running PHP5 (manual install) and IIS6. I've pointed to the php5isapi.dll in IIS. I'm assuming b/c I do this that I am using the php.exe. Thoughts? I've searched the PHP manual, but have had no luck. You're not running any exe file. IIS uses php5isapi.dll instead of an exe file - they essentially do the same job but the dll is designed to be loaded into another application. -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] system command
Instruct ICC wrote: Date: Thu, 25 Oct 2007 09:43:14 +0800 From: [EMAIL PROTECTED] To: php-general@lists.php.net Subject: [PHP] system command I tried: $a=$_SERVER[REMOTE_ADDR]; echo pREMOTE_ADDR=$abr; if($a=192.168.250.108) { $a=61.64.101.101; } $aa=system('lynx -dump http://api.hostip.info/country.php?ip=$a',$location); echo pa=$abraa=$aabrlocation=$locationbr; $aa=system('lynx -dump http://api.hostip.info/country.php?ip=61.64.101.101',$location); echo pa=$abraa=$aabrlocation=$locationbr; I get: REMOTE_ADDR=192.168.250.108 XX a=61.64.101.101 aa=XX location=0 TW a=61.64.101.101 aa=TW location=0 as you can see, if I put the IP address in, I get the right answer (TW). What am I doing wrong? bye Ronald Use double quotes to get the value of $a or else you get the literal string $a. $aa=system(lynx -dump http://api.hostip.info/country.php?ip=$a,$location); or $aa=system('lynx -dump http://api.hostip.info/country.php?ip='.$a,$location); Thanks! 1st solution did not work for me, but the second one did. I still have a problem with it. It prints the info to the page. Can I suppress this somehow? bye Ronald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Slashes, include, AJAX?
On 10/25/07, Rodrigo Poblanno Balp [EMAIL PROTECTED] wrote: Nathan Nobbe wrote: On 10/25/07, Rodrigo Poblanno Balp [EMAIL PROTECTED] wrote: Hi everybody! I'm building a small ajax app which consists of only 3 php files. index.php which contains all the app and has a couple of links. When a link is clicked an Ajax request is sent to the server (using prototype) to the url central.php with only one parameter 'id'. Depending on that parameter, central.php should look for the appropiate content, in this case link1.php. Then I return a JSON object with the things that should be updated on index.php So this is the pseudo-code: index.php html... body a href= onclick=[send the Ajax request using prototype with the id = 1]Link #1/a div id=theUpdatableDIV/div /body central.php html... body ?php [read the id parameter] switch(id){ case 1: //which is the only case for now!! //build the JSON object $output = array(title = Link #1 Title!, content=file_get_contents(link1.php));//here I read the last file which has the content to be updated asynchronously return [the JSON object based on $output]; break; } ? /body link1.php divWelcome to the content of link #1 which was updated using a href= ajax.orgajax/a/div the JSON object is formed ok, now, my problem is that link1.php outputs like this: divWelcome to the content of link #1 which was updated using a href=ajax.orgajax\/a\/div So at the moment I update the div id=theUpdatableDIV element on index.php, I get no real content, but a string with the strange slashes. I've tried: stripslashes, ereg_replace, str_replace and strtr to eliminate the wierd slashes. Can anybody tell how to do it right? how are you building the json object? i recommend json_encode(utf8_encode($dataToEncode)); if youre using php5. if youre using php4, try this: http://mike.teczno.com/JSON/JSON.phps also, you might want to check out firebug for firefox. it will let you easily analyze the interaction between the client and server. also, to verify that the json object youre generating is infact ok; run it through here: http://www.jslint.com/ -nathan Hi Nathan, I'm using php5, and I'm building the JSON object just like that, with the json_encode. The problem with using utf_encode apart from the original is that I get the \n\r for each line in the file read. Any suggestions? Thanx are you running windows? im guessing those are newline characters in windows format that arent getting interpreted correctly on the client side. you might try stripping out the newline characters prior to encoding the data. $jsonOut = json_encode(utf8_encode(str_replace(\r\n, '', $stringToEncode))); also, what are you trying to encode? if you are encoding arrays or objects (php that is) you will have to utf8_encode all the elements of those complex datums prior to handing them to json_encode() for the final output. -nathan
Re: [PHP] SMTP unable to relay
As previously posted, you need to work with your mail server admin. sendmail is not normally on WinDoze boxes, so do some googling for the setup you have, and talk with your admins to see what you need to do to get it set up to work correctly. Wolf Diana wrote: I have tried settiing my php.ini to SMTP = localhost as well as using the SMTP of my regular mail, and I keep on getting this. Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for [EMAIL PROTECTED] in C:\Inetpub\wwwroot\intranet\test.php on line 11 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: SMTP
As previously posted, you need to work with your mail server admin. sendmail is not normally on WinDoze boxes, so do some googling for the setup you have, and talk with your admins to see what you need to do to get it set up to work correctly. Wolf Daniel Brown wrote: On 10/25/07, Jens Kleikamp [EMAIL PROTECTED] wrote: Diana schrieb: I dont know what I did but now I get this message Failed to connect to mailserver at localhost port 25, verify your SMTP Do you have a smtp server running on localhost? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Diana, Try to keep all of the messages in a single thread so that people searching the archives can benefit from your solution as well. Check into the following: 1.) Is there an SMTP server running on port 25 on the local machine? 2.) Is there a firewall blocking incoming or outgoing connections on that port? 3.) Is PHP able to connect to any remote SMTP servers, or by domain name? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Maximum function nesting level of '100' reached
If I had to venture a guess, you nested 100 functions (called 100 functions in a stack), and therefore reached the maximum limit in PHP. That is, you overflowed the stack. You may have a recursion problem, especially if you're using an XML parser that is not the PHP 5-native one. On Thursday 25 October 2007, Sascha Braun wrote: What is the cause for that error: Fatal error: Maximum function nesting level of '100' reached, aborting! in /home/Projekte/spectral/modules/xml_mm/classes/xml_mm.class.php on line 118 Thank you! Sascha -- Larry Garfield AIM: LOLG42 [EMAIL PROTECTED] ICQ: 6817012 If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it. -- Thomas Jefferson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] show required row first and then other remaining rows
Hi Andrew, Thanks a lot. it really worked very well. Sanjeev On 10/26/07, Andrew Ballard [EMAIL PROTECTED] wrote: This should work: ORDER BY CASE WHEN id = 3 THEN 0 ELSE 1 END, name Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Warm Regards Sanjeev http://www.sanchanworld.com/ http://webdirectory.sanchanworld.com/ - Website submission http://webhosting.sanchanworld.com/ - Webhosting solution provider