News
: April 3, 2008 - New Contest! -
Win 5 Years of Hosting and $1,000!
June 30, 2008 -
Submit Your Site for the July 08 Site of the Month Award!
Home
Help
Search
Calendar
Login
Register
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
July 09, 2008, 02:45:32 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Web Hosting Forum | Lunarpages
>
Lunarpages Web Hosting - Online Help Desk
>
Lunarpages - Beginner Assistance
>
Python script problems
Pages: [
1
]
Go Down
« previous
next »
Print
Author
Topic: Python script problems (Read 376 times)
sdweyhrich
Newbie
Offline
Posts: 1
Python script problems
«
on:
April 16, 2008, 08:39:12 AM »
I've added Google AdSense to my web site, but the AdSense page says it would like a sitemap. Google offers a free site-map generation Python script, but doesn't give much information as to how it should be used.
I've run Perl and PHP scripts before, but not Python. Elsewhere on Lunarforums it was stated that these should be run in the cgi-bin directory, and have a ".cgi" extension. However, when I run the script, I get a "500 Internal Server Error". I checked the error log, and changed the permissions for this file to "755". I no longer get any feedback in the Error Log that explains WHY I'm getting a 500 error.
I suspect it has to do with the header in the Python file. I used a cron job to determine where Python is on my server, and got a number of replies:
python: /usr/bin/python
/usr/bin/python2.3
/usr/lib/python2.3
/usr/local/bin/python2.4
/usr/local/bin/python
/usr/local/lib/python2.4
/usr/include/python2.3
/usr/share/man/man1/python.1.gz
After reading more about this (finally found the documentation at Google's site), I tried to run the script as a cron job (to make use of the Unix command line). I set this command:
python /public_html/cgi-bin/sitemap_gen.py --config=/public_html/cgi-bin/config.xml --testing
And the e-mail reply from the cron job said
python: can't open file '/public_html/cgi-bin/sitemap_gen.py'
I have his error also if I change the extension to .cgi.
Any suggestions on how to make this run?
Logged
MrPhil
Quantum Encyclopedia Writer
Offline
Posts: 3041
Re: Python script problems
«
Reply #1 on:
April 16, 2008, 04:58:50 PM »
/home/YOUR_ACCOUNT_NAME/public_html/
...
You're not in a Web environment (Apache server). You're in the Linux command line environment here (probably in
/home/ACCOUNT/
), and you told it look for
public_html
under the system root "/" (which is not where it is).
Logged
Visit My Site
E-mail Me
Pages: [
1
]
Go Up
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Lunarpages Web Hosting - Information & Opportunities
-----------------------------
=> Lunarpages Web Hosting - Announcements
=> Lunarpages Web Hosting - Hosting Plans & Site Information
=> Job Opportunities at Lunarpages Web Hosting
=> Lunarpages Web Hosting - Network Information
=> Lunarpages Web Hosting - Server Information
-----------------------------
Lunarpages Web Hosting - Before Signing Up
-----------------------------
=> Lunarpages Web Hosting Plans - Pre-Sales Questions
-----------------------------
Lunarpages Web Hosting - Online Help Desk
-----------------------------
=> Lunarpages - Webhosting Help
=> Lunarpages - Beginner Assistance
=> Lunarpages - How to's
=> E-mail with your Lunarpages Hosting Plan
=> Lunarpages - CPanel Help
=> Lunarpages - Ecommerce Hosting
=> Lunarpages - FrontPage
=> Lunarpages - DreamWeaver
=> Lunarpages - Message Boards-Forums-Fantastico Scripts
===> Lunarpages - Joomla / Mambo
-----------------------------
Lunarpages Web Hosting - Advanced Assistance
-----------------------------
=> Web Management
=> Lunarpages - Webdesign and HTML
=> Lunarpages - Search Engine Optimization
=> Lunarpages - Animation & Flash
=> Lunarpages - Graphics
=> Lunarpages - Web Hosting, Email & PC Security
=> Lunarpages - Dedicated Web Hosting
=> Lunarpages - Reseller Web Hosting
=> Lunarpages - VPS Hosting
=> Lunarpages - SharePoint Services (Beta)
===> Lunarpages - cPanel & WHM
===> Lunarpages - General
===> Lunarpages - Plesk
===> Lunarpages - Security
===> Lunarpages - Tutorials
===> Lunarpages - Webmin
===> Lunarpages - WHM
-----------------------------
Lunarpages Web Hosting - Coding
-----------------------------
=> Lunarpages - ASP
=> Lunarpages - C++ / PERL / CGI
=> Lunarpages - PHP & MySQL
=> Lunarpages - Java Applets & Javascript
=> Lunarpages - JSP & Servlets
=> Lunarpages - Ruby Hosting
=> Lunarpages - Windows Development & Hosting
-----------------------------
Lunarpages Web Hosting - Entertainment
-----------------------------
=> Lunarpages - Chat & Stuff!
=> Lunarpages - Contests
=> Fun at Lunarpages!!
=> Lunarpages - Online Gaming
-----------------------------
Lunarpages Web Hosting - General
-----------------------------
=> Social Networking
=> Lunarpages Free Web Hosting - Education Program
=> Lunarpages - Affiliate Program
=> Introduce Yourself to the Lunarpages Forum Community!
=> Your Websites & Creations at Lunarpages!
=> Lunarpages Website of the Month
=> Lunarpages - Service and Trade
Loading...