real estate large scale 301 redirect

Trying to work out what to do in regard to a redirect of a new client real estate website.

We have no access at all to the old site and the url structure on new is forcibly different due to randomly generated property IDs (our system generates a different ID from old)

The old url structure is www.mydomain.com/property/view?=1111

The new url structure is www.mydomain.com/property/street-name/2222

My instinct is to do manual 301s for every property (about 6000), matching by page title, but sadly I cant as I have no access to the structure of the old website and despite spidering it numerous times I cant get a pull of all properties off.

If any could give me any advice on what best to do to avoid bad user experience and a google frying, would really appreciate it.

Thanks in advance.

Mark

New rows created in Django admin aren’t displayed on site

This problem is noticed when doing the Django tutorial.

  1. Successfully make a poll with a choice on the admin site that is then displayed on the admin site:

poll successfully created on admin site

  1. Go to mysite.com/polls and the poll is not present: "No polls are available."

  2. I can either apachectl restart or touch mysite/wsgi.py and get the same results which is that the new row then displays properly at mysite.com/polls

Why aren't the new rows displayed immediately at mysite.com/polls after their creation at the admin site without restarting the server?

Relevant code from urls.py:

from django.conf.urls import patterns, url
from django.views.generic import DetailView, ListView
from django.utils import timezone
from polls.models import Poll

urlpatterns = patterns('',
    url(r'^$',
        ListView.as_view(
            queryset=Poll.objects.filter(pub_date__lte=timezone.now) \
                .order_by('-pub_date')[:5],
            context_object_name='latest_poll_list',
            template_name='polls/index.html'),
        name='index'),
...

There is no code for mysite.com/polls in views.py.

The template code for mysite.com/polls

{% if latest_poll_list %}
    <ul>
    {% for poll in latest_poll_list %}
    <li>
        <a href="{% url 'polls:detail' poll.id %}">{{ poll.question }}</a>
    </li>
    {% endfor %}
    </ul>
{% else %}
    <p>No polls are available.</p>
{% endif %}

Using:

  1. Django 1.5
  2. python 3.3.0-3
  3. mod_wsgi 3.4-2
  4. postgresql 9.2.3-1
  5. apache 2.2.24-1
  6. linux 3.8.4-1

Extra notes:

  1. Same behavior on Django's (1.5) development server
  2. Same behavior NOT present previously when I did the Django (1.5) tutorial under python 2.7 and MySQL
  3. The rows are SELECT-able from the postgresql shell after creation at the admin site
  4. The new polls are readable from the shell client when made on the admin site using django.test.client.Client
  5. When I made a new poll from the shell using django.test.client.Client, the new poll was not readable from either the shell client or on mysite.com/polls, however it was readable from psql and mysite.com/admin before a server restart.

Apache 500 Error due to User Agent?

I am currently getting 500 errors from Apache using a alarming probe shell script that has been provided to myself.

Unfortunately I have not been able to get to the bottom of why the script generates a 500 error when attempting to access content locally on the server but using other methods like wget and telnet works fine.

The following are the Apache access log entries for each of the attempts:

Using Wget

127.0.0.1 - "" [19/Mar/2013:14:31:44 +1100] "GET /index.html HTTP/1.1" 200 1635 "-" "Wget/1.13.3" "-"

Using Telnet

127.0.0.1 - "" [20/Mar/2013:13:12:11 +1100] "GET /index.html HTTP/1.1" 200 1635 "-" "-" "-"

Using the Probe Scripts

127.0.0.1 - -  [19/Mar/2013:14:33:56 +1100] "GET /index.html HTTP/1.1" 500 -    "-" "" "-"

The only difference I can see is that the probe has a - instead of a "" in the user agent (3rd item) which either way tells me it wasn't passed in any of the instances (as this is expected since there is no authentication).

I've bumped up the logging for everything in Apache and can't figure out what is amiss. There is no processing involved, it's a static file, and I have attempted with other file types too, like images to no avail.

Does anyone have any ideas or has seen something similar?

Thanks, Tony

Checksum Exception when reading from or copying to hdfs in apache hadoop

I am trying to implement a parallelized algorithm using Apache hadoop, however I am facing some issues when trying to transfer a file from the local file system to hdfs. A checksum exception is being thrown when trying to read from or transfer a file.

The strange thing is that some files are being successfully copied while others are not (I tried with 2 files, one is slightly bigger than the other, both are small in size though). Another observation that I have made is that the Java FileSystem.getFileChecksum method, is returning a null in all cases.

A slight background on what I am trying to achieve: I am trying to write a file to hdfs, to be able to use it as a distributed cache for the mapreduce job that I have written.

I have also tried the hadoop fs -copyFromLocal command from the terminal, and the result is the exact same behaviour as when it is done through the java code.

I have looked all over the web, including other questions here on stackoverflow however I haven't managed to solve the issue. Please be aware that I am still quite new to hadoop so any help is greatly appreciated.

I am attaching the stack trace below which shows the exceptions being thrown. (In this case I have posted the stack trace resulting from the hadoop fs -copyFromLocal command from terminal)

[email protected]:~/Desktop/hadoop2$ bin/hadoop fs -copyFromLocal ~/Desktop/dtlScaleData/attr.txt /tmp/hadoop-name/dfs/data/attr2.txt

13/03/15 15:02:51 INFO util.NativeCodeLoader: Loaded the native-hadoop library
    13/03/15 15:02:51 INFO fs.FSInputChecker: Found checksum error: b[0, 0]=
    org.apache.hadoop.fs.ChecksumException: Checksum error: /home/name/Desktop/dtlScaleData/attr.txt at 0
        at org.apache.hadoop.fs.ChecksumFileSystem$ChecksumFSInputChecker.readChunk(ChecksumFileSystem.java:219)
        at org.apache.hadoop.fs.FSInputChecker.readChecksumChunk(FSInputChecker.java:237)
        at org.apache.hadoop.fs.FSInputChecker.read1(FSInputChecker.java:189)
        at org.apache.hadoop.fs.FSInputChecker.read(FSInputChecker.java:158)
        at java.io.DataInputStream.read(DataInputStream.java:100)
        at org.apache.hadoop.io.IOUtils.copyBytes(IOUtils.java:68)
        at org.apache.hadoop.io.IOUtils.copyBytes(IOUtils.java:47)
        at org.apache.hadoop.io.IOUtils.copyBytes(IOUtils.java:100)
        at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:230)
        at org.apache.hadoop.fs.FileUtil.copy(FileUtil.java:176)
        at org.apache.hadoop.fs.FileSystem.copyFromLocalFile(FileSystem.java:1183)
        at org.apache.hadoop.fs.FsShell.copyFromLocal(FsShell.java:130)
        at org.apache.hadoop.fs.FsShell.run(FsShell.java:1762)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
        at org.apache.hadoop.fs.FsShell.main(FsShell.java:1895)
    copyFromLocal: Checksum error: /home/name/Desktop/dtlScaleData/attr.txt at 0

XAMPP + mod_wsgi + python Windows 7

i'm trying to install django on a local test server [i know python+django has one] and i've already set up xampp hosting:

Apache 2.4, Python 2.7, mod_wsgi (compiled from source: https://code.google.com/p/modwsgi/wiki/InstallationOnWindows and using win32-ap22py27.mk, idk if the make file I used is okay since there are no errors upon starting apache and apache says it loads the wsgi module as well as my python)

xampp

wsgi.conf [that is included in httpd.conf]:

WSGIScriptAlias /wsgi "C:/xampp/htdocs/wsgi/scripts/test.wsgi"
AddHandler wsgi-script .wsgi

<Directory "C:/xampp/htdocs/wsgi/scripts">
    Order deny,allow
    Allow from all
</Directory>

and a generic test.wsgi file:

def application(env, start_response):
    start_response("200 OK", [])
    output = "<html>Hello World! Request: %s</html>"
    output %= env['PATH_INFO']
    return [output]

My problem is that I get an aborted connection on testing a wsgi app: **http://localhost/wsgi**

i've searched the internets and no luck

Xdebug and PHP not working on my server

I've had xdebug and php configured many times in the passed, but going back over my old notes, is failing to help me get it configured again.

I have done the following:

  1. Installed LAMP
  2. Installed php5-xdebug
  3. Restarted apache sudo /etc/init.d/apache2 restart
  4. The /etc/php5/apache2/conf.d/xdebug.ini now looks like this:

xdebug.ini

zend_extension=/usr/lib/php5/20090626+lfs/xdebug.so
xdebug.remote_enable=On
xdebug.remote_enable=1
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"

I create a php file which just contains phpinfo(); and when I load that page in the browser, I don't get an xdebug section as normal which contains all the xdebug details like

xdebug.collect
xdebug.dump
xdebug.profiler

etc etc.

What have I don't wrong this time round?

The OS is Ubuntu 12.04
PHP version is 5.3.10
Apache version is 2.2.22
Xdebug version is 2.1.0-1