Re: [PHP] mysql_fetch_row win32 to Linux
Like this $myquery = SELECT * FROM xpackage; print pmyquery = $myquery/p; $myresult = mysql_query($myquery); while($myrowz = mysql_fetch_row($myresult)){ print p . $myrowz[0] . /p; } [EMAIL PROTECTED] wrote: on 1/12/02 11:45 AM, sundogcurt at [EMAIL PROTECTED] wrote: myquery = SELECT * FROM xpackage Warning: Supplied argument is not a valid MySQL result resource in /path to page with error/default.php on line 5 Line 5 is this part while($myrowz = mysql_fetch_row($myresult)){ this tells me that $myresult is not a valid mysql result resource identifier. how do you obtain $myresult? -- mike cullerton
Re: [PHP] Piping data into a select box
Thank's for the help! Dean - Original Message - From: Jimmy [EMAIL PROTECTED] To: Dean Householder [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Sunday, January 13, 2002 12:33 AM Subject: Re: [PHP] Piping data into a select box Hi Dean, Does anyone know how to give a select pulldown box a default value from a PHP variable? ? function generate_option_list ($key_value,$set) { // This function will return option list and set the selected attribute // $key_value : the associative array which contain the key and the value for each option // $set : the value to be selected by deafult // // Usage: for example we want to have a dropdown list of month, and set February as selected // // $key_value=array(01=January,02=February,...); // $option_list=generate_option_list($key_value,02); // //$option_list now contain text option value='01'January/option // // option value='02' selectedFebruary/option // // NOTE: This will only create the OPTION tag, without the SELECT tag // while ( list($key,$value) = each($key_value) ) { if ($key==$set) {$var.=option value='$key' selected$value/option;} else {$var.=option value='$key'$value/option;} } return $var; } ? -- Jimmy Leave loved ones with loving words, it may be the last time you see them -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Time Zone Offset?
Marvin Sanders [EMAIL PROTECTED] wrote: I'm using the PHP date() function on my site, but since my hosting company (Pair Networks) is on the East Coast and I'm on the West Coast, everything shows as three hours later (for most of my visitors, anyway). Pair tells me there's no setting I can make on my account to change the server time zone. Can anyone recommend a way to set an offset for the date() function in PHP? (I searched on php.net and couldn't find anything.) putenv(TZ=PST8PDT); jim -- PHP General Mailing List (http://www.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] Send output before header location
On Wednesday 09 January 2002 11:55, Alawi wrote: How can I output before send header I see some site some output and after that it Jump to other site !! Is that maked by header localtion ?? No, they're using a meta tag in the head section. Quoted from wdg-html-reference: META HTTP-EQUIV=Refresh CONTENT=10; URL=../ tells the browser to load ../ 10 seconds after the current document has finished loading. Not all browsers support this, so authors should provide an alternate means of moving to the new page where necessary. The Refresh header is sometimes used for splash screens or when a page has moved, but the technique is not very effective since users may not even be looking at the window that is to be refreshed and since it messes up the user's history on many browsers. Some search engines penalize pages that use a Refresh of a few seconds or less. -- Meir Kriheli -- PHP General Mailing List (http://www.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] CSS Editors
Are there any good CSS Editors. Something that will tell you to which browsers you are compatible while you write the CSS and such? berber -- PHP General Mailing List (http://www.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] CSS Editors
TopStyle - http://www.bradsoft.com Maciek -Original Message- From: Boaz Yahav [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 13, 2002 12:28 PM To: [EMAIL PROTECTED] Subject: [PHP] CSS Editors Are there any good CSS Editors. Something that will tell you to which browsers you are compatible while you write the CSS and such? -- PHP General Mailing List (http://www.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] Trailing Navigation In PHP MySQL
Im relatively new to PHP, and for one section of my site - I am creating a review database. Im working on designing how I want the navigation. I think the most effective way would be a trailing Navigation (ie Top Category 1 SubCategory 2). I've set up my MySQL Database with names of categories and and associative IDs. Can anyone help me to get jumpstarted? Thanks. Steph
Re: [PHP] Redeclaring functions
Arve PHP has variable function names: $myfunc = this_is_a_func ; $foo = $myfunc( ) ; This way, you can make a single function call access a number of different functions at run time. You can't change the declaration, but you can change the call... You don't really say what you are planning to do, but I would have thought this approach should meet most requirements. I find it very useful. Also, as I am sure you know, there are a number of ways of making the number of parameters dynamic - probably the simplest is to standardise on a single array as a param, and stick any values you need inside that. I find that PHP is great for very late binding - there is usually a way if you look for it... Geoff Caplan Advantae Ltd As a small, personal, enjoy-myself-project I'd like to run a perpetual-running socket server. Problem is; I also want it to be self-modifying so I can insert, remove and change functions as the server is running. The problem is; under normal circumstances, PHP won't let the script redeclare functions. Is there any way to circumvent this. -- PHP General Mailing List (http://www.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] 404 Redirection
Hey people, Probably a quick and simple question, but if I have the usuall in my script: -- PHP General Mailing List (http://www.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] 404 Redirection
Try that again, without pressing ctrl-enter this time!! As I said, I have got the usual script: ? if(isset($action)) { $include = $action; } else { $include = home; } include($include. .inc); ? but, how do I put in a custom error page instead of seeing: Warning: Unable to access anyotherpage.inc in /var/virt/home/stuffwefound-co-uk/public_html/index.php on line 70 Warning: Failed opening 'anyotherpage.inc' for inclusion (include_path='') in /var/virt/home/stuffwefound-co-uk/public_html/index.php on line 70 I have got an error page for any other url i.e. apagenotfound.php but I dont know how to overcome the above. Thanks in advance Lee
Re: [PHP] Record Paging Using Arrays
Why don't you ask the question on a SQL Server list? This isn't a put down, or an attempt to shove you away, but if you can do this in MSFT's TRANSACT-SQL you will be offloading the work to the database engine which is designed to do it. Alternately, can you use two queries, the first which uses TOP, and a second which also uses top and fetches greater than previous result. That would also have the advantage of returning small data sets, faster. Regards - Miles Thompson At 03:24 PM 1/12/2002 -0400, Joe Van Meer wrote: Hi there, I have a small php/data driven website and would like to incorporate record paing. Unfortunately I'm working with sql Server temporarily, but I'm still required to do this. So since I wasn't allowed to use the handy LIMIT in my sql statement I figured I'd dump my results into a mulitdiensional array and navigate through the records that way. I know this propbabbly isn't the best method, but it's the way I have to do it for now. I've managed to display my records out of the array, but would now like to incorporate a next' and a 'previous' button to navigate through the array. Can someone take a look at my code below and tell me how I'm to go about doing this? I thought maybe by having 2 functions that would advance my array pointer and another to retreat the pointer would do the trick. I'm unsure how to incorporate it. I've added two functions within the below, not sure if they are appropriate or not though. Thx Joe :) Code: if(!isset($consultantarray)){ //connect to db $connectionToDB = odbc_connect(cdxcffcoltant, jo7gecon, josje7con); //create query statement $sqls = SELECT consultantid, firstname, lastname, city, stateprovince, country, category, yearsexp FROM CONSULTANT WHERE category ='$category' ORDER BY yearsexp DESC ; //execute the sql statement (query) on the connection made $resultset = odbc_do($connectionToDB, $sqls); //initialize the consultant arrays $consultantdetailsarray[] = array(); $consultantarray[] = array(); //initialize a variable to zero for start of array below in while loop $x = 0; // while there is still results fetch the data from the database --- while loop while(odbc_fetch_row($resultset)){ $consultantdetailsarray[0] = odbc_result($resultset, 1); $consultantdetailsarray[1] = odbc_result($resultset, 2); $consultantdetailsarray[2] = odbc_result($resultset, 3); $consultantdetailsarray[3] = odbc_result($resultset, 4); $consultantdetailsarray[4] = odbc_result($resultset, 5); $consultantdetailsarray[5] = odbc_result($resultset, 6); $consultantdetailsarray[6] = odbc_result($resultset, 7); $consultantdetailsarray[7] = odbc_result($resultset, 8); //dump each consultant into the new array called $consultantarray $consultantarray[$x] = $consultantdetailsarray; //increment to next element of array $x++; } } * function nextFive($array, $number){ for ($counter = 0; $counter $number; $counter++){ next($array); } } function previousFive($array, $number){ for ($counter = 0; $counter $number; $counter++){ prev($array); } } * //loop through the elements of retrieved array (2nd one holding the consultant details) //second loop to grab through $consultant details array elements foreach($consultantarray as $y){ list($cid, $firstname, $lastname, $city, $stateprovince, $country, $category, $yearsexp) = $y; print trtd align=leftfont color='#663399' face='verdana' size=2a href='consultantdetails.php?cid= . $cid . ' . $firstname . . $lastname . /a/font/tdtd align=leftfont color='#663399' face='verdana' size=2 . $city . /font/tdtd align=leftfont color='#663399' face='verdana' size=2 . $stateprovince . /font/tdtd align=leftfont color='#663399' face='verdana' size=2 . $country . /font/tdtd align=leftfont color='#663399' face='verdana' size=2 . $category . /font/tdtd align=leftfont color='#663399' face='verdana' size=2 . $yearsexp . /font/td/tr; } -- PHP General Mailing List (http://www.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] include with call
Hello, I have a file which does several different things depending on how its called Ie file?mode=show is to show it etc But I want to include the output from the show so I tried ?php include(file.php?mode=show); ? but this causes errors. It goes away with including as only file.php but doing that also causes problems because mode isnt set yet. Anyone know how to get around this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] php-win broke on 'OLEAUT32.DLL'
Hi all, I had my php4 working with apache 1.3x on my Windows2000 box. However, I installed software for my Kodak DC215 digital camera and it overwrote some files in the WINNT/system32 directory. Php suddenly became unusable. I'm getting an error 'unable to find dynamic link node...in file 'WINNT\system32\OLEAUT32.DLL'. I've tried removing all my php files and re-installing them, but it produces the same error. Any ideas how to fix this? Dennis -- PHP General Mailing List (http://www.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] New to list
Check out : http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=279 Sincerely berber Visit http://www.weberdev.com/ Today!!! To see where PHP might take you tomorrow. -Original Message- From: Andrew [mailto:[EMAIL PROTECTED]] Sent: Friday, January 11, 2002 2:05 AM To: [EMAIL PROTECTED] Subject: [PHP] New to list Hello to you all! I am new to this list and I have a question that maybe someone can help with In a script I am working on I have a math's equation : ((0.416 / $time) * 60) * 60) this out but a figure at goes to a about 10 decimal places I only want 2 decimal places and just can not figure out how to do this Any ideas would be great Thanks Andrew Web Harper Graphics www.webharpergraphics.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Authenticating via http
Check this out : http://www.weberdev.com/index.php3?GoTo=search.php3%3Fsearch%3Dauthentic ation%26searchtype%3Dtitle Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: Paul [mailto:[EMAIL PROTECTED]] Sent: Friday, January 11, 2002 9:49 AM To: [EMAIL PROTECTED] Subject: [PHP] Authenticating via http Here's a really quick question. I can't figure out how to try to get user authentication more than once. For instance, supposed I get this log on screen that asks for my username and password. If I type in something wrong that variable gets stuck in $PHP_AUTH_USER, and there is no way to unset it, so the user would be prompted again. Please help. Thanks ?php if (!isset($PHP_AUTH_USER)) { header(WWW-Authenticate: Basic realm=\My Realm\); header(HTTP/1.0 401 Unauthorized); echo Text to send if user hits Cancel button\n; exit; } else { //Check the database for user/password combination. Oh, not right? let's try again unset($PHP_AUTH_USER); //Doesn't work } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.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] Time Zone Offset?
Marvin, I'm using the PHP date() function on my site, but since my hosting company (Pair Networks) is on the East Coast and I'm on the West Coast, everything shows as three hours later (for most of my visitors, anyway). Pair tells me there's no setting I can make on my account to change the server time zone. =not competent to comment. Recommend a review of the php.ini file commands and even if you can't gain access to that file on the server, the function which allows you to make a change to the PHP environment for the life of the current script. Can anyone recommend a way to set an offset for the date() function in PHP? (I searched on php.net and couldn't find anything.) =I run an international service, and would have had a massive headache if each client was to see things stated in their own timezone. We agreed that each would make specifications in their own timezone (and language...) but that all system output would be in GMT. =To your question: read up on the time/date functions for GMT, convert all input and store all date/times as GMT; and at retrieval time convert time/dates from GMT to whichever time zone you want to use. PS also takes care of bi-annual summer time discontinuities too (should they apply to you). =Regards, =dn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] I'm new - one page to another
You can start checking out examples on WeberDev.com :) Sincerely berber Visit http://www.weberdev.com/ Today!!! To see where PHP might take you tomorrow. -Original Message- From: universal2001 [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 09, 2002 9:28 AM To: [EMAIL PROTECTED] Subject: [PHP] I'm new - one page to another Hi! I'm new to PHP and I have tried to find the answer to my questions but I still have no luck. I'm trying to make a page which is based on the data that I retrieved from my database. now, I want to make a link (text) to a new page but I want to pass my variable also. I don't have any form at all so .. how do I pass avariable through a text link which is being clicked. thanks for reviewing my email any answer is greatly appriciated. -- PHP General Mailing List (http://www.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] Maybe OT but I was wondering....
in Apache you can set this in the httpd.conf or in any .htaccess file : ErrorDocument 404 http://www.weberdev.com/404.php3 Sincerely berber Visit http://www.weberdev.com/ Today!!! To see where PHP might take you tomorrow. -Original Message- From: Ben Turner [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 08, 2002 10:37 PM To: [EMAIL PROTECTED] Subject: [PHP] Maybe OT but I was wondering I am trying to set up a completely dynamic site using php and a mysql backend. I am trying to find somewhere that I can identify a custom 404 error page and then pull the page based on the document directory. Problem is, is this even possible in PHP? I haven't found too much related to custom 404 pages done in php. So I was thinking, if anyone knows some information on this topic, might you have a url or maybe a book title that I could check out to research this a bit further? thanks for your help Ben -- PHP General Mailing List (http://www.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] 404 Redirection
on 1/13/02 6:07 AM, FiShcAkE at [EMAIL PROTECTED] wrote: Try that again, without pressing ctrl-enter this time!! As I said, I have got the usual script: ? if(isset($action)) { $include = $action; } else { $include = home; } include($include. .inc); ? but, how do I put in a custom error page instead of seeing: if i understand what you are asking, you might try something like if (is_file($include. .inc)) { include($include. .inc); } else { include(custom_error.inc); } you may need to execute is_file($include. .inc) inside a loop so that it checks in all your inlude_directories. foreach($dirs as $dir) { if (is_file($dir.'/'.$include. .inc)) { blahblahblah } otherwise, if you know 'all' the valid files, you could create an array of filenames and compare $include to elements of the array. Warning: Unable to access anyotherpage.inc in /var/virt/home/stuffwefound-co-uk/public_html/index.php on line 70 Warning: Failed opening 'anyotherpage.inc' for inclusion (include_path='') in /var/virt/home/stuffwefound-co-uk/public_html/index.php on line 70 I have got an error page for any other url i.e. apagenotfound.php but I dont know how to overcome the above. Thanks in advance Lee -- mike cullerton michaelc at cullerton dot com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: include with call
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (John Cuthbert) wrote: I have a file which does several different things depending on how its called Ie file?mode=show is to show it etc But I want to include the output from the show so I tried ?php include(file.php?mode=show); ? but this causes errors. It goes away with including as only file.php but doing that also causes problems because mode isnt set yet. $mode='show'; include(file.php); Include() brings in the content of a file just as if you'd copy/pasted it there. It's not an HTTP GET request. -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] 4.1.1 Causes Signal 11 On FreeBSD 4.5 / Apache 1.3.22
Hello I am experiencing a lot of Signal 11's when I compile PHP 4.1.1 into my Apache server on my FreeBSD 4.5-RC machine. If I compile the -exact- same Apache configuration with PHP 4.0.6, it works fine. As soon as I switch to 4.1.1, it causes Signal 11's (and sometimes 10's) when I load certain pages. It seems that it crashes when the pages have mySQL database access on them and are fairly complex (I was thinking perhaps a memory problem?) The machine that it runs on is, hardware wise, very stable - it's been using the same memory, processor, hard drive and motherboard for almost a year with no problems, and no other daemons crash or cause any signals at all. Has anyone else experienced this problem? Any ideas on what may be the cause? Here's the line that I used to configure PHP (so you can see what modules I'm installing): ./configure --with-apache=../apache_1.3.22 --enable-safe-mode --with-exec-di r=/usr/local/bin --enable-bcmath --enable-calendar --with-jpeg-dir=/usr/loca l --with-ftp --with-gd=/usr/local --with-png-dir=/usr/local --with-ttf=/usr/ local --with-mysql=/usr/local --with-curl=/usr/local --with-zlib-dir=/usr/lo cal --with-freetype-dir=/usr/local --with-pear --with-mcrypt --with-dom=/usr /local --with-pcre Any help is greatly appreciated. Thanks. Tim smime.p7s Description: application/pkcs7-signature
Re: [PHP] 4.1.1 Causes Signal 11 On FreeBSD 4.5 / Apache 1.3.22
I am experiencing a lot of Signal 11's when I compile PHP 4.1.1 into my Apache server on my FreeBSD 4.5-RC machine. If I compile the -exact- same Apache configuration with PHP 4.0.6, it works fine. As soon as I switch to 4.1.1, it causes Signal 11's (and sometimes 10's) when I load certain pages. It seems that it crashes when the pages have mySQL database access on them and are fairly complex (I was thinking perhaps a memory problem?) You somtimes get 10's? That's a SIGUSR1 and not something that will take down your server. It would actually cause a graceful restart of Apache, but I don't see how anything we do in PHP could cause spurious sig10's. Get a backtrace of one of the sig11's. Without that there isn't much hope of us tracking this down. -Rasmus -- PHP General Mailing List (http://www.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] Setting up an XML platform/website
Is anyone interested in setting up an XML platform for PHP, where the use of XML is explained, with sample PHP/XML applications and in-depth real live tutorials? Since lot's of people underestimate the power of XML. Maybe, it's nice to be ready when Microsoft's dotNet crashes in and launches an new XML era. Anyone wants to help building such an platform/website? Sincerly, Emile -- PHP General Mailing List (http://www.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] Newbie database question
I am entering info from form into database, is there a way to check say firstname, lastname and address to see if it is a duplicate to what is already in database and if it is then just enter any new information they may enter and not create a new entry -- PHP General Mailing List (http://www.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] Newbie database question
Which database are you using? Dean Ouellette wrote: I am entering info from form into database, is there a way to check say firstname, lastname and address to see if it is a duplicate to what is already in database and if it is then just enter any new information they may enter and not create a new entry -- Sliante, Richard S. Crawford mailto:[EMAIL PROTECTED] http://www.mossroot.com AIM: Buffalo2K ICQ: 11646404 Yahoo!: rscrawford MSN: [EMAIL PROTECTED] When you have lost the ability to laugh at yourself, you have lost the ability to think straight. --Clarence Darrow Push the button, Max! -- PHP General Mailing List (http://www.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] Newbie database question
MySql At 10:10 AM 1/13/2002 -0800, Richard Crawford wrote: Which database are you using? Dean Ouellette wrote: I am entering info from form into database, is there a way to check say firstname, lastname and address to see if it is a duplicate to what is already in database and if it is then just enter any new information they may enter and not create a new entry -- Sliante, Richard S. Crawford mailto:[EMAIL PROTECTED] http://www.mossroot.com AIM: Buffalo2K ICQ: 11646404 Yahoo!: rscrawford MSN: [EMAIL PROTECTED] When you have lost the ability to laugh at yourself, you have lost the ability to think straight. --Clarence Darrow Push the button, Max! -- PHP General Mailing List (http://www.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] Newbie database question
on 1/13/02 10:51 AM, Dean Ouellette at [EMAIL PROTECTED] wrote: I am entering info from form into database, is there a way to check say firstname, lastname and address to see if it is a duplicate to what is already in database and if it is then just enter any new information they may enter and not create a new entry i'm definitely not an expert on this stuff, but here are some things to think about... on way to keep duplicates from being entered, is to make every (firstname, lastname, address) triplet unique in your database. in mysql, this would be something like ALTER TABLE table_name ADD UNIQUE some_unique_name(firstname, lastname, address); this may not be a good thing though. there may be instances where two folks exist with the same firstname,lastname, address. father/son and mother/daughter perhaps. if you just want to check, you can do something like SELECT id FROM table WHERE firstname = '$firstname' and lastname = '$lastname' and address = '$address'; if you get an id, then a record already exists. the problem with this, is data entry. depending on who is typing the stuff in a form, they may not type/spell it exactly the same each time. you may need to figure out some other unique identifier to determine if it's the 'same' person. hope this helps, mike -- mike cullerton -- PHP General Mailing List (http://www.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] Newbie database question
I don't think that there's an easy way to do it in MySQL. I usually use some hack along the lines of, select x from t where x = $y, and if there are any results returned, return a message of some sort (That value already exists in the database!). Bear in mind that sometimes people have very similar contact information. At the university where I used to work, there were two employees who shared the same first, middle, and last names, as well as birth dates, and their social security numbers differed by exactly one digit. A rare circumstance, to be sure, but not impossible. Dean Ouellette wrote: MySql At 10:10 AM 1/13/2002 -0800, Richard Crawford wrote: Which database are you using? Dean Ouellette wrote: I am entering info from form into database, is there a way to check say firstname, lastname and address to see if it is a duplicate to what is already in database and if it is then just enter any new information they may enter and not create a new entry -- Sliante, Richard S. Crawford mailto:[EMAIL PROTECTED] http://www.mossroot.com AIM: Buffalo2K ICQ: 11646404 Yahoo!: rscrawford MSN: [EMAIL PROTECTED] When you have lost the ability to laugh at yourself, you have lost the ability to think straight. --Clarence Darrow Push the button, Max! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Sliante, Richard S. Crawford mailto:[EMAIL PROTECTED] http://www.mossroot.com AIM: Buffalo2K ICQ: 11646404 Yahoo!: rscrawford MSN: [EMAIL PROTECTED] When you have lost the ability to laugh at yourself, you have lost the ability to think straight. --Clarence Darrow Push the button, Max! -- PHP General Mailing List (http://www.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] Decryption
Is there a method for decrypting encrypted things by md5? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: include with call
Thanks :) Cc Zona [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... In article [EMAIL PROTECTED], [EMAIL PROTECTED] (John Cuthbert) wrote: I have a file which does several different things depending on how its called Ie file?mode=show is to show it etc But I want to include the output from the show so I tried ?php include(file.php?mode=show); ? but this causes errors. It goes away with including as only file.php but doing that also causes problems because mode isnt set yet. $mode='show'; include(file.php); Include() brings in the content of a file just as if you'd copy/pasted it there. It's not an HTTP GET request. -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] anyone with a usenet editor
Hi, I'm building a database of usenet postings for soc.culture.brazil. This was easy enough (with exception of handling mime in the postings); I'm just dumping the body of the message into the database. I plan to allow a person to select a thread, perhaps a user or whatever and then get all relevant/selected posts and enter them into a textarea box for insertion into another table which I'm thinking to organize by question/answer. I imagine the heavy use of a frames and javascript to make this as easy to use as possible. I'm wondering if anyone who reads the above might say hey .. this sounds like ... You can see my beginning of this here: http://www.readbrazil.com/ Thanks, Peter --- Reality is that which, when you stop believing in it, doesn't go away. -- Philip K. Dick -- PHP General Mailing List (http://www.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] Decryption
John Cuthbert wrote: Is there a method for decrypting encrypted things by md5? No. MD5 is a one-way hash, *not* a form of encryption. A hash is specifically designed so that it is impractical to find the input string, given the output string. If you need to encrypt/decrypt, look at the mcrypt extension and use 3DES or one of the other symmetrical encryption algorithms. HTH, --Joe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
php-general Digest 13 Jan 2002 19:37:23 -0000 Issue 1109
php-general Digest 13 Jan 2002 19:37:23 - Issue 1109 Topics (messages 80335 through 80368): Send output before header location 80335 by: Alawi 80336 by: David 80340 by: Meir Kriheli Re: mysql_fetch_row win32 to Linux 80337 by: sundogcurt Re: Piping data into a select box 80338 by: Dean Householder Re: Time Zone Offset? 80339 by: Jim Winstead 80352 by: DL Neil CSS Editors 80341 by: Boaz Yahav 80342 by: Maciej Uhlig Trailing Navigation In PHP MySQL 80343 by: steph.philedom2k.com Re: Redeclaring functions 80344 by: Geoff Caplan 404 Redirection 80345 by: FiShcAkE 80346 by: FiShcAkE 80355 by: mike cullerton Re: Record Paging Using Arrays 80347 by: Miles Thompson include with call 80348 by: John Cuthbert 80356 by: CC Zona 80366 by: John Cuthbert php-win broke on 'OLEAUT32.DLL' 80349 by: drobinson Re: New to list 80350 by: Boaz Yahav Re: Authenticating via http 80351 by: Boaz Yahav Re: I'm new - one page to another 80353 by: Boaz Yahav Re: Maybe OT but I was wondering 80354 by: Boaz Yahav 4.1.1 Causes Signal 11 On FreeBSD 4.5 / Apache 1.3.22 80357 by: Tim Gustafson 80358 by: Rasmus Lerdorf Setting up an XML platform/website 80359 by: Emile Bosch Newbie database question 80360 by: Dean Ouellette 80361 by: Richard Crawford 80362 by: Dean Ouellette 80363 by: mike cullerton 80364 by: Richard Crawford Decryption 80365 by: John Cuthbert 80368 by: Joe Conway anyone with a usenet editor 80367 by: Peter J. Schoenster Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- ---BeginMessage--- How can I output before send header I see some site some output and after that it Jump to other site !! Is that maked by header localtion ?? ---End Message--- ---BeginMessage--- How can I output before send header I see some site some output and after that it Jump to other site Is that maked by header localtion ?? no, if there\'s output first, then it\'s not using header(\Location: whatever.php\), because headers MUST be sent before any other output to the browser. there are other ways to redirect a user to another page: for example: meta HTTP-EQUIV=\REFRESH\ content=\0; url=http://www.yourdomain.com/index.html\; you could use some javascript to do it too. ---End Message--- ---BeginMessage--- On Wednesday 09 January 2002 11:55, Alawi wrote: How can I output before send header I see some site some output and after that it Jump to other site !! Is that maked by header localtion ?? No, they're using a meta tag in the head section. Quoted from wdg-html-reference: META HTTP-EQUIV=Refresh CONTENT=10; URL=../ tells the browser to load ../ 10 seconds after the current document has finished loading. Not all browsers support this, so authors should provide an alternate means of moving to the new page where necessary. The Refresh header is sometimes used for splash screens or when a page has moved, but the technique is not very effective since users may not even be looking at the window that is to be refreshed and since it messes up the user's history on many browsers. Some search engines penalize pages that use a Refresh of a few seconds or less. -- Meir Kriheli ---End Message--- ---BeginMessage--- Like this $myquery = SELECT * FROM xpackage; print pmyquery = $myquery/p; $myresult = mysql_query($myquery); while($myrowz = mysql_fetch_row($myresult)){ print p . $myrowz[0] . /p; } [EMAIL PROTECTED] wrote: on 1/12/02 11:45 AM, sundogcurt at [EMAIL PROTECTED] wrote: myquery = SELECT * FROM xpackage Warning: Supplied argument is not a valid MySQL result resource in /path to page with error/default.php on line 5 Line 5 is this part while($myrowz = mysql_fetch_row($myresult)){ this tells me that $myresult is not a valid mysql result resource identifier. how do you obtain $myresult? -- mike cullerton ---End Message--- ---BeginMessage--- Thank's for the help! Dean - Original Message - From: Jimmy [EMAIL PROTECTED] To: Dean Householder [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Sunday, January 13, 2002 12:33 AM Subject: Re: [PHP] Piping data into a select box Hi Dean, Does anyone know how to give a select pulldown box a default value from a PHP variable? ? function generate_option_list ($key_value,$set) { // This function will return option list and set the selected attribute // $key_value : the associative array which contain the key and the value for each option // $set : the value to be selected by deafult // // Usage: for example we want to have a
[PHP] convert yyyy/mm/dd to mm/dd/yyyy, how?
Hello everybody, convert /mm/dd to mm/dd/, how? MYSQL does everything in /mm/dd. I live in the Netherlands and we are use to the format dd/mm/. What's the best way to display it as mm/dd/ in a table on a query? My first idea whas to split the date up in vars in php and then print the vars in the way I like it Is this a bad idea? Or are there better sollutions? Thanx in advance for answering! -- Met vriendelijke groet / With Greetings, Sander Peters site: http://www.visionnet.nl/ email: mailto:[EMAIL PROTECTED] webmail: mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] convert yyyy/mm/dd to mm/dd/yyyy, how?
Hiya, Personally, I use the following bit of code. All it does is take a 14 digit timestamp and convert it into a unix timestamp: function date($date) { //Extract the parts from the date $year = substr($date, 0, 4); $month = substr($date, 4, 2); $day = substr($date, 6, 2); $hour = substr($date, 8, 2); $min = substr($date, 10, 2); $sec = substr($date, 10, 2); //return the unix timestamp for the date passed return (gmmktime($hour, $min, $sec, $month, $day, $year)); } From then on, you can use the date function in PHP to manage the date. There are also ways to do it using the SQL command (DATE_FORMATE() I think is one), but you'll have to read the manual for into on that. At 20:56 13/01/2002 +0100, Sander Peters wrote: Hello everybody, convert /mm/dd to mm/dd/, how? MYSQL does everything in /mm/dd. I live in the Netherlands and we are use to the format dd/mm/. What's the best way to display it as mm/dd/ in a table on a query? My first idea whas to split the date up in vars in php and then print the vars in the way I like it Is this a bad idea? Or are there better sollutions? Thanx in advance for answering! -- Met vriendelijke groet / With Greetings, Sander Peters site: http://www.visionnet.nl/ email: mailto:[EMAIL PROTECTED] webmail: mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] // Jonathan Wright // [EMAIL PROTECTED] // GCS d- s: a-- C++(+) US P+++ L+ E W+++ !N w !O M- V- PS+@ PE+ //Y PGP t+ !5 X R- tv(-) b(+) DI D+(++) G h-- r-- z--(++) -- PHP General Mailing List (http://www.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] convert yyyy/mm/dd to mm/dd/yyyy, how?
on 1/13/02 12:56 PM, Sander Peters at [EMAIL PROTECTED] wrote: My first idea whas to split the date up in vars in php and then print the vars in the way I like it Is this a bad idea? Or are there better sollutions? that's the way i do it. i have 2 functions i use all the time for getting dates in and out of mysql using $month,$day,$year. for any project, i also create functions for formatting $month,$day,$year however the customer requires the output. -- mike cullerton -- PHP General Mailing List (http://www.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] Decryption
On Sun, 13 Jan 2002, John Cuthbert wrote: Is there a method for decrypting encrypted things by md5? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] Brute force. MD5 is a one way hashing Algorithm which means it was NOT designed for encryption but it can be used that way. Thank you, Steve Maroney -- PHP General Mailing List (http://www.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] Newbie database question
On 13 Jan 2002, at 12:51, Dean Ouellette wrote: I am entering info from form into database, is there a way to check say firstname, lastname and address to see if it is a duplicate to what is already in database and if it is then just enter any new information they may enter and not create a new entry If using mysql you can use REPLACE rather than insert (if you also pass a unique key/value with your statement). Of course you have some means of identifying a record. Perhaps it is a combo of firstname, lastname and address but that's not very good. I recall having this situation appear for me in the past ... I think it may be an error in design when one cannot be sure if it's an INSERT for a new record or an UPDATE to an existing record. Perhaps you could dissuage me otherwise with your example. Peter --- Reality is that which, when you stop believing in it, doesn't go away. -- Philip K. Dick -- PHP General Mailing List (http://www.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] convert yyyy/mm/dd to mm/dd/yyyy, how?
MySQL has plenty of functions to return dates to you in any format you specify. Please read http://mysql.com/documentation/mysql/bychapter/manual_Reference.html#Date_and_time_functions and pay special attention to the DATE_FORMAT() function. -Rasmus On Sun, 13 Jan 2002, Sander Peters wrote: Hello everybody, convert /mm/dd to mm/dd/, how? MYSQL does everything in /mm/dd. I live in the Netherlands and we are use to the format dd/mm/. What's the best way to display it as mm/dd/ in a table on a query? My first idea whas to split the date up in vars in php and then print the vars in the way I like it Is this a bad idea? Or are there better sollutions? Thanx in advance for answering! -- Met vriendelijke groet / With Greetings, Sander Peters site: http://www.visionnet.nl/ email: mailto:[EMAIL PROTECTED] webmail: mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: [PHP-DB] Re: [PHP] convert yyyy/mm/dd to mm/dd/yyyy, how?
Rasmus, I have held several datetime-related conversations with people recently, and another series about 'when'/whether to use PHP or MySQL functionality. Here you are, the man of PHP, advising Sander to use MySQL functionality! (and in marked contrast to the (biased) advice one might expect on PHP lists, eg JDEW's reply) I'm grinning at the apparent incongruity, but with no insult to yourself. Would you care to comment further on when one should consider using SQL commands in favor of implementing identical functionality in PHP (and possibly in some situations, vice-versa)? Regards, =dn - Original Message - From: Rasmus Lerdorf [EMAIL PROTECTED] To: Sander Peters [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: 13 January 2002 19:52 Subject: [PHP-DB] Re: [PHP] convert /mm/dd to mm/dd/, how? MySQL has plenty of functions to return dates to you in any format you specify. Please read http://mysql.com/documentation/mysql/bychapter/manual_Reference.html#Date_and_time_functions and pay special attention to the DATE_FORMAT() function. -Rasmus On Sun, 13 Jan 2002, Sander Peters wrote: Hello everybody, convert /mm/dd to mm/dd/, how? MYSQL does everything in /mm/dd. I live in the Netherlands and we are use to the format dd/mm/. What's the best way to display it as mm/dd/ in a table on a query? My first idea whas to split the date up in vars in php and then print the vars in the way I like it Is this a bad idea? Or are there better sollutions? Thanx in advance for answering! -- Met vriendelijke groet / With Greetings, Sander Peters site: http://www.visionnet.nl/ email: mailto:[EMAIL PROTECTED] webmail: mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.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] strtok bug
Hi, does anybody know when the strtok bug introduced in 4.1.1 will be fixed ? Will we have a 4.1.2 or should I try to grab a cvs tree (assuming that it is already solved) ? thanks. __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: [PHP-DB] Re: [PHP] convert yyyy/mm/dd to mm/dd/yyyy, how?
You use the right tool for the job. MySQL is going to have to format the date field for the return anyway. It makes sense to simply tell MySQL your preferred format instead of having it returned to you in the wrong format and then you having to apply more gear to get it into the right one. -Rasmus On Sun, 13 Jan 2002, DL Neil wrote: Rasmus, I have held several datetime-related conversations with people recently, and another series about 'when'/whether to use PHP or MySQL functionality. Here you are, the man of PHP, advising Sander to use MySQL functionality! (and in marked contrast to the (biased) advice one might expect on PHP lists, eg JDEW's reply) I'm grinning at the apparent incongruity, but with no insult to yourself. Would you care to comment further on when one should consider using SQL commands in favor of implementing identical functionality in PHP (and possibly in some situations, vice-versa)? Regards, =dn - Original Message - From: Rasmus Lerdorf [EMAIL PROTECTED] To: Sander Peters [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: 13 January 2002 19:52 Subject: [PHP-DB] Re: [PHP] convert /mm/dd to mm/dd/, how? MySQL has plenty of functions to return dates to you in any format you specify. Please read http://mysql.com/documentation/mysql/bychapter/manual_Reference.html#Date_and_time_functions and pay special attention to the DATE_FORMAT() function. -Rasmus On Sun, 13 Jan 2002, Sander Peters wrote: Hello everybody, convert /mm/dd to mm/dd/, how? MYSQL does everything in /mm/dd. I live in the Netherlands and we are use to the format dd/mm/. What's the best way to display it as mm/dd/ in a table on a query? My first idea whas to split the date up in vars in php and then print the vars in the way I like it Is this a bad idea? Or are there better sollutions? Thanx in advance for answering! -- Met vriendelijke groet / With Greetings, Sander Peters site: http://www.visionnet.nl/ email: mailto:[EMAIL PROTECTED] webmail: mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP timesheets?
I can't get it to run... 1. The application keeps looking for the include files in the main path instead of the include dir. 2. The admin will not accept the default pass that is written in the INSTALL... Any ideas? Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: Christopher William Wesley [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 08, 2002 3:31 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] PHP timesheets? On Mon, 7 Jan 2002, Christian Calloway wrote: Are there any PHP coded timesheet type web application? And if so, what would we be suggested. Thanks, Take a look at these: http://freshmeat.net/search/?site=Freshmeatq=timesheet+phpsection=proj ects ~Chris /\ \ / September 11, 2001 X We Are All New Yorkers / \ rm -rf /bin/laden -- PHP General Mailing List (http://www.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] Invalid Email Characters
Hi, Could anybody confirm exactly which characters, if any, are NOT valid in an email address. Many Thanks Alexis -- PHP General Mailing List (http://www.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] Invalid Email Characters
Alexis, Could anybody confirm exactly which characters, if any, are NOT valid in an email address. =such rules of the Internet are laid out in documents called RFCs (initially they are Requests for Comment but once adopted become ...) You are looking for RFC822 (although there are others pertinent to email). Try http://www.freesoft.org/CIE/RFC/822/ =unfortunately beware, the 'rules' are honored as much in the breach as the observance...! =Regards, =dn -- PHP General Mailing List (http://www.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] Invalid Email Characters
On 13 Jan 2002, at 21:43, DL Neil wrote: Alexis, Could anybody confirm exactly which characters, if any, are NOT valid in an email address. =such rules of the Internet are laid out in documents called RFCs (initially they are Requests for Comment but once adopted become ...) You are looking for RFC822 (although there are others pertinent to email). Try http://www.freesoft.org/CIE/RFC/822/ =unfortunately beware, the 'rules' are honored as much in the breach as the observance...! You might want to look at the regular expression constructed by Jeffrey Friedl as described here: http://builder.cnet.com/webbuilding/pages/Programming/Scripter/05 2098/ss01.html Approaches range from simple to complex. On the high end, Jeffrey Friedl, in his book Mastering Regular Expressions (1997, O'Reilly Associates), presents an 11-page explanation of his 4,724-byte email-validation script. But in the interest of sanity, this regular expression will suffice for most situations And the rest of that page seems like a good, practical intro to validation. afaik, this is the book for regexes: Mastering Regular Expressions Powerful Techniques for Perl and Other Tools http://www.oreilly.com/catalog/regex/ I would reckon it and the RFC are the places to go for full understanding of the matter. Peter --- Reality is that which, when you stop believing in it, doesn't go away. -- Philip K. Dick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] How to get a function backtrace?
Hmm... I've been wondering if a function to do this exists too... would be REALLY handing for debugging!! Anyone know?? -Original Message- From: Stefan Rusterholz [mailto:[EMAIL PROTECTED]] Sent: Friday, January 11, 2002 8:35 PM To: PHP Subject: [PHP] How to get a function backtrace? Im not sure if function-backtrace is the correct word for what I need, so I'll explain: If I have for example ? a(); function a(){ b(); } function b(){ c(); } function c(){ $x = function_backtrace(); print_r($x); } ? then I want to get array( [0]= 'a', [1]= 'b', [2]= 'c' ) or something similar. So I want to know, what functions have been called. If you know perl, then adequate function was caller. I already searched php.net for it but had no luck for it - so if you please could point me to the right direction I was very happy. TIA Stefan Rusterholz
[PHP] beginer
Hi! somebody say me how work with sql server and code php? i try with the functions and the results are bad i need examples, please :( -- PHP General Mailing List (http://www.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] External Function
Is it possible to put all of my functions in a text file and just call it and use the functions in it? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] beginer
on 1/13/02 10:32 AM, Vania Lavielle Castro at [EMAIL PROTECTED] wrote: how work with sql server and code php? i try with the functions and the results are bad i need examples, please :( http://www.php.net/links.php -- mike cullerton -- PHP General Mailing List (http://www.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] External Function
on 1/13/02 10:06 AM, Cory at [EMAIL PROTECTED] wrote: Is it possible to put all of my functions in a text file and just call it and use the functions in it? http://www.php.net/manual/en/function.require-once.php http://www.php.net/manual/en/function.include-once.php -- mike cullerton -- PHP General Mailing List (http://www.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] beginer
Tutorials at http://www.thickbook.com. There are also tutorials at DevShed and WebMonkey, and links at http://www.php.net (or one of its mirrors) Miles Thompson At 12:32 PM 1/13/2002 -0500, Vania Lavielle Castro wrote: Hi! somebody say me how work with sql server and code php? i try with the functions and the results are bad i need examples, please :( -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: strtok bug
Hello, Robert Mena wrote: Hi, does anybody know when the strtok bug introduced After 4.0.6 . in 4.1.1 will be fixed ? Will we have a 4.1.2 or should I try to grab a cvs tree (assuming that it is already solved) ? You may want to ask that in php-dev mailing list because last time that I reported it I was told that it would not be fixed because it was just me complaining. Actually, I don't think that who has broken strtok noticed that he broken the behaviour that was always like that since the function was introduced in PHP 3, so the change was never documented. This suggests that like you and me there are certainly much more people affected that have not realized that strtok was broken and that it will affect their code. Anyway, since PHP developers do not seem to be willing to fix what they broke, regardless if they ever reconsider, you may want to try this alternative function that behaves like the original and only relies on functions that were not (yet) broken, so you don't stop yourself from upgrading PHP. http://phpclasses.upperdesign.com/browse.html/package/404 I also had several popular classes of mine broken because of the strtok bug. Since they are very popular the changes were announce in Freshmeat which according to the PHP Classes site they were downloaded by more than 30.000 users, despite on of the justifications for not fixing the bug was that it was not affecting significant code bases, which is not true as you may notice. Email validation class http://freshmeat.net/releases/66935/ HTTP client class http://freshmeat.net/releases/66937/ POP3 client class http://freshmeat.net/releases/66938/ MIME message composing and sending class http://freshmeat.net/releases/66936/ SMTP client class http://freshmeat.net/releases/66940/ Regards, Manuel Lemos -- PHP General Mailing List (http://www.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] Invalid Email Characters
On Sun, 13 Jan 2002, Peter J. Schoenster wrote: You might want to look at the regular expression constructed by Jeffrey Friedl as described here: http://builder.cnet.com/webbuilding/pages/Programming/Scripter/05 2098/ss01.html In this example \w matches any word character. A word character can be any character specified by the current locale, including accents, etc., so I suggest using [a-z0-9_] instead of \w. -- Gabor Gludovatz [EMAIL PROTECTED] - Phone: +36 (20) 9 109 129 http://www.sopron.hu/~ggabor/ - ICQ# 861 404 -- PHP General Mailing List (http://www.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] strtok bug
Are you referring to the change with 4.1.0 that's documented in the manual? Have another look, it gives examples of new/old behavior: http://www.php.net/strtok Regards, Philip Olson On Sun, 13 Jan 2002, Robert Mena wrote: Hi, does anybody know when the strtok bug introduced in 4.1.1 will be fixed ? Will we have a 4.1.2 or should I try to grab a cvs tree (assuming that it is already solved) ? thanks. __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- PHP General Mailing List (http://www.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] External Function
Is there anyway that I can have a file (ex: functions.txt) that has all of my functions in it. And I can call that file and use the functions that are in it. If it is possible, than that would save me a load of time, thanks Cory -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP and search engine???
Hi! is it possible to use include() to optimise the meta tags on our web pages? example: if yahoo.com is spidering our page the key word provided is a,b,c, ... if altavista.com is spidering then use key word.etc.. if it is possible how do i know that yahoo is spidering or altavista is spidering? any suggestion is appriciated. regards, Dani -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP x Mysql
Yeah, this smells like someone upgraded/recompiled php without mysql and that is pretty hard to do nowadays as mysql is built in by default. Dennis Moore wrote: execute phpinfo(); on a new page to see if mysql is still compiled in...; - Original Message - From: Frederico Madeira [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 10, 2002 10:37 PM Subject: [PHP] PHP x Mysql Hello !! My server was runing perfect the mysql server and php language. Today when i acess any paga that stabilished a conection with mysql the follow mesage return me. Fatal error: Call to undefined function: mysql_connect() in /home/fred/public_html/vg/index1.php on line 14 How i resolve this problem ? Tanks. Fred -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Vincent Stoessel [EMAIL PROTECTED] Java Linux Apache Mysql Php (JLAMP) Engineer (301) 362-1750 Mobile (410) 419-8588 AIM, MSN: xaymaca2020 , Yahoo Messenger: vks_jamaica -- PHP General Mailing List (http://www.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] External Function
On Monday 14 January 2002 07:19, Cory wrote: Is there anyway that I can have a file (ex: functions.txt) that has all of my functions in it. And I can call that file and use the functions that are in it. If it is possible, than that would save me a load of time, thanks Cory include('functions.txt'); -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* People should have access to the data which you have about them. There should be a process for them to challenge any inaccuracies. -- Arthur Miller */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP timesheets?
On Monday 14 January 2002 05:30, Boaz Yahav wrote: I can't get it to run... 1. The application keeps looking for the include files in the main path instead of the include dir. use ini_set() to change the include_path -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* The day advanced as if to light some work of mine; it was morning, and lo! now it is evening, and nothing memorable is accomplished. -- H.D. Thoreau */ -- PHP General Mailing List (http://www.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] memory error
Sometimes a memory error is just a memory error. What does your ram/swap usage look like? Thomas Holton wrote: Hi I built PHP on an ALPHA running OSF V5.1 I did the install after the make just like i did in the past. This time, however, when i do: apachectl start i get this: /usr/local/apache/bin/apachectl: 323331 Memory fault /usr/local/apache/bin/apachectl start: httpd could not be started There are no error messages being print to any apache logs. Now, I had apache running previously with PHP. I realized that imap had not been properly installed into my PHP so i went back and rebuilt PHP. Now I get this problem. This is my configuration: ./configure --with-apxs=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --with-gd=/usr/local/src/gd-1.8.4 --with-png-dir=/usr/local/src/libpng-1.2.0 --with-zlib-dir=/usr/local/src/zlib --with-curl=/usr/local/lib --with-calendar --with-jpeg-dir=/usr/local/src/jpeg-6b/ --with-imap (imap was installed by putting c-client.a in /usr/lib and the appropriate header files in /usr/include) This time around I had to edit a php source file: in ext/standard/scanf.c and make the function scan_set_error_return to NOT be an inline function. Has any had this problem before? thanks! tom holton .. -- Vincent Stoessel [EMAIL PROTECTED] Java Linux Apache Mysql Php (JLAMP) Engineer (301) 362-1750 Mobile (410) 419-8588 AIM, MSN: xaymaca2020 , Yahoo Messenger: vks_jamaica -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Php.ini file missing
Hi, I am new to this list and also to php and I am sorry to already bother you with a question you might find really stupid, but I looked around for this information several days now and I couldn't find some good resources. I installed php 4.1.0 on Mac OS X 10.1.2 and everything seems to work well, also with mySQL and Apache. I am learning php from a book for beginners full of explanations and scripts, so in the last days I wrote some scripts which make possible to send e-mails filling a form on the browser. The scripts worked out well, but I haven't been able to read the e-mails and understand where I should be able to. I believed I had to change the SMTP settings of php or some sort of mail server in the system and reading some articles found in several web sites I think the solution would be to change some settings in the php.ini file. The build I downloaded doesn't have any php.ini file and in the faq section of the website from where I downloaded it (http://www.entropy.ch/software/macosx/php/) there is simply written to create the php.ini file in the /usr/local/lib/php.ini, including the intermediate /lib/ directory that doesn't exist already on my system. I would like to know how I can create the php.ini file or if there is a easier way to get and read the e-mails sent by the php scripts without working on the php configuration. I am sorry to disturb you all, but I don't have any experience and I haven't been able to find anything clear about this question. I would really appreciate if you could give me some tips or some web site's addresses where I can find easy information, or where I can download a copy of the php.ini file. I thank you in advance for the kindness and the attention. Greetings, Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Php.ini file missing
hi michael, to create the directory and file, you'll need to run the terminal application. from there, type sudo mkdir /usr/local/lib to create the necessary directory. you should get prompted for a password. type your own password. you need to do this from an administrator account. the first account created during the install process is an administrator account. are you sure you don't have a copy of php.ini on your system? try locate php.ini from the terminal window. if there is one, you can copy it to the /usr/local/lib directory. sudo cp php.ini /usr/local/lib/ if you don't have one, you can download the distribution from php.net and copy php.ini-dist from there to /usr/local/lib and rename it sudo mv php.ini-dist /usr/local/lib/php.ini anyone know a better way to just get php.ini? a couple great sites for macosx http://www.stepwise.com http://macosxhints.com hope this helps, mike on 1/13/02 6:03 PM, Michael Sciascia at [EMAIL PROTECTED] wrote: Hi, I am new to this list and also to php and I am sorry to already bother you with a question you might find really stupid, but I looked around for this information several days now and I couldn't find some good resources. I installed php 4.1.0 on Mac OS X 10.1.2 and everything seems to work well, also with mySQL and Apache. I am learning php from a book for beginners full of explanations and scripts, so in the last days I wrote some scripts which make possible to send e-mails filling a form on the browser. The scripts worked out well, but I haven't been able to read the e-mails and understand where I should be able to. I believed I had to change the SMTP settings of php or some sort of mail server in the system and reading some articles found in several web sites I think the solution would be to change some settings in the php.ini file. The build I downloaded doesn't have any php.ini file and in the faq section of the website from where I downloaded it (http://www.entropy.ch/software/macosx/php/) there is simply written to create the php.ini file in the /usr/local/lib/php.ini, including the intermediate /lib/ directory that doesn't exist already on my system. I would like to know how I can create the php.ini file or if there is a easier way to get and read the e-mails sent by the php scripts without working on the php configuration. I am sorry to disturb you all, but I don't have any experience and I haven't been able to find anything clear about this question. I would really appreciate if you could give me some tips or some web site's addresses where I can find easy information, or where I can download a copy of the php.ini file. I thank you in advance for the kindness and the attention. Greetings, Michael -- mike cullerton michaelc at cullerton dot com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Php.ini file missing
I think that you have this problem because your sendmail is not running. Try to run your sendmail (probably this command /etc/rc.d/init.d/./sendmail start- Note that before the name sendmail you have two chars ./) and I think your problem will be fixed. Then test your script again to see if it's working. If this do not work, write again, I'll be very happy to help the php community. Rafael Perazzo __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Php.ini file missing
on 1/13/02 6:35 PM, Rafael Perazzo at [EMAIL PROTECTED] wrote: I think that you have this problem because your sendmail is not running. Try to run your sendmail (probably this command /etc/rc.d/init.d/./sendmail start- Note that before the name sendmail you have two chars ./) and I think your problem will be fixed. Then test your script again to see if it's working. ahhh, if this is indeed the problem, then you (michael from the original message) need to enable sendmail in /etc/hostconfig by changing the line MAILSERVER=-NO- to MAILSERVER=-YES- (isn't everything different in macosx) again, you need to do this from an administrator account. this will start sendmail each time you reboot. i'm not exactly sure how to start sendmail correctly from the command line, but one of the sites i mentioned earlier might have something. mike -- mike cullerton -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] RE: [PHP-DEV] Re: strtok bug
Manuel: What is broken with strtok() since php4.06? So far my code that use it seems to work ok with PHP4.10...??? I'd Like to know ;) A+ Alain -Original Message- From: Manuel Lemos [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 13, 2002 2:44 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; Robert Mena Subject: [PHP-DEV] Re: strtok bug Hello, Robert Mena wrote: Hi, does anybody know when the strtok bug introduced After 4.0.6 . in 4.1.1 will be fixed ? Will we have a 4.1.2 or should I try to grab a cvs tree (assuming that it is already solved) ? You may want to ask that in php-dev mailing list because last time that I reported it I was told that it would not be fixed because it was just me complaining. Actually, I don't think that who has broken strtok noticed that he broken the behaviour that was always like that since the function was introduced in PHP 3, so the change was never documented. This suggests that like you and me there are certainly much more people affected that have not realized that strtok was broken and that it will affect their code. Anyway, since PHP developers do not seem to be willing to fix what they broke, regardless if they ever reconsider, you may want to try this alternative function that behaves like the original and only relies on functions that were not (yet) broken, so you don't stop yourself from upgrading PHP. http://phpclasses.upperdesign.com/browse.html/package/404 I also had several popular classes of mine broken because of the strtok bug. Since they are very popular the changes were announce in Freshmeat which according to the PHP Classes site they were downloaded by more than 30.000 users, despite on of the justifications for not fixing the bug was that it was not affecting significant code bases, which is not true as you may notice. Email validation class http://freshmeat.net/releases/66935/ HTTP client class http://freshmeat.net/releases/66937/ POP3 client class http://freshmeat.net/releases/66938/ MIME message composing and sending class http://freshmeat.net/releases/66936/ SMTP client class http://freshmeat.net/releases/66940/ Regards, Manuel Lemos -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Php.ini file missing
Check the README or INSTALL docs. The file is there under another name, but right now I can't remember. Something like distribution.ini. Regards - Miles Thompson At 02:03 AM 1/14/2002 +0100, Michael Sciascia wrote: Hi, I am new to this list and also to php and I am sorry to already bother you with a question you might find really stupid, but I looked around for this information several days now and I couldn't find some good resources. I installed php 4.1.0 on Mac OS X 10.1.2 and everything seems to work well, also with mySQL and Apache. I am learning php from a book for beginners full of explanations and scripts, so in the last days I wrote some scripts which make possible to send e-mails filling a form on the browser. The scripts worked out well, but I haven't been able to read the e-mails and understand where I should be able to. I believed I had to change the SMTP settings of php or some sort of mail server in the system and reading some articles found in several web sites I think the solution would be to change some settings in the php.ini file. The build I downloaded doesn't have any php.ini file and in the faq section of the website from where I downloaded it (http://www.entropy.ch/software/macosx/php/) there is simply written to create the php.ini file in the /usr/local/lib/php.ini, including the intermediate /lib/ directory that doesn't exist already on my system. I would like to know how I can create the php.ini file or if there is a easier way to get and read the e-mails sent by the php scripts without working on the php configuration. I am sorry to disturb you all, but I don't have any experience and I haven't been able to find anything clear about this question. I would really appreciate if you could give me some tips or some web site's addresses where I can find easy information, or where I can download a copy of the php.ini file. I thank you in advance for the kindness and the attention. Greetings, Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP and search engine???
you could try looking at http_referer or remote_host or something like that. Never tried it myself, but sounds like it'd work... dunno what the values for them would be though :( -Original Message- From: Dani [mailto:[EMAIL PROTECTED]] Sent: Monday, January 14, 2002 2:17 PM To: PHP LIST Subject: [PHP] PHP and search engine??? Importance: High Hi! is it possible to use include() to optimise the meta tags on our web pages? example: if yahoo.com is spidering our page the key word provided is a,b,c, ... if altavista.com is spidering then use key word.etc.. if it is possible how do i know that yahoo is spidering or altavista is spidering? any suggestion is appriciated. regards, Dani -- PHP General Mailing List (http://www.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] Slow references?
Is it just me, or is working with references slow? I have functions that loop through about 1 lines of text, generating stats on the content. When I pass the lines to the function normally, this takes 0.8 seconds. Passing by reference, or as a reference, both increase the time to 6 seconds. Meaning that working with references takes 750% the time. In my head, making a copy should be slowest, but apparently referencing is far slower... Am I missing a point anywhere? --|-- Tino Didriksen http://ProjectJJ.dk/ -- PHP General Mailing List (http://www.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] i need mssql(beginer)
Hi: I need some php functions with sql server and I don't have access to internet, I connected with my server but I can not to execute any query. at the moment I am working with odbc but it is not what I want :-) -- PHP General Mailing List (http://www.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] Slow references?
copies are faster if you don't change the copied data since no copy is actually done. It is a shallow copy also know as a copy-on-write so you should just pass a copy in your case, I bet. -Rasmus On Mon, 14 Jan 2002, Tino Didriksen wrote: Is it just me, or is working with references slow? I have functions that loop through about 1 lines of text, generating stats on the content. When I pass the lines to the function normally, this takes 0.8 seconds. Passing by reference, or as a reference, both increase the time to 6 seconds. Meaning that working with references takes 750% the time. In my head, making a copy should be slowest, but apparently referencing is far slower... Am I missing a point anywhere? --|-- Tino Didriksen http://ProjectJJ.dk/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: PHP and search engine???
You check the $HTTP_USER_AGENT for what robot is going through your site. Yahoo, which gets their results from Google, would then have Googlebot somewhere in the var. To control webcrawlers more, you can look up robots.txt ( http://www.robotstxt.org/ ). --|-- Tino Didriksen http://ProjectJJ.dk/ -- PHP General Mailing List (http://www.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] External Function
As Jason said, include() is what you should look for and, as Mike said, you should also take a look at include_once() and require_once(). Obviously, require() is another option. However, you should be aware that txt files are displayed as plain text when accessed, so if any sensitive data is in there you should rename the file to functions.php - in this case the php is parsed and since it only contains functions, nothing is displayed. Bogdan Cory wrote: Is there anyway that I can have a file (ex: functions.txt) that has all of my functions in it. And I can call that file and use the functions that are in it. If it is possible, than that would save me a load of time, thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: [PHP-DEV] Re: strtok bug
Hello, Alain Samoun wrote: Manuel: What is broken with strtok() since php4.06? So far my code that use it seems to work ok with PHP4.10...??? I'd Like to know ;) If the token character is the first of the string you want to tokenize, now strtok ignores it, before it would return an empty string. For instance strtok(/something,/) would return but since strtok was broken it returns something. This makes strtok completely useless to break an arbitrary string by tokens because it will discard the first token if it is an empty string. The strtok function behaved like that since it was introduced in PHP 3. If you figure that this change will break your PHP code, you may want to try the function in the page below. It also contains a fixed version of dirname that was also broke between PHP 4 and 4.1.0. Regards, Manuel Lemos A+ Alain -Original Message- From: Manuel Lemos [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 13, 2002 2:44 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; Robert Mena Subject: [PHP-DEV] Re: strtok bug Hello, Robert Mena wrote: Hi, does anybody know when the strtok bug introduced After 4.0.6 . in 4.1.1 will be fixed ? Will we have a 4.1.2 or should I try to grab a cvs tree (assuming that it is already solved) ? You may want to ask that in php-dev mailing list because last time that I reported it I was told that it would not be fixed because it was just me complaining. Actually, I don't think that who has broken strtok noticed that he broken the behaviour that was always like that since the function was introduced in PHP 3, so the change was never documented. This suggests that like you and me there are certainly much more people affected that have not realized that strtok was broken and that it will affect their code. Anyway, since PHP developers do not seem to be willing to fix what they broke, regardless if they ever reconsider, you may want to try this alternative function that behaves like the original and only relies on functions that were not (yet) broken, so you don't stop yourself from upgrading PHP. http://phpclasses.upperdesign.com/browse.html/package/404 I also had several popular classes of mine broken because of the strtok bug. Since they are very popular the changes were announce in Freshmeat which according to the PHP Classes site they were downloaded by more than 30.000 users, despite on of the justifications for not fixing the bug was that it was not affecting significant code bases, which is not true as you may notice. Email validation class http://freshmeat.net/releases/66935/ HTTP client class http://freshmeat.net/releases/66937/ POP3 client class http://freshmeat.net/releases/66938/ MIME message composing and sending class http://freshmeat.net/releases/66936/ SMTP client class http://freshmeat.net/releases/66940/ Regards, Manuel Lemos -- PHP Development Mailing List http://www.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: [PHP-DEV] Re: strtok bug
You call it broken, we call it finally making them POSIX-compliant. Whatever floats your boat. -Rasmus On Mon, 14 Jan 2002, Manuel Lemos wrote: Hello, Alain Samoun wrote: Manuel: What is broken with strtok() since php4.06? So far my code that use it seems to work ok with PHP4.10...??? I'd Like to know ;) If the token character is the first of the string you want to tokenize, now strtok ignores it, before it would return an empty string. For instance strtok(/something,/) would return but since strtok was broken it returns something. This makes strtok completely useless to break an arbitrary string by tokens because it will discard the first token if it is an empty string. The strtok function behaved like that since it was introduced in PHP 3. If you figure that this change will break your PHP code, you may want to try the function in the page below. It also contains a fixed version of dirname that was also broke between PHP 4 and 4.1.0. Regards, Manuel Lemos A+ Alain -Original Message- From: Manuel Lemos [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 13, 2002 2:44 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; Robert Mena Subject: [PHP-DEV] Re: strtok bug Hello, Robert Mena wrote: Hi, does anybody know when the strtok bug introduced After 4.0.6 . in 4.1.1 will be fixed ? Will we have a 4.1.2 or should I try to grab a cvs tree (assuming that it is already solved) ? You may want to ask that in php-dev mailing list because last time that I reported it I was told that it would not be fixed because it was just me complaining. Actually, I don't think that who has broken strtok noticed that he broken the behaviour that was always like that since the function was introduced in PHP 3, so the change was never documented. This suggests that like you and me there are certainly much more people affected that have not realized that strtok was broken and that it will affect their code. Anyway, since PHP developers do not seem to be willing to fix what they broke, regardless if they ever reconsider, you may want to try this alternative function that behaves like the original and only relies on functions that were not (yet) broken, so you don't stop yourself from upgrading PHP. http://phpclasses.upperdesign.com/browse.html/package/404 I also had several popular classes of mine broken because of the strtok bug. Since they are very popular the changes were announce in Freshmeat which according to the PHP Classes site they were downloaded by more than 30.000 users, despite on of the justifications for not fixing the bug was that it was not affecting significant code bases, which is not true as you may notice. Email validation class http://freshmeat.net/releases/66935/ HTTP client class http://freshmeat.net/releases/66937/ POP3 client class http://freshmeat.net/releases/66938/ MIME message composing and sending class http://freshmeat.net/releases/66936/ SMTP client class http://freshmeat.net/releases/66940/ Regards, Manuel Lemos -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] IF Statements
I have a page for listing the contents of a table from my db. Being client.php?action=list As the action variable also allows for adding extra to the table, etc. Once I use ?action=list I want to be able to click on a single record and have it give me the extended info. so client.php?action=listclientcode=(the clients id in the db) My problem is working out how to evaluate this new part. I have normal If statements for the listing, adding, etc. But how can I get it to check if clientcode is present. If clientcode is not present I want it to load the list page as normal. But if the clientcode is present then it is to load something else. How do I structure my IF statement? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] SELECT DAYOFYEAR(NOW())
Hi! I'm storing a date in this format : 2002-01-13 11:08:40 -mm-dd hh:mm:ss This is great because it gives me the date and the time, which I need. I want to compare this date from the database to the current DAYOFYEAR() but when I do this select DAYOFYEAR('2002-01-13 11:08:40') I get this Error - Perl execution failed Modification of non-creatable array value attempted, subscript -1 at ./mysql-lib.pl line 187, line 2. It works great when I do select DAYOFYEAR(NOW()) though, I'm totally confused, is this a known bug or is there a work around that anybody knows of that you can let me in on? Ulitmately I want to compare todays DAYOFYEAR to the DAYOFYEAR from fields in the database to establish entries that were created today. I'm looking at what I have written here and I think I have confused myself, if this is not clear, please feel free to flame me. I'm looking forward to any light that can be shed on this problem.
Re: [PHP] IF Statements
if ($action=='list') { if (!$clientcode) { old_code } else { new_code } } I put the $clientcode test inside the $action test because I suppose you take different actions on $clientcode depending on $action - if that's not the case, simply switch the two if's. This assumes that $clientcode0. If you also use 0, then test if (!isset($clientcode)) instead. Bogdan Necro wrote: I have a page for listing the contents of a table from my db. Being client.php?action=list As the action variable also allows for adding extra to the table, etc. Once I use ?action=list I want to be able to click on a single record and have it give me the extended info. so client.php?action=listclientcode=(the clients id in the db) My problem is working out how to evaluate this new part. I have normal If statements for the listing, adding, etc. But how can I get it to check if clientcode is present. If clientcode is not present I want it to load the list page as normal. But if the clientcode is present then it is to load something else. How do I structure my IF statement? -- PHP General Mailing List (http://www.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] SELECT DAYOFYEAR(NOW())
This doesn't appear to be a PHP question. Are you sure you are on the right list? On Sun, 13 Jan 2002, sundogcurt wrote: Hi! I'm storing a date in this format : 2002-01-13 11:08:40 -mm-dd hh:mm:ss This is great because it gives me the date and the time, which I need. I want to compare this date from the database to the current DAYOFYEAR() but when I do this select DAYOFYEAR('2002-01-13 11:08:40') I get this Error - Perl execution failed Modification of non-creatable array value attempted, subscript -1 at ./mysql-lib.pl line 187, line 2. It works great when I do select DAYOFYEAR(NOW()) though, I'm totally confused, is this a known bug or is there a work around that anybody knows of that you can let me in on? Ulitmately I want to compare todays DAYOFYEAR to the DAYOFYEAR from fields in the database to establish entries that were created today. I'm looking at what I have written here and I think I have confused myself, if this is not clear, please feel free to flame me. I'm looking forward to any light that can be shed on this problem. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] SELECT DAYOFYEAR(NOW())
I am a dork! And you answered that almost before I sent it, you're like Mighty Mouse on Ginseng! [EMAIL PROTECTED] wrote: This doesn't appear to be a PHP question. Are you sure you are on the right list? On Sun, 13 Jan 2002, sundogcurt wrote: Hi! I'm storing a date in this format : 2002-01-13 11:08:40 -mm-dd hh:mm:ss This is great because it gives me the date and the time, which I need. I want to compare this date from the database to the current DAYOFYEAR() but when I do this select DAYOFYEAR('2002-01-13 11:08:40') I get this Error - Perl execution failed Modification of non-creatable array value attempted, subscript -1 at ./mysql-lib.pl line 187, line 2. It works great when I do select DAYOFYEAR(NOW()) though, I'm totally confused, is this a known bug or is there a work around that anybody knows of that you can let me in on? Ulitmately I want to compare todays DAYOFYEAR to the DAYOFYEAR from fields in the database to establish entries that were created today. I'm looking at what I have written here and I think I have confused myself, if this is not clear, please feel free to flame me. I'm looking forward to any light that can be shed on this problem.
Re: [PHP] IF Statements
Hi, My problem is working out how to evaluate this new part. I have normal If statements for the listing, adding, etc. But how can I get it to check if clientcode is present. If clientcode is not present I want it to load the list page as normal. But if the clientcode is present then it is to load something else. How do I structure my IF statement? If i understand correctly, you need something like this... $sql = select clientcode from table where clientcode='$var'; $qu = mysql_query($sql) or die(mysql_error()); if(mysql_num_rows($qu)=='0') { //does not exist } else { //exists //loop through records here. } hmmz might be wrong... just came back from a few weeks of holidays. Regards, James Mclean Adam Internet Web Design Team » [EMAIL PROTECTED] | www.adam.com.au « » 199 Sturt St. | P: 8231 0303« » Adelaide 5000 | F: 8231 0223« Windows didn't get as bad as it is overnight -- it took over ten years of careful development. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP and search engine???
On Monday 14 January 2002 10:08, Martin Towell wrote: you could try looking at http_referer or remote_host or something like that. Never tried it myself, but sounds like it'd work... dunno what the values for them would be though :( -Original Message- From: Dani [mailto:[EMAIL PROTECTED]] Sent: Monday, January 14, 2002 2:17 PM To: PHP LIST Subject: [PHP] PHP and search engine??? Importance: High Hi! is it possible to use include() to optimise the meta tags on our web pages? example: if yahoo.com is spidering our page the key word provided is a,b,c, ... if altavista.com is spidering then use key word.etc.. if it is possible how do i know that yahoo is spidering or altavista is spidering? Please note that some search engines doesn't like to be 'fooled' in this manner. They'll probably stop indexing your website if they find out you're engaged in such practices :) -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* Take heart amid the deepening gloom that your dog is finally getting enough cheese. -- National Lampoon, Deteriorata */ -- PHP General Mailing List (http://www.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: [PHP-DEV] Re: strtok bug
Hello, Rasmus Lerdorf wrote: You call it broken, we call it finally making them POSIX-compliant. Whatever floats your boat. I don't disagree, but the fact is that doesn't help anybody that used the function and relied on its original behaviour that was there for 4 years. As for being POSIX compliant, I don't think that POSIX states anything about how PHP functions should behave, so I do not see where is the gain of breaking this function, especially when making PHP strtok behave exactly like C strtok is absolutely irrelevant I think for 99,9% of PHP users because they don't use C in POSIX at all. As a side note, based on the Web browser share distribution of the PHP Classes site, I think the majority of PHP users come from Windows now, but I may be wrong. Anyway, if breaking the behaviour of a long standing function was bad, what really made it worse the was fact that who has broken the function, did not even have the decency to note down in the NEWS/ChangeLog, so whoever plans to upgrade to PHP 4.1.0 could be warned and avoided outages due to this silent backwards incompatible change. Documenting the new behaviour in the user manual does not help even if it was not made much later after releasing PHP 4.1.0 like this change that was only documented because there was a bug report much later after the change was done. What happens is that careful developers tend to take a look in the ChangeLog before installing a new version in a production environment to avoid outages and misbehaviour cause by the change in the broken function. Since it did not happen even until today, nobody is being warned and depending on what the function is used for, it may be causing data trashing of site databases until the developers realize what happened. Don't you have a requirement in the PHP CODING STANDARDS file that makes it mandatory for PHP developers to note down important changes? Not having such requirement just allows messy development habits to jeopardize PHP code quality. Before somebody decides to repress my opinion again, notice how I am trying to be constructive by suggesting improvements in the quality of PHP development process. Now you may put that gun down. :-) Regards, Manuel Lemos -Rasmus On Mon, 14 Jan 2002, Manuel Lemos wrote: Hello, Alain Samoun wrote: Manuel: What is broken with strtok() since php4.06? So far my code that use it seems to work ok with PHP4.10...??? I'd Like to know ;) If the token character is the first of the string you want to tokenize, now strtok ignores it, before it would return an empty string. For instance strtok(/something,/) would return but since strtok was broken it returns something. This makes strtok completely useless to break an arbitrary string by tokens because it will discard the first token if it is an empty string. The strtok function behaved like that since it was introduced in PHP 3. If you figure that this change will break your PHP code, you may want to try the function in the page below. It also contains a fixed version of dirname that was also broke between PHP 4 and 4.1.0. Regards, Manuel Lemos A+ Alain -Original Message- From: Manuel Lemos [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 13, 2002 2:44 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; Robert Mena Subject: [PHP-DEV] Re: strtok bug Hello, Robert Mena wrote: Hi, does anybody know when the strtok bug introduced After 4.0.6 . in 4.1.1 will be fixed ? Will we have a 4.1.2 or should I try to grab a cvs tree (assuming that it is already solved) ? You may want to ask that in php-dev mailing list because last time that I reported it I was told that it would not be fixed because it was just me complaining. Actually, I don't think that who has broken strtok noticed that he broken the behaviour that was always like that since the function was introduced in PHP 3, so the change was never documented. This suggests that like you and me there are certainly much more people affected that have not realized that strtok was broken and that it will affect their code. Anyway, since PHP developers do not seem to be willing to fix what they broke, regardless if they ever reconsider, you may want to try this alternative function that behaves like the original and only relies on functions that were not (yet) broken, so you don't stop yourself from upgrading PHP. http://phpclasses.upperdesign.com/browse.html/package/404 I also had several popular classes of mine broken because of the strtok bug. Since they are very popular the changes were announce in Freshmeat which according to the PHP Classes site they were downloaded by more than 30.000 users, despite on of the justifications for not fixing the bug was that it was not affecting significant code bases, which is not true as you may notice. Email
RE: [PHP] IF Statements
if (action == list) { if (isset($clientcode)) // or just if ($clientcode) would work... { // extended listing here } else { // normal listing here } } else if -Original Message- From: Necro [mailto:[EMAIL PROTECTED]] Sent: Monday, January 14, 2002 2:09 PM To: [EMAIL PROTECTED] Subject: [PHP] IF Statements I have a page for listing the contents of a table from my db. Being client.php?action=list As the action variable also allows for adding extra to the table, etc. Once I use ?action=list I want to be able to click on a single record and have it give me the extended info. so client.php?action=listclientcode=(the clients id in the db) My problem is working out how to evaluate this new part. I have normal If statements for the listing, adding, etc. But how can I get it to check if clientcode is present. If clientcode is not present I want it to load the list page as normal. But if the clientcode is present then it is to load something else. How do I structure my IF statement? -- PHP General Mailing List (http://www.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: [PHP-DEV] Re: strtok bug
-Original Message- From: Manuel Lemos [mailto:[EMAIL PROTECTED]] Before somebody decides to repress my opinion again, Hah! That's got to be one of the funniest things I've ever read! Downloads do not imply usage, only curiosity. I've downloaded a large number of PHP class libraries from different places. The only one I've ever used is a CC validation one ... mark C. -- PHP General Mailing List (http://www.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] PHP4.1.1 can't connect to SQL Server 7 SP3 on NT/2000
Hello, I previously have MSSQL7 with SP1 and PHP4.1.1 worked fine with it. Now I upgrade to SP3 and PHP4 won't connect to MSSQL7. I have NT,IIS with SP6, and use the PHP MSSQL module to connect. My PHP.EXE is the standard binary that comes with the distribution. The error message I get is: Warning: MS SQL message: Login failed for user 'scott'. (severity 14) in c:\inetpub\wwwroot\music4\common\lib.inc on line 12 Could someone point me in the right direction to resolve this? Thanks Quan -- PHP General Mailing List (http://www.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] PHP4.1.1 can't connect to SQL Server 7 SP3 on NT/2000
When you upgraded to SP3 did it remove the 'scott' user? Just a thought, I'm not really very experienced with MSSQL stuff. Tyler - Original Message - From: Quan Tran [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, January 13, 2002 9:54 PM Subject: [PHP] PHP4.1.1 can't connect to SQL Server 7 SP3 on NT/2000 Hello, I previously have MSSQL7 with SP1 and PHP4.1.1 worked fine with it. Now I upgrade to SP3 and PHP4 won't connect to MSSQL7. I have NT,IIS with SP6, and use the PHP MSSQL module to connect. My PHP.EXE is the standard binary that comes with the distribution. The error message I get is: Warning: MS SQL message: Login failed for user 'scott'. (severity 14) in c:\inetpub\wwwroot\music4\common\lib.inc on line 12 Could someone point me in the right direction to resolve this? Thanks Quan -- PHP General Mailing List (http://www.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] Writing Array to File w/o blank lines
I have been working on a script that manipulates arrays and now I am working on the part where the user can erase part of the array. Previously the function that writes the array to a file looked like: function updateSuspenderOrVehicleFile($fileToUpdate, $newDataArray) { $fileName = fopen( $fileToUpdate,w); for ($i=0; $icount($newDataArray); $i++) { //don't write blank lines left by remove feature if ($newDataArray[$i] != ) { //check to see if on the last solution, if not add line break at end. if ($i+1 == count($newDataArray) || $newDataArray[$i +1] == ) fwrite($fileName,$newDataArray[$i]); else fwrite($fileName,$newDataArray[$i]\r\n); } } } The problem is that when a user erases part of the array, I just set it to array[$number] == , which works except in the following cases. Lets say the user selects the last 2 array elements to erase, then when the function is called to write the array, it leaves a couple blank lines at the end of the file which messes up things later. Originally I though I would be easier to set the record they want to erase to , but is there another way to say compress the whole array together or a better way to do this? Thanks for any ideas, Andrew V. Romero -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] MySQL connection problem?
Here is my situation: 1. Two hosts: HA and HB, both connected with each other via Internet. 2. On HA there is a MySQL server SA and a Web server WA, while on HB there is a SB and a WB. 3. On WA there is a page, on which there are two buttons: ba and bb. The ba is linked to a script sa.php while bb linked to sb.php. Both the scripts are lcated on HA. The sa.php only talks with SA while sb.php talks with both SA and SB. So connection between sb.php and SB will have to go via Internet. 4. Sometimes both the scripts works well, when click on either ba or bb the scritps responce very quickly. But sometimes there may be problem with sb.php: when click on bb the WEB just stuck there and the small earth keep on rotating but nothing return. The most strange thing is that, if something wrong with sb.php, you cannot stop it. You click browser's stop button (it do looks stopped because the earth stopped) and then click ba (will call sa.php), still got nothing return, the browser seems not wake from sb.php's problem. I guess it might be something to do with MySQL connection via internet. But have no clue how to look into the problem. Could any one here can point me the right direction to get it fixed? Thanks in advance! Alex -- PHP General Mailing List (http://www.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] system () exec() problem
I've been working on this for quite a while and can't seem to get it, must be missing something. What I'd like to do is run the command: /bin/su -c /home/mailman/bin/newlist $list_name $owner $passwd1 | grep : | grep -v file: I also need to send a \r (CR) after $passwd1 before the first grep and I need to capture the output of it and append all that to a sendmail aliases file. It would be nice to be able to remove the list as well it involves running: /bin/su -c /home/mailman/bin/rmlist -a $list_name and then removing the aliases (for that list) from the sendmail file. PERL snippits that accomplish this are included below. Thanks for your help! --Ben The PERL code (for adding) is below: sub createNewList { if ($_[2] eq ) { error($text{erArgs}); } $listName = $_[0]; $adminEmail = $_[1]; $listPassword = $_[2]; #this command is a cludge, if they change the output it may #mess the whole thing up $commandLine = su -c '.$config{newlist_exec}. $listName $adminEmail $listPassword' .$config{exec_as_user}.| grep : | grep -v file:|; #this will only add the newlist to mailman, we still need to #add the aliases open(RESULT, $commandLine ) || return 0; print $text{txtAlias}.br\n; while (RESULT) { $line = $_; $line =~ s/\/\/; $line =~ s/\\n/\/; $line =~ s/\n//; system(echo \'$line\' $config{aliases_file} ); print $linebr; } close(RESULT); system(su -c '$config{newaliases_command}' ); # system($config{newaliases_command}); } The PERL code (for removing) is below: sub deleteList { if ($_[0] eq ) { error($text{erListName}); } $listName = $_[0]; $delArchives = $_[1]; if ($delArchives) { $cmdLine = su -c '$config{rmlist_exec} -a $listName' $config{exec_as_user}; } else { $cmdLine = su -c '$config{rmlist_exec} $listName' $config{exec_as_user}; } open(OUTPUT, $cmdLine | )||error($text{erExecution}); while (OUTPUT) { print $_br; } close(OUTPUT); $cmdLine = cat $config{aliases_file} |grep -v $listName:| grep -v $listName-owner:|grep -v $listName-request:|grep -v $listName-admin: $config{aliases_file}; #we need to backup our old alias file system(cp $config{aliases_file} $config{aliases_file}.backup); system($cmdLine); system(su -c '$config{newaliases_command}' $config{exec_as_user}); # system($config{newaliases_command}); print $text{txtBackup}.$config{aliases_file}.backup; } -- PHP General Mailing List (http://www.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 array to file w/o blanks- Update
Oops the function had one mistake in it (from me already trouble shooting this), it should be: function updateSuspenderOrVehicleFile($fileToUpdate, $newDataArray) { $fileName = fopen( $fileToUpdate,w); for ($i=0; $icount($newDataArray); $i++) { //don't write blanks left by remove feature if ($newDataArray[$i] != ) { //check to see if on the last solution, if not add line break at end. if ($i+1 == count($newDataArray)) //the older email had an OR statement here fwrite($fileName,$newDataArray[$i]); else fwrite($fileName,$newDataArray[$i]\r\n); } } } Thanks, Andrew V. Romero -- PHP General Mailing List (http://www.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: [PHP-DEV] Re: strtok bug
BC was broken, this happens sometimes. The majority of the PHP Dev team agrees that strtok() should be POSIX compliant, so it is now, and forever will be. Not being in NEWS/Changelog was an oversight/error, nobody is perfect. This not happening in the future is a desire of everyone. Also, it'll be nice when every BC break is clearly documented in one place, deprecations too. Your desires on the matter are shared by all, in that, allowing for seamless PHP upgrades is a good thing. Such breaks are very uncommon in the PHP world, you will find that some members want many more :)) This is documented now which is as best we can do at this point. That and clearly document all BC breaks in the future. I vow to help on the documentation end. Regards, Philip Olson On Mon, 14 Jan 2002, Manuel Lemos wrote: Hello, I don't disagree, but the fact is that doesn't help anybody that used the function and relied on its original behaviour that was there for 4 years. As for being POSIX compliant, I don't think that POSIX states anything about how PHP functions should behave, so I do not see where is the gain of breaking this function, especially when making PHP strtok behave exactly like C strtok is absolutely irrelevant I think for 99,9% of PHP users because they don't use C in POSIX at all. As a side note, based on the Web browser share distribution of the PHP Classes site, I think the majority of PHP users come from Windows now, but I may be wrong. Anyway, if breaking the behaviour of a long standing function was bad, what really made it worse the was fact that who has broken the function, did not even have the decency to note down in the NEWS/ChangeLog, so whoever plans to upgrade to PHP 4.1.0 could be warned and avoided outages due to this silent backwards incompatible change. Documenting the new behaviour in the user manual does not help even if it was not made much later after releasing PHP 4.1.0 like this change that was only documented because there was a bug report much later after the change was done. What happens is that careful developers tend to take a look in the ChangeLog before installing a new version in a production environment to avoid outages and misbehaviour cause by the change in the broken function. Since it did not happen even until today, nobody is being warned and depending on what the function is used for, it may be causing data trashing of site databases until the developers realize what happened. Don't you have a requirement in the PHP CODING STANDARDS file that makes it mandatory for PHP developers to note down important changes? Not having such requirement just allows messy development habits to jeopardize PHP code quality. Before somebody decides to repress my opinion again, notice how I am trying to be constructive by suggesting improvements in the quality of PHP development process. Now you may put that gun down. :-) Regards, Manuel Lemos -- PHP General Mailing List (http://www.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] Authentication Question
I am new to MySQL and PHP. I am wondering how Authentication through PHP and MySQL. How does a username and password now where to take that user? An example is online banking. You enter your account number for (username) and your password. How does it know where to go for your specific account? I am looking to create a system similar to online banking. I appreciate your help. Thanks, Ben -- PHP General Mailing List (http://www.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: [PHP-DEV] Re: strtok bug
Hello, Mark Charette wrote: -Original Message- From: Manuel Lemos [mailto:[EMAIL PROTECTED]] Before somebody decides to repress my opinion again, Hah! That's got to be one of the funniest things I've ever read! Downloads do not imply usage, only curiosity. I've downloaded a large number of PHP class libraries from different places. The only one I've ever used is a CC validation one ... Duh? What does what you said have to do with what you quoted from my message? :-) Regards, Manuel Lemos -- PHP General Mailing List (http://www.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] Writing Array to File w/o blank lines
Hello Andrew- This can be solved here or better yet, solved from the place that removes the array elements. Use unset() for that: unset($arr[$key]); Now, when you loop through the array it'll have no empty elements. Rather then use for(), consider foreach() as it relies on no counts. But, in this case, I'd most likely create a string first then fwrite() just once. Something like: $data = implode(\n, $array); Also, consider renaming the function/vars to something a bit more generic, such as createFile or createFileFromArray but anyway, just an opinion :) And, use fclose(). Also for good measure, you may want to check if $file is_writable() first. Regards, Philip Olson p.s. Please keep questions to one thread. On Sun, 13 Jan 2002, Andrew V. Romero wrote: I have been working on a script that manipulates arrays and now I am working on the part where the user can erase part of the array. Previously the function that writes the array to a file looked like: function updateSuspenderOrVehicleFile($fileToUpdate, $newDataArray) { $fileName = fopen( $fileToUpdate,w); for ($i=0; $icount($newDataArray); $i++) { //don't write blank lines left by remove feature if ($newDataArray[$i] != ) { //check to see if on the last solution, if not add line break at end. if ($i+1 == count($newDataArray) || $newDataArray[$i +1] == ) fwrite($fileName,$newDataArray[$i]); else fwrite($fileName,$newDataArray[$i]\r\n); } } } The problem is that when a user erases part of the array, I just set it to array[$number] == , which works except in the following cases. Lets say the user selects the last 2 array elements to erase, then when the function is called to write the array, it leaves a couple blank lines at the end of the file which messes up things later. Originally I though I would be easier to set the record they want to erase to , but is there another way to say compress the whole array together or a better way to do this? Thanks for any ideas, Andrew V. Romero -- PHP General Mailing List (http://www.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] PHP4.1.1 can't connect to SQL Server 7 SP3 on NT/2000
I am still able to connect to SQL server (with the user scott) from another SQL Server Enterprise Manager. However PHP still won't connect... Quan -Original Message- From: Tyler Longren [mailto:[EMAIL PROTECTED]] Sent: Monday, January 14, 2002 11:40 AM To: Quan Tran; [EMAIL PROTECTED] Subject: Re: [PHP] PHP4.1.1 can't connect to SQL Server 7 SP3 on NT/2000 When you upgraded to SP3 did it remove the 'scott' user? Just a thought, I'm not really very experienced with MSSQL stuff. Tyler - Original Message - From: Quan Tran [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, January 13, 2002 9:54 PM Subject: [PHP] PHP4.1.1 can't connect to SQL Server 7 SP3 on NT/2000 Hello, I previously have MSSQL7 with SP1 and PHP4.1.1 worked fine with it. Now I upgrade to SP3 and PHP4 won't connect to MSSQL7. I have NT,IIS with SP6, and use the PHP MSSQL module to connect. My PHP.EXE is the standard binary that comes with the distribution. The error message I get is: Warning: MS SQL message: Login failed for user 'scott'. (severity 14) in c:\inetpub\wwwroot\music4\common\lib.inc on line 12 Could someone point me in the right direction to resolve this? Thanks Quan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php-win broke on 'OLEAUT32.DLL'
Dennis, I can't help you but I know the oleaut32.dll file is not part of the php install but part of the microsoft package. I got the same fault on an NT4 platform and know that a compacted oleaut32 file is on the distribution CD--I just can't do anything about it. Anyway, good luck, and if someone answers you off-line please let me know what their suggestions are. Hugh - Original Message - From: drobinson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, January 13, 2002 6:26 AM Subject: [PHP] php-win broke on 'OLEAUT32.DLL' Hi all, I had my php4 working with apache 1.3x on my Windows2000 box. However, I installed software for my Kodak DC215 digital camera and it overwrote some files in the WINNT/system32 directory. Php suddenly became unusable. I'm getting an error 'unable to find dynamic link node...in file 'WINNT\system32\OLEAUT32.DLL'. I've tried removing all my php files and re-installing them, but it produces the same error. Any ideas how to fix this? Dennis -- PHP General Mailing List (http://www.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] php and sqlserver2000
i have many problems with my web site. i have sql server 2000 and php4 but i not connect with my server and the result pages don't show. somebody help me :-( -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] out memory
when trying to show a field of type varchar(200) in my web pages I have an error: Fatal: emalloc(): Unable to allocate 1073741824 bytes it seems being of memory capacity That you think? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]