[PHP] Supressing warnings on "max file size exceeded"

2001-07-25 Thread Bing
How do I suppress the following message when posting a file to a .php-script? Warning: Max file size exceeded - file [uploadedfile] not saved in /home/html/org.begravningar/intradev_html/forum.php on line 0 It's a warning on line 0, and even if I put error_reporting(0) on line 1 it doesn't hel

Re: [PHP] Re: Supressing warnings on "max file size exceeded"

2001-07-25 Thread Bing
Thanks for your input Henrik, The problem isn't allowing for file-size really, I'd like to limit it to say some 500kb, but it's the inability to stop anyone from violating this rule beforehand that triggers the warning. I can't stop anyone from uploading a 600kb file until it's uploaded - and

[PHP] Location header does not work?

2004-08-03 Thread Bing Du
) { session_write_close(); header("Location: https://computing.eng.iastate.edu/mambo/index.php?option=content&task=view&id=159&Itemid=162";); exit; } == Am I doing anything wrong with the Location header? Any help would be greatly appreciated. Bing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Location header does not work?

2004-08-03 Thread Bing Du
The latest message I got was 'Redirection limit for this URL exceeded. Unable to load the requested page.This may be caused by cookies that are blocked.'. Bing > On Tuesday 03 August 2004 15:41, Bing Du offered up the following tid-bit > of > information : >> I

Re: [PHP] Location header does not work?

2004-08-04 Thread Bing Du
sk=view&id=159&Itemid=162";); } else { echo 'hello my friend'; } Bing > On Tue, 3 Aug 2004 15:34:27 -0500 (CDT), Bing Du <[EMAIL PROTECTED]> wrote: >> The latest message I got was 'Redirection limit for thi

Re: [PHP] Location header does not work?

2004-08-05 Thread Bing Du
box of the browser changed to https://computing.eng.iastate.edu/mambo/index.php?option=content&task=view&id=159&Itemid=162 fine. But instead of showing the page that https address should point to, 'You are in HTTPS mode' was displayed as the else clause specified. Bing

[PHP] retrieve all the groups a user is memberOf from active directory?

2007-01-25 Thread Bing Du
nd would like to shed some light (better with some code samples) how it should be done effectively? Any ideas would be greatly appreciated. Thanks, Bing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] retrieve all the groups a user is memberOf from active directory?

2007-01-26 Thread Bing Du
> On Thu, January 25, 2007 3:07 pm, Bing Du wrote: >> Sorry if the top is not closely PHP related. But I need to accomplish >> it >> using PHP. >> >> I can query the attribute 'memberOf' of a user from the active >> directory >> server w

[PHP] advice on sql injection/XSS prevention

2007-04-05 Thread Bing Du
form input to help prevent SQL injection/XSS? So each programmer doesn't have to write their own form validation code. I'd appreciate any advice or pointers. Thanks in advance, Bing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] how to verify PHP has been installed with ldap?

2004-04-29 Thread Bing Du
alled with ldap support? Thanks in advance for any help, Bing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] how to verify PHP has been installed with ldap?

2004-04-29 Thread Bing Du
erver, but nothing helped. Do I need to do anything on the apache server? What did I do wrong? Bing > From: "Bing Du" <[EMAIL PROTECTED]> > >> So my question is how to verify PHP has been installed with ldap >> support? > > > > And see if there is a

Re: [PHP] how to verify PHP has been installed with ldap?

2004-04-30 Thread Bing Du
/apache/bin//apachectl restart Where else should I look? Bing > Or... did you restart apache after running your make install? If not, that > might be a good idea... `/path/to/apachectl restart` > > > On Thursday 29 April 2004 04:00 pm, Curt Zirzow wrote: >> * Thus wrote Bing

[PHP] how does PHP handle kerberos authentication?

2004-05-05 Thread Bing Du
I need to code kerberos authentication in PHP. Like in Perl, it has Authen::Krb5 module. How the similar tasks are done in PHP? I've searched (all site) 'kerberos' on www.php.net but did not find any information that I need. Thanks in advance for any help, Bing -- PHP Gener

[PHP] mail sent but not received?!

2004-06-25 Thread Bing Du
like possible log, or turn on some debug level in php? I've also tried mail($to,$sbj,$msg, "-f [EMAIL PROTECTED]"), no workie either. Any help would be greatly appreciated! Bing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] call to undefined function which is defined

2007-06-11 Thread Bing Du
} else if ($offset < 0 && $n < $start) { $n = $end - ($start - $n - 1); } return chr($n); } == I don't understand why the error is about a function that's defined fine?? Thanks in advance for any help, Bing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] make global variables accessible to functions?

2006-04-07 Thread Bing Du
Hello, We use PHP 4.3.9. 'register_globals = Off' is set in php.ini. I've heard using 'global' could cause security problems. Is using $GLOBALS still not more secure than using the 'global' keyword? How should function foo() obtain the value of $a? ==

Re: [PHP] Re: make global variables accessible to functions?

2006-04-07 Thread Bing Du
the function, it's not feasible to pass all them as funtion parameters. Bing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] help with multidimentional arrays

2006-04-11 Thread Bing Du
; foreach ($arr[$sponsor] as $project) { echo "$project"; } == My expected output should be like: sponsor1: project1 title project2 title project3 title sponsor2 project1 title project7 title What is wrong? I'd appreciate any h

Re: [PHP] help with multidimentional arrays

2006-04-12 Thread Bing Du
> On 4/11/06, Bing Du <[EMAIL PROTECTED]> wrote: >> => foreach ($sponsor_id as $sponsor => $arr) >> echo "$sponsor:"; >> foreach ($arr[$sponsor] as $project) { >> echo "$project"; >>

[PHP] how should MS Access DATETIME be handled in PHP?

2006-04-13 Thread Bing Du
#x27;F j, Y'. The format looks correct. But date() requires the time it's converting be a timestamp. So how should I output the 'end_date' in the 'F j, Y' format? I'd appreciate any help. Bing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] how should MS Access DATETIME be handled in PHP?

2006-04-13 Thread Bing Du
5'. == list($year,$month,$day,$hour,$minute,$second,$fraction) = get_object_vars($rec[0]); echo "using list, year is $year"; == This one works. But I prefer using list. == $arr = get_object_vars($rec[0]); echo "year is $arr[year]"; == Thanks, Bing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] how should MS Access DATETIME be handled in PHP?

2006-04-13 Thread Bing Du
ar) rather than $arr['year']. I need to use the date as key to construct another associative array. It's easier for me to do $projects[$year] instead of $projects[$arr['year']]. Thanks also for your other advice. I appreciated it. Bing -- PHP General Mailing Lis

Re: [PHP] how should MS Access DATETIME be handled in PHP?

2006-04-13 Thread Bing Du
> Hi! > > Bing Du wrote: >> Excellent! Yes, it now does give me a clue to see what's actually in >> the >> object. print_r($rec[0]) shows: >> >> stdClass Object ( [year] => 2005 [month] => 8 [day] => 31 [hour] => 0 >> [minute] =&

RE: [PHP] how should MS Access DATETIME be handled in PHP?

2006-04-13 Thread Bing Du
gt; Interesting. Thanks a bunch for the tip, Mike. Appreciate it. Bing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] how should MS Access DATETIME be handled in PHP?

2006-04-14 Thread Bing Du
ormat() a MySQL specific funtion? If so, we're out of luck because our backend DB is MS Access. Bing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] make keys of a associative array DB field names?

2006-04-14 Thread Bing Du
($rec as $var) { echo "$var\n"; } } How should I connect them together? Say, the fields are 'name', 'age', 'score'. I want to print out $rec['name'], $rec['age'] and $rec['score'] rather than using $rec[0], $rec[1] and

Re: [PHP] how should MS Access DATETIME be handled in PHP?

2006-04-19 Thread Bing Du
the fields are of some kind of date type. Enumerating the fields is not feasible. SELECT * from table; So in this case, how should the date fields be formated in the query? Thanks, Bing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] how should MS Access DATETIME be handled in PHP?

2006-04-20 Thread Bing Du
xtra one you've created on the fly, and it will be named > "end_date_formatted". Great. Thanks, John. Yes, it works for Access as well. Bing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] how to keep spaces in parameters in URL?

2006-04-24 Thread Bing Du
Hello, == Foo Bar"; ?> == Then the URL showed up at the bottom border of the browser has 'name=foo'. What should I do to have 'name=foo bar' in the URL? I tried htmlspecialchars but did not see any difference. I'd appreciate any help. Bing -- PHP General

[PHP] how to get the absolute path of an included file?

2006-04-27 Thread Bing Du
nt variable or something? I'd appreciate any help. file1.php == == file2.php == == Thanks, Bing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] how to get the absolute path of an included file?

2006-04-28 Thread Bing Du
27; really means because file2.php is not an actual file on the filesystem. file2.php is a PHP content element in a web application. Anyway, I've figured out. Bing > 2006/4/27, Bing Du <[EMAIL PROTECTED]>: >> >> Hello, >> >> Here are the two scripts. The res

[PHP] remove html tags in text?

2006-05-11 Thread Bing Du
ted tags, like ? Thanks in advance for any ideas, Bing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] access multiple databases

2005-08-16 Thread Bing Du
' included. Do I need to install anything else, like iodbc? Would anybody give me some guidance how I should start from here? Thanks, Bing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] why memory limit is still being complained about?

2005-09-21 Thread Bing Du
ation. I've already changed it to 30M in /etc/php.ini and restarted the web server (Apache/2.0.48 on RHEL 3). And phpinfo() shows /etc/php.ini is the right config file that php uses. Anybody have any clue what I missed here? Bing -- PHP General Mailing List (http://www.ph

[PHP] protect password?

2005-11-04 Thread Bing Du
of cases? I'm sure there must be some way to store critical information in some encrypted format but it's still readable to scripts for authentication purpose. But don't know how. Any ideas or pointer would be greatly appreciated. Bing -- PHP General Mailing List (http://w

[PHP] add more features on working php?

2005-11-18 Thread Bing Du
to download PHP source and go through configure, make and make install? Thanks in advance, Bing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] add more features on working php?

2005-11-18 Thread Bing Du
David Grant wrote: Bing, Have you checked for a php-ldap RPM? Cheers, David Grant Bing Du wrote: Hello, PHP has already been installed through RPM. phpinfo() shows '--with-ldap'. That's the only information about ldap. I think there should be more than that if php were

Re: [PHP] add more features on working php?

2005-11-18 Thread Bing Du
Bing Du wrote: David Grant wrote: Bing, Have you checked for a php-ldap RPM? Cheers, David Grant Bing Du wrote: Hello, PHP has already been installed through RPM. phpinfo() shows '--with-ldap'. That's the only information about ldap. I think there should be more than t

Re: [PHP] add more features on working php?

2005-11-18 Thread Bing Du
Bing Du wrote: Bing Du wrote: David Grant wrote: Bing, Have you checked for a php-ldap RPM? Cheers, David Grant Bing Du wrote: Hello, PHP has already been installed through RPM. phpinfo() shows '--with-ldap'. That's the only information about ldap. I think there shou

[PHP] username format when binding to Active Directory?

2005-11-21 Thread Bing Du
ot; Our AD only allows authenicated bindings. We don't know user's DN before binding. So anybody know how to make PHP allow $ldaprdn="[EMAIL PROTECTED]"? Thanks in advance, Bing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] can bind but cannot search?

2005-11-22 Thread Bing Du
} } ?> == However, the following ldapsearch returns the result fine. % ldapsearch -h ad.coll.some.edu -s sub -b "dc=coll,dc=some,dc=edu" -x -D 'CN=John Smith,OU=Users,DC=Coll,DC=some,DC=edu' -W "samaccountname=jsmith" I'm in dark now and don't know

[PHP] Re: can bind but cannot search?

2005-11-22 Thread Bing Du
Bing Du wrote: Hello all, The following script returns 'search failed...' after 'LDAP bind successful...'. == "; $r=ldap_bind($ds, $ldaprdn, $ldappass); if ($r) { echo "LDAP bind successful..."; } else { echo "LDAP bind f

[PHP] how to exist within the context?

2005-11-22 Thread Bing Du
correct way to get the script stop and output its results always in the page structure. Thanks in advance, Bing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: username format when binding to Active Directory?

2005-11-22 Thread Bing Du
Bing Du wrote: Hello, The following script returns 'LDAP bind failed...'. "; $ldaprdn = "[EMAIL PROTECTED]"; $ldappass = "jsmithpass"; $ds=ldap_connect("ad.dept.some.edu"); if ($ds) { echo "Binding ..."; $r=ldap_bind($ds, $ld

Re: [PHP] how to exist within the context?

2005-11-22 Thread Bing Du
Thanks for the help. But I still got: Please enter your name! Continue processing... What I want is if no name is entered, only 'Please enter your name!' should be returned. Bing David Grant wrote: Hi, Try this: It's a hack, but it works. Cheers, David Grant Bing

Re: [PHP] how to exist within the context?

2005-11-22 Thread Bing Du
Ummm... but I don't see how that is related to my exit problem. Any pointers for me to learn more about it? Thanks much for the help. Bing Jay Blanchard wrote: [snip] [/snip] You have to POST the value back to the form. This is one of the harder concepts to grasp when progra

[PHP] syntax checking?

2005-11-22 Thread Bing Du
Hi, How should PHP syntax be checked before execution? Anything similar to what option -c does in Perl? % perl -c test.pl Thanks, Bing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] syntax checking?

2005-11-22 Thread Bing Du
bin/php -l myScript.php Too late :). I've already tried -i. Boy, that returns tons of information . My machine was choked. Bing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] syntax checking?

2005-11-23 Thread Bing Du
Bing Du wrote: Jay Blanchard wrote: [snip] How should PHP syntax be checked before execution? Anything similar to what option -c does in Perl? % perl -c test.pl [/snip] from the command line /usr/local/bin/php -i myScript.php [/snip] Ooops, sorry, should be an ell "l" /usr

Re: [PHP] syntax checking?

2005-11-23 Thread Bing Du
uld run it in a browser to get line numbers and more precise error messages Just found out this web based PHP syntax checking tool http://www.meandeviation.com/tutorials/learnphp/php-syntax-check/, it helped me find the problem. Pretty nice. Bing -- PHP General Mailing List (http://www.ph

[PHP] how to resolve this conflict?

2005-12-01 Thread Bing Du
Transaction rpmUtils.runTransaction(ts,rpmCallback, transdir) File "/usr/share/rhn/up2date_client/rpmUtils.py", line 520, in runTransaction "Failed running transaction of packages: %s") % errors, deps=rc) // So any way to walk around this conflict? Thanks in advance for any suggestions. Bing Bing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: how to resolve this conflict?

2005-12-01 Thread Bing Du
James Benson wrote: You obviously need to remove the old package or compile your own from source Bing Du wrote: Hello, I've already posted it on the MySQL General Discussion list. Thought I wanted to try this list as well in case somebody knows. 5.0.11-beta-standard is al

[PHP] generate database driven web pages

2006-01-17 Thread Bing Du
staff name is clicked, his/her staffID will then be used to query the DB for personal information. Anybody have any handy working examples to give me some hints? Thanks in advance for any help. Bing -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net