[PHP] Phpmyadmin password
Hi, I lost phpmyadmin password. Is there anyway to recover it? Thank you -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Holocoste against palestinians
The message is to webhosting companies, Israel is killing palestinian children. Some sites are are showing the fotos of israel's holocoste against palestinians. Now here is a link that shows to israelis how to fight that too: http://www.jpost.com/servlet/Satellite?cid=1231167272840&pagename=JPost%2FJPArticle%2FShowFull Please be aware of that. Thank you -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Email configuration
Hi all, I've installed php and mysql in fedora. Now i am able to create php programs. But when I am unable to use email in my programs. I am wondering what is the easiest way to use email in my php programs. Can i send email from my personal computer. I am a regular person connected to internet through an internet provider. Is there any preconfigured software or I have to go through the configuration of sendmail for example? Thank you -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Email configuration
Thanks guys, I'm gonna read all this staff, and let you know if have some issues. Thanks a lot --- On Thu, 2/5/09, Yannick Mortier wrote: > From: Yannick Mortier > Subject: Re: [PHP] Email configuration > To: t...@kinetix.gr > Cc: itmaqu...@yahoo.com, php-general@lists.php.net > Date: Thursday, February 5, 2009, 3:19 PM > 2009/2/5 Thodoris : > > > > I think that the OP mentioned the word fedora > somewhere above... > > > > Oh sorry, I'm so stupid... Anyways, if you want to send > mail to large > providers you'll need to use a relay. I found a nice > tutorial about > how to set it up with google apps. > It was for Ubuntu but you just have to install msmtp and > follow the other steps. > Here it is: > http://nanotux.com/blog/the-ultimate-server/4/#l-mail > I did it on my little gentoo server here at home and it > works great. > > > > -- > Currently developing a browsergame... > http://www.p-game.de > Trade - Expand - Fight > > Follow me at twitter! > http://twitter.com/moortier > > -- > 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] regular expressions question
Hi, I am using that right now and i have don't know how to include blank fields. For example if a user does not fill a field in a form i want to accept it. I tried the code you posted, for now it is blocking blank fields. Thank you - Original Message From: Richard Lynch <[EMAIL PROTECTED]> To: Adil Drissi <[EMAIL PROTECTED]> Cc: php-general@lists.php.net Sent: Tuesday, March 4, 2008 3:09:09 PM Subject: Re: [PHP] regular expressions question On Tue, March 4, 2008 1:19 pm, Adil Drissi wrote: > Is there any way to limit the user to a set of characters for example > say i want my user to enter any character between a and z (case > insensitive). And if the user enters just one letter not belonging to > [a-z], this will not be accepted. > > I tried eregi('[a-z]', $fname) but this allows the user to enter > abdg4512kdkdk for example. What you tried only requires ONE a-z character somewhere in the input. Try this: preg_match('^[a-z]+$', $fname); This will: ^ "anchor" the string at the beginning [a-z]+ a to z, with at least one letter $ "anchor" the string at the end Note, however, that some people have other characters in their first name, such as apostrophe, space, and dash. Oh, and the digit 3, for "bo3b" who was a programmer on the first Apple Macintosh. His parents were hippies, and that really is his name... You may want to obtain a LARGE list of "first names" and run them through your validator as a test. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs
[PHP] Error handling
Hi, I need help with a simple script that i made for handling errors. The problem is that the script displays the same message several times while i want it displayed just one time. He is the code: "; echo $errno. ""; } } set_error_handler(error_handler, E_STRICT); ini_set('error_reporting', 0); $conn = mysql_connect(localhost, root, iolfsyd) or trigger_error("connection au serveur failed",WARNING); ?> Thanks Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
Re: [PHP] Error handling (skip this message my mistake)
Sorry, i found the error. it was my mistake - Original Message From: It Maq <[EMAIL PROTECTED]> To: php-general@lists.php.net Sent: Tuesday, March 11, 2008 11:38:10 AM Subject: [PHP] Error handling Hi, I need help with a simple script that i made for handling errors. The problem is that the script displays the same message several times while i want it displayed just one time. He is the code: "; echo $errno. ""; } } set_error_handler(error_handler, E_STRICT); ini_set('error_reporting', 0); $conn = mysql_connect(localhost, root, iolfsyd) or trigger_error("connection au serveur failed",WARNING); ?> Thanks ____ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
[PHP] best practices in error handling in PHP
Hi, I want to know what is the best solution for handling errors. After reading some documents dealing with the subject, i have three options: * Using a class for error handling * Using PEAR error object * Using try and catch exceptions The error handling i want to implement will be done in a big application that was developed from the beginning without any concern about error handling. Thank you Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
Re: [PHP] best practices in error handling in PHP
Yes you are right i can use trigger_error that will use the function that handles errors from my class. Thanks - Original Message From: Christoph Boget <[EMAIL PROTECTED]> To: It Maq <[EMAIL PROTECTED]> Cc: php-general@lists.php.net Sent: Wednesday, March 12, 2008 10:31:07 AM Subject: Re: [PHP] best practices in error handling in PHP > I want to know what is the best solution for handling errors. After reading > some > documents dealing with the subject, i have three options: > * Using a class for error handling > * Using PEAR error object > * Using try and catch exceptions > The error handling i want to implement will be done in a big application > that was > developed from the beginning without any concern about error handling. It seems to me that 1 and 3 aren't necessarily mutually exclusive. I believe that you can use your own error classes in php's try/catch functionality. As for PEAR's error object, unless you are using PEAR elsewhere in your app I'm not sure it would be worthwhile to just use this very small piece. This is all just IMO. thnx, Chris Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
Re: [PHP] best practices in error handling in PHP
I mean using calling trigger_error from the catch{} Yes you are right i can use trigger_error that will use the function that handles errors from my class. Thanks - Original Message From: Christoph Boget <[EMAIL PROTECTED]> To: It Maq <[EMAIL PROTECTED]> Cc: php-general@lists.php.net Sent: Wednesday, March 12, 2008 10:31:07 AM Subject: Re: [PHP] best practices in error handling in PHP > I want to know what is the best solution for handling errors. > After reading some > documents dealing with the subject, i have three options: > * Using a class for error handling > * Using PEAR error object > * Using try and catch exceptions > The error handling i want to implement will be done in a big > application that was > developed from the beginning without any concern about error > handling. It seems to me that 1 and 3 aren't necessarily mutually exclusive. I believe that you can use your own error classes in php's try/catch functionality. As for PEAR's error object, unless you are using PEAR elsewhere in your app I'm not sure it would be worthwhile to just use this very small piece. This is all just IMO. thnx, Chris Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Intercepting errors
Hi, Now i know how to create errors with trigger_error, but i am wondering how can I make my error handling class intercept any kind of error although i'm not aware about it and i don't know if it will happen. Is this possible? Thank you Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Intercepting errors
I'am already using that. When i call trigger_error the function set in set_error_handler handles the error. but now i don't know if this will handle all the other errors that i don't know about in case they happen. Is there anyway to test that? - Original Message From: Richard Heyes <[EMAIL PROTECTED]> To: It Maq <[EMAIL PROTECTED]> Cc: php-general@lists.php.net Sent: Thursday, March 13, 2008 10:36:20 AM Subject: Re: [PHP] Intercepting errors > Now i know how to create errors with trigger_error, but i am > wondering how can I make my error handling class intercept any kind > of error although i'm not aware about it and i don't know if it will > happen. Is this possible? You could use set_error_handler(): http://uk.php.net/manual/en/function.set-error-handler.php -- Richard Heyes Employ me: http://www.phpguru.org/cv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ____ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Intercepting errors
I already read th page of the manual, but i still don't understand a lot of things. Below you will find a simple code that i ade for understanding more about this. In the code i'm triggering an error of type "E_USER_ERROR", so now i'm wondering why it is not considered as E_USER_ERROR in set_error_handler(). And if somebody can suggest an error (something real not just trigger_error) that can be intercepted by set_error_handler(), this will be very useful.here is the code: "; echo $errstr. ""; switch($errno) { case E_USER_ERROR: $str = ""; $str = "ERROR MESSAGE: ". $errstr; $str .= "The application will be stopped just after the following error message:"; $str.= "File: ". $filename; $str.= "Line number: ". $lineno; $GLOBALS['toto'] = $str; //return $GLOBALS['error']; break; case E_USER_WARNING: echo "ERROR MESSAGE: ". $errstr; echo "The application will continue but there is a warning:"; echo "File: ". $filename; echo "Line number: ". $lineno; break; case E_USER_NOTICE: echo "ERROR MESSAGE: ". $errstr; echo "The application will continue but there is a notice:"; echo "File: ". $filename; echo "Line number: ". $lineno; break; } } echo "Testing set_error_handler"; error_reporting(E_USER_ERROR|E_USER_WARNING|E_USER_NOTICE); set_error_handler('error_handler'); ini_set('error_reporting', 0); trigger_error("The string for testing the error", E_USER_ERROR); ?> - Original Message From: Richard Heyes <[EMAIL PROTECTED]> To: It Maq <[EMAIL PROTECTED]> Cc: php-general@lists.php.net Sent: Thursday, March 13, 2008 11:00:30 AM Subject: Re: [PHP] Intercepting errors > I'am already using that. When i call trigger_error the function set > in set_error_handler handles the error. but now i don't know if this > will handle all the other errors that i don't know about in case they > happen. Is there anyway to test that? Read the manual page. I believe it handles all except things like parse errors: "The following error types cannot be handled with a user defined function: E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING, and most of E_STRICT raised in the file where set_error_handler() is called." Oh and Stephane: this is a mailing list. If you want off you can go to http://www.php.net. -- Richard Heyes Employ me: http://www.phpguru.org/cv Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Intercepting errors (skip)
sorry i just forgot to print the results. It 's my mistake - Original Message From: It Maq <[EMAIL PROTECTED]> To: php-general@lists.php.net Sent: Thursday, March 13, 2008 11:22:36 AM Subject: Re: [PHP] Intercepting errors I already read th page of the manual, but i still don't understand a lot of things. Below you will find a simple code that i ade for understanding more about this. In the code i'm triggering an error of type "E_USER_ERROR", so now i'm wondering why it is not considered as E_USER_ERROR in set_error_handler(). And if somebody can suggest an error (something real not just trigger_error) that can be intercepted by set_error_handler(), this will be very useful.here is the code: "; echo $errstr. ""; switch($errno) { case E_USER_ERROR: $str = ""; $str = "ERROR MESSAGE: ". $errstr; $str .= "The application will be stopped just after the following error message:"; $str.= "File: ". $filename; $str.= "Line number: ". $lineno; $GLOBALS['toto'] = $str; //return $GLOBALS['error']; break; case E_USER_WARNING: echo "ERROR MESSAGE: ". $errstr; echo "The application will continue but there is a warning:"; echo "File: ". $filename; echo "Line number: ". $lineno; break; case E_USER_NOTICE: echo "ERROR MESSAGE: ". $errstr; echo "The application will continue but there is a notice:"; echo "File: ". $filename; echo "Line number: ". $lineno; break; } } echo "Testing set_error_handler"; error_reporting(E_USER_ERROR|E_USER_WARNING|E_USER_NOTICE); set_error_handler('error_handler'); ini_set('error_reporting', 0); trigger_error("The string for testing the error", E_USER_ERROR); ?> - Original Message From: Richard Heyes <[EMAIL PROTECTED]> To: It Maq <[EMAIL PROTECTED]> Cc: php-general@lists.php.net Sent: Thursday, March 13, 2008 11:00:30 AM Subject: Re: [PHP] Intercepting errors > I'am already using that. When i call trigger_error the function set > in set_error_handler handles the error. but now i don't know if this > will handle all the other errors that i don't know about in case they > happen. Is there anyway to test that? Read the manual page. I believe it handles all except things like parse errors: "The following error types cannot be handled with a user defined function: E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING, and most of E_STRICT raised in the file where set_error_handler() is called." Oh and Stephane: this is a mailing list. If you want off you can go to http://www.php.net. -- Richard Heyes Employ me: http://www.phpguru.org/cv Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to get error context
Hi, i need help because I'm unable to retrieve error's context. Below is the code that is working perfectly except the context that is not displayed: ERROR Number: ". $errno; $str .= "ERROR MESSAGE: ". $errstr; $str.= "File: ". $filename; $str.= "Line number: ". $lineno; $str.= "Context: ". $errcontext[0]; echo $str; } echo "Testing set_error_handler"; error_reporting(0); set_error_handler('error_handler'); ini_set('error_reporting', 0); //trigger_error("The string for testing the error", E_USER_WARNING); $ourFileName = "testFile.txt"; $fh = fopen($ourFileName, 'X');// or die("Can't open file"); fclose($fh); ?> ____ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to get error context
Hi, I maid the modifications you suggested. For the error context when i display it, it gives a lot of information, but not easy to understand how the array is structured. If somebody knows about a site explaining how to access the context it would be great. I also modified the error reporting to E_ALL as you suggested. Now an other question arise: For the connection to the database if i put a wrong username or password the error is reported automatically to the function that i defined as the error handling function, but for the next statement (see code below) if i put a wrong database name the error is not reported automatically, i have to trigger it using triger_error. So i'm wondering if there are some rules that can help me know if an error will be reported automatically or not. here is my code after modification: "; switch($errno) { case E_USER_ERROR: $type = "E_USER_ERROR";break; case E_USER_WARNING: $type = "E_USER_WARNING";break; case E_USER_NOTICE: $type = "E_USER_NOTICE";break; case E_ERROR: $type = "E_ERROR";break; case E_WARNING: $type = "E_WARNING";break; case E_PARSE: $type = "E_PARSE";break; case E_NOTICE: $type = "E_NOTICE";break; case E_CORE_ERROR: $type = "E_CORE_ERROR";break; case E_CORE_WARNING: $type = "E_CORE_WARNING";break; case E_COMPILE_ERROR: $type = "E_COMPILE_ERROR";break; case E_STRICT: $type = "E_STRICT";break; case E_COMPILE_WARNING: $type = "E_COMPILE_WARNING";break; case E_RECOVERABLE_ERROR: $type = "E_RECOVERABLE_ERROR";break; default: echo "This is an error not listed"; } $str = ""; $str .= "ERROR TYPE: ". $type; $str .= "ERROR Number: ". $errno; $str .= "ERROR MESSAGE: ". $errstr; $str.= "File: ". $filename; $str.= "Line number: ". $lineno; echo $str; echo "Context: "; print_r($errcontext); } echo "Testing set_error_handler"; error_reporting(E_ALL); set_error_handler('error_handler'); mysql_connect("localhost", "admin", "admin"); mysql_select_db("wrongdb") or trigger_error("wrong database"); ?> --- Jim Lucas <[EMAIL PROTECTED]> wrote: > It Maq wrote: > > Hi, > > > > i need help because I'm unable to retrieve error's > context. Below is the code that is working perfectly > except the context that is not displayed: > > > > > function error_handler($errno, $errstr, > $filename, $lineno, $errcontext) > > { > > > > try doing a print_r($errcontext) here and see what > you get? > > maybe the zero index does not exist. > > > > > $str = ""; > > $str .= "ERROR Number: ". $errno; > > $str .= "ERROR MESSAGE: ". $errstr; > > $str.= "File: ". $filename; > > $str.= "Line number: ". $lineno; > > $str.= "Context: ". $errcontext[0]; > > echo $str; > > > > > > } > > > > echo "Testing set_error_handler"; > > > > I have always used > error_reporting(E_ALL); > instead of this. > > error_reporting(0); > > set_error_handler('error_handler'); > > ini_set('error_reporting', 0); > > I have never seen the above line before. This and > the error_reporting(0) would > probably suppress all error messages generated by > PHP. Double check these > settings and make sure the you can still trigger an > error with trigger_error() > if you have error_reporting() turned off. > > > > > //trigger_error("The string for testing the > error", E_USER_WARNING); > > $ourFileName = "testFile.txt"; > > $fh = fopen($ourFileName, 'X');// or die("Can't > open file"); > > fclose($fh); > > > > > > ?> Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to get error context
For example "mysql_connect" reprted automatically the error but in the manual http://us3.php.net/manual/en/function.mysql-connect.php all they give as information is the return: "Returns a MySQL link identifier on success, or FALSE on failure.", where can i see if it throws an error, and when you say throwing do you mean that i can catch the error without throwing it myself? --- Zoltán Németh <[EMAIL PROTECTED]> wrote: > 2008. 03. 14, péntek keltezéssel 07.20-kor It Maq > ezt írta: > > So i'm wondering if there are some rules > > that can help me know if an error will be reported > > automatically or not. > > there is no general rule for that. you have to check > the manual for each > function, some of them just returns false on error, > others throw > warnings/notices/errors... > > greets, > Zoltán Németh > > Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to get error context
Here is the error message captured by my error handling function: mysql_connect() [function.mysql-connect]: Access denied for user 'admin'@'localhost' (using password: YES) i put a wrong password and username --- Zoltán Németh <[EMAIL PROTECTED]> wrote: > 2008. 03. 14, péntek keltezéssel 07.40-kor It Maq > ezt írta: > > For example "mysql_connect" reprted automatically > the > > error but in the manual > > > http://us3.php.net/manual/en/function.mysql-connect.php > > all they give as information is the return: > "Returns > > a MySQL link identifier on success, or FALSE on > > failure.", where can i see if it throws an error, > and > > when you say throwing do you mean that i can catch > the > > error without throwing it myself? > > hmm actually what error did mysql_connect throw? > because if it just fails connecting, it returns > false. on the other > hand, if you provide it wrong arguments (e.g. less > arguments, or wrong > data type, or whatever) that raises a php error and > the function does > not even run. > this is true for most functions which return false > on error. the > returning false means there was some error with the > action itself, while > php errors are raised when the action can not be > executed because of > some error in the code itself. > > greets, > Zoltán Németh > > > > > --- Zoltán Németh <[EMAIL PROTECTED]> wrote: > > > > > 2008. 03. 14, péntek keltezéssel 07.20-kor It > Maq > > > ezt írta: > > > > So i'm wondering if there are some rules > > > > that can help me know if an error will be > reported > > > > automatically or not. > > > > > > there is no general rule for that. you have to > check > > > the manual for each > > > function, some of them just returns false on > error, > > > others throw > > > warnings/notices/errors... > > > > > > greets, > > > Zoltán Németh > > > > > > > > > > > > > > > > > Never miss a thing. Make Yahoo your home page. > > http://www.yahoo.com/r/hs > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] algorithm of pages beaking
Hi, I am working in page breaking (dividing the result of a select query in multiple pages). Now my problem is not with the php code, but with the algorithm that organize the links to the pages. I want to do something like google, the pages numbers at the bottom of the page must not exceed a maximum number, the actual page must be in the center of the links to other pages and there are a lot of other conditions that arise. Do you know about a site that describe these conditions or may be propose the whole algorithm for that? Thank you Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Fastest way to get table records' number
Hi, did you try mysql_num_rows ? --- Andrew Ballard <[EMAIL PROTECTED]> wrote: > On Wed, Mar 19, 2008 at 1:04 PM, TG > <[EMAIL PROTECTED]> wrote: > > > > It seems that count(*) pulls all the data from > the row then performs a count > > increment whereas count(did) only pulls the 'did' > column. > > Again, I don't believe COUNT(*) pulls any data. If > there is a row, it > simply counts it. The row could be full of NULLS (if > allowed by your > schema - yikes) and it will still be counted. I'd > guess that COUNT(1) > does the same thing. COUNT(did) does only examine > the `did` column, > but NULL values are excluded from the count. > > > I wonder if count(did) is the same speed as > count(1) or if it will depend on > > how much/what type of data is in 'did'. > > > > > > I also wonder why count() takes a parameter. > Isn't it always going to count > > +1 for the row? I'll have to look that up > sometime. > > It takes a parameter because it depends on what you > want to count. > COUNT(*) will return the number of rows matching the > WHERE clause. > COUNT(`column_name`) will return the number of > non-NULL values in the > column `column_name`. You could have a million rows > in the table, but > if every row has NULL in `column_name`, the COUNT() > will return 0. > There is also COUNT(DISTINCT `column_name`), which > counts the number > of distinct, non-NULL values in the column. > > Andrew > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] convert associative array to ordinary array
Hi, i have an associative array and i want to use it as an ordinary array, is that possible? what i mean is instead of $arr['fruit'] i want to call it by its position in the array $arr[3] thanks Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] convert associative array to ordinary array
thank you, it works! --- Casey <[EMAIL PROTECTED]> wrote: > On Fri, Mar 28, 2008 at 10:33 AM, Daniel Brown > <[EMAIL PROTECTED]> wrote: > > On Fri, Mar 28, 2008 at 2:27 PM, It Maq > <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > > > i have an associative array and i want to use > it as an > > > ordinary array, is that possible? > > > > > > what i mean is instead of $arr['fruit'] i want > to call > > > it by its position in the array $arr[3] > > > > Did you try? > > > > -- > > > > Forensic Services, Senior Unix Engineer > > 1+ (570-) 362-0283 > > > > > > > > $numbered_array = array_values($associative_array); > > -- > -Casey > Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to write simpleXML object to a file
Hi, I am reading an xml file. After that i modify one node. IN the xml object that i'm handling it is modified but not in the original file. Can you tell me how i can make the modification to an xml file or how to write an xml object to a file? Thank you You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost. http://tc.deals.yahoo.com/tc/blockbuster/text5.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] XHTML Validation problem
Hi, I have a page that displays data entered by the user. There is one user that entered the character "&" inside the text he typed. For this case the xhtml validation fails and gives me the following error: "character "&" is the first character of a delimiter but occurred as data." I'm wondering if there is a way to avoid this error. The page itself is valid and fails just in the case the user enters the & character. Thank you ________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] adding the results of mysql_query
Hi, I need to add the result of 4 calls to mysql_query (4 different queries) to the same object so that i can mysql_fetch_object in the same loop. Is that possible? otherwise is there any other alternative? Thank you Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] usort inside a class
Hi, i'm trying to build a class that sorts a multidimensional array. I'm using the php function "usort". I declared the comparision function as a method of my class but i'm unable to give it as argument to the function usort. this "usort($this->arr, $this->cmpi)" gaves the following error: usort() [function.usort]: Invalid comparison function i tried to do "usort($this->arr, 'cmpi')" but it does not work either. Thanks ____ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] usort inside a class
It works thanks a lot! --- On Fri, 5/9/08, Richard Heyes <[EMAIL PROTECTED]> wrote: > From: Richard Heyes <[EMAIL PROTECTED]> > Subject: Re: [PHP] usort inside a class > To: [EMAIL PROTECTED] > Cc: php-general@lists.php.net > Date: Friday, May 9, 2008, 8:47 PM > > i'm trying to build a class that sorts a > multidimensional array. > > I'm using the php function "usort". > > > > I declared the comparision function as a method of my > class but i'm unable to give it as argument to the > function usort. > > > > this "usort($this->arr, $this->cmpi)" > gaves the following error: usort() [function.usort]: > Invalid comparison function > > > > i tried to do "usort($this->arr, > 'cmpi')" but it does not work either. > > If it's anything like other functions, try this: > > usort($this->arr, array($this, 'cmpi')); > > -- > Richard Heyes > > ++ > | Access SSH with a Windows mapped drive | > |http://www.phpguru.org/sftpdrive| > ++ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] convert query result to array
Hi, is there any function that can convert the result of query to an associative array? what i want is the following: $query = "select * from tablename"; $result = mysql_query($query); $arr = somefunction($result); where $arr should be an assoiative array whose indices have the same name as the fields names of table tablename. Thank you Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] problem with htmlspecialchars in version5.2.5
Hi, this statement: echo nl2br(htmlspecialchars($row['jobdescription'], ENT_QUOTES, 'UTF-8')); works for php4.3.10 but not for php5.2.5 I am wondering if i am missing something. Thank you -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Creating XML files
Hi all, Some months ago i worked with XML. And i remember that i was able to create xml files quite easily. Now i don`t have the book i used by the time. I made many searches in google and i don't find something interesting. So i'm wondering if somebody can give a good link with examples. If i remeber well, i can create axml file without writing the hole file to a string before writing the string to the file. Thanks a lot -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Creating zip files
Hi, I am using the "pclziplibrary" to create a zip archive. Now i have the following error message: Error : PCLZIP_ERR_READ_OPEN_FAIL (-2) : Unable to open archive 'archive.zip' in wb mode If someone is using the same library please tell me what this error means exactly. I am using the same code in my PC, it is working but not in the real server. What i am able to do in my pc is writing the archive to the disc. Do you know if there is a way to create the archive just in memory and let the user download it without having to store it in the server? Thank you -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] push data directlly to the client(was Creating zip files)
Hi, Thank you for your answer. Now i figured out how to build the zip archive. I am using a class that returns the compressed data: $zipedresult = $zipfile->zipped_file(); This data, i can write it to a file. but i would like to make it downloadable without having to store it in the server. Is that possible? Thanks --- On Tue, 7/8/08, Eric Butera <[EMAIL PROTECTED]> wrote: > From: Eric Butera <[EMAIL PROTECTED]> > Subject: Re: [PHP] Creating zip files > To: [EMAIL PROTECTED] > Cc: php-general@lists.php.net > Date: Tuesday, July 8, 2008, 7:22 PM > On Tue, Jul 8, 2008 at 3:17 PM, It flance > <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I am using the "pclziplibrary" to create a > zip archive. > > Now i have the following error message: > > Error : PCLZIP_ERR_READ_OPEN_FAIL (-2) : Unable to > open archive 'archive.zip' in wb mode > > > > If someone is using the same library please tell me > what this error means exactly. I am using the same code in > my PC, it is working but not in the real server. > > > > What i am able to do in my pc is writing the archive > to the disc. Do you know if there is a way to create the > archive just in memory and let the user download it without > having to store it in the server? > > > > Thank you > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > Has it ever worked on the server? You might need to check > permissions > to see if your php script has access to write the zip > archive to disc. > > If you're using php5 you can use the ZipArchive[1] > extension that is > built in now. It is quite fast and easy to use. > > [1] http://us2.php.net/manual/en/ref.zip.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP editor for linux
Hi, What do you think is the best php editor for linux. I'm using the Debian distribution. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Php installation
Hi all, I'm using Fedora 8. I installed php, mysql and apache. Now i can run a script connecting to a database from terminal but not from browser. Any suggestion? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Don't understand what is this $arr['N']['#']
Hi, I am working on the code of a former employee and I don't understand what this $arr['N']['#'] refers to. I know it is a multidimensional associative array but the # i don't what this means. Thank you -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Don't understand what is this $arr['N']['#']
hi, You're right. Because associative arrays are meant to make code easier to understand by using meaningful indexes. Thank you guys --- On Wed, 9/24/08, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > From: Nathan Nobbe <[EMAIL PROTECTED]> > Subject: Re: [PHP] Don't understand what is this $arr['N']['#'] > To: "Richard Lynch" <[EMAIL PROTECTED]> > Cc: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>, "php-general@lists.php.net" > > Date: Wednesday, September 24, 2008, 7:38 PM > On Wed, Sep 24, 2008 at 1:00 PM, Richard Lynch > <[EMAIL PROTECTED]> wrote: > > > > -Original Message- > > > I am working on the code of a former employee and > I don't understand > > > what this $arr['N']['#'] refers > to. > > > > > > I know it is a multidimensional associative array > but the # i don't > > > what this means. > > > > '#' is just a string value. > > > > It has no special meaning whatsoever. > > > except in the deranged world of the original author :D > > -nathan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Remove an element from associative array
Hi, is there any predefined function in php that allows to remove an element from an associative array? Thank you -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] extract column from multidimentional array
Hi, below you will find the code for a small script where i'm able to extract a row but not a column. So the question is how can I do that. Here is the code: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP installation on RedHat
Anyone know where I can get a better step by step how to for installation of PHP with DOM, XSLT, and XPATh support on Red Hat? PHP.NET is not so hot... /T -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Garbage collection and strange session behaviour
Hi, Here is a simple script: ".session_id()." -that's our session id, hmmm"); ?> // END OF A SCRIPT The lines from #1 to #3 intentionally set these parameters to the garbage collector just to speed up the results of the problem. #4 - we're sleeping So, after first run we have: after #5 - a new session, #7 puts a variable in the session and #8 tells us about that. After #5 we also have the session file "/tmp/sess_?" written out there anywhere. On second run after #5 (we've been sleeping enough on #4 to have our session announced "old", "...dead-man-walking..." - quotation from 'The Green Mile' movie), the gc-monster is awaken and hungry for eating "old" session files. Finally we have the session file "/tmp/sess_?" deleted by the garbage collector after #5. That's guaranteed by #1 - #4. [If we put another 'sleep' after "/* #5 */session_start()", we may have time to switch to '/tmp' directory and persuade ourselves that there is no session file any more after the execution of #5.] No session file - no session variables anymore, no session at all??? WRONG ANSWER! We are sent to the 'else' clause, so "$_SESSION['a_sess_string]" is set and alive , and its value - additionally - is the one before the session file has gone (deleted) - "abcd" in my example. Obviously 'session_start()' first fills all of the sesion variables into memory, and after that shoots the garbage collector to go to finish its cleaning work. The session file is deleted, but inside the session, in our script, we are not acquainted with that... Until the end of script we are happy that everything is all right, but probably this self-confidence could lead us to some troubles later. Is there a workaround? Without going to the file system to check if the file still exists? A smart and elegant PHP session way, without any if-file-exists-checking functions? P.S. (To the administrators/moderators/whatever of this mailing list) - Please tell the people - write it somewhere on http://www.php.net/mailing-lists.php - that there is no chance to get subscribed if they are using any public mail address like @yahoo.com. It took me 2 days, I struggled like a pig with a pumpkin to find out... - Bulgarian National Radio IT Department (+359 2) 9336 615 BNR - Sofia, Bulgaria -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] array_multisort?
Hi List, I'm having a problem sorting the following array: $product = array($id, $title, $price); $shop[] = $product; I want the array 'shop' to be sorted by the 'title' in array 'product'. I tried the function 'array_multisort()', but that did not do the trick. Does anyone know how to fix this? Best regards, Sebastiaan Timmers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Writing IPTC tags
Hi all, Just wanted to know if it's possible to write iptc tags with php, and, if so, how? I can read them trough getimagesize(). TIA, Dirk Bean IT T: +31 (0)23 - 5422299 F: +31 (0)23 - 5422728 W: http://www.bean-it.nl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem installing in Win2003 Server SP1
I have been trying for several days to get PHP 4.x installed on my Win2003 SP1 server. I am doing the manual (isapi) install. I modified my php.ini file, I think correctly. And added the extension into IIS6, pointing to the \php directory and the php4isapi.dll file. When I try to view a php file, even one that returns the basics showing if PHP is running or not, I get a 'page can't be found' Can anyone tell me what I might be doing wrong? Thanks, Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help installing on Win2003 server?
Can someone tell me where I can find some detailed instructions on how to install PHP on a Win2003 Server? I've tried to install it using the PHP instructions, but it doesn't seem to be working, think I'm missing something. Thanks.
[PHP] Re: Help installing on Win2003 server?
No, this is on a IIS6 install, not Apache -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Monday, July 11, 2005 12:27 PM To: Grosz, Steve (IPG IT); php-general@lists.php.net Subject: RE: [PHP] Help installing on Win2003 server? [snip] Can someone tell me where I can find some detailed instructions on how to install PHP on a Win2003 Server? I've tried to install it using the PHP instructions, but it doesn't seem to be working, think I'm missing something. [/snip] Did you install Apache? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Help installing on Win2003 server?
Yes, I have looked at that info, but am still having a problem. -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Monday, July 11, 2005 12:39 PM To: Grosz, Steve (IPG IT); php-general@lists.php.net Subject: RE: [PHP] Help installing on Win2003 server? [snip] No, this is on a IIS6 install [/snip] Have you read this... http://us2.php.net/manual/en/install.windows.iis.php ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Help installing on Win2003 server?
I get a message in the browser saying it can't find the file, will find standard .htm or .cfm files, but when I try to browse to a .php file, nothing. -Original Message- From: John Nichel [mailto:[EMAIL PROTECTED] Sent: Monday, July 11, 2005 1:39 PM To: php-general@lists.php.net Subject: Re: [PHP] Help installing on Win2003 server? Grosz, Steve (IPG IT) wrote: > Yes, I have looked at that info, but am still having a problem. And that problem is? Error messages? Logs? -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- 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] Problem installing in Win2003 Server SP1
I can see the .htm/.html file just fine. So, what settings should I be looking at for the problems with PHP? Steve -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 12, 2005 12:12 AM To: Grosz, Steve (IPG IT) Subject: Re: [PHP] Problem installing in Win2003 Server SP1 On Mon, July 11, 2005 9:46 am, Grosz, Steve (IPG IT) said: > I have been trying for several days to get PHP 4.x installed on my > Win2003 SP1 server. I am doing the manual (isapi) install. I > modified my php.ini file, I think correctly. And added the > extension into IIS6, pointing to the \php directory and the php4isapi.dll file. > > When I try to view a php file, even one that returns the basics > showing if PHP is running or not, I get a 'page can't be found' > > Can anyone tell me what I might be doing wrong? Put an .html file in that same directory. Surf to it. Can you find it? If not, PHP isn't the problem -- IIS configuration is. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] 404 error - why???!!
Ok, I thought I had installed PHP correctly on my Win2003 server, using ISAPI. I added the extension, and mapped it to the php4isapi.dll file, added a path to my /php folder in Win2003, edited my php.ini file which I copied to my /windows/system32 folder. In IIS, I made sure that the application extension for .php was added, also pointing to the php4isap.dll file, and in the documents, added the index.php file, moved it to the top of the list. So, after all that, why am I still getting 404- file not found errors. This is on a IE browse that is running on the same machine as IIS/PHP! Any help is appreciated, this is getting very frustrating. Thanks, Steve
RE: [PHP] 404 error - why???!!
Yes, the dll file is on the server, in the /php directory Steve -Original Message- From: glumtail [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 13, 2005 10:18 AM To: php-general@lists.php.net Subject: Re: [PHP] 404 error - why???!! Hi: 1. did you copy php4isap.dll to /php folder? 2. in local disk? 2005/7/14, Grosz, Steve (IPG IT) <[EMAIL PROTECTED]>: > > Ok, I thought I had installed PHP correctly on my Win2003 server, > using ISAPI. I added the extension, and mapped it to the php4isapi.dll > file, added a path to my /php folder in Win2003, edited my php.ini > file which I copied to my /windows/system32 folder. > > In IIS, I made sure that the application extension for .php was added, > also pointing to the php4isap.dll file, and in the documents, added > the index.php file, moved it to the top of the list. > > So, after all that, why am I still getting 404- file not found errors. > This is on a IE browse that is running on the same machine as IIS/PHP! > > Any help is appreciated, this is getting very frustrating. > > Thanks, > Steve > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] 404 error - why???!!
Regular .htm files work just fine. Its kinda strange.. -Original Message- From: Richard Davey [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 13, 2005 10:18 AM To: php-general@lists.php.net Subject: Re: [PHP] 404 error - why???!! Hello Steve, Wednesday, July 13, 2005, 5:11:58 PM, you wrote: GSII> Ok, I thought I had installed PHP correctly on my Win2003 server, GSII> using ISAPI. I added the extension, and mapped it to the GSII> php4isapi.dll file, added a path to my /php folder in Win2003, GSII> edited my php.ini file which I copied to my /windows/system32 folder. This won't fix the 404 (sorry), but the php.ini doesn't go in system32, it just goes in the Windows directory. Do you only get 404s on PHP files? What happens if you copy an .html file into the same location and request that? Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear the lack of them." - Isaac Asimov -- 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] 404 error - why???!!
I guess I'm not sure how to tell if its loading correctly. Can you tell me how to confirm that it is? I'm using PHP 4.x as well. Steve -Original Message- From: glumtail [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 13, 2005 11:00 AM To: php-general@lists.php.net Subject: Re: [PHP] 404 error - why???!! Hello Steve, is the ISAPI loaded success? what's your PHP version? Version 4.x works fine. 2005/7/14, Grosz, Steve (IPG IT) <[EMAIL PROTECTED]>: > > Regular .htm files work just fine. Its kinda strange.. > > -Original Message- > From: Richard Davey [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 13, 2005 10:18 AM > To: php-general@lists.php.net > Subject: Re: [PHP] 404 error - why???!! > > Hello Steve, > > Wednesday, July 13, 2005, 5:11:58 PM, you wrote: > > GSII> Ok, I thought I had installed PHP correctly on my Win2003 > GSII> server, using ISAPI. I added the extension, and mapped it to the > GSII> php4isapi.dll file, added a path to my /php folder in Win2003, > GSII> edited my php.ini file which I copied to my /windows/system32 > folder. > > This won't fix the 404 (sorry), but the php.ini doesn't go in > system32, it just goes in the Windows directory. Do you only get 404s > on PHP files? What happens if you copy an .html file into the same > location and request that? > > Best regards, > > Richard Davey > -- > http://www.launchcode.co.uk - PHP Development Services "I do not fear > computers. I fear the lack of them." - Isaac Asimov > > -- > 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] 404 error - why???!!
Ohthat!! :) -Original Message- From: glumtail [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 13, 2005 11:10 AM To: php-general@lists.php.net Subject: Re: [PHP] 404 error - why???!! Hello Steve, Administrator tools -> Internet Services Manager -> Default Web Site -> ISAPI 2005/7/14, Grosz, Steve (IPG IT) <[EMAIL PROTECTED]>: > > I guess I'm not sure how to tell if its loading correctly. Can you > tell me how to confirm that it is? > > I'm using PHP 4.x as well. > > Steve > > -Original Message- > From: glumtail [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 13, 2005 11:00 AM > To: php-general@lists.php.net > Subject: Re: [PHP] 404 error - why???!! > > Hello Steve, > is the ISAPI loaded success? > what's your PHP version? Version 4.x works fine. > > 2005/7/14, Grosz, Steve (IPG IT) <[EMAIL PROTECTED]>: > > > > Regular .htm files work just fine. Its kinda strange.. > > > > -Original Message- > > From: Richard Davey [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, July 13, 2005 10:18 AM > > To: php-general@lists.php.net > > Subject: Re: [PHP] 404 error - why???!! > > > > Hello Steve, > > > > Wednesday, July 13, 2005, 5:11:58 PM, you wrote: > > > > GSII> Ok, I thought I had installed PHP correctly on my Win2003 > > GSII> server, using ISAPI. I added the extension, and mapped it to > > GSII> the > > > GSII> php4isapi.dll file, added a path to my /php folder in Win2003, > > GSII> edited my php.ini file which I copied to my /windows/system32 > > folder. > > > > This won't fix the 404 (sorry), but the php.ini doesn't go in > > system32, it just goes in the Windows directory. Do you only get > > 404s on PHP files? What happens if you copy an .html file into the > > same location and request that? > > > > Best regards, > > > > Richard Davey > > -- > > http://www.launchcode.co.uk - PHP Development Services "I do not > > fear computers. I fear the lack of them." - Isaac Asimov > > > > -- > > 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 > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] 404 error - why???!!
Ok, I don't think it is loaded. I manually added it, restarted w3svc, and the status still shows as *unknown* -Original Message- From: glumtail [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 13, 2005 11:10 AM To: php-general@lists.php.net Subject: Re: [PHP] 404 error - why???!! Hello Steve, Administrator tools -> Internet Services Manager -> Default Web Site -> ISAPI 2005/7/14, Grosz, Steve (IPG IT) <[EMAIL PROTECTED]>: > > I guess I'm not sure how to tell if its loading correctly. Can you > tell me how to confirm that it is? > > I'm using PHP 4.x as well. > > Steve > > -Original Message- > From: glumtail [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 13, 2005 11:00 AM > To: php-general@lists.php.net > Subject: Re: [PHP] 404 error - why???!! > > Hello Steve, > is the ISAPI loaded success? > what's your PHP version? Version 4.x works fine. > > 2005/7/14, Grosz, Steve (IPG IT) <[EMAIL PROTECTED]>: > > > > Regular .htm files work just fine. Its kinda strange.. > > > > -Original Message- > > From: Richard Davey [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, July 13, 2005 10:18 AM > > To: php-general@lists.php.net > > Subject: Re: [PHP] 404 error - why???!! > > > > Hello Steve, > > > > Wednesday, July 13, 2005, 5:11:58 PM, you wrote: > > > > GSII> Ok, I thought I had installed PHP correctly on my Win2003 > > GSII> server, using ISAPI. I added the extension, and mapped it to > > GSII> the > > > GSII> php4isapi.dll file, added a path to my /php folder in Win2003, > > GSII> edited my php.ini file which I copied to my /windows/system32 > > folder. > > > > This won't fix the 404 (sorry), but the php.ini doesn't go in > > system32, it just goes in the Windows directory. Do you only get > > 404s on PHP files? What happens if you copy an .html file into the > > same location and request that? > > > > Best regards, > > > > Richard Davey > > -- > > http://www.launchcode.co.uk - PHP Development Services "I do not > > fear computers. I fear the lack of them." - Isaac Asimov > > > > -- > > 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 > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] 404 error - why???!!
Ok, now it appears the ISAPI is loaded, I get the green up arrow, but the priority always shows as 'unknown'. Still get the 404 errors when trying to view .php pages Steve -Original Message- From: glumtail [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 13, 2005 11:10 AM To: php-general@lists.php.net Subject: Re: [PHP] 404 error - why???!! Hello Steve, Administrator tools -> Internet Services Manager -> Default Web Site -> ISAPI 2005/7/14, Grosz, Steve (IPG IT) <[EMAIL PROTECTED]>: > > I guess I'm not sure how to tell if its loading correctly. Can you > tell me how to confirm that it is? > > I'm using PHP 4.x as well. > > Steve > > -Original Message- > From: glumtail [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 13, 2005 11:00 AM > To: php-general@lists.php.net > Subject: Re: [PHP] 404 error - why???!! > > Hello Steve, > is the ISAPI loaded success? > what's your PHP version? Version 4.x works fine. > > 2005/7/14, Grosz, Steve (IPG IT) <[EMAIL PROTECTED]>: > > > > Regular .htm files work just fine. Its kinda strange.. > > > > -Original Message- > > From: Richard Davey [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, July 13, 2005 10:18 AM > > To: php-general@lists.php.net > > Subject: Re: [PHP] 404 error - why???!! > > > > Hello Steve, > > > > Wednesday, July 13, 2005, 5:11:58 PM, you wrote: > > > > GSII> Ok, I thought I had installed PHP correctly on my Win2003 > > GSII> server, using ISAPI. I added the extension, and mapped it to > > GSII> the > > > GSII> php4isapi.dll file, added a path to my /php folder in Win2003, > > GSII> edited my php.ini file which I copied to my /windows/system32 > > folder. > > > > This won't fix the 404 (sorry), but the php.ini doesn't go in > > system32, it just goes in the Windows directory. Do you only get > > 404s on PHP files? What happens if you copy an .html file into the > > same location and request that? > > > > Best regards, > > > > Richard Davey > > -- > > http://www.launchcode.co.uk - PHP Development Services "I do not > > fear computers. I fear the lack of them." - Isaac Asimov > > > > -- > > 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 > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] 404 error - why???!!
OK, you lost me, execute/write on which file? I don't use asp, I use Coldfusion, and .htm, I'm only installing PHP so I can use the phpBB system. -Original Message- From: glumtail [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 13, 2005 12:05 PM To: php-general@lists.php.net Subject: Re: [PHP] 404 error - why???!! Hello, it seems that your ISAPI is ok. 1. with full permission? e.g: execute,write and so on... 2. how about asp file? 2005/7/14, Grosz, Steve (IPG IT) <[EMAIL PROTECTED]>: > > Ok, now it appears the ISAPI is loaded, I get the green up arrow, but > the priority always shows as 'unknown'. > > Still get the 404 errors when trying to view .php pages > > Steve > > -Original Message- > From: glumtail [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 13, 2005 11:10 AM > To: php-general@lists.php.net > Subject: Re: [PHP] 404 error - why???!! > > Hello Steve, > Administrator tools -> Internet Services Manager -> Default Web Site > -> ISAPI > > 2005/7/14, Grosz, Steve (IPG IT) <[EMAIL PROTECTED]>: > > > > I guess I'm not sure how to tell if its loading correctly. Can you > > tell me how to confirm that it is? > > > > I'm using PHP 4.x as well. > > > > Steve > > > > -Original Message- > > From: glumtail [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, July 13, 2005 11:00 AM > > To: php-general@lists.php.net > > Subject: Re: [PHP] 404 error - why???!! > > > > Hello Steve, > > is the ISAPI loaded success? > > what's your PHP version? Version 4.x works fine. > > > > 2005/7/14, Grosz, Steve (IPG IT) <[EMAIL PROTECTED]>: > > > > > > Regular .htm files work just fine. Its kinda strange.. > > > > > > -Original Message- > > > From: Richard Davey [mailto:[EMAIL PROTECTED] > > > Sent: Wednesday, July 13, 2005 10:18 AM > > > To: php-general@lists.php.net > > > Subject: Re: [PHP] 404 error - why???!! > > > > > > Hello Steve, > > > > > > Wednesday, July 13, 2005, 5:11:58 PM, you wrote: > > > > > > GSII> Ok, I thought I had installed PHP correctly on my Win2003 > > > GSII> server, using ISAPI. I added the extension, and mapped it to > > > GSII> the > > > > > GSII> php4isapi.dll file, added a path to my /php folder in > > > GSII> Win2003, > > > > GSII> edited my php.ini file which I copied to my > > > GSII> /windows/system32 > > > folder. > > > > > > This won't fix the 404 (sorry), but the php.ini doesn't go in > > > system32, it just goes in the Windows directory. Do you only get > > > 404s on PHP files? What happens if you copy an .html file into the > > > same location and request that? > > > > > > Best regards, > > > > > > Richard Davey > > > -- > > > http://www.launchcode.co.uk - PHP Development Services "I do not > > > fear computers. I fear the lack of them." - Isaac Asimov > > > > > > -- > > > 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 > > > > > > -- > 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] 404 error - why???!!
I appreciate the try, but no, I still get a 404 error. :) This is killing me!! -Original Message- From: Joseph [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 13, 2005 12:34 PM To: Grosz, Steve (IPG IT) Cc: php-general@lists.php.net Subject: Re: [PHP] 404 error - why???!! Steve, I may have missed this response, if this is a repeat please excuse me... Make sure you have the correct mysql and php versions to run phpBB. I had 404 errors with a blogging/forum application where the index file moved to another page. But because there were some errors in setup the page came up as 404. You might try to put this in a page: info.php Then go to the page, this will let you know if php is running. I have a feeling it is the BB which is having the problem. jzf Grosz, Steve (IPG IT) wrote: >OK, you lost me, execute/write on which file? > >I don't use asp, I use Coldfusion, and .htm, I'm only installing PHP so >I can use the phpBB system. > >-Original Message- >From: glumtail [mailto:[EMAIL PROTECTED] >Sent: Wednesday, July 13, 2005 12:05 PM >To: php-general@lists.php.net >Subject: Re: [PHP] 404 error - why???!! > >Hello, > it seems that your ISAPI is ok. >1. with full permission? e.g: execute,write and so on... >2. how about asp file? > > 2005/7/14, Grosz, Steve (IPG IT) <[EMAIL PROTECTED]>: > > >>Ok, now it appears the ISAPI is loaded, I get the green up arrow, but >>the priority always shows as 'unknown'. >> >>Still get the 404 errors when trying to view .php pages >> >>Steve >> >>-Original Message- >>From: glumtail [mailto:[EMAIL PROTECTED] >>Sent: Wednesday, July 13, 2005 11:10 AM >>To: php-general@lists.php.net >>Subject: Re: [PHP] 404 error - why???!! >> >>Hello Steve, >>Administrator tools -> Internet Services Manager -> Default Web Site >>-> ISAPI >> >>2005/7/14, Grosz, Steve (IPG IT) <[EMAIL PROTECTED]>: >> >> >>>I guess I'm not sure how to tell if its loading correctly. Can you >>>tell me how to confirm that it is? >>> >>>I'm using PHP 4.x as well. >>> >>>Steve >>> >>>-Original Message- >>>From: glumtail [mailto:[EMAIL PROTECTED] >>>Sent: Wednesday, July 13, 2005 11:00 AM >>>To: php-general@lists.php.net >>>Subject: Re: [PHP] 404 error - why???!! >>> >>>Hello Steve, >>>is the ISAPI loaded success? >>>what's your PHP version? Version 4.x works fine. >>> >>>2005/7/14, Grosz, Steve (IPG IT) <[EMAIL PROTECTED]>: >>> >>> >>>>Regular .htm files work just fine. Its kinda strange...... >>>> >>>>-Original Message- >>>>From: Richard Davey [mailto:[EMAIL PROTECTED] >>>>Sent: Wednesday, July 13, 2005 10:18 AM >>>>To: php-general@lists.php.net >>>>Subject: Re: [PHP] 404 error - why???!! >>>> >>>>Hello Steve, >>>> >>>>Wednesday, July 13, 2005, 5:11:58 PM, you wrote: >>>> >>>>GSII> Ok, I thought I had installed PHP correctly on my Win2003 >>>>GSII> server, using ISAPI. I added the extension, and mapped it to >>>> >>>> > > > >>>>GSII> the >>>> >>>> >>>>GSII> php4isapi.dll file, added a path to my /php folder in Win2003, >>>> >>>> >>>>GSII> edited my php.ini file which I copied to my >>>>GSII> /windows/system32 >>>>folder. >>>> >>>>This won't fix the 404 (sorry), but the php.ini doesn't go in >>>>system32, it just goes in the Windows directory. Do you only get >>>>404s on PHP files? What happens if you copy an .html file into the >>>> >>>> > > > >>>>same location and request that? >>>> >>>>Best regards, >>>> >>>>Richard Davey >>>>-- >>>>http://www.launchcode.co.uk - PHP Development Services "I do not >>>>fear computers. I fear the lack of them." - Isaac Asimov >>>> >>>>-- >>>>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 >>> >>> >>> >>> >>-- >>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] 404 error - DLL files needed ??
In installing PHP4 on Win2003/IIS 6, I have noticed that only 1 dll file is used on the ISAPI install. What is the php4ts.dll file used for? And do I need to add it into my ISAPI area within IIS or just use the php4isapi.dll file... Steve
RE: [PHP] 404 error - DLL files needed ??
I'm afraid it didn't help. I know the php4ts.dll need to be in the path, and the instructions say that if that file is in the /php directory, and there is a Path to that directory, all should be fine. I'm curious if within IIS I use php4isapi.dll for my extension and ISAPI filter. -Original Message- From: Mikey [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 13, 2005 1:38 PM To: php-general@lists.php.net Subject: Re: [PHP] 404 error - DLL files needed ?? Grosz, Steve (IPG IT) wrote: >In installing PHP4 on Win2003/IIS 6, I have noticed that only 1 dll >file is used on the ISAPI install. > >What is the php4ts.dll file used for? And do I need to add it into my >ISAPI area within IIS or just use the php4isapi.dll file... > >Steve > > > Well, as per the installation instructions, that dll needs to be in your system path - system32 is the best place for it. hth, Mikey -- 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] 404 error - DLL files needed ??
I tried that, renamed a txt file to .php, but when I try to get the .php file, I just get a 404 error. -Original Message- From: glumtail [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 13, 2005 2:15 PM To: php-general@lists.php.net Subject: Re: [PHP] 404 error - DLL files needed ?? Dear Steve: php4ts.dll is needed by php4isapi.dll. if you can visit your pages in wwwroot folder, just try to rename that page to php extension. e.g: rename postinfo.html to postinfo.php C:\PHP │ install.txt │ license.txt │ magic.mime │ news.txt │ php-cli.exe │ php.exe │ php.gif │ php.ini │ php.ini-dist │ php.ini-recommended │ php4embed.lib │ php4isapi.dll │ php4ts.dll │ php4ts.lib │ ├─dlls │ ├─extensions │ ├─mibs │ ├─openssl │ ├─pdf-related │ └─sapi 2005/7/14, Grosz, Steve (IPG IT) <[EMAIL PROTECTED]>: > > I'm afraid it didn't help. I know the php4ts.dll need to be in the > path, and the instructions say that if that file is in the /php > directory, and there is a Path to that directory, all should be fine. > > I'm curious if within IIS I use php4isapi.dll for my extension and > ISAPI filter. > > -Original Message- > From: Mikey [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 13, 2005 1:38 PM > To: php-general@lists.php.net > Subject: Re: [PHP] 404 error - DLL files needed ?? > > Grosz, Steve (IPG IT) wrote: > > >In installing PHP4 on Win2003/IIS 6, I have noticed that only 1 dll > >file is used on the ISAPI install. > > > >What is the php4ts.dll file used for? And do I need to add it into my > >ISAPI area within IIS or just use the php4isapi.dll file... > > > >Steve > > > > > > > Well, as per the installation instructions, that dll needs to be in > your system path - system32 is the best place for it. > > hth, > > Mikey > > -- > 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
[PHP] Install directions for Win2003 SP1??
Does anyone have a step by step, screenshots would be great, of how to install PHP 4.x on a Win2003 SP1 server? I've tried going through the install instructions on PHP.net's site for windows, but its still not working, so I think I'm missing something somewhere along the way. Thanks! Steve
RE: [PHP] 404 error - DLL files needed ??
Tjoekbezoer, I can tell you that it is there, because I manually added it, and it is set to 'allowed'. Steve -Original Message- From: Tjoekbezoer van Damme [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 13, 2005 3:52 PM To: php-general@lists.php.net Subject: Re: [PHP] 404 error - DLL files needed ?? On 7/13/05, Grosz, Steve (IPG IT) <[EMAIL PROTECTED]> wrote: > I tried that, renamed a txt file to .php, but when I try to get the .php file, I just get a 404 error. Grosz, this might very well be your webserver invoking. By default, IIS 6.0 all webserver extensions (like PHP). To check if your server still does, open up your IIS manager (Start->Run->'c:\windows\system32\inetsrv\iis.msc') Then browse to Web Service Extensions on the left. If you did install PHP correctly you should see PHP appearing in the list on the right. Set it to 'Allowed'. Now try requesting the page via your browser again. Good luck! Tjoekbezoer -- 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] 404 error - DLL files needed ??
I pretty sure that it isn't checked, but I'll double check againanything else? I can't imagine that it should be this difficult to get PHP running. Steve -Original Message- From: Kristen G. Thorson [mailto:[EMAIL PROTECTED] Sent: Thursday, July 14, 2005 7:09 AM Cc: php-general@lists.php.net Subject: Re: [PHP] 404 error - DLL files needed ?? In the extension manager for the site/directory where this is not working, make sure the check box "Verify file exists" is not checked. I think I ran into a similar problem with a different extension and had the same issue. kgt Grosz, Steve (IPG IT) wrote: > Tjoekbezoer, > >I can tell you that it is there, because I manually added it, and it is >set to 'allowed'. > >Steve > >-Original Message- >From: Tjoekbezoer van Damme [mailto:[EMAIL PROTECTED] >Sent: Wednesday, July 13, 2005 3:52 PM >To: php-general@lists.php.net >Subject: Re: [PHP] 404 error - DLL files needed ?? > >On 7/13/05, Grosz, Steve (IPG IT) <[EMAIL PROTECTED]> wrote: > > >>I tried that, renamed a txt file to .php, but when I try to get the >> >> >.php file, I just get a 404 error. > >Grosz, this might very well be your webserver invoking. By default, IIS >6.0 all webserver extensions (like PHP). To check if your server still >does, open up your IIS manager >(Start->Run->'c:\windows\system32\inetsrv\iis.msc') Then browse to Web >Service Extensions on the left. If you did install PHP correctly you >should see PHP appearing in the list on the right. Set it to 'Allowed'. >Now try requesting the page via your browser again. > > >Good luck! > >Tjoekbezoer > >-- >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] Win2000 easier than Win2003 ??
Is setting up PHP easier on Windows 2000 server rather than Win2003? I'm having nothing but problems getting PHP files to show up in IE on the Win2003 server, I get nothing but 404 - file not found errors.
[PHP] php: mpeg / avi / mov
Hi, I want to know the dimensions (width, height) of an mpeg / avi / mov file... does anyone know how I can arrange that with PHP or possibly via a UNIX command string? Greets, Edward -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] a quick question..
Or, if you've already set your massive list of variables...: $varname = "nr".rand(0, $n); print ${$varname}; - Original Message - From: "Miles Thompson" <[EMAIL PROTECTED]> To: "Tauntz" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Sunday, January 27, 2002 8:15 PM Subject: Re: [PHP] a quick question.. > Try this: > > Store variables in an array, say $msg_array. (For those of Hungarian preference, $arrMessages.) > $index = rand (0, $n) > echo $msg_array[ $index ] > > Now this will require a bit of messing about, seeding the randomizer, etc., but you get the idea. > > Miles Thompson > > > On Sunday 27 January 2002 03:00 pm, Tauntz wrote: > > If I have n variables: > > $nr1 = "some text"; > > $nr2 = "some other text" > > $nr3 > > > > and I want to print the text "randomly" (like if I enter the page.. it > > displays $nr1... next time it displays $nr 5.. etc) how can I achieve it ? > > > > [EMAIL PROTECTED] > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Back button to Query Pages
Hi, a possible solution is also to provide the backbutton href with the original variable values... print "back\n"; Greets, Edward - Original Message - From: "Nick Wilson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 28, 2002 9:57 AM Subject: Re: [PHP] Back button to Query Pages > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > * and then phantom blurted > > Page 1 is a list of people's names (queried by State). > > > > Page 2 is each person's profile. > > > > When I hit the back button on Page 2 it tells me it has to requery the > > List on Page 1 (apparently not stored in the client's browser cache). > > Is there anyway to make it use the cached copy instead of requeurying > > the database? I know using Active Server Pages you could do this. > > Tough one. > This will need some experimentation as I'm just speculating a theory > Set a session var on page 1 *after* a successfull query. > At the beginning of page 1 test to see if the var is set, > If so just print the peoples names as if the query were run, if not > run the query. > > I have no idea if that will help but I hope it provides a little > inspiration anyhow :-) > - -- > > Nick Wilson > > Tel: +45 3325 0688 > Fax: +45 3325 0677 > Web: www.explodingnet.com > > > > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.0.6 (GNU/Linux) > > iD8DBQE8VRJ2HpvrrTa6L5oRAkWYAJ45ckNJHxjlvz5i/pMKVSkXjwgItgCfbLZA > fXxmthm2VEP5nqjv1Zj+j0Y= > =R2HK > -END PGP SIGNATURE- > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Back button to Query Pages
the moment I hit the send button I realised it myself too :-) but this is a pretty good alternative... Edward - Original Message - From: "Nick Wilson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 28, 2002 10:15 AM Subject: Re: [PHP] Back button to Query Pages > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > * and then Edward van Bilderbeek - Bean IT blurted > > Hi, > > > > a possible solution is also to provide the backbutton href with the original > > variable values... > > I'm pretty sure he means the /browser/ back button though. > - -- > > Nick Wilson > > Tel: +45 3325 0688 > Fax: +45 3325 0677 > Web: www.explodingnet.com > > > > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.0.6 (GNU/Linux) > > iD8DBQE8VRamHpvrrTa6L5oRAs5EAJ4kJyVPGdcvNmPkTEgCJkIUJZ20PwCgi4K0 > XJCudv0n1sFrJBrH37W5mVg= > =ntoU > -END PGP SIGNATURE- > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Mpeg
Hi, I've asked this question before, but no answer... so here it is again: does anyone now how I can get the dimensions (width, height) of an mpeg file? maybe via a unix command... (because in the PHP manual, I can't find anything about it, and I'm not that much of a unix-guru...)... thanks, Edward -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Sending Form Arrays
try something like this: check 1 check 2 check 3 check 4 check 5 that should do it... Edward - Original Message - From: "Scott Saraniero" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 28, 2002 3:17 PM Subject: [PHP] Sending Form Arrays > Hi, > > I have a form that has a section with multiple checkboxes. I would like to > be able to send the checked boxes out as an array, and be able to retrieve > the array in the next page (that the form variables go to.) I cannot find > specific info on this anywhere. Can someone please point me in the right > direction? > > Thanks, > Scott > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] HTML lists & PHP
maybe you can try something like this... $r1 = "game1" $r2 = "game16"; echo ""; echo "$teams[$r1]"; echo "$teams[$r2]"; echo ""; Greets, Edward > I keep getting parse error with this code: > ($teams[] is a big array that I got by using mysql_fetch_array) > > >$r = "game"; >echo ""; >echo "$teams[$r.'1']"; >echo "$teams[$r.'16']"; >echo ""; > > Im trying to make a dropdown list. > > Here is the error message: > Parse error: parse error, expecting `']'' in > /home/filanya/www/madness/bracket.php on line 65 > > (line 65 is the third line down) > > THANKS > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] is create_function slow?
including a file is nothing more then placing the text of the include file at the place you called "include()" so I think there's no reason why it should be quicker or slower... Edward Hi, is create function slow? Or has it a very significant slowdown compared to an include? i might want to create functions on the fly if it isn't tooo slow.. warm regards, Emile Bosch -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Attachments with mail() function
I recommend sending yourself a mail with an attachment and check the sourcecode of the received mail... together with base64encode() you should be able to do the job... Edward - Original Message - From: "Rafael Perazzo B Mota" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 30, 2002 3:11 AM Subject: [PHP] Attachments with mail() function > How can I send a simple file as attachment using the mail function ? > Can anyone give me a simple example ? > > Thanks > > Rafael Perazzo > > > _ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] A real simple question...
and if you want to write it to a file directly then do something like: exec('ftpusers > filename.txt'); Greets, Edward > Take a look at > > exec() > passthru() > system() > > Keep in mind that the webserver usally runs as User nobody or an equivilant > of that. So this user should have rights to run the program. > > Kind Regards, > Jerry Verhoef > > > -Original Message- > > From: Liam MacKenzie [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, January 30, 2002 10:29 AM > > To: [EMAIL PROTECTED] > > Subject: [PHP] A real simple question... > > > > > > Hey everyone, > > > > Got a question... > > > > How to I run a program and print it's output into a document? > > For instance, I have a program called "ftpusers" and when run > > from a shell like this: > > /usr/local/misc/ftpusers > > It will display a plain text list of people connected to my server. > > > > How do I get PHP to call that program and print it's output > > into a webpage? > > > > > > Thanks for your help! > > > > > > Liam > > > > > The information contained in this email is confidential and > may be legally privileged. It is intended solely for the > addressee. Access to this email by anyone else is > unauthorized. If you are not the intended recipient, any > form of disclosure, production, distribution or any action > taken or refrained from in reliance on it, is prohibited and > may be unlawful. Please notify the sender immediately. > > The content of the email is not legally binding unless > confirmed by letter bearing two authorized signatures. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How can I decrypt a password I previously coded with md5()?
The whole idea of MD5 is to generate a unique code from your string. It's practical impossible to generate an identical string that creates the same unique code. So youcan be sure that someone that creates the same code also created the same text... e.g. a password... it's impossible to reverse the procedure, else it wouldn't be safe... Greets, Edward "Jose" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > > I'm making a proyect in php, and I have some doubts about the md5. > I encript a password with it, but I don't know how to decrypt it again. > > Thanks. > > > -- -- > -- > Jose Fco. ( [EMAIL PROTECTED] ). > OLINET, S.L. Teléfono: 952207135 - Fax: 952207600 > Avda. Juan Sebastián Elcano, 39-41. 29017 Málaga. > -- -- > -- > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How can I decrypt a password I previously coded with md5()?
huh? well, use md5()... if you want a password that can be decrypted too, I'm afraid you have to write you're own encryption / decryption algoritm... maybe you can use base64encode() (don't know for sure)... but in both cases, if someone guesses your used encoding algoritm, you have a problem... Edward "Jose" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > Then how can I encrypt the password? > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Tables Loading Slow
Maybe this is a solution for you: instead of: 1data 1 2data 2 3data 3 4data 4 you can do this: 1data 1 2data 2 3data 3 4data 4 If you can't beat them, join them! Greets, Edward "Adam Leckron" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > from the PHP manual > [flush()] > ...Even the browser may buffer its input before displaying it. Netscape, for > example, buffers text until it receives an end-of-line or the beginning of a > tag, and it won't render tables until the tag of the outermost > table is seen... > > even if you're flushing the buffer after rows are processed, you probably > wont get any increase in load time because of this rendering issue... it's > just a drawback of using tables in html, regardless of how they are > generated... > > -- > Adam Leckron [[ [EMAIL PROTECTED] ]] > > > "Tony Bibbs" <[EMAIL PROTECTED]> wrote in message > 1012401977.6913.10.camel@tbibbs">news:1012401977.6913.10.camel@tbibbs... > > Check the PHP manual on flush() > > > > --Tony > > > > On Wed, 2002-01-30 at 08:38, Bryan Gintz wrote: > > > Hi. > > > I have a large database query that returns anywhere from 10-30ish > > > records. The problem comes from loading them in tables. With IE5 and > > > Netscape 5 on windows, the results do not display until the last > > > tag is written. Does anyone have any ideas on how to show the > > > results as the come from the query? > > > > > > Thanks. > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- > > Tony Bibbs | Life is a moderately good play > > [EMAIL PROTECTED] | with a bad 3rd act. > > 515.554.8046 | > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] ereg et all
hi, is there a simple way to replace an occurence of a string, into another, maintaing capital positions... Like: $str = "This equals this equals tHis"; and I wanna replace all occurences of "this" in "that", that the result will be: $str = "That equals that equals That"; Edward -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] ereg et all
that is not what I meant... I want the cases to remain... - Original Message - From: "Rick Emery" <[EMAIL PROTECTED]> To: "'Edward van Bilderbeek - Bean IT'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 31, 2002 10:47 PM Subject: RE: [PHP] ereg et all > try: eregi_replace("this","that","This equals this equals tHis"); > > > -Original Message- > From: Edward van Bilderbeek - Bean IT [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 31, 2002 3:40 PM > To: [EMAIL PROTECTED] > Subject: [PHP] ereg et all > > > hi, > > is there a simple way to replace an occurence of a string, into another, > maintaing capital positions... > > Like: > $str = "This equals this equals tHis"; > > and I wanna replace all occurences of "this" in "that", that the result will > be: > > $str = "That equals that equals That"; > > Edward > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] ereg et all
Oh, that was a typo... sorry... it should be: "This equals this equals tHis" -> "That equals that equals tHat" Edward - Original Message - From: "Jeff Sheltren" <[EMAIL PROTECTED]> To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 31, 2002 10:56 PM Subject: Re: [PHP] ereg et all > I'm not sure why you wanted the last word "tHis" to be changed to "That" > (with a capital)... can you explain further? > > Jeff > > At 10:52 PM 1/31/2002 +0100, Edward van Bilderbeek - Bean IT wrote: > >that is not what I meant... I want the cases to remain... > > > >- Original Message - > >From: "Rick Emery" <[EMAIL PROTECTED]> > >To: "'Edward van Bilderbeek - Bean IT'" <[EMAIL PROTECTED]>; > ><[EMAIL PROTECTED]> > >Sent: Thursday, January 31, 2002 10:47 PM > >Subject: RE: [PHP] ereg et all > > > > > > > try: eregi_replace("this","that","This equals this equals tHis"); > > > > > > > > > -Original Message- > > > From: Edward van Bilderbeek - Bean IT [mailto:[EMAIL PROTECTED]] > > > Sent: Thursday, January 31, 2002 3:40 PM > > > To: [EMAIL PROTECTED] > > > Subject: [PHP] ereg et all > > > > > > > > > hi, > > > > > > is there a simple way to replace an occurence of a string, into another, > > > maintaing capital positions... > > > > > > Like: > > > $str = "This equals this equals tHis"; > > > > > > and I wanna replace all occurences of "this" in "that", that the result > >will > > > be: > > > > > > $str = "That equals that equals That"; > > > > > > Edward > > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] ereg et all
hmm, that's not what i wanted to hear :-))) e.g. try doing that for the word: transparancy looots of different possibilities then... Edward - Original Message - From: "Jeff Sheltren" <[EMAIL PROTECTED]> To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 31, 2002 11:06 PM Subject: Re: [PHP] ereg et all > Ahhh, ok makes more sense now. Although, I don't think that there is an > "easy" way to do what you are asking. I think that in order to accomplish > that, you will have to specify all possible cases of a string, and have a > ereg_replace() statement for each of them. > > Jeff > > At 11:01 PM 1/31/2002 +0100, Edward van Bilderbeek - Bean IT wrote: > >Oh, that was a typo... sorry... > > > >it should be: > > > >"This equals this equals tHis" -> "That equals that equals tHat" > > > >Edward > > > >- Original Message - > >From: "Jeff Sheltren" <[EMAIL PROTECTED]> > >To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]>; > ><[EMAIL PROTECTED]> > >Sent: Thursday, January 31, 2002 10:56 PM > >Subject: Re: [PHP] ereg et all > > > > > > > I'm not sure why you wanted the last word "tHis" to be changed to "That" > > > (with a capital)... can you explain further? > > > > > > Jeff > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] ereg et all - new question..
Maybe I better ask my question different... what i want to do is, to highlight certain text in a string... for example: "This equals this equals tHis..." has to become: "This equals this equals tHis"... so dispite the case, the 's should be put around it... does that make it easier? not for me :-) Greets, Edward - Original Message - From: "Jeff Sheltren" <[EMAIL PROTECTED]> To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 31, 2002 11:06 PM Subject: Re: [PHP] ereg et all > Ahhh, ok makes more sense now. Although, I don't think that there is an > "easy" way to do what you are asking. I think that in order to accomplish > that, you will have to specify all possible cases of a string, and have a > ereg_replace() statement for each of them. > > Jeff > > At 11:01 PM 1/31/2002 +0100, Edward van Bilderbeek - Bean IT wrote: > >Oh, that was a typo... sorry... > > > >it should be: > > > >"This equals this equals tHis" -> "That equals that equals tHat" > > > >Edward > > > >- Original Message - > >From: "Jeff Sheltren" <[EMAIL PROTECTED]> > >To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]>; > ><[EMAIL PROTECTED]> > >Sent: Thursday, January 31, 2002 10:56 PM > >Subject: Re: [PHP] ereg et all > > > > > > > I'm not sure why you wanted the last word "tHis" to be changed to "That" > > > (with a capital)... can you explain further? > > > > > > Jeff > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] ereg et all - new question..
Wow, thanks a lot... although it should be \\0 here... didn't see anything in the manual about the \\ maybe gotta look for it again :-) Thanks, Edward - Original Message - From: "Richard Crawford" <[EMAIL PROTECTED]> To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, January 31, 2002 11:20 PM Subject: Re: [PHP] ereg et all - new question.. > Seems like that makes it a LOT easier. > > Use eregi_relace() instead of ereg_replace(). eregi allows for > case-insensitivity. > > Try > > eregi_replace("this","\\1",$str); > > That should do it, though I haven't tried it myself. > > > On Thu, 2002-01-31 at 14:14, Edward van Bilderbeek - Bean IT wrote: > > Maybe I better ask my question different... > > > > what i want to do is, to highlight certain text in a string... > > > > for example: "This equals this equals tHis..." has to become: > > "This equals this equals tHis"... so dispite the case, > > the 's should be put around it... > > > > does that make it easier? not for me :-) > > > > Greets, > > > > Edward > > > > > > - Original Message - > > From: "Jeff Sheltren" <[EMAIL PROTECTED]> > > To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]>; > > <[EMAIL PROTECTED]> > > Sent: Thursday, January 31, 2002 11:06 PM > > Subject: Re: [PHP] ereg et all > > > > > > > Ahhh, ok makes more sense now. Although, I don't think that there is an > > > "easy" way to do what you are asking. I think that in order to accomplish > > > that, you will have to specify all possible cases of a string, and have a > > > ereg_replace() statement for each of them. > > > > > > Jeff > > > > > > At 11:01 PM 1/31/2002 +0100, Edward van Bilderbeek - Bean IT wrote: > > > >Oh, that was a typo... sorry... > > > > > > > >it should be: > > > > > > > >"This equals this equals tHis" -> "That equals that equals tHat" > > > > > > > >Edward > > > > > > > >- Original Message - > > > >From: "Jeff Sheltren" <[EMAIL PROTECTED]> > > > >To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]>; > > > ><[EMAIL PROTECTED]> > > > >Sent: Thursday, January 31, 2002 10:56 PM > > > >Subject: Re: [PHP] ereg et all > > > > > > > > > > > > > I'm not sure why you wanted the last word "tHis" to be changed to > > "That" > > > > > (with a capital)... can you explain further? > > > > > > > > > > Jeff > > > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: Email Attachment
what also is a great help, is sending yourself an email with an attachment, en check the sourcecode of your mail... (in outlook that is: properties, details, message source)... one tip: don't forget the empty lines between the sections... Greets, Edward - Original Message - From: "Mike Eheler" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 01, 2002 10:01 PM Subject: [PHP] Re: Email Attachment > That's because it's not a specific feature of mail sending/php's mail > features. > > Instead you should look around for code examples that achieve this, as > it is no small task, and will require that you learn a good deal about > MIME and how files are "attached" to emails.. a good place to start > would be http://phpclasses.upperdesign.com/ > > Mike Eheler > SearchBC.com Technical Support > > Mauricio Sthandier wrote: > > Hello, I'm new in php development... I was wondering how can I attach a Word > > (.doc) Document in an email sent with the mail() function (if I can do it > > just with it). > > > > I know it has to see with the additional headers of the email, but I would > > be grateful If anyone could tell where can i go to for this specific > > information. > > > > I couldn't find it in PHP manual (.pdf version). > > > > Thanxs ! > > > > > > > > > > > -- > Animals can be driven crazy by putting too many in too small a pen. > Homo sapiens is the only animal that voluntarily does this to himself. > -- Lazarus Long > > -BEGIN PGP PUBLIC KEY BLOCK- > Version: GnuPG v1.0.6 (GNU/Linux) > Comment: For info see http://www.gnupg.org > > mQGiBDxa9oIRBACuGtJ4G2Clyv695SU3Mw88UG4EO5BoAUrvWaa7263EW6DWpHaB > FxJutSyohKbHwlhpVBo8shQ3mD0WP8lhxZuetPs/KmWDu1Vqln+41MxCX5Pm3INt > 64UxM2T/YPIOhjwGNlEtu2mcQGwkNCKzihc2m0yzXvBOeqQXrZXdz93BQwCgrYS8 > rO+mXPjoe1QQ5UWHSjye07ED/j7VJSnqNeUuv3ZCJ+DII3n9IhSPrykRkBN4PejD > RT8PDhbqqHb69U/+KVNSw3u7yLqD+6T/deR147G8cJ8/AIckGfgB+SaNXAJ1dDK0 > 2QH/wQiQp+9qlqJJAgfb2TrdK041z0m9qv5s0EpDEsTxoxLbBWLSE0w1xqrFYUHd > abQPA/9kJgA3yts6M+shtRQSg7QGvChuT5IerDHBZ+TkHnXbpZ5qTW/WBFZMn3oE > pqVtwmArndQYwwgu09j48EXDqnNCRoUwaEg458mi0F3cAqL34l0Hi8OYDkV53+UL > anUaTHFJCSAmfenCyeM+jsNNyq4JU5cAu1B26IetTRgZTNMlsbQjTWlrZSBFaGVs > ZXIgPG1pa2VAaWRlYXJlc291cmNlLmNvbT6IVwQTEQIAFwUCPFr2ggULBwoDBAMV > AwIDFgIBAheAAAoJEKrKiKGSvUb6Sb4AoJR3wyrB/cFRdRixW0pekAOUthxvAJ4k > A1OrTC+CmUqjP4frbdGQ3IreIbkBDQQ8WvaJEAQA7Qtz4irfoq4etWr6uMX1WsTS > G6TK6EL+A1UCOZchK9Hs/cbdKLzP0kr4Ic7NjP2oF925qCi90g/nuKU5rp/Qv9ns > GPaRiczyNRgt3DTK+vqe0zBvgH6JnL4KC1aKdGUESQaJGvsvrHC9oXyjfzQHZRzL > 7nM5N7kMjW3oFVxvvwsAAwYD/in3u7k3QQijKGTv3hSuTFy94PqLVTaFPR6wPRvj > 2Fkp9siVzg6Jxt2eEpxOK/gEBNe5C5JB1vemMoOesoRg2UGaa/k4t7o+RYop2VKo > wsiCUQ8y/115WZ+4l1vrG0PstfQD3lFUoM6ThGThEZ/k8Hu/dIJE8noZdpAHwCer > X5T9iEYEGBECAAYFAjxa9okACgkQqsqIoZK9RvpR8ACdE6TAt/xh5WnuF6nqcCJy > GmgiO74An27yM1es2sp4uLheLGBpCCcF1fM2 > =F/K7 > -END PGP PUBLIC KEY BLOCK- > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Adding 6 digits to a str?
like this: $digit = 122; $digits = sprintf ("%08d", $digit); print $digits; Greets, Edward - Original Message - From: "Jeff Sheltren" <[EMAIL PROTECTED]> To: "Andy" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Saturday, February 02, 2002 6:41 PM Subject: Re: [PHP] Adding 6 digits to a str? > Why is it that you want to represent an int with leading 0's? Is it just > to print it out that way? If that is the case, then you can use the printf > function for formatted printing. > > > Jeff > > At 10:53 AM 2/2/2002 +0100, Andy wrote: > >Hi guys, > > > >I am trying to force a int to be 8 digits. If it is only 3 dig filling the > >first ones with 0. > > > >Anyhow I tryed it with type casting, but it does not matter what I try, I > >always get an addition. > > > >E.g: > > $member_id is: 136 > >should be: 0136 > > > >Here is the code, which is still returning 136: > > > >for($i=0;$i >$length = strlen($member_id[$i]); > > > > settype ($member_id[$i], "string"); > > $zero = '0'; > > settype ($zero, "string"); > > > > $member_id[$i] = $zero + $member_id[$i]; > > echo $member_id[$i]; > >} > > > >Does anybody know how to solve this thing?? > > > >Thanx Andy > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] date problems
i think it is the strtotime() function that gives the trouble... why don't you try mktime() ? > sounds like it might have something to do with leap year. > > Jim Lucas > - Original Message - > From: "toni baker" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, February 04, 2002 12:03 PM > Subject: [PHP] date problems > > > > $date1 = "12/12/2001"; > > $date1 = date("D M j Y", strtotime($date1)); > > print $date1.""; > > > > When I execute the code above I get the following > > output: > > > > Tue Dec 11 2001 instead Wed Dec !2 2001 > > > > Why does this happen and how can I get the Dec 12 > > output? Thanks > > > > > > > > > > > > > > __ > > Do You Yahoo!? > > Great stuff seeking new owners in Yahoo! Auctions! > > http://auctions.yahoo.com > > > > -- > > 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] uksort wisdom
shouldn't it be: uksort($array_array,"cmp"); Greets, Edward - Original Message - From: "Sondra Russell" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, February 05, 2002 5:52 AM Subject: [PHP] uksort wisdom > Hi Guys! > > I'm looking to get a *deeper understanding* of uksort. My quandry: > > $array[listing1][name] = "listing 1"; > $array[listing1][premiere] = ""; > $array[listing2][name] = "listing 2"; > $array[listing2][premiere] = ""; > $array[listing3][name] = "listing 3"; > $array[listing3][premiere] = "yes"; > > I'd like the result to come out as: > $array[listing3] //(this is the one with the premiere set to "yes") > $array[listing1] // (no premiere, but in order) > $array[listing2] // (again, no premiere, but again in order) > > So far, I've got: > > function cmp= ($a,$b) { > global $array; > if ($array [$a][premiere] == "yes") { > return -1; > } else { > return ($a < $b) ? -1 : 1; > } > } > > uksort($array_array,cmp); > > But that ends up, strangely with: > $array[listing3] > $array[listing2] > $array[listing1] > > > Any wisdom? Just would like a better idea of the inner workings of uksort. > > Best, > Sondra > > -- > 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] Tricky array question
try using something like this: $varname = $categories[0]; echo ${$varname}[0]; Greets, Edward "Andy" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > Hi there, > > I have a tricky array question. > > My app is passing via post a array variable called glacier. Now I am > checking for the content > of this array. Because there are more of those arrays, I am getting all the > names out of a db. > > How is it possible to get the value and keep the name of the array dynamic? > > e.g: > Array name passed by post is: $glacier // > contains e.g. $glacier[0] = testname > Array with category names coming out of db is: $category // contains e.g. > $category[0] = glacier > > echo $categories[0]; // returns glacier > echo $glacier[0]; // returns testname > > I tryed $categories[0][0] but it returns only the first letter of glacier > (g) > > Any ideas?? > > Thanx, Andy > > > > > -- > 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] Change of Language
check out: setlocale() Greets, Edward - Original Message - From: "Nicolas Llamosas" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, February 05, 2002 4:13 PM Subject: [PHP] Change of Language > How can in change the language in my site? (spanish) > for example using the function date. (LANG?) > > Thanks > Nicolás Llamosas > > > _ > MSN Photos es la manera más sencilla de compartir, editar e imprimir sus > fotos favoritas. http://photos.latam.msn.com/Support/WorldWide.aspx > > > -- > 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] Create Mysql Records From a Comma separated Values String
$array_foo = explode(",", $foo); for ($i=0; $i To: <[EMAIL PROTECTED]> Sent: Wednesday, February 06, 2002 1:54 PM Subject: [PHP] Create Mysql Records From a Comma separated Values String > > Hi to everyone > > i have the following problem > > i have a string $foo which contains (n variable) comma separated values > (example "1,17,23,45") > and i want to insert these values in a mysql table . The destination field > is int type and i need to insert one record per value > > Do you know which php function(s) should i use in order to (loop -extract > the values from string) and do that ?? > > Thanks in advance for your help > > regars > > simos > > > -- > 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] Regex function needed
I don't know if this is the best way but: $str = "This is or was a test for short words"; while (ereg(" [a-z]{1,3} ", $str)) { $str = eregi_replace(" [a-z]{1,3} ", " ", $str); } print $str; this replaces all occurences of a space followed by 1,2 or 3 alphabetic characters followed by a space... the reason why it's performed in a while loop is because of two or more short words following each other and thus sharing a space... Greets, Edward - Original Message - From: "Michael Kimsal" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 07, 2002 11:58 PM Subject: [PHP] Regex function needed > Looking for a regex (preg or ereg) to remove > all 1, 2 and 3 character words. > > > -- > 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] Regex function needed
this might even work beter, to take comma's and periods etecetera into account to: $str = "This is or was a test for short words, although an, should be deleted to."; while (ereg(" [a-z]{1,3} ", $str)) { $str = eregi_replace(" [a-z']{1,3}([ ]{1}|[,]{1}|[.]{1}|[:]{1})", "\\1", $str); } or even this for comma's etcetera before the words: $str = "This is or was a test for short words, although an, should be deleted to."; while (ereg(" [a-z]{1,3} ", $str)) { $str = eregi_replace("([ ]{1}|[,]{1}|[.]{1}|[:]{1})[a-z']{1,3}([ ]{1}|[,]{1}|[.]{1} |[:]{1})", "\\2", $str); } Greets, Edward print $str; - Original Message - From: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "Michael Kimsal" <[EMAIL PROTECTED]> Sent: Friday, February 08, 2002 12:33 AM Subject: Re: [PHP] Regex function needed > I don't know if this is the best way but: > > $str = "This is or was a test for short words"; > > while (ereg(" [a-z]{1,3} ", $str)) { > $str = eregi_replace(" [a-z]{1,3} ", " ", $str); > } > print $str; > > > this replaces all occurences of a space followed by 1,2 or 3 alphabetic > characters followed by a space... the reason why it's performed in a while > loop is because of two or more short words following each other and thus > sharing a space... > > > Greets, > > Edward > > > > - Original Message - > From: "Michael Kimsal" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, February 07, 2002 11:58 PM > Subject: [PHP] Regex function needed > > > > Looking for a regex (preg or ereg) to remove > > all 1, 2 and 3 character words. > > > > > > -- > > 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] Regex function needed
after some puzzling I came to this: $str = "One as a start. This is or was a test for short words, although an, should be deleted to."; $str = preg_replace(array("/\b[A-Za-z']{1,3}\b/", "/[ ]{1}([ ]{1}|[,]{1}|[.]{1}|[:]{1})/"), array("", "\\1"), $str); print $str; which means: first: replace all 1,2 or 3 character occurrences by nothing after that, replace all spaces that are followed by one comma, or one period, or one : by that comma, period or : hope this is what you wanted? Edward - Original Message - From: "Bas Jobsen" <[EMAIL PROTECTED]> To: "Michael Kimsal" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, February 08, 2002 1:10 AM Subject: Re: [PHP] Regex function needed > Op donderdag 07 februari 2002 23:58, schreef Michael Kimsal: > > Looking for a regex (preg or ereg) to remove > > all 1, 2 and 3 character words. > > $string="over deze regex loop ik nu al de hele dag en een uur te piekeren. 't > wil niet! of wel! l'a."; > $string=" ".$string; > while (preg_match("/\W\w{1,3}\W/i",$string)) > $string = preg_replace("/\W\w{1,3}\W/i", " ", $string); > $string=substr($string,1); > echo $string; > ?> > > -- > 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] Syntax ???
just quote the 'y' in your query: $ynumber = mysql_query("SELECT COUNT(*) As Cnt FROM responses WHERE response='y'"); Edward - Original Message - From: "Ron Clark" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 08, 2002 7:38 PM Subject: [PHP] Syntax ??? > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hello all again, > > Here is my line in my script: > $ynumber = mysql_query("SELECT COUNT(*) FROM responses WHERE > response=y"); > > But it returns a blank or empty. How do I convert this MySQL command > to PHP? > mysql> SELECT COUNT(*) FROM responses WHERE response="y"; > > In other words, how do I specify the "y" at the end without messing > up PHP? > > Thanks, > RC > > -BEGIN PGP SIGNATURE- > Version: PGP 7.1 > > iQA/AwUBPGQbIESpEYIqgLQzEQJr4wCeNiIhqHZYloLJWsvNr2ODustuPU0AoPw6 > ROvim3yCO9Z9GlyReg6pyMa9 > =D1uC > -END PGP SIGNATURE- > > > > > -- > 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] One more quickie
or: SELECT LEFT(date, 7) as YearAndMonth FROM table; Edward - Original Message - From: "val petruchek" <[EMAIL PROTECTED]> To: "PHP" <[EMAIL PROTECTED]> Sent: Saturday, February 09, 2002 2:28 PM Subject: Re: [PHP] One more quickie > > Don?t really want to bother you with these quickies - but: > > > > If i have a result from mysql that is a date (2002-02-09) - how do i > change > > that into a variable with only the first 7 characters (2002-02)? > > > > SELECT year(data), month (data) from table; > > Valentin Petruchek (aki Zliy Pes) > *** Cut the beginning *** > http://zliypes.com.ua > mailto:[EMAIL PROTECTED] > > > > > > -- > 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] Age
don't know if there is some "date_diff" -like function, but you can do it this way: $now = getdate(); $nw_year = $now["year"]; $nw_month = $now["mon"]; $nw_day = $now["mday"]; $chk_date = "09/02/1977"; list ($chk_day, $chk_month, $chk_year) = explode("/", $chk_date); print $nw_year; $age = $nw_year - $chk_year; if ($nw_month<$chk_month) $age--; if ($nw_month==$chk_month && $nw_day<$chkday) $age--; print "age: ".$age; assuming that the date : "dd/mm/" greets, edward - Original Message - From: "André Felix Miertschink" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, February 09, 2002 8:08 PM Subject: [PHP] Age > Could anybody find out the simplest method of calculating the age? > The date of birth is in the format string ('01/01/1977'). > > André > > > -- > 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] possible bug in date() function
it was last week though... guesss you mean 29th? Edward "LaserJetter" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Using the code below: > > $buffer['Last_access'] = 1013336429; > $date = date("H:i D, nS M Y",$buffer['Last_access']); > print $date; > > prints "10:20 Sun, 2th Feb 2002" > I didnt know there was a 2th of February!! > > Is this a bug and do I get a prize for finding it? ;o) > > LJ > > > > > -- > 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] printing files
just put the lines in an array, each array element contains a line... and then just print the specified array elements... Edward - Original Message - From: "John Gurley" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, February 13, 2002 12:55 PM Subject: [PHP] printing files > Just a quick question, > is there a way to echo in your php code lines of a file that you specify. > i.e. you want to output lines 1,4,7 of a certain text file > Thanks > John > > > > _ > Join the world's largest e-mail service with MSN Hotmail. > http://www.hotmail.com > > > -- > 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] Tricky variable question! Impossible??
Well, as long as you use double quotes: " the variables will be parsed inside you statement... single quotes however mean the exact string... example: $icon = "1.jpg"; $str = "this is the image $icon"; $str2 = 'this is the image $icon'; print $str; // returns: "this is the image 1.jpg" print $str2; // returns: "this is the image $icon" Greets, Edward - Original Message - From: "Andy" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, February 16, 2002 6:03 PM Subject: [PHP] Tricky variable question! Impossible?? > Hi guys, > > I am not sure if this is possible. Not on my knowledge, but maybe someone is > smarter than I am :-) > > I want to pass an icon to a function. Therefore I am putting all the html > into a var called icon. > Inside this html their is another variable with an array which value is set > inside the function. > > How can I pass this html thing and ensure that the variable is gonna be set? > Take a look at the code underneath. > Like that it is just printing out $picture_id[$i] > > $icon_1 = "onclick=\"return confirm('Are you sure you want to delete picture no: > $picture_id[$i]');\"> >alt=\"delete\"> > "; > > Can anybody help on this? > > Thanx for any help > > Cheers Andy > > > > -- > 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] regular expressions
first of all: why do you use: [0-9][0-9]*... you better use: [0-9]+ then same goes for \w and I guess you don't need the ('s and )'s either... Edward - Original Message - From: "German Castro Donoso" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 21, 2002 5:26 PM Subject: [PHP] regular expressions > I have a problem with ereg function. > In php 4.0.5 i use this > if ( ereg("([0-9][0-9]*)\|(\w\w*)",$opcion, $registros) ) { > ... > } > and no problem. But, in php 4.1.1 don't work. I think that may be the escape > of | character. > > Note: I'm looking for a | in the string. Then i need escape the | > > Any idea for fix it? > > > > Thanks > German Castro > > > > -- > 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