Jump to content

mvfreelance

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Contact Methods

  • MSN
    jrfocus@hotmail.com

Profile Information

  • Gender
    Not Telling
  • Location
    uk

mvfreelance's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. this forum is going "kindergarten" level , big time yo kiddo, your output:
  2. try <? $result = mysql_query("SELECT Description, Path, Thumbnail FROM pictures"); //arrays to hold the titles, descriptions and paths separately $desc = array(); $paths = array(); $thumbs = array(); $cnt = 0; //fetch tha data from the database while ($row = mysql_fetch_array($result , MYSQL_NUM )) { $desc[$cnt] = $row[0]; $paths[$cnt] = substr(strrchr($row[1],92),1); $thumbs[$cnt] = $row[2]; $cnt++; } ?>
  3. are you getting any PHP error message? are you running PHP in safe_mode ?
  4. has your code ever worked? If, yes then some change to your enviromment might have caused the script to stop working. eg. someone might 've changed the root password. Or the permitions to the storage directory If your code has just being done and it doesn't work, then try: $_createBackup = 'mysqldump -u' . $_user . ' -p' . $_password . ' ' . $_database . ' -R --opt -q --single-transaction > ' . $_sqlFile; check dev.mysql.com/doc/refman/5.1/en/mysqldump.html for the manual Also,
  5. Many thanks to AlexWD , cags & redarrow for their inputs! As I suspected at first the problem was configuration related I've got Multibyte String aka mbstring enabled (great extension for internationalization jobs) BUT when encoding_translation is enabled (encoding_translation=On), it will try translate all HTTP requests before sending them into the great PHP engine - roughly speaking and because sometimes it can't translate certain characters, it simply removes those characters from the HTTP request - dunno why... Anyways, really recommend encoding_translation=Off . best 4 all!
  6. I'm fully aware of PHP lack of support and bugs, UTF-8 related ( though it seams that PHP 6 will be fully UTF- as you said, the code works fine in your box (by the way many thanks for taking the time to try it). And it also works fine in a LAMP box I've got. And in a WAMP box of a friend. But my main WAMP box doens't respond as expected. [dammit ] I'm fairly familiar with "internationalization" so well said in the article you recommended (www.phpwact.org/php/i18n/charsets) , that makes me 99% confident that the problem is some configuration in either php.ini or httpd.conf
  7. Redarrow thanks for your input, but... as I exposed in the original post. I test the simple request: page.php?var=abcdeéf the expected result: string(7) abcdeéf page.php?var=abcdeéf page.php , code simply prints the length of the parameter 'var' followed by its value then, prints the requested URL. and no matter if the header is ISO-8859-1 or UTF-8. the output I got is the same, as follow: string(7) abcdef page.php?var=abcdeéf the PHP constant $_SERVER['REQUEST_URl'] works FINE, but $_GET does NOT. really weird <?php header("Content-type: text/html; charset=ISO-8859-1"); print("string(".strlen($_GET['var']) .") ".$_GET['var'] ."\n"); print(urldecode($_SERVER['REQUEST_URI'])); ?> and <?php header("Content-type: text/html; charset=UTF-8"); print("string(".strlen($_GET['var']) .") ".$_GET['var'] ."\n"); print(urldecode($_SERVER['REQUEST_URI'])); ?>
  8. no matter the browser I use, the results are the same... I have tried: IE6 IE7 IE8 FF 3.5.3 FF 3.5 curl.exe 7.19.3 plus, the same same code works just fine in a different server.. so def not a browser issue.. any more tips , please???
  9. My mistake when posting... I did indeed tried to use header(.... utf- .. <?php header("Content-type: text/html; charset=UTF-8"); print("string(".mb_strlen(utf8_encode($_GET['var'])) .") ".$_GET['var'] ."\n"); print(urldecode($_SERVER['REQUEST_URI'])); ?> return the same results.... I'm pretty sure that this is a configurations problem. coz the code works fine when Apache is running under Linux (centos)... thanks for the replay anyways.... Any more suggestions please??
  10. don't wanna sound rude, but If you wanna get help you should help the folks that are trying to help you first... ok, accordinly to u , and I quote below, table orders has 3 fields (adtype | adsize | seller) ... WHY are you querying "student" and "design" there then?? IF u give better details, u might get a better answer.
  11. not trying any tricks here, but post the structure of ur tables and I'll give u the right query.
  12. Hey folks! I'm no noobie, but got a problem here that' is driving me nuts... my enviromment: * php 5.2.10 * apache 2.2 * OS Windows Vista * RewriteEngine On * DefaultCharset UTF-8 When requesting any page and parsing values thru $_GET, all works fine, apart when parsing "french strings" (e.g. Chloé / Chlo%E9 , becomes: Chlo , OR Élle ,becomes: lle ) So I have: page.php <?php header("Content-type: text/html; charset=ISO-8859-1"); print("string(".strlen($_GET['var']) .") ".$_GET['var'] ."\n"); print(urldecode($_SERVER['REQUEST_URI'])); ?> request : page.php?var=ABC%25DE expected: string(6) ABC%DE page.php?var=ABC%25DE output : string(6) ABC%DE page.php?var=ABC%25DE ------------------------------------------------------ request : page.php?var=ABC%DE expected: string(6) ABC%DE page.php?var=ABC%DE output : string(6) ABC%DE page.php?var=ABC%DE ------------------------------------------------------ request : page.php?var=ABCDÉF expected: string(6) ABCDÉF page.php?var=ABCDÉF output : string(5) ABCDF page.php?var=ABCDÉF ------------------------------------------------------ request : page.php?var=ABCD%E9F expected: string(6) ABCDÉF page.php?var=ABCD%E9F output : string(5) ABCDF page.php?var=ABCD%E9F ------------------------------------------------------ So, the "É" (and its urlencode equivalent %E9) were simply ignored by PHP. Got the same results for the code <?php header("Content-type: text/html; charset=ISO-8859-1"); print("string(".mb_strlen(utf8_encode($_GET['var'])) .") ".$_GET['var'] ."\n"); print(urldecode($_SERVER['REQUEST_URI'])); ?> Anyone please???
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.