FAQ

Search Discussions

1,386 discussions - 2,432 posts

  • For installation and enabling support of OCI8, I highly recommend Zend Core for Oracle from Zend. I had almost a month's worth of trouble trying to get OCI8 working until I found that, and it was a ...
    JonJon
    May 10, 2006 at 4:42 pm
    Dec 7, 2009 at 9:33 pm
  • function arfsort($a,$fl){ $GLOBALS['__ARFSORT_LIST__'] = $fl; usort($a,'arfsort_func'); return $a; } function arfsort_func($a,$b) { foreach ($GLOBALS['__ARFSORT_LIST__'] as $f) { switch ($f[1]) { // ...
    Numbertype???Numbertype???
    May 17, 2006 at 1:06 am
    Jan 23, 2011 at 4:17 pm
  • Just in case: 'max_allowed_package' is a MySQL variable; it is not a PHP function/variable/constant. Further info: http://dev.mysql.com/doc/refman/4.1/en/packet-too-large.html HTH. ---- Server IP: ...
    GustavonareaGustavonarea
    May 17, 2006 at 1:53 am
    Oct 27, 2010 at 9:58 pm
  • estoreic (note from 15-May-2006 10:54) is right. there seems to be a problem with the oci8-api-functions in php 4.4.x. there are error-messages like these in the error_log: child pid 22297 exit ...
    Rainer KlierRainer Klier
    May 22, 2006 at 9:02 am
    Jun 26, 2009 at 6:35 pm
  • We were having performance issues caused by Segmentation Faults on pages using Oracle. An example of the Seg faults appearing in Apache's error log is: *** glibc detected *** free(): invalid next ...
    Estoreic ListEstoreic List
    May 16, 2006 at 5:47 am
    Jun 26, 2009 at 6:35 pm
  • Dropping support for Oracle 9i clients on Windows is a huge mistake! Most people in production environments can't just slap another oracle_home on their box just for php traffic. The Instant Client ...
    Terry GreenlawTerry Greenlaw
    May 12, 2006 at 5:03 pm
    Jun 26, 2009 at 6:34 pm
  • mail() opens a new connection for each email it sends out which causes some significant overhead if you're sending out many emails in one go. You can avoid this by using sockets like Antony Male has ...
    ChrisChris
    May 27, 2006 at 7:03 pm
    May 17, 2009 at 8:10 pm
  • Just as a reply to 'evildictaitor', eval() obfuscation can be of use use against script kiddies, or people with little free time if implemented more intelligently. And by more intelligently I mean ...
    AoeuidAoeuid
    May 14, 2006 at 7:44 pm
    May 17, 2009 at 7:51 pm
  • To partialy correct Neo's on RFC 850 date... RFC 850 is obsolete by RFC 1036. In HTTP header, RFC 1123 is the first choice: it has a fixed length format and 4 digits year. Therefore, the correct ...
    PosenatoPosenato
    May 15, 2006 at 6:30 am
    Feb 7, 2009 at 1:20 am
  • The GNU manual page has moved, the new address is http://www.gnu.org/software/shishi/ manual/html_node/Date-input-formats.html ---- Server IP: 213.92.11.19 Probable Submitter: 217.220.95.174 ---- ...
    D_spagnoliD_spagnoli
    May 11, 2006 at 10:11 am
    Oct 25, 2008 at 5:55 am
  • BugFix of davidstummer's listImages() function: function listImages($dirname=".") { $ext = array("jpg", "png", "jpeg", "gif"); $files = array(); if($handle = opendir($dirname)) { while(false !== ...
    RepleyatfreemaildotitRepleyatfreemaildotit
    May 19, 2006 at 11:46 am
    May 13, 2007 at 6:54 pm
  • To PHP 5.1.2 and above you can simulte this function with: <?php if (!function_exists('curl_setopt_array')) { function curl_setopt_array(&$ch, $curl_options) { foreach ($curl_options as $option = ...
    DarkelderDarkelder
    May 23, 2006 at 6:37 pm
    Jan 16, 2007 at 11:36 pm
  • Be carefull with: $characters[mt_rand(0, count($characters))]; "If you want a random number between 5 and 15 (inclusive), for example, use mt_rand (5, 15)." Array index are between 0 and n-1, but ...
    AriasArias
    May 29, 2006 at 8:56 am
    Nov 7, 2014 at 11:03 am
  • Thanks to armstrong ~~at~~ rice ~~dot~~ edu for your number to words function. There does seem to be one glitch I've discovered, at least on my system. Hundreds work but hundreds of thousands and ...
    GfinaleGfinale
    May 14, 2006 at 5:52 pm
    Mar 23, 2014 at 2:16 pm
  • If you want to check, if there are some more elements in array after given key, you can use the following function: function more_array_keys($keyname, &$array) { if (!is_array($array)) { return ...
    SigmarSigmar
    May 30, 2006 at 9:44 pm
    Oct 22, 2013 at 2:58 pm
  • The documentation for array_merge_recursive() states that string keys are preserved while numeric keys are renumbered. What's not obvious is that string keys which happen to be numeric are NOT ...
    VladimirkorneaVladimirkornea
    May 11, 2006 at 2:03 pm
    Oct 22, 2013 at 2:58 pm
  • Re Solaris I was able to compile PHP 5.0.4 under Solaris 2.6 but I had to use gcc to do it. The source is not compatible with the Solaris C preprocessor. I did not have to install any of the gnu ...
    Chris GoodChris Good
    May 10, 2006 at 7:06 am
    Oct 22, 2013 at 2:58 pm
  • Encrypting user input doesn't do much to guard against SQL injection attacks. Naturally, you want to encrypt sensitive information across the wire, but if a user puts in malicious data into an input ...
    SomebodySomebody
    May 10, 2006 at 3:56 pm
    Oct 22, 2013 at 12:17 pm
  • Really, you should not send headers terminated by \n - it's not per-rfc supported by a HTTP server. Instead, send as \r\n which is what the protocol specifies, and that regular expression would be ...
    GeoffreyatnevradotnetGeoffreyatnevradotnet
    May 6, 2006 at 10:47 pm
    Oct 22, 2013 at 6:53 am
  • I have modified my function found in the previous post. It now uses preg_replace() which should technically be faster than ereg_replace(). You can also specify what you want to replace "\r\n" with. ...
    Godfrankdomain-ismsntld-iscomGodfrankdomain-ismsntld-iscom
    May 18, 2006 at 4:06 am
    Jun 13, 2013 at 11:11 am
  • WARNING : I believe there are a couple of mistakes in the function provided just below by maciej dot strzelecki at gmail dot com. Namely, that in the two substr_replace() calls, the third parameters ...
    DholmesDholmes
    May 9, 2006 at 3:20 pm
    Jan 15, 2013 at 5:09 am
  • With regard to the note written by dolan at teamsapient dot com: You must take note that list() assigns variables starting from the rightmost one (as stated in the warning). That makes $record having ...
    ErgalvanErgalvan
    May 4, 2006 at 6:23 pm
    Sep 13, 2012 at 10:06 am
  • Negative timestamps give problem also using linux as guest operating system inside WMvare with Windows host operating system. ---- Server IP: 213.92.11.19 Probable Submitter: 193.204.78.114 ---- ...
    Carlo TafuroCarlo Tafuro
    May 8, 2006 at 11:34 am
    Sep 7, 2012 at 1:21 am
  • Here is a function for calculating the $k-th root of $a : <?php function root($a,$k){return(($a<0&&$k%2 0)?-1:1)*pow(abs($a),1/$k);}; ? ---- Server IP: 195.70.37.52 Probable Submitter: 62.77.205.248 ...
    Nospam) (nospamNospam) (nospam
    May 10, 2006 at 8:21 am
    Aug 2, 2012 at 3:30 pm
  • An easier way of achieving the same result as implode_with_keys() - and quicker execution time: <? /* NOTE: $glue is not used if $is_query is true */ function implode_with_keys($array, $glue, ...
    AdnanAdnan
    May 23, 2006 at 4:10 pm
    Aug 2, 2012 at 1:17 pm
  • I have a new characters table. i want send it below that. <?php $color = "#f1f1f1"; echo "<center "; echo "<h1 From 32 To 255 Characters Table</h1 "; echo "</center "; echo "<table border=\"0\" ...
    ErdemErdem
    May 17, 2006 at 6:09 am
    Aug 2, 2012 at 11:39 am
  • Example "Hello World!" SSL HTTP Server. Note, if you don't use a signed ssl certificate, your browser will give you a warning. <?php // Hello World! SSL HTTP Server. // Tested on PHP 5.1.2-1+b1 (cli) ...
    EE
    May 26, 2006 at 2:29 am
    May 10, 2012 at 8:54 pm
  • Will check a Multi-Dimentional Array to any specified level. This is a fix to 11/16/05 submission, which would break since you must supply a foreach with an array. Beware recursive functions ...
    JupiterJupiter
    May 30, 2006 at 2:43 am
    Oct 9, 2011 at 9:20 am
  • In addition to what "tobias_demuth at web dot de" wrote: Assigning the return value of a function to a constant does not work. Thus you may assign the return value of a function to a global constant ...
    Php-generalPhp-general
    May 31, 2006 at 8:56 am
    Aug 3, 2011 at 1:26 pm
  • If you are storing your passwords with and MD5 hash and are worried about collisions, an approach I have used was to store two passwords for the user. credentials ---------- userName password ...
    CoryostrudelCoryostrudel
    May 17, 2006 at 12:39 pm
    Jul 17, 2011 at 8:38 am
  • Here is an unfucked version of the arbitrary-large-number base_convert examples below: I modified it so that it works as drop-in replacement for base_convert. Attention, no sanity checking is done ...
    MichaelrennerMichaelrenner
    May 17, 2006 at 1:17 pm
    Jul 2, 2011 at 3:37 pm
  • I try to use the function unpackZip from schore at NOSPAM dot hotmail dot com. it appears that the fclose instruction is missing. Without that instruction, i've got some trouble to unpack zip file ...
    Php-generalPhp-general
    May 10, 2006 at 2:16 pm
    Jun 29, 2011 at 3:24 pm
  • READ HERE If installing PHP 5.x on Windows Server 2003 / IIS 6.x ... It was extremely frustrating getting this to work, so hopefully my struggle will allow others to do this the *easy* way. BEFORE ...
    Winterspan-at-gmail /c/o/mWinterspan-at-gmail /c/o/m
    May 20, 2006 at 4:51 am
    Jun 20, 2011 at 3:21 pm
  • Simpler version of Bruteork's example (though not making use of floor()): <?php if ($counter % 2 == 0) echo "even"; ? ---- Server IP: 129.16.214.50 Probable Submitter: 85.30.174.70 ---- ...
    AndreasblixtAndreasblixt
    May 27, 2006 at 8:19 pm
    Mar 10, 2011 at 3:11 pm
  • Due to the floating point precision issue (http://www.php.net/float) if you round() one additional decimal point prior to calling floor() you will get the expected result. For example: echo ...
    JaredfineJaredfine
    May 30, 2006 at 3:09 am
    Mar 10, 2011 at 3:10 pm
  • Just to complete Murat TASARSU's post in this page. I hope this will help anyone who is going to add it with fsockopen <html <body <form method="post" action="" <input name="fruit" value="banana" / ...
    HyanchristianHyanchristian
    May 25, 2006 at 7:44 am
    Mar 9, 2011 at 2:24 pm
  • Regarding the user who states that foreach is faster, this depends on the size of the array you are dealing with. On large arrays while(list($key, $val) = each($array) is considerably faster, as in ...
    ScinScin
    May 4, 2006 at 3:23 am
    Feb 18, 2011 at 3:57 pm
  • There was a post earlier about not using the $_FILES['userfile']['type'] for verification and that a malicious PHP file could be hidden under the image/gif mime type. That is correct, but it is not ...
    IvandotcukicatgmaildotcomIvandotcukicatgmaildotcom
    May 20, 2006 at 1:02 pm
    Jan 23, 2011 at 4:53 pm
  • At least in PHP 4.3.11 ftp_nlist lists complete paths, not just filenames. Therefore the function by uma at di4 dot com did not work for me. But it worked with a small change in line 6 like this: ...
    MailatmartinauerdotnetMailatmartinauerdotnet
    May 14, 2006 at 5:29 pm
    Jun 30, 2010 at 12:03 pm
  • That's an interesting discovery. I don't think it should be this way, but I think it's more a firefox/browser bug (at least, if you see it as a bug) than a fault in mysql/php. What happens if you ...
    AesarAesar
    May 9, 2006 at 5:20 pm
    Jun 16, 2010 at 12:49 pm
  • Same here with PHP 5.1.4. is_writable ignores my ACLs and also groups dont work sometimes. ---- Server IP: 217.160.72.57 Probable Submitter: 84.175.44.21 ---- X-Spam-Status: No, hits=3.1 required=5.0 ...
    F KnodtF Knodt
    May 24, 2006 at 5:26 pm
    Apr 7, 2010 at 7:07 pm
  • I had trouble using IIS and PHP with Firefox. If you are having similar problems then take a look at this article: http://blogs.wdevs.com/shog9/archive/2005/03/09/2668.aspx ---- Server IP: ...
    InfoInfo
    May 2, 2006 at 10:16 pm
    Apr 7, 2010 at 6:31 pm
  • A nice tutorial on PHP5's abstract classes and interfaces: Working with php5 class types abstract classes and interfaces. http://www.phpfive.net/article4.htm ---- Server IP: 66.163.161.117 Probable ...
    JamesJames
    May 16, 2006 at 5:04 pm
    Apr 7, 2010 at 6:12 pm
  • The correct url for the windows dll is: http://pecl4win.php.net/ext.php/php_sqlite.dll ---- Server IP: 64.71.164.2 Probable Submitter: 207.170.255.253 ---- X-Spam-Status: No, hits=3.1 required=5.0 ...
    Notshrockc_inhs_orgNotshrockc_inhs_org
    May 10, 2006 at 4:59 pm
    Apr 7, 2010 at 2:49 pm
  • The following code will rename an uploaded image to a MD5 hash with a rand number added of its name and check wheter a file with same hash already exists or not: <?php $file = ...
    SirarthurSirarthur
    May 10, 2006 at 6:57 pm
    Feb 18, 2010 at 2:22 pm
  • I would think that this is the preferred behavior anyways since the compilation should be independent from the source code. I would want to be able to compile any part of my source code without ...
    ShannahatsfudotcaShannahatsfudotca
    May 23, 2006 at 10:37 pm
    Feb 18, 2010 at 2:17 pm
  • Members can be added to instances on the fly. Simply use $apple= new fruit(); $pear=new fruit(); $apple- color='red'; $pear- smell='sweet'; and $apple only will contain a member (field) color, but ...
    Php-generalPhp-general
    May 1, 2006 at 1:00 pm
    Feb 15, 2010 at 5:55 pm
  • If you need to "emulate" offset/limit (as PEAR::DB puts it) for db2 queries, you will definitely need to add array('cursor' = DB2_SCROLLABLE) to your db2_exec() call. Otherwise, you will get nothing ...
    ShawnShawn
    May 19, 2006 at 5:27 pm
    Dec 15, 2009 at 7:51 pm
  • Use this with OCIResult(). Though you may find OCIFetchInto to be faster than the combination of OCIFetch and OCIResult ---- Server IP: 64.71.164.2 Probable Submitter: 130.85.107.40 ---- ...
    Mlong-phpatmlongdotusMlong-phpatmlongdotus
    May 8, 2006 at 10:36 pm
    Dec 1, 2009 at 9:52 pm
  • Note that the "new" operator no longer returns a copy of the constructed object, but the object itself. This behavior may be as of PHP 5.x. This means that $foo = new class(); and $foo =& new ...
    AibAib
    May 31, 2006 at 6:13 pm
    Nov 7, 2009 at 6:59 pm
Group Navigation
period‹ prev | May 2006 | next ›
Group Overview
groupphp-notes @
categoriesphp
discussions1,386
posts2,432
users732
websitephp.net

732 users for May 2006

Bjori: 639 posts Php-general: 344 posts Nlopess: 248 posts Dave: 86 posts Ninki: 53 posts Betz: 28 posts : 28 posts Fill: 26 posts Bill: 24 posts Eric: 23 posts Mike: 20 posts Cece: 19 posts Philip: 17 posts Texasholdem: 12 posts Onlineroulette: 10 posts Onlineblackjack: 9 posts Onlinecasino: 8 posts None: 8 posts Repleyatfreemaildotit: 7 posts Text: 6 posts
show more
Archives