Locations
  • Hi:

    I just wanted to know if there is something that needs to be configured to use the Locations when adding or editing an article.

    I say this because on the demo site, you select the country from the dropdown list or select any country and enter a city name and you have results.

    In my case, I select a country, write a city name and all I get is a sorry, nothing found :/


    Thanks!

    Smile
  • 6 Comments sorted by
  • Vote Up0Vote Down Martin SaturkaMartin Saturka
    Posts: 40Member, Sourcefabric Team
    Hi, Oscar,
    it should work without any special setting. Have you tried the same city
    names for the search? We use the GeoNames data set, and it has great but
    limited span.

    What are your OS/webserver/php/mysql versions, please? Could you look at you
    database, whether the geo-data were installed:
    SELECT count(*) FROM CityLocations;
    SELECT count(*) FROM CityNames;

    Together with, does the web server log say something?

    Regards,
    Martin

    On Thu, Feb 10, 2011 at 8:27 AM, Oscar <
    newscoop-support@lists.sourcefabric.org> wrote:

    > Hi:
    >
    > I just wanted to know if there is something that needs to be configured to
    > use the Locations when adding or editing an article.
    >
    > I say this because on the demo site, you select the country from the
    > dropdown list or select any country and enter a city name and you have
    > results.
    >
    > In my case, I select a country, write a city name and all I get is a sorry,
    > nothing found :/
    >
    >
    > Thanks!
    >
    > [image: Smile]
    >



    --
    Martin Saturka
    Software Engineer, Sourcefabric
    martin.saturka@sourcefabric.org
    www.sourcefabric.org

  • Hi:


    ====
    it should work without any special setting. Have you tried the same city
    names for the search? We use the GeoNames data set, and it has great but
    limited span.
    ====

    Yes, I have used the same city names.


    ===
    What are your OS/webserver/php/mysql versions, please?
    ===

    CENTOS 5.5
    Apache 2.2.16
    PHP 5.2.14
    MySQL 5.0.91-community-log



    ===
    Could you look at you
    database, whether the geo-data were installed:
    SELECT count(*) FROM CityLocations;
    SELECT count(*) FROM CityNames;
    ===

    it says empty values

    SELECT *
    FROM `CityLocations`
    LIMIT 0 , 30

    SELECT *
    FROM `CityNames`
    LIMIT 0 , 30



  • Vote Up0Vote Down Martin SaturkaMartin Saturka
    Posts: 40Member, Sourcefabric Team
    HI,
    thank you for the information.



    > ===
    >
    > Could you look at you
    > database, whether the geo-data were installed:
    > SELECT count(*) FROM CityLocations;
    > SELECT count(*) FROM CityNames;
    > ===
    >
    > it says empty values
    >
    > SELECT *
    > FROM `CityLocations`
    > LIMIT 0 , 30
    >
    > SELECT *
    > FROM `CityNames`
    > LIMIT 0 , 30
    >

    You mean that it answers something like "Empty set (0.00 sec)", and the
    SELECT count(*) queries answer with a single row telling '0'
    there, right? It means that the geo-data were not installed, i.e. some
    problem during the installation. Do not you remember some error messages
    during the installation, or may be something was left at logs?

    Could you, please, go to the directory with Newscoop install data
    ("newscoop/install/sql/") and run the next mysql commands from there?

    set names utf8;

    TRUNCATE CityLocations;
    ALTER TABLE CityLocations DISABLE KEYS;
    LOAD DATA LOCAL INFILE 'CityLocations.csv' INTO TABLE CityLocations FIELDS
    TERMINATED BY ';' ENCLOSED BY '"';
    ALTER TABLE CityLocations ENABLE KEYS;

    TRUNCATE CityNames;
    ALTER TABLE CityNames DISABLE KEYS;
    LOAD DATA LOCAL INFILE 'CityNames.csv' INTO TABLE CityNames FIELDS
    TERMINATED BY ';' ENCLOSED BY '"';
    ALTER TABLE CityNames ENABLE KEYS;


    This should install the data necessary for the locations search.

    M.

    --
    Martin Saturka
    Software Engineer, Sourcefabric
    martin.saturka@sourcefabric.org
    www.sourcefabric.org

  • Hi Martin:

    I'm getting error: the used command is not allowed with this mysql version

  • Vote Up0Vote Down Martin SaturkaMartin Saturka
    Posts: 40Member, Sourcefabric Team
    Hi, Oscar,
    it looks that you have disabled the "LOAD DATA LOCAL" command. You can
    enable it via setting "*set-variable=local-infile=1*" in your (/etc/)my.cnf
    file, and (just for the mysql command line client) could help putting
    '--local-infile' as a parameter for the mysql client.

    More information e.g. at:
    http://dev.mysql.com/doc/refman/5.0/en/load-data-local.html
    http://www.davidhurst.co.uk/2009/05/14/mysql-error-42000-the -used-command-is-not-allowed-with-this-mysql-version/

    On Thu, Feb 10, 2011 at 10:35 PM, Oscar <
    newscoop-support@lists.sourcefabric.org> wrote:

    > Hi Martin:
    >
    > I'm getting error: the used command is not allowed with this mysql version
    >
    >
    >


    M.

    --
    Martin Saturka
    Software Engineer, Sourcefabric
    martin.saturka@sourcefabric.org
    www.sourcefabric.org

  • Hi:

    well, after too much efforts, I got it working... Smile will post if I find an any issue.

    Thank you for your help!