Jump to content

jazzman1

Staff Alumni
  • Posts

    2,713
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by jazzman1

  1. Well, to help you here you need to print out the $conn variable, to see what result you want to match. Most likely the regExp pattern does not match the string as expected. Add the following else condition, if (preg_match_all($pattern,$connstr,$arr,PREG_PATTERN_ORDER)) { echo "<sql>".print_r($arr,true)."</sql>\n"; array_push($GLOBALS["sql"],print_r($arr,true)); echo " <conn dbsrvr=\"".$arr[1][6]."\" dbname=\"".$arr[4][7]."\" user=\"".$arr[2][6]."\" pass=\"".$arr[3][6]."\" php_tz=\"".$arr[5][10]."\" php_dtf=\"".$arr[6][8]."\" php_dta=\"".$arr[7][9]."\" pt_on=\"".$arr[8][0]."\" pt_mail=\"".$arr[9][1]."\" curl=\"".$arr[10][2]."\" cto=\"".$arr[11][3]."\" pto=\"".$arr[12][4]."\" ssl=\"".$arr[13][5]."\" />\n"; } else { echo "NOT match"; }
  2. I've never heard of it before and it's only compatible with windows platform, that's why I don't know it. All files and folders starting with a dot (.) symbol are hidden in the Unix world, windows is not Unix but obviously that works as well. What about to add a dot in front of _SYNCAPP directory to make it hidden?
  3. Put the following on top of the index.php file: <?php ini_set('display_errors',1); ini_set('display_startup_errors',1); error_reporting(-1); To debug database queries use the mysql_error() php function: mysql_connect($server, $username, $password) or die(mysql_error()); mysql_select_db($db) or die(mysql_error()); $r1=mysql_query("select count(*) as records from blog") or die(mysql_error()); // etc.....
  4. What do you want to accomplish? To disable all requests for all hidden files and directories starting with "_" to the currect directory or you want to scan (search, research) them there....or something else?
  5. What about to show us all related scrips? I'm not a windows expert but check if all services are started in XAMMP?
  6. Do you know what a dot notation for db server is? To get the workaround to that $db just to enclose the string with backticks or rename it. Change: $db = "test.php"; // to $db = "`test.php`"; //or $db = "test_php";
  7. Why do you want to make a search by string length? What about if the length of two or more devices match the actual number of characters in the string?
  8. The "at" (@) symbol is called error-control operator in PHP. It suppress errors, warnings and notices, so, I recommend to avoid using it when you're developing applications and for sure there is nothing to do with charset and collation settings in this case. I saw you fixed the problem changing "utf8" to "latin1".
  9. Hm....it's a template. How did you create the database and all tables by this application (event calendar) or via phpMyAdmin? To fix it open up the index.php file (located in the main directory) and change the following: // Collation.. @mysql_query("SET CHARACTER SET 'utf8'"); @mysql_query("SET NAMES 'utf8'"); //to // Collation.. mysql_query("SET CHARACTER SET 'latin1'"); mysql_query("SET NAMES 'latin1'");
  10. I've made a test using the same database character set and collation (latin1_swedish_ci) setting apache headers in the html document as <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> and works just fine with this charset. Are you using in your php code a header() function somewhere?
  11. No. According to the above picture, the 2nd row is being created by proper encoding, the 3rd NOT. You don't have to use utf-8 as character encoding when inserting a data to database. Have you added a charset to the php connection string, such as charset=utf8?
  12. Then, stop learning tutorials and start learning the core programming logic by reading the docs
  13. Well-deserved mac. Congrats my friend
  14. @REO, once you have selected the database via phpMyAdmin, click the 1st icon (browse) under action, beside the table name, while in the structure view and do a "view" to display rows of data in the database containing those swedish letters. I want to know how the swedish letters are represent in this column as question marks or normal swedish letters?
  15. Then, most likely you're using different charset settings when you're inserting the data to database. Have you seen the content correctly when you try to open the content of this column via phpMyAdmin?
  16. I'm not compiled this version of php. However, what says - ./configure --help ?
  17. I'd start running a mysql command line client executing sql statements from a text file using the source command. Here, it's an example of installation sakila database, use same logic.
  18. What's the default database character set and database collation? Most of mysql visual tools use the default db character set and collation as latin1_swedish_ci, if so you don't have to have any issues with swedish letters.
  19. Then, you need to join the "Document table" table as well to your query. That's why I told you to provide some sample of data and what do you want to retrieve from them.
  20. How? With pictures? Common boy, be serious please
  21. Give us some sample of data, please. I don't see where "idAssetDocStand" belongs to in your explanation above.
  22. If "idAssetDocStand" is a column from a table named "AssetDocStand" (left table), then you'd use a LEFT JOIN with the where clase where this ID is NULL to retrieve a set of rows not matching rows in the right table (Asset), but I'm not sure about that The better way is to explain your tables structure PS, try next: $query_DocUp = sprintf("SELECT idAssetDocStand FROM AssetDocStand LEFT JOIN Asset ON AssetDocStand.idAsset = Asset.idAsset WHERE AssetDocStand.idDocumentStandards = %s AND AssetDocStand.Archive=%s AND Asset.idLocation = %s AND Asset.idAsset is NULL", GetSQLValueString($colname_DocUp, "int"), GetSQLValueString($colname_Archive, "text"), GetSQLValueString($colname_Location, "int"));
  23. Separate the set from select sql statement. Try, mysql_query("SET @serial=0;") or die(mysql_error()); $bg_sql=("SELECT @serial := @serial+1 AS `photo_number`, `photo_filename` FROM `gallery_photos` ORDER BY RAND() LIMIT 20"); $bg_result=mysql_query($bg_sql) or die (mysql_error());
  24. Have you quoted the query running by php?
  25. you should focus into the data comming from the html textarea field, the content of this field will be send to the server and receive some response using ajax.
×
×
  • 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.