Re: [PHP] Recursive permissions
On 2/19/06, tedd [EMAIL PROTECTED] wrote: Perhaps this is something limited to GoLive and not an option in setting chmod's via php's built-in functions. This is clearly depending on the host OS/ftp daemon and what permission is set on the upload folder. What GoLive! probably does with that checkbox is setting permissions through chmod on the ftp automagically after each file has been uploaded. Do you have shell access to the particular host? -- Kim Christensen [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP/LDAP Authentication
On 2/19/06, Golden Butler [EMAIL PROTECTED] wrote: I'm currently running OpenLDAP with some users populated in the database. I would like to use PHP to create a web page where my ldap users can enter their username and password credentials to log into our intranet. Can someone point me to some expample scripts, articles, or sites. Thanks. http://php.net/ldap As always, read the docs and check the user comments. You won't need any more examples :-) -- Kim Christensen [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] DOM XML : set_attribute()
Hi, I am working with PHP 4.3 on windows. I am using PHP DOM functions to update the XML file. When I try to set the attribute of a particular node, the subsequent get returns the set value, but it doesn't reflect in the memory structure. echo ###,$build_node-get_attribute('path'); = this returns the original path value. $build_node-set_attribute('path', 'new_path'); echo ###,$build_node-get_attribute('path'); = this returns the new_path value. var_dump($build_node); = This does not reflect the change in path attribute for the build_node, it shows the the original path value. Can anybody help me in this issue? Thanks, Jils
Re: [PHP] Subtracting Large Numbers
I would guess integer overflow. On 2/17/06, Bruce [EMAIL PROTECTED] wrote: I am puzzled by the following code: ?php print pMaxInt=.PHP_INT_MAX; $AA = -190668411; $BB = -2181087916; print brAA=$AA; print brBB=$BB; $AA = (int)$AA + (int)$BB; print brAA+BB=$AA; ? On some systems, I get: MaxInt=2147483647 AA=-190668411 BB=-2181087916 AA+BB=-2338152059 On others, I get: MaxInt=2147483647 AA=-190668411 BB=-2181087916 AA+BB=1923210969 Why the difference? Thanks...Bruce -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] regular pattern to mat ch �
On Sat, Feb 18, 2006 at 10:42:04PM +0100, Patrick wrote: im trying to get my regular pattern to allow �� but it refuses to, i have something like this: [^a-zA-Z��0-9-_ ] But this dosent seem to work, anyone got any ideas? Quite a few actually: - you forgot to use the delimiter in the expression - display_errors is off, so you dont see debug errors - error_reporting is set to low. - the variable you are matching doesn't have the value you think - there is a parse error in your script - the logic you are using in your if statement is reversed - the statement isn't ever getting executed - there is some character translations causing the expression to change - PCRE doesnt like you - This looks rather suspicious: '0-9-_' It might help narrow it down a bit if you could provide a simple script for how your are using this in context, and how it isn't working. Curt -- cat .signature: No such file or directory -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP/LDAP Authentication
Maybe this can help : Authentication script to authenticate users in Active Directory through LDAP. http://www.weberdev.com/get_example-3261.html Sincerely berber Visit the Weber Sites Today, To see where PHP might take you tomorrow. Search for PHP Code from your browser http://toolbar.weberdev.com Free Uptime Monitor : http://uptime.weberdev.com SEO Data Monitor http://seo.weberdev.com -Original Message- From: Golden Butler [mailto:[EMAIL PROTECTED] Sent: Sunday, February 19, 2006 8:40 AM To: PHP Mailing List Subject: [PHP] PHP/LDAP Authentication I'm currently running OpenLDAP with some users populated in the database. I would like to use PHP to create a web page where my ldap users can enter their username and password credentials to log into our intranet. Can someone point me to some expample scripts, articles, or sites. Thanks. - Delamatrix -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Looping from A to Z
Good afternoon. I'm having trouble getting PHP to loop from A through Z. Here is what I tried, coming from a C background: for ($l = A; $l = Z; $l++) echo $l; // Returns A, B, C, ..., X, Y, Z, AA, AB, AC, AD, AE, ... YX, YY, YZ. (26 * 26 results!) Interestingly, if I make it a less than operation instead of less than or equal to, it works correctly (except for the Z): for ($l = A; $l Z; $l++) echo $l; // Returns A, B, C, ..., W, X, Y (25 results) Anyone know why PHP would do that? Richard --- Richard K. Miller www.richardkmiller.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Looping from A to Z
Good afternoon. I'm having trouble getting PHP to loop from A through Z. Here is what I tried, coming from a C background: for ($l = A; $l = Z; $l++) echo $l; // Returns A, B, C, ..., X, Y, Z, AA, AB, AC, AD, AE, ... YX, YY, YZ. (26 * 26 results!) Interestingly, if I make it a less than operation instead of less than or equal to, it works correctly (except for the Z): for ($l = A; $l Z; $l++) echo $l; // Returns A, B, C, ..., W, X, Y (25 results) Anyone know why PHP would do that? Nope... but try... for ( $l = ord(A); $l = ord(Z); $l++ ) echo $l; Also maybe check out the range() function. -philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Looping from A to Z
Richard K Miller wrote: Good afternoon. I'm having trouble getting PHP to loop from A through Z. Here is what I tried, coming from a C background: for ($l = A; $l = Z; $l++) echo $l; // Returns A, B, C, ..., X, Y, Z, AA, AB, AC, AD, AE, ... YX, YY, YZ. (26 * 26 results!) Interestingly, if I make it a less than operation instead of less than or equal to, it works correctly (except for the Z): for ($l = A; $l Z; $l++) echo $l; // Returns A, B, C, ..., W, X, Y (25 results) Anyone know why PHP would do that? Richard --- Richard K. Miller www.richardkmiller.com foreach(range('a', 'z') as $value){ echo $value; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HN CAPTCHA at http://www.phpclasses.org
Manuel: A good CAPTCHA must be fuzzy. If you know other fuzzy CAPTCHA besides these, it may help to sharing that knowledge. Try this: http://xn--ovg.com/no_bot The point of CAPTCHA is to provide something that a bot can't figure out, but a human can, right? Well, for a bot to figure out the answer, the bot must be able to get at the source code, right? Take a look at this source code and from it determine the answer. Also, try to view the content source code from any page on this site. I think this data is bot-proof, isn't it? Or have I blundered? Many thanks for any review and/or suggestions. tedd -- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Looping from A to Z
Good afternoon. I'm having trouble getting PHP to loop from A through Z. Here is what I tried, coming from a C background: for ($l = A; $l = Z; $l++) echo $l; // Returns A, B, C, ..., X, Y, Z, AA, AB, AC, AD, AE, ... YX, YY, YZ. (26 * 26 results!) Interestingly, if I make it a less than operation instead of less than or equal to, it works correctly (except for the Z): for ($l = A; $l Z; $l++) echo $l; // Returns A, B, C, ..., W, X, Y (25 results) Anyone know why PHP would do that? Richard I don't see the problem. There are 26 letters. If you say start at A and finish before Z, then you should expect 25 letters returned. Maybe there is something I'm not understanding. tedd -- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HN CAPTCHA at http://www.phpclasses.org
You got me. Where are you hiding it? Gerry On 2/19/06, tedd [EMAIL PROTECTED] wrote: Manuel: A good CAPTCHA must be fuzzy. If you know other fuzzy CAPTCHA besides these, it may help to sharing that knowledge. Try this: http://xn--ovg.com/no_bot The point of CAPTCHA is to provide something that a bot can't figure out, but a human can, right? Well, for a bot to figure out the answer, the bot must be able to get at the source code, right? Take a look at this source code and from it determine the answer. Also, try to view the content source code from any page on this site. I think this data is bot-proof, isn't it? Or have I blundered? Many thanks for any review and/or suggestions. -- Gerry http://portal.danen.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HN CAPTCHA at http://www.phpclasses.org
You got me. Where are you hiding it? In test.js: http://www.xn--ovg.com/no_bot/rpc.php?action=one Unless you hide it in a different place each time, how useful is that? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Recursive permissions
I am aware of how to change the contents of a directory to a specific chmod using a recursive php routine, but I was looking for a simpler way. That's the only way. Doing it through ftp, the ftp program does the recursive stuff - not the ftp server. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Looping from A to Z
Good afternoon. I'm having trouble getting PHP to loop from A through Z. Here is what I tried, coming from a C background: for ($l = A; $l = Z; $l++) echo $l; // Returns A, B, C, ..., X, Y, Z, AA, AB, AC, AD, AE, ... YX, YY, YZ. (26 * 26 results!) Interestingly, if I make it a less than operation instead of less than or equal to, it works correctly (except for the Z): for ($l = A; $l Z; $l++) echo $l; // Returns A, B, C, ..., W, X, Y (25 results) Anyone know why PHP would do that? Richard From the PHP docs: PHP follows Perl's convention when dealing with arithmetic operations on character variables and not C's. For example, in Perl 'Z'+1 turns into 'AA', while in C 'Z'+1 turns into '[' ( ord('Z') == 90, ord('[') == 91 ). Note that character variables can be incremented but not decremented. -Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HN CAPTCHA at http://www.phpclasses.org
How would a bot find it though? On 2/19/06, comex [EMAIL PROTECTED] wrote: You got me. Where are you hiding it? In test.js: http://www.xn--ovg.com/no_bot/rpc.php?action=one Unless you hide it in a different place each time, how useful is that? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP/LDAP Authentication
Thanks for all the help! I'll check it out. - Delamatrix Weber Sites LTD wrote: Maybe this can help : Authentication script to authenticate users in Active Directory through LDAP. http://www.weberdev.com/get_example-3261.html Sincerely berber Visit the Weber Sites Today, To see where PHP might take you tomorrow. Search for PHP Code from your browser http://toolbar.weberdev.com Free Uptime Monitor : http://uptime.weberdev.com SEO Data Monitor http://seo.weberdev.com -Original Message- From: Golden Butler [mailto:[EMAIL PROTECTED] Sent: Sunday, February 19, 2006 8:40 AM To: PHP Mailing List Subject: [PHP] PHP/LDAP Authentication I'm currently running OpenLDAP with some users populated in the database. I would like to use PHP to create a web page where my ldap users can enter their username and password credentials to log into our intranet. Can someone point me to some expample scripts, articles, or sites. Thanks. - Delamatrix -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Recursive permissions
On Sat, Feb 18, 2006 at 06:07:16PM -0500, tedd wrote: On 2/18/06, tedd [EMAIL PROTECTED] wrote: Hi gang: Question: I know you can set a directory to have certain permissions, but how do you set the permissions to be recursive? In other words, for example, if you set the directory to be 755, then everything placed within that directory will also be 755. http://php.net/manual/en/function.umask.php -- Kim Christensen Kim: Thanks, but are you sure about that? In a way, yes. It is rather unclear because, well a 755 on a normal file isn't and shouldn't be needed. It also depends on how the file is created, by default most file creation tools will always try to create a file with 666 permissions and directory creation with 777. The umask is an XOR value that should be applied to the creation. Assuming umask is set to 022, when you create a dir 777 XOR 022 == 755; make a file, 666 XOR 022 = 644. So if your directories dont end up with a 755 setting your umask is set to something other than 022. What I'm looking for is how to set the permissions for a directory such that all files in it will have the same permissions. Directoryies require that you have the x (execution aka octet 1) bit set in order to get a listing of the directory. Thus why you have 755 on directories. Files should only have the x bit set if they actually should be executed, otherwise they should be 644. Now with all that. if you set a umask of 133, and dont need to ever get a directory listing of files, you most likely will be able to maintain a file structure that everything has the same permissions but it will only be 644. I use GoLive and in their file FTP access settings they have a recursive checkbox. If the checkbox is not checked, then whatever permission setting I give to a directory is just to the directory. However, if it the recursive checkbox is checked, then all files placed in the directory will have the directory's permissions. Perhaps this is something limited to GoLive and not an option in setting chmod's via php's built-in functions. I am aware of how to change the contents of a directory to a specific chmod using a recursive php routine, but I was looking for a simpler way. Your question is really not clear what the problem is. It seems you are having some issues with permissions, and is probably due to your ftp access vs your web access but that is a guess at this point. Curt. -- cat .signature: No such file or directory -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP generated JavaScript
Is is possible to make an external Javascript with PHP. Am I doing this correcT? ?php header(Content-Type: text/javascript); $text = Hello World; echo alert('.$text.');; ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php