Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by Itshim

  1. Itshim

    get ip address

    This function has always worked for me: function getIpAddress() { if (!empty($_SERVER['HTTP_CLIENT_IP'])) { $ip_expl = explode('.', $_SERVER['HTTP_CLIENT_IP']); $referer = explode('.', $_SERVER['REMOTE_ADDR']); if ($referer[0] != $ip_expl[0]) { $ip = array_reverse($ip_expl)...
  2. Itshim

    Save As...Slow Response

    Thank you for the replies. I checked the mapped drives, and they are all connected (there are three). Also, I have had this computer for about a year, and have not changed anything recently. Since last I posted I ran a registry cleaner, but no luck there either. If I find anything I will post...
  3. Itshim

    Save As...Slow Response

    It all started when I noticed my computer getting a little sluggish. I ran Anti-virus, Anti-Spam, disk cleanup, and defrag. This seemed to fix my sluggish issue, but now my 'Save As...' dialog box, takes about 20-30 seconds to open. It only happens the first time I attempt to 'Save As'. I...
  4. Itshim

    MySQL / PHP INT values

    vacunita, I had not thought about new data types being added as DBs mature, and I think you make a very valid point. Since I would assume all values can be represented as strings (except for NULL of course) it would definitely make more sense to have a stable extension instead of trying to...
  5. Itshim

    MySQL / PHP INT values

    I have done a little more research into this and found that it actually happens in the MySQL C API. The documentation I found on mysql_fetch_row() (in the C API) states: Now PHP does the conversion for you, but I am actually more shocked that it happens in the C because it is not a loosely...
  6. Itshim

    MySQL / PHP INT values

    I understand that, my question is why label them as strings when they are coming into PHP as integers? If they were labeled as integers you could still do everything you listed because like you said: PHP variables type depends on its content, and its context. I completely understand in the...
  7. Itshim

    MySQL / PHP INT values

    Actually, I believe they are returned as strings, because using the comparison '===' will fail when comparing the returned value to an integer. The documentation of mysql_fetch_array (and other mysql functions) state: Also if you use var_dump() on a returned value it is labeled as a string...
  8. Itshim

    MySQL / PHP INT values

    When querying data out of MySQL into PHP, all values from MySQL arrive in PHP as strings, even if the MySQL column type is INT. This is documented behavior, but I was wondering if someone could explain why this is the case. The data type returned by MySQL corresponds to the column type, so why...
  9. Itshim

    include() failed...Or did it?

    Excellent, error_get_last() looks like the right tool for the job. I have a tendency to stay away from require() calls, because if it fails it issues an fatal error (E_ERROR), problem with that being that there is no way to trap a fatal error. I was hoping that require() would be changed to...
  10. Itshim

    Cannot use relative paths in PHP scripts

    Doing some testing on my setup Windows XP/Apache 2.2/PHP 5.2.3 The include_path directive is commented out by default, and loading up the phpinfo() file shows: include_path .;C:\php5\pear So I have to assume if PHP finds no include_path directive it defaults to this. If you uncomment the...
  11. Itshim

    include() failed...Or did it?

    That is what I normally do, but it occurred to me this morning that an include file could have the statement: return FALSE; In which case the code: if ((include $filename) === FALSE){ //do something } would not be able to determine if the file was included or not. I am not actually having a...
  12. Itshim

    include() failed...Or did it?

    Doing some testing, I have found that when and include statement fails to open a stream it returns boolean FALSE (along with generating warnings), but an included file could also return FALSE. I would like to know if there is a way to determine (programmatically) if the include failed or it was...
  13. Itshim

    php installation

    I have to agree with josel on one point: But I would also urge you to manually install PHP, you will have a chance to learn about configuring PHP, enabling extensions, and everything else that goes along with it. I am no server wiz and I recently had to update my development server. I had...
  14. Itshim

    Need help with Array

    Not to hijack a thread but... I'm shocked; I have never run into this problem. Do you know of any specific browsers which behave this way? The value attribute of a checkbox is required by the HTML specs and if no value is given the client is suppose to send the value 'on'. I know browsers...
  15. Itshim

    Adding Dates

    I should have explained it a little better... Example 437 shows how the functions date() and mktime() can be used together to add and subtract time. //ten days ahead $lastmonth = mktime(0, 0, 0, date("m"), date("d")+10, date("Y")); //ten days back $lastmonth = mktime(0, 0, 0, date("m")...

Part and Inventory Search

Back
Top