Re: [PHP] PHP IDE
On Saturday 26 January 2002 03:49, Zeev Suraski stuffed this into my mailbox: I use Activestate Komodo (www.activestate.com). It's not free though ($ 29,95 end-user/educational $ 299 commercial). However, it's not just PHP, it also has stuff for perl, C and several other languages. regards I'm probably not objective, but the upcoming (Feb 4) Zend Studio is pretty darned good, and it works perfectly under Linux. You can try the beta (even though final release will have much more impressive/intelligent code completion) at zend.com/store/beta.php Zeev On Fri, 25 Jan 2002, Rafael Perazzo B Mota wrote: Who knows a good Php IDE for linux, like PHP Code ? Rafael Perazzo _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php vs asp
On Monday 28 January 2002 16:21, you wrote: I could be very very very wrong on this, but I think that if you want to access MySQL through ASP you need an ODBC in between it and I think that will slow things down. Far as I know PHP uses the MySQL libraries and that SHOULD (again, I'm NOT sure) take away some of the extra overhead ODBC has and it should thus be faster with PHP. (Assuming you don't run PHP on a windows box, in which case you might need to use ODBC as well, but again, not sure about that, I never use any of these on windoze machines why get things so complicated when it runs so smooth with apache/php/mysql under linux...) -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then liz lynch blurted sorry i should have explained myself abit better.i am a huge fan of php hence why i subscribe to this mailing list. its just that i need to settle an argument. my understanding is that php works better with mysql however a friend of mine is adament that asp will work just as well. i am not sure Hehe, well truth is I'm not sure either but I expect that performance wise it would be very similar. It's when you start talking about documentation and envoirnment as Micheal said that you'll notice the difference. - -- Nick Wilson Tel: +45 3325 0688 Fax: +45 3325 0677 Web: www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8VWxxHpvrrTa6L5oRAkCUAJ9aeWdNyTOXPBCi09C2tznk7Fw02QCgnCoC RhQrSJDs4mw8WzWAMWBmXx8= =GRe3 -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP 4.0.6 Problem, Cannot load /usr/local/apache/libexec/libphp4.so
Hey there, I have some problems loading the php module. Apache was compiled from sources with mod_ssl and is located in /usr/local/apache. MySQL 4.23.47 was also compiled from sources and is located in /usr/local/mysql PHP was compiled from source with these options: ./configure --with-mysql=/usr/local/mysql --with-apxs=/usr/local/apache/apxs --prefix=/usr/local/php --with-openssl=/usr/local/ssl --with-zlib --with-bz2 (I included the --with-zlib for the uncompress not resolv thing buggy so that ain't it) In httpd.conf LoadModule php4_module libexec/libphp4.so AddModule mod_php4.c (the addmodule is not within any containers (the make install had put it within the SSL containers, I put it upwards, the error is on the LoadModule though) apachectl start gives this error: Syntax error on line 206 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/libexec/libphp4.so into server: cannot open shared object file: cannot load shared object file: No such file or directory bin/apachectl start: httpd could not be started Kind regards, Ferry van Steen -- PHP General Mailing List (http://www.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 4.0.6 Problem, Cannot load /usr/local/apache/libexec/libphp4.so -SOLVED-
SOLVED, sorry about this. My mistake. -- Forwarded Message -- Subject: PHP 4.0.6 Problem, Cannot load /usr/local/apache/libexec/libphp4.so Date: Fri, 25 Jan 2002 12:36:09 +0100 From: TD - Sales International Holland B.V. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Hey there, I have some problems loading the php module. Apache was compiled from sources with mod_ssl and is located in /usr/local/apache. MySQL 4.23.47 was also compiled from sources and is located in /usr/local/mysql PHP was compiled from source with these options: ./configure --with-mysql=/usr/local/mysql --with-apxs=/usr/local/apache/apxs --prefix=/usr/local/php --with-openssl=/usr/local/ssl --with-zlib --with-bz2 (I included the --with-zlib for the uncompress not resolv thing buggy so that ain't it) In httpd.conf LoadModule php4_module libexec/libphp4.so AddModule mod_php4.c (the addmodule is not within any containers (the make install had put it within the SSL containers, I put it upwards, the error is on the LoadModule though) apachectl start gives this error: Syntax error on line 206 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/libexec/libphp4.so into server: cannot open shared object file: cannot load shared object file: No such file or directory bin/apachectl start: httpd could not be started Kind regards, Ferry van Steen --- -- PHP General Mailing List (http://www.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] $this objects and vars
Hey there, got a question about $this. I thought this was a fixed variable to point to the currently used object but I've seen a script wherein it's used within an object like this class a { $var = 0; function b { do something... $this -var++; } } the $this here will increment the $var of the object a... so far so good. now further in the script you'll get an sql query $this = mysql_fetch_array(indentifier); now as far as I knew you shouldn't be possible to use $this for this purpose, it has nothing to do with objects... why can it be used? it's only confusing things. The script works tho... As far as I've seen in other languages, the things the language contains can't be used for something else (think they're called language constructs?!) anyways it would be sortta like trying to define a function print while one already exists natively in the language. You shouldn't be able to do that right? Does anyone mind explain why $this can be used as a normal var? this is very confusing. And what is php gonna do if you have a var $this and use $this to point to the current object? Kind regards and have a nice weekend --- -- PHP General Mailing List (http://www.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] strange problem
On Friday 18 January 2002 15:52, you wrote: So hashes are now $var{'keyname'} (with curly brackets) and arrays are $var[0] (with normal brackets?) -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * On 18-01-02 at 15:49 * Marc Logghe said Hi, my PHP (PHP Version 4.1.1) suddenly does not take this anymore: $a['color'] = 'red'; I get this error: Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' when I remove the quotes around the key, it works. Problem is , that a certain key is %coding (I know, I know, I should not use non-alphanumerics, but it used to work) and this key I cannot use anymore: php does not take %coding, nor '%coding', nor %coding. Can someone help me out ? Marc No idea, but a fella on this list told me [] had been deprecated in favour of {} Maybe that has something to do with it? - -- Nick Wilson Tel: +45 3325 0688 Fax: +45 3325 0677 Web: www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8SDaaHpvrrTa6L5oRAq/iAKCFdCMULk8xWwcT1mMhgPF0Xsj3QwCcCxE+ M+YsJ4QKu1szbP5tkGScES4= =bTv8 -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Generating a new line in a text file
On Friday 18 January 2002 17:00, you wrote: FYI, In windows a newline is usualy made by CRLF (Carriage Return (\r) , Line Feed (\n)), in linux/unix it's usually just LF (\n) Jason Murray wrote: : Don't know why it's got everyone else stumped. : : \n is the new line character. Make sure you use it in and : not in ''. : : Jason Unfortunately, that doesn't work either, it changes the \n that appeared at the end of the new line to a single black block. It does not put the next quote onto a new line. Ah, so you're opening the file in something that doesn't understand newlines and prefers line feeds, then. In that case you'll want to use \r instead of \n. Na, he's posting using MS Outlook so I guess he is using Windows. In that case use \r\n. -- PHP General Mailing List (http://www.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] Lazy evaluation? -=- The solution
On Wednesday 16 January 2002 17:25, you wrote: I'm sorry, I think I was confusing languages. PHP does do lazy evaluation. If the left side is false the right side won't be evaluated. I've attached some code, it ain't really neat tidy but it's effective and will show you how it works. Just run it aha! see, i didn't understand the whole picture. so, let me see if i can create another question. suppose if (($a_good = ($a == 'a')) ($b_good = ($b == 'b'))) blahblahblah(); are you saying, that $b_good should always have the result of ($b == 'b') even if $a != 'a'? that's not what my test shows (hi bogdan :) so, is there something other than that forces the other half to be evaluated? interesting... mike on 8/23/01 5:19 PM, TD - Sales International Holland B.V. at [EMAIL PROTECTED] wrote: On Wednesday 16 January 2002 16:18, you wrote: I think the cause is, which is lacking in the reply below, that if you have like if ((function1(val, val)) (function2(val, val)) blabla(); you still want function2 to be executed because it does things necessary for your script, however, if one of them returns false you don't want blabla() to be executed. If that isn't the case you should use or or one of the other operators not too sure about that tho' but i'm sure I'll be corrected if that isn't the case :-) on 1/16/02 5:57 AM, Miles Thompson at [EMAIL PROTECTED] wrote: For or statements it does, but not or xor. I don't know about you, but I wouldn't want lazy evaluation on a conditional statement involving and. i'm new to all this stuff, so i'll bite. hopefully someone can explain what i'm missing. if i have a statement like if (($a == 'a') ($b == 'b')) blahblahblah(); and, $a != 'a'. why should php even look at the value for $b while evaluating this line? shouldn't the if fail after evaluating $a? thanks, mike -- mike cullerton michaelc at cullerton dot com -- mike cullerton michaelc at cullerton dot com ? /* This is to test whether or not evaluates both sides if the left side is false */ function tr() { print This function returns trueBR\n; return TRUE; } function fl() { print This function returns falseBR\n; return FALSE; } print HTMLHEADTITLEThe Logical Operator amp;amp; Test/TITLE/HEADBODYH1The Logical Operator amp;amp; Test/H1\n; print CENTERTrue amp;amp; True then echo succesBR\n; if (tr() tr()) echo SuccesBR\n; print HR\n; print True amp;amp; False then echo succesBR\n; if (tr() fl()) echo SuccesBR\n; print HR\n; print CENTERFalse amp;amp; True then echo succesBR\n; if (fl() tr()) echo SuccesBR\n; print HR\n; print CENTERFalse amp;amp; False then echo succesBR\n; if (fl() fl()) echo SuccesBR\n; print HR\n; print /CENTER/BODY/HTML; ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] quit me off the php list
On Tuesday 15 January 2002 19:40, Ben Turner stuffed this into my mailbox: If you could just try and drag your lazy ass to the bottom of this lists email you'll find how to unsubscribe yourself without bugging us /Quit Thyago Consort :D Hey I tried! - Original Message - From: Thyago Consort [EMAIL PROTECTED] To: Adam Baratz [EMAIL PROTECTED]; PHP List [EMAIL PROTECTED] Sent: Tuesday, January 15, 2002 12:00 PM Subject: [PHP] quit me off the php list -Original Message- From: Adam Baratz [mailto:[EMAIL PROTECTED]] Sent: sexta-feira, 11 de janeiro de 2002 01:40 To: PHP List Subject: Re: [PHP] PHP Parsing Database Text Is it possible to have PHP parse text queried from a database (security issues notwithstanding)? If so, how? Yes. Pull out the text with your method of choice and then use the eval function passing it the string of text to parse as its only parameter. -Adam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Parsing?
On Wednesday 16 January 2002 16:14, you wrote: You will need to appropiate lines in your apache config for that to work tho' AddType application/x-httpd-php-source .phps if I'm not mistaken, as long as your PHP is running, you already have the other necessary lines in there regards Doing this: cp file_i_want_to_look_at.php file_i_want_to_look_at.phps http://www.domain.name/file_i_want_to_look_at.phps will display coloured source listing in the browser. Is that what you want? This is referenced somewhere in the docs, and even if you only rename a file to phps it is sometimes useful for tracking down a peculiar bug. HTH - Miles At 03:40 PM 1/16/2002 +0100, Tony Arnold wrote: I'm wondering if it's possible to parse a .php-file so i looks exactly as if I just were looking at the source trough a browser with all the environment-variables intact and so on? / Tony... -- PHP General Mailing List (http://www.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] beginer | SQL PHP Tutorial/Training
On Sunday 13 January 2002 18:32, you wrote: For all you out there just getting started, on the MySQL site there is atleast I training I know of, I haven't checked there in a while and you might find some others there now too. Anyways, the one I read, and pretty much liked as it will give you a nice start with BOTH MySQL and PHP is here: http://www.mysql.com/articles/ddws/index.html Regards 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]
Re: RE: [PHP] HTTP_X_FORWARDED_FOR?
On Thursday 10 January 2002 19:36, [EMAIL PROTECTED] stuffed this into my mailbox: Please note that not all proxies will fill in HTTP_X_FORWARDED_FOR. Some will obscure it others will not fill it in at all, either due to privacy or to conseal things. Okay, thanks. 'Cause I mean, the REMOTE_ADDR is still there. So you mean that the HTTP_X_FORWARDED_FOR isn't working while I'm working localhost? REMOTE_ADDR contains the IP of the computer that requested your page. If it was a proxy doing the request, you'll have the proxy's IP in this variable, and the IP of the computer that requested the page from the proxy will be in HTTP_X_FORWARDED_FOR. Thanks, never really knew that. This means the best way to grab an IP is with a a function like this: ?php function getIP () { if (getenv(HTTP_X_FORWARDED_FOR)) { $ip = getenv(HTTP_X_FORWARDED_FOR); } else { $ip = getenv(REMOTE_ADDR); } return $ip; } ? Yeah, that's what I do. ;) I'm unsure what happens with multiple proxies, and I'd be interested to know - do you get an array of HTTP_X_FORWARDED_FORs? Do you just get the first or the last? Have no idea... Cheers Jon Get your own free email account from http://www.popmail.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] Error Logging Question
Hey there, I'm playing around with the logging options in the php.ini file. I set this: display_errors = Off Because I don't want to visitors to see any errors (besides the errors I define myself in the PHP script, which is exactly what this does... I only print out things like can't open database which doesn't reveal sensitive data like paths and host) log_errors = On I need the error ofcourse :-) now I had error_log set. However, my error log resides in a root write only directory. My apache logs have NO problem with these permissions (apache logs are u root g root rw-r--r--) however appearantly PHP gets started only by the forked processes because it CAN'T write to a root log file if it's set in error_log so I unset error_log, now apache takes over the logging appearantly because the errors now show up in my apache error_log which is kewl. But this is what I have a question about I have not yet configured my own apache like this, but I saw this at my ISP. What they do is make VirtualHost containers in which each virtual host has their own log files. This is absolutely cool, because I can't read the log files from others and they can't read mine. But every user can read their own webserver logs. (you can't get into the user directory so you can't read the files either). Anyways, the question would be, if I don't fill in the error_log tag like I did now, will the errors in such a setup go to the general error file or does it go to the virtual host log file of the virtualhost it belongs too? Thanks in advance and have a great weekend ya'll Ferry -- PHP General Mailing List (http://www.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] easy quickie..
On Wednesday 02 January 2002 20:20, Seb Frost stuffed this into my mailbox: For the ease I guess I use alt-leftarrow to go back :-) I've never understood why people do this? My browser has a back button. I know how to use it. It's only a centimetre of mouse travel away from the page I'm looking at, why do I need a duplicate? - seb -Original Message- From: Kelly Meeks [mailto:[EMAIL PROTECTED]] Happy New Year, Does php set a variable that tells you the url of the page that a user has just come from? So if I wanted to create my own 'Back' button in a pop up window, for instance? Thanks in advance, Kelly --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.307 / Virus Database: 168 - Release Date: 11/12/2001 -- PHP General Mailing List (http://www.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] Licensing??
On Wednesday 02 January 2002 20:14, Michael A. Peters stuffed this into my mailbox: Hmm but ClibPDF is an additional library package which is not part of the PHP engine right? regards I would like to note that you may need to purchase licensing for certain uses. For instance, I use ClibPDF on OS X. If I ever use it for commercial purposes (which I am planning to do, btw) I will need to purchase a license from FastIO for use of the ClibPDF library. On Wed, 2 Jan 2002 23:00:23 +0100 TD - Sales International Holland B.V. [EMAIL PROTECTED] mentioned: On Saturday 29 December 2001 05:47, Rasmus Lerdorf stuffed this into my mailbox: No it's free hehe :-) but I think they still appreciate any donations :-). : For since they are developping software they also have to do research n stuff so sometimes they have to buy books and some testing hardware which mainly is financed by donations I believe (this is general open-source far as I know, not PHP project specific) I'm sure you should be able to find info about it on the homepage. Regards -- PHP General Mailing List (http://www.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] Licensing??
On Saturday 29 December 2001 05:47, Rasmus Lerdorf stuffed this into my mailbox: No it's free hehe :-) but I think they still appreciate any donations :-). For since they are developping software they also have to do research n stuff so sometimes they have to buy books and some testing hardware which mainly is financed by donations I believe (this is general open-source far as I know, not PHP project specific) I'm sure you should be able to find info about it on the homepage. Regards Well, PHP is not under the GPL. But you still don't need to buy any sort of license. -Rasmus On Sat, 29 Dec 2001, Bogdan Stancescu wrote: LOL! You may want to read this for clarification: http://www.gnu.org/philosophy/free-sw.html Bogdan Andrew V. Romero wrote: what do they get out of 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] PHP / SSL
On Thursday 20 December 2001 15:37, Jon Farmer stuffed this into my mailbox: 256 bit encryption should be crackable by not too much more people than Microsoft, the US government, China and perhaps some others with shitloads of money that CAN dissapear (within reasonable time). Else there will be questions. Personally I found it hard to believe as well. But I'm told that you can have the same power for like $ 100.000,- by buying the best price/performance now. Make no mistake, those machines only need a mainboard, cpu, cooler, powersupply and a network card. Even better, we're thinking about x86 hardware (you and me) be appearantly there is hardware on the market that was specifically crafted to decrypt stuff brute force. One of those would probably match like a 100 or maybe even a 1000 of the P-II 266 distributed.net has. Now if you're sure you can make $ 200.000,- by the credit card numbers/other info you gain from cracking it, it is already worth the effort. Btw, an Athlon 1400 does 5,3 MKeys per SECOND (RC5-64)!! and those are damn cheap... I urge you strongly to advise against that. Although it might be possible to downgrade your encryption to 40bit I'd like to make you aware of the fact that DES which is 56 bit encryption if I'm not mistaken was cracked several times by brute force in UNDER 22 hours by the distributed.net people (www.distributed.net). Therefore I would NOT consider 40 bits encryption safe and I feel obligated to make you aware of that. You are warned now :-) so do as you please. Erm, yeah true but by their own admission they used the equivalant of 16 PII 266Mhz machines to accomplish this. If you think someone is going to want your data and has those kinda resources available then yeah go for higher. However if thats your worry where are you going to stop in the length of your key? If your that paranoid then it shouldn't be using public networks in the first place!! -- PHP General Mailing List (http://www.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] Fwd: REJECTED: Re: [PHP] PHP / SSL
sorry it was rejected the first time so there might be some garbage in it Whow, I'd have to check that :-) any crypto people here? :-) bitwise 56 is 40. Mathematically it would take a lot less time to brute force 40 bit than it would 56 bit. 40 bit = (2^40) 1.0995116278e+12 (1.099.511.627.800 possible options) 56 bit = (2^56) 7.2057594038e+16 (72.057.594.038.000.000 possible options) I'm am no crypto expert whatsoever, but it looks to me like you're done a lot faster if you only have to test for only 1.099.511.627.800 keys than for 72.057.594.038.000.000. The 56bit keys were cracked under 22 hours several times far as I know. Ofcourse this is also a quesion of luck. You might be a real lucky ass and get the correct key the first try. Then again you might be an unlucky ass and get the key at the last one to try. Once again, I'm NO crypto expert whatsoever. But it appears to me that 40bit encryption can't have more keys than that fit in 40 bits? Then again, maybe they mix several alghorythms I'd have to check.. I'm also sending this to distributed.net mailing lists. There are some crypto experts there, maybe they can shed some light on it. Hang on, correct me if I'm wrong, but isn't 56bit DES significantly different from 40-bit SSL (which uses a 40bit key for the public key crypto and something like a 3000bit key for the symmetric cipher used for the actual data transfer). What I mean is, DES is significantly weaker than the weakest part of standard 40bit SSL yes? If I'm wrong, arent a lot of people putting a lot of confidence in something that really isnt secure (i.e. all SSL sessions...)?? --- -- PHP General Mailing List (http://www.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] Mommy, is it true that...?
On Friday 21 December 2001 02:39, you wrote: I believe (not sure so please clarify) that if your code was if ($pwd == goodpwd) $lethimin = 1; else $lethimin = 0; the code would be secure. only setting the variable when the pass is correct would be too easy to crack right? since I'd call the page like page.php?lethimin=bla now it's a string with text which evals TRUE which is a major security breach correct? kind regards happy holidays Hi everybody! Two things I consider urban myths about PHP (plus MySQL) - please let me know what you think of these: 1. The evil global variables Ok, the classic ? if ($pwd==GOODPASSWORD) { $lethimin=1; } [bullshit code] if ($lethimin) { echo(fread(fopen(/etc/passwd,r))); } ? is obviously valid. But let's be serious, who codes this? The example code is valid and it's easily crackable indeed, but you don't do that kind of thing - you do it in one step. Even if you really need the bullshit code in there for some obscure reason, this is the log in code damnit, anybody takes care of that! Why I raised this issue is because I think people tend to get paranoid about PHP. And that happens in both worlds - customers and developers. Nothing to say about customers, I'd be careful too if I heard some dude got intoxicated at a McDonald's in Bogota. My problem is with developers - they got it in their head that variables are your enemy and initialize everything nowadays - including local variables! My question to you guys is this: does anybody know of a real example of reasonably careful coding led to disaster with global variables? 2. Please enter your age: 25; drop database mysql Does this actually work? I've read at least a dozen articles telling people to get it in their blood not to trust users and addslashes to any king incoming data, as well as pass it as strings to mysql (insert into person set age='$age' instead of insert into person set age =$age). So I decided I had to test this: I wrote the code exactly as in the example; I provided the exact dangerous input (well, to be honest, I tried a select instead of drop mysql). When I tried it, the presumably dangerous situation degraded into a trivial MySQL error. It went something like You have an error near '; select 1+1'. Did you ever actually try this? Does it work on your system? Thanks in advance for the input! Bogdan -- PHP General Mailing List (http://www.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: Algorithm: Limiting Large Numbers of Pages to 10 visible
On Friday 21 December 2001 05:59, Manuel Lemos stuffed this into my mailbox: err if it's coming from SQL just use LIMIT like select * from table limit 0, 10 would give you the first 10 resulst select * from table limit 10, 10 gives you results 11 - 20 select * from table limit 20, 10 gives you 21 - 30 etc Hello, I've got to believe that there's a really slick way of doing this. I've searched the usual places (weberdev.com, devshed.com, zend.com) but there's no really good keywords, and when you search on 'paging you get too many results to be useful http://phpclasses.upperdesign.com/browse.html/package/130 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] Sendemail appends domain to mail function
On Friday 21 December 2001 11:48, Peter stuffed this into my mailbox: You probably have masquerading on I think. I believe it's the DM tag in the sendmail.conf off record I think you want to use this for spam. since else it's pretty useless to send email from a non-existing domain which XYZ is. i'll warn you now. If i receive spam from you I'll kick your ass. If it's not for spam I didn't say anything ok? :-) /off record Hi, I have problem. Everytime that I want to send email using a PHP script from my server, it automatically appends the domain name of my server to the From: line. else { $mailheaders .= From: XYZ company\n; $mailheaders .= Reply-To: $email\r\n; $mailheaders .= Content-Type: text/html; charset=iso-8859-1\r\n; $remarks .= brbr$items; mail([EMAIL PROTECTED], quotation enquiry, $remarks, $mailheaders); ?img src=images/thank_you.gif? } } As you can see from the example above , I use XYZ company , but in the email that I receive it comes out as XYZ [EMAIL PROTECTED] It automatically appended the domain name to the end of it. How can I avoid this? Thanks. Peter -- PHP General Mailing List (http://www.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 / SSL
This is what I got back so far from RC5 where there are crypto experts. And as the guy from GMDI? i forgot, something like that .nl, pointed out, it also matters whether it's SSL2 or SSL3 40bit encryption if I'm not mistaken. Hope you can do something with this info. Appearantly, like stated below, it is less work to crack RC5 40 bits (which SSL probably uses) than it is to crack DES. Since DES can be cracked within 22 hours on distributed.net and that power can be compared with like $ 100.000 I ESTIMATE somebody with like 40.000 bucks can crack it in reasonable time. I guess the big question is this, if it gets cracked, who are they gonna hold responcible. If they are gonna hold you responcible I'd certainly think twice about this :-) Kind regards happy holidays -- Forwarded Message -- Subject: Re: [RC5] Re: [PHP] PHP / SSL | for distributed.net OffTopic!!! Date: Fri, 21 Dec 2001 08:12:36 -0500 From: Jeff Gilchrist [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED], [EMAIL PROTECTED] - Original Message - From: TD - Sales International Holland B.V. [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, December 21, 2001 12:34 PM Subject: [RC5] Re: [PHP] PHP / SSL | for distributed.net OffTopic!!! for the distributed.net people sorry this is OT but we would like to know what is more secure. 40bit SSL or 56bit DES. The reason I'm asking is since DES has been cracked under 22 hours 40bit SSL looks really insecure to me. Thanks in advance, sorry for the OT /for the distributed.net people First, you have to realise that SSL is not a crypto algorithm, it is a transport layer, so when you are talking about 40bit SSL you are most likely talking about 40bit RC5 encryption which is used in SSL. You can also have 56bit DES encryption in SSL, or a number of other algorithms if your SSL client/server supports it. Either way, using a 40bit key is MUCH less secure than using a 56bit key. Every time you increase the key length by a bit, it doubles the amount of possible keys to search through to crack it by brute force. A 56bit key has 65536 times more possible keys than a 40bit key. A 128bit key has 309485009821345068724781056 times more possible keys than a 40bit key. Remember with a brute-force attack you have to check all the keys to see if it is the correct one so the more possible keys there are, the longer it will take and the more work is involved. You should not use either 40bit or 56bit SSL since both are not considered secure. You should use 128bit SSL instead. There is no reason to use 40 or 56bit SSL any more since web servers and web browsers that support 128bit SSL are easily found. Modules like mod_ssl for Apache support 128bit encryption algorithms using the openssl library. If you only have the choice between 40bit SSL or 56bit SSL, then go for the 56bit version. Your traffic will not be securely protected but it is much more work to break DES than it is 40bit RC5 in SSL. Regards, Jeff. --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP / SSL
On Thursday 20 December 2001 14:58, you wrote: I urge you strongly to advise against that. Although it might be possible to downgrade your encryption to 40bit I'd like to make you aware of the fact that DES which is 56 bit encryption if I'm not mistaken was cracked several times by brute force in UNDER 22 hours by the distributed.net people (www.distributed.net). Therefore I would NOT consider 40 bits encryption safe and I feel obligated to make you aware of that. You are warned now :-) so do as you please. Kind regards, Ferry van Steen PS I'm also on distributed.net's mailing list. I once asked why it wouldn't be safe then, since distributed.net has a huge load processing power due to the number of people that participate. Appearantly it's fairly easy for a lot of companies/governments/etc to EASILY!! match that computational power. Hi, Bit off topic this, but I thought I'd ask anyway... I've been implementing a financial reporting system, in PHP, which will be running on the internet. Obviously, therefore, security is an issue. The system itself implements a username/password login system, but I want to be able to run it using SSL for obvious reasons. My problem is this: The server we have (Red Hat 7.0, Apache 1.3.14-3, open-ssl 0.9.5a-14, mod_ssl 2.7.1-3) came with ssl preconfigured and ready to use. It runs at 128 bit encryption which is fine as far as I'm concerned. The people who will be using the system, however, have a company standard browser which is IE 4 and only supports 40 bit encryption. And for various political reasons they don't want to upgrade all the browsers. So what I want to know is how easy it is to turn down the encryption level, and how to go about it. Any suggestions, pointers??? All the documentation I've come across thus far doesn't really cover anything like this Richy == Richard Black Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com Tel: 0141 435 3504 Email: [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]
Fwd: [PHP] Re: need some help
Hey you might wanna look at this: http://www.mysql.com/articles/ddws/index.html it's a tutorial to PHP with MySQL, I sure liked reading it. I also got a book the PHP 4 Bible. The dutch translation has some translation errors but the english version should be fine. Has nice examples et al. also check out www.webmonkey.com they have tutorials/lessons (all free!) for a kinds of web related stuff. I also send my kid brother there and he has learned a lot from that page. I've seen some PHP stuff on there as well. Hope that helps regards -- Forwarded Message -- Subject: [PHP] Re: need some help Date: Tue, 18 Dec 2001 08:38:10 -0800 From: Chris Lee [EMAIL PROTECTED] To: [EMAIL PROTECTED] I'll try and answer your questions as will the rest off the forum Im sure, just post away. -- Chris Lee [EMAIL PROTECTED] Melva Garcia [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am looking for a mentor to help me along with using php and mysql i am a designer for over 9 years now..and will in return help you with anything pertaining to layout and design i have alot of dumb questions pertianing to php and mysql dba can someone help me i would appreciate any help I can get thanks Mel __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] addslash/stripslashes
On Wednesday 19 December 2001 13:12, you wrote: test\ === 'test' evals true :-) what I don't get however, the second the var is set like $string = escaping \ quotes; the backslash dissapears in the variable. The backslash is no longer there thus so having the statement mysql_query(insert into table values(\$string\)); would be interpreted: mysql_query(insert into table values(\test\)); in which case the quote shouldn't appear in the database cause it will see that as delimiter of the first one, however I think the mysql_query fixes this by adding a backslash to it which is interpreted by mysql again cause it doesn't store the backslash. The only problem i still have is HTML. If i insert quotes into a field and retrieve them for my form like this: INPUT TYPE=TEXT NAME=name VALUE=$string the value will stop at the first quote in the string dropping the rest on the floor since it doesn't recognize is (most likely) as a tag. So there an exploit there (only HTML/Javascript though not PHP) since you could insert a field like valuescript bla bla bla insert your favorite site mess'm'upper javascript here/script!-- -- so i need to fix that. otherwise it goes fine. normally i'd understand this perfectly but with all these magic quotes and the mysql functions appearantly adding the backslashes for escaping and PHP automatically type casting of variables it has become vague as hell to me :/ thanks for the help so far people, the sky is finally clearing up :-) regards On 19-Dec-2001 TD - Sales International Holland B.V. wrote: On Tuesday 18 December 2001 17:01, you wrote: sorry, one more question. I check the database, the character where in there without backslashes. How does this work? Does PHP send the data with or without backslashes to the MySQL environment?... I guess it's with since you can do $string = test\; $s = $string; and $s will be test and not test, however when printing $s to output it will also say test not test\ so I guess it depends on the database module way of handling strings Yep. the backslash is an escape interpreted by PHP in double-quoted strings. compare : $str= test\; $str= 'test'; Regards, -- PHP General Mailing List (http://www.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] outputting db content
On Wednesday 19 December 2001 16:28, you wrote: yea that's easy :-) first I have to tell you that the first result is numbered 0 like in arrays ok? now you would do a select like this select * from table limit 10; this will give you the first 10 results since you didn't supply a start number after that you want the second 10 ofcourse so then you do select * from table limit 10,10; 10 is actually the 11th result starting from there you'll get 11 through 20 select * from table limit 20, 10; will give you 21 through 30 etc etc ofcourse in PHP it would be easier to supply the first rule as select * from table limit 0, 10; since you then don't have to check whether it's the first so it'll save ya a loop or an if statement. proof of concept: mysql select * from test; +--+ | bla | +--+ |1 | |2 | |3 | |4 | |5 | |6 | |7 | |8 | |9 | | 10 | | 11 | | 12 | +--+ mysql select * from test limit 0,3; +--+ | bla | +--+ |1 | |2 | |3 | +--+ mysql select * from test limit 3,3; +--+ | bla | +--+ |4 | |5 | |6 | +--+ mysql select * from test limit 6,3; +--+ | bla | +--+ |7 | |8 | |9 | +--+ hope that helps Silly question, Does anyone have a quick example of how you would show X numbers of database records at a time from a query? (you know, list 25 of 400 records with next/previous navigation)... Thanks Kelly -- PHP General Mailing List (http://www.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] addslash/stripslashes
Hey there, I was once told I need to use addslashes and stripslashes on data I get from the web and insert into the database. I'd like to know why?!?! See I know that with other languages you could use special chars to hack/crack the database, but even without add/strip slashes I can't seem to manage I have a text field I inserted into the database and I entered stuff like this: ~!@#$%^*()_+~!@#$%^*()_+|\\||\[]{};:'.,/? since quotes n stuff aren't nicely closed now I'd expect an error if this was crack/hackable however it just inserts fine without any problems whatsoever. I'm using PHP 4.0.6 and MySQL 4.23.43 (I think haven't checked...) Also when I go to the page where the data is retrieved from the database and put in HTML I see EXACTLY what I entered. So it doesn't appear to me I'd need these add/strip slashes functions. Any comments would be greatly appreciated. Also I'm looking for a small feature of HTML. I know this isn't the right list so if you guys don't reply no hard feelings. At this moment I use meta to refresh (go back to the form) after entering the data, you'll see a page that it's succeeded (or failed for that matter) and than after 3 secs you'll go back to the main empty form. However, I'd like to know a way other than meta, since when an error occurs it can happen the HTML header is already printed out and thus I can't use the meta tag anymore. I was thinking about javascript or something but other ways are welcome since javascript can be disabled in the browser. Please bear with me, this is the first thing I actually write. I only wrote some small things for playing a little, nothing serious and this script will be in a commercial environment with database access n stuff. Pretty kewl but it has to be as secure and smooth as I can get it :-) Kind regards, Ferry van Steen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Fwd: Re: [PHP] Passing through Array's to another script
-- Forwarded Message -- Subject: Re: [PHP] Passing through Array's to another script Date: Tue, 18 Dec 2001 22:01:53 +0100 From: TD - Sales International Holland B.V. [EMAIL PROTECTED] To: gkin [EMAIL PROTECTED] On Tuesday 18 December 2001 14:43, you wrote: Ok I'm a newbie but there some things I think I can point out. why does your ACTION have a GET method URL??? the ?xtabel should be filled in by the form not by you. Second you can't access arrays like print($xtabel) that will only print the constant Array not the values in there, you're gonna need a loop for that. I think the best solution for you would be to create sessions and register the array within the session. And like I said, making a POST form with a GET URL attached to it makes no sense to me at all. What you could try, but I'm guessing here is the following. print(FORM METHOD=POST ACTION=\script.php\\n); $val = current($xtabel); print(INPUT TYPE=HIDDEN NAME=xtabel[] VALUE=\$val\\n); /* You need the [] at xtabel cuz else the older value will be overwritten, this will make it clear to PHP that it's an array/hash*/ while ($val = next($xtabel) { print(INPUT TYPE=HIDDEN NAME=xtabel[] VALUE=\$val\\n); } print(INPUT TYPE=SUBMIT NAME=SUBMIT\n); print(/FORM); I HAVE NOT!!! tested this but I think it might work. Since I didn't check it might have some typos, you'll have to try I'm low on time and like I said I'm new to this also, so no guarentees :-). Kind regards I want to pass through an array with content to another script. The array is correctly filled with data. To do this I use the following code: FORM METHOD='post' ACTION='script.php?xtabel = ? print($xtabel); ?' The content of the array is not recognised in the script.php. What is the best way to do 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] Arrays/Hashes
Hey there, sortta simple question... Is it just me or can't you access hashes within strings? This works... print(Some text $myarray[0]BR\n); This doesn't print(Some text $myhash['mykey']BR\n); i'm asking in relation to databases (not that that matters). If i fetch a row from the database I can use the $array[0], [1], etc in the print statements if i use mysql_fetch_array (oh sorry, u people call it associative arrays instead of hashes, my mistake) i can't access $array['fieldname'] from within a print statement but I CAN do $DBID = $resultarray['idfieldname']; and then use $DBID. regards -- PHP General Mailing List (http://www.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] is_int with HTML FORM
Hey there, First of all please CC me as I'm no longer a member on this list. Sorry about that but I receive too much :-(. Please bear with me as I'm a new PHP scripter on the block Ok for the question. I was under the impression that PHP would automatically select the type for the vars to use. However if I have a field in my form where I insert only a 4 in I'd expect the var to be an integer (or atleast some other whole number type of var). However is_int fails on the 4 and sees it as a string. So how am I going to check whether it's nothing but digits [0-9]. The field can hold 4 characters but they don't neccesarily need to be filled. So the input could be 1 through . Now I could check with or but that won't work since they would still eval true if they'd enter 3a. Ok it would fail if they'd enter a3 but that still leaves a possibility to crash my script with 3a. Perhaps somebody could hand me a nice regexp or something... I'm not yet familiar with those. Kind regards and have a nice weekend. Ferry van Steen -- PHP General Mailing List (http://www.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 + Form
Hey there, once again... sorry but I'm not on the list so please CC me :-) I was in the assumption that you needed to use addslashes on a var you retrieve from a form to properly insert it into the database. Well I'm not using it and I can put ,\n,\t etc in my webform but SQL won't evaluate them although!! I use double quotes (var) to insert them. Can anyone explain? Cuz I'm sortta trying to crack my own database by making malicious statements like entering into the form , next data value, next data value); Hack_sql_statement; error on the rest of the values that sql is trying to parse. but i'm not succeeding. Which I find totally cool but I don't understand it I truely am/was under the assumption that I needed to prevent such things by using addslashes() but I guess I'm wrong. Just curious :-) Have a nice weekend fellow scripters Regards -- PHP General Mailing List (http://www.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] %20
Spaces are not allowed in URL's, that the newer browsers do accept them probably means nothing more than that they don't show you that they encode it to %20 On Wednesday 14 November 2001 01:54, John Steele stuffed this into my mailbox: Hi Oosten, I don't think that's a bug in NS 4.7, but part of the spec for URLs. See the PHP manual for the urlencode() encode function. John Hello I just discovered a netscape 4.7 bug when sending a string. The variable cannot contain a space. So a string like this does not work in netscape 4.7 objectdetail.php?Bouw=variableObject_type=normalStreet_type=normal street. The variable Street_type doesn't get through netscape 4.7, but IE and Netscape 6 do let the variable through. Is there a way to automatically let a spacer fill with %20 so it works at all browsers and i don't have to reprogram my system? Thanks! Sjoerd van Oosten Digitaal vormgever [EMAIL PROTECTED] Datamex E-sites B.V. http://www.esites.nl Minervum 7368 Telefoon: (076) 5 730 730 4817 ZH BREDA Telefax: (076) 5 877 757 ___ -- PHP General Mailing List (http://www.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 Highlighting Text Editors
Hey there, these are the editors given by you guys, thanks for the replies. If somebody could put this online on php.net it would be great. If you have anything to add please feel free to email me. Windows UltraEdit ActiveState Komodo EditPlus HTML-Kit Homesite Linux/Unix Nedit (x)emacs Visual SlickEdit vim/gvim ActiveState Komodo Beaver Cooledit KWrite (included with KDE, PHP highlighting since KDE 2.2.1 maybe 2.2.0 also haven't used that version 2.1.2 doesn't support PHP) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Uncertainties about MySQL commands
Hey list, i'm new to php so bare with me... got some questions on mysql commands. I'd like to know how the mysql_insert_id() function works exactly. First of all how reliable is it? What happens this happens: Table: (ID int unsigned primary key auto_increment, Stuff text, MoreStuff text) (my script) insert into table values(NULL, bla, bla) (some other application) insert into table values(NULL, bleh, bleh) (my script) $id = mysql_insert_id it's not likely that this will happen, but if the site is very/extremely crowded it could be that there's an insert right after mine but before me callind mysql_insert_id. As you might guess I'd like to know which ID will be returned, the one my script created or the one from the other application? Also what happens if my table is like this: Table: (Stuff text, ID int unsigned primary key auto_increment, OtherStuff text) Thus having the ID on column 2 instead of 1 or like this Table: (Bla int unsigned primary key auto_increment, Stuff text, Otherstuff text) Thus the ID not having the name ID Or like this Table: (bla int unsigned primary key auto_increment, id int unsigned primary key auto_increment, stuff text, otherstuff text) Thus having 2 auto_increment columns where the 2nd one is called ID (lower case). I'm really uncertain about that and couldn't find it back in the manual does it only read the first column? does this column have to be named ID, what if ID is another column? what if there is more than 1 auto_increment column in the table? what happens if some(one)/(thing) else inserts before calling mysql_insert_id. One more question (pure curiosity this one) the return value from mysql_query... is that ever gonna be higher than 1? I assume it can be if the insert affects more than 1 line right? Also my book says that the return value is TRUE or FALSE for every command except for an INSERT in which case it would be 0 on failure and higher on succes. I think that's crap? I'm guessing it will also return a number for UPDATE's and REPLACE's is that correct? Are there others? OK just one more thing, this is for the people from troutworks if they're monitoring this list. I think the translation of the PHP Bible is crap! Please complain about it at the translator. The guy/girl managed to translate (quotes) to (comma's) , and there are a lot of other wrongly translated things in there, luckily the examples in there got me on the right path again over and over showing that the translation was incorrect but it's just confusing like hell. The number of mistakes is unbelievable (and i'm NOT talking about spelling errors, I'm talking about messy stuff like calling quotes comma's) and I'm 100% certain it was NOT translated by a programmer regards -- PHP General Mailing List (http://www.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 Questions
Hey there, part of my old question can be ignored since I just found out (stupid.) there can be only 1 auto_increment column in a table and by testing with PHP I also found out the position of the column doesn't matter nor it's name. I'd still like an answer on the rest tho' regards -- PHP General Mailing List (http://www.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] Text Editor with Highlighting
Hey there, I looked on the site for this but couldn't find anything about it. I'd like a list of your favorite text editors (preferable for Linux/XFree) with highlighting. I'm using beaver now, I tried cooledit but it's not me... too much functions and looks like it came from an old 386 :-). I have kde 2.1.2 which has kwrite, but it's kwrite does not yet support PHP, kde 2.2.1 does but i don't wanna download the entire kde package. Besides i think it's still in development I tried in on my laptop at home but it just makes things bold instead of all kinds of different colors. also beaver colors for in plain html and has some problems with correctly indentifying /* */ comments if you use more of em. i'm also interested in windows though and i think more people are interested so maybe somebody of the site might also want to keep track of the list so it can be put online regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]