On Jan 14, 2:51 pm, OwenK <cheeesemon...@gmail.com> wrote:
> I've made a dictionary site that relies on a text file to look up
> entries. The function that calls it works fine in the shell or in the
> development server, but when I try to use it with mod_python/apache it
> gives me an IOError errno 2, No such file or directory. Why the
> difference? Is there a better/nicer way to call the file then with the
> file() function?

The current working directory of Apache can be anything, ensure you
are not using relative pathnames. Use an absolute pathname instead.

Also ensure that all directories down to where file is are searchable
by Apache user and file itself is readable. Thus directory permissions
must be at least o+x and file o+r. In other words, Apache runs as a
special user and not you, thus it need appropriate access.

Graham
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to