• Member Avatar for cereal
    cereal

    Replied To a Post in Redirection limit reached

    Hi, it happens because their server detects you are using a bot, by setting a User-Agent their server replies with a Location header that suggests where to redirect the request, …
  • Member Avatar for cereal
    cereal

    Gave Reputation to pty in FIND_IN_SET() performance

    It sounds like you aren't working to the strengths of the database. MySQL, unlike Oracle, PostgreSQL etc doesn't support [arrays](https://www.postgresql.org/docs/9.6/static/arrays.html), and searching on text is unlikely to be optimal. I …
  • Member Avatar for cereal
    cereal

    Gave Reputation to happygeek in DaniWeb Database Breach

    > I think I'm going to go crawl into a hole and hide now. Hey Dani, I think you are doing a brilliant job of being open and up front …
  • Member Avatar for cereal
    cereal

    Replied To a Post in FIND_IN_SET() performance

    Yes, in MySQL, RLIKE is a synonym of REGEXP: * http://dev.mysql.com/doc/refman/5.7/en/regexp.html
  • Member Avatar for cereal
    cereal

    Replied To a Post in FIND_IN_SET() performance

    FIND_IN_SET() does not use indexes, so it can become slow. You can try with a regular expression and LIKE: SELECT `column` FROM `table` WHERE `column` LIKE '123%' AND `column` RLIKE …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Issue trying to rate limit my API with Redis

    No, zero issues until now, all is fine.
  • Member Avatar for cereal
    cereal

    Replied To a Post in PHP return array with folder files from function

    You could use the `RecursiveDirectoryIterator()` something like in this comment: * http://php.net/manual/en/function.glob.php#92710 More precisely like this: <?php $path = dirname(__DIR__); $dir_iterator = new RecursiveDirectoryIterator($path , FilesystemIterator::SKIP_DOTS); $iterator = new RecursiveIteratorIterator($dir_iterator …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Issue trying to rate limit my API with Redis

    I'm following the Redis, PHPRedis documentation and the CI driver to see if there is any discrepancy that could lead those results. But as far as I'm seeing it seems …
  • Member Avatar for cereal
    cereal

    Replied To a Post in What language is this program made in ?

    Hi, look, this hex dump suggests it could be C++: 0007e0a0 72 20 61 72 67 75 6d 65 6e 74 73 0d 0a 00 00 00 |r arguments.....| 0007e0b0 …
  • Member Avatar for cereal
    cereal

    Replied To a Post in PHP / MySQLi Bind Statement

    **@Dani** I think it's related more to prepared statements in `ext/mysqli`: * http://php.net/manual/en/mysqli-stmt.bind-param.php **@Sunny** See if this comment helps: * http://php.net/manual/en/mysqli-stmt.bind-param.php#92283 Note: when uploading a blob consider to convert it …
  • Member Avatar for cereal
    cereal

    Replied To a Post in The difference between main/index.php and main/

    It is not automatic. When you call `/main/` you point to a directory (aka folder) in the document root of the web server, to display by default a file you …
  • Member Avatar for cereal
    cereal

    Replied To a Post in How to store curl_exec output into mysql table

    Hi, you have two choices: 1. parse the CSV strings into an array and then insert 2. use the `LOAD DATA INFILE` statement to feed the file to the database, …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Serve webhost root domain from public_html *subdirectory* ?

    Hi, set the the rewrite base to your subfolder `RewriteBase "/myapp/"`, then it should work. For more information read this: * http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritebase
  • Member Avatar for cereal
    cereal

    Replied To a Post in PHP Date Format

    Hi, from the [documentation the `strtotime()` function](http://php.net/strtotime) you can read: > Parse about any English textual datetime description into a Unix timestamp And it expects: int strtotime ( string $time …
  • Member Avatar for cereal
    cereal

    Replied To a Post in generate pdf from php data retrieve from mysql

    The error states: > (previously declared in C:\wamp\www\mysqltopdf\fpdf.php:36) in C:\wamp\www\mysqltopdf\fpdf.php on line 52 so check the contents of included file. Also I don't know much about this code, so verify …
  • Member Avatar for cereal
    cereal

    Replied To a Post in generate pdf from php data retrieve from mysql

    **@athanas_1** Hi, this error happens when you declare a function two or more times. For example: <?php function a() { return ; } function a() { return ; } You …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Multiple linked Gmail accounts. If one is compromised, are all of them?

    In addition: if the hash is generated by a salted md5 or sha1, the attacker can generate a string that outputs the same hash, it does not need to find …
  • Member Avatar for cereal
    cereal

    Gave Reputation to phphp in Autocomplete

    sir I also used trim() in this line to get correct party name $data[$i]['label'] = trim($row['desc1']); Thanks sir, now everything is ok.
  • Member Avatar for cereal
    cereal

    Replied To a Post in Autocomplete

    Spaces in URLs can be represented by `%20` or by `+`, it depends on the browser and by the enctype attribute of the form tag. Your script can receive requests …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Autocomplete

    Ok, the blank list of results happens because JQuery expects to receive `label` and/or `value` as index keys of the result set. > Multiple types supported: > Array: An array …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Autocomplete

    Can you show your current code? (HTML, JS and PHP) The above results seem to be originated by your previous code.
  • Member Avatar for cereal
    cereal

    Replied To a Post in Autocomplete

    Look, it works fine for me. Do this: open the **Web Developer Console** which is available in Google Chrome, Chromium and Mozilla Firefox, hit the **Network** tab and enter a …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Autocomplete

    Try with: $i = 0; while($row=sqlsrv_fetch_array($select)) { $data[$i]['code'] = $row['code']; $data[$i]['desc1'] = $row['desc1']; $i++; }
  • Member Avatar for cereal
    cereal

    Replied To a Post in Broken link

    **@HG** Hi, I think it's related to this thread: * https://www.daniweb.com/community-center/daniweb-community-feedback/threads/470580/link-underline
  • Member Avatar for cereal
    cereal

    Replied To a Post in Autocomplete

    Hi, check the source of the **custom data** example in the autocomplete JQueryUI documentation: * http://jqueryui.com/autocomplete/#custom-data The `select` property should fit your requirements: select: function( event, ui ) { $( …
  • Member Avatar for cereal
    cereal

    Replied To a Post in PHP $_FILES Size Does Not Return a Value

    Hi, with browsers requests, the server can only accept the upload and check the sizes when it finishes. So, if you want to manage the error through PHP, raise the …
  • Member Avatar for cereal
    cereal

    Replied To a Post in PHP Warning: mysqli_real_escape_string() expects parameter 1 to be mysqli,

    Hi, right before this code, set a check: /* check connection */ if(mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } Too see why the connection returns null.
  • Member Avatar for cereal
    cereal

    Replied To a Post in Mysql offline online database sync

    Hi, you could use the replication model shipped with MySQL, see: * http://dev.mysql.com/doc/refman/5.7/en/replication.html * http://dev.mysql.com/doc/refman/5.7/en/replication-howto.html Where each node acts like master and slave. See if a multi-master approach could work: …
  • Member Avatar for cereal
    cereal

    Replied To a Post in image error in cakephp

    Hi, you have to share more information about the issue, the form and the controller code could also help.
  • Member Avatar for cereal
    cereal

    Replied To a Post in Dazah

    > Can you try again and let me know if the results are as you intend them this time? You're awesome Dani, now it works fine, thank you! :D
  • Member Avatar for cereal
    cereal

    Replied To a Post in Dazah

    Thank you Dani, no way, by following your directions I get: > A different DaniWeb member is already associated with this Dazah user account. Let me recap: * my current …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Dazah

    Hi Dani! :D I have few points: ###A I still not receive emails (newsletter, notifications) with my registration email address (the *Receive Community-related Email?* issue). I only receive the monthly …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Why does Google offer free fonts to use online?

    > I'm talking more about the darkest real possibilities. Like executing arbitrary code through the font engine? That's definitely doable by crafting fonts with embedded code. See, for example, the …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Why does Google offer free fonts to use online?

    Consider also that you could serve Google Fonts from your web server, just download them and set the paths in the CSS file.
  • Member Avatar for cereal
    cereal

    Replied To a Post in How To redirect one controller to another controller in cakephp?

    Hi, are you following the documentation? * http://book.cakephp.org/3.0/en/controllers.html#redirecting-to-other-pages If affirmative, can you share your code and more information about what is not working?
  • Member Avatar for cereal
    cereal

    Replied To a Post in PHP MYSQL - saving data from forms to database

    At line 36 add: or die(mysql_error()); and see if it returns some information about the query syntax. By the way, you should switch to MySQLi or PDO. The mysql_* functions …
  • Member Avatar for cereal
    cereal

    Replied To a Post in How to profile web software prior to release?

    ###Side Note You can use **Apache Bench** to test loads: * http://httpd.apache.org/docs/current/programs/ab.html It allows you to build GET & POST requests, file uploads and see how the server performs under …
  • Member Avatar for cereal
    cereal

    Replied To a Post in PHP - Not sure why it is not working Help needed

    Hi, add error checking to the database connection and query execution, if it does not solve, test your query on a MySQL client.
  • Member Avatar for cereal
    cereal

    Replied To a Post in What's with the light fonts?

    Hi, in addition to **Ddanbe's** suggestion: with Google Chrome, right click a word in this post, choose **Inspect**, it will open the *Web Developer Console,* click on **Computed:** from there …
  • Member Avatar for cereal
    cereal

    Replied To a Post in git from command line

    Hi, if you want to download the project to a new box then you clone it, so you do: git clone url_of_the_repository If the code is already there, but not …
  • Member Avatar for cereal
    cereal

    Gave Reputation to Gribouillis in Mod- unexpected result

    On my computer, when I write f = 3.56 in a python program, the following bits are stored in memory 0 10000000000 1100011110101110000101000111101011100001010001111011 This is the IEEE 754 representation of …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Send true 404 with PHP

    > -sigh- > Why is it so, that when there's an issue, people look all around :D, but not on the issue. lol, I asked because I do not know …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Send true 404 with PHP

    Hi, I don't understand your request: `defined()` is used only with constants not with statements, are you defining a constant or just trying to `include 'somefile.php';` and be sure it's …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Mod- unexpected result

    Hi, It happens because of rounding errors, for more information see: * http://floating-point-gui.de/ * http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html You could try with `Decimal()`: from decimal import Decimal # with binary floating points print(divmod(356, …
  • Member Avatar for cereal
    cereal

    Gave Reputation to Taywin in Php Excel data showing duplicate data

    Check your line 73, you are assigning value (using `=` instead of `==`) for 2 conditions checking. Fix that and see how it is going to be.
  • Member Avatar for cereal
    cereal

    Replied To a Post in select box error

    Hi, can you show the code that gives you this issue?
  • Member Avatar for cereal
    cereal

    Replied To a Post in how to get count in prepare using PDO Functions

    See this comment: * http://php.net/manual/en/pdostatement.rowcount.php#113608 You can connect to MSSQL through different drivers, depending on which you choose then you can use `rowCount()`.
  • Member Avatar for cereal
    cereal

    Gave Reputation to diafol in how to get count in prepare using PDO Functions

    `rowCount` shouldn't be used for `SELECT`. It's more like the old `rows_affected`. From the manual: >PDOStatement::rowCount() returns the number of rows affected by the last DELETE, INSERT, or UPDATE statement …
  • Member Avatar for cereal
    cereal

    Replied To a Post in how to get count in prepare using PDO Functions

    Hi, if using MySQL you can do a second query: $num = $this->conn->query("SELECT FOUND_ROWS()")->fetchColumn(); About rowCount(): > PDOStatement::rowCount() returns the number of rows affected by the last DELETE, INSERT, or …
  • Member Avatar for cereal
    cereal

    Replied To a Post in Want to know how to build php website using mysql

    Hi, start from the ground: * install a local development environment to test your scripts, so search tutorials about installing PHP and MySQL, or if you want something more easy …

The End.