marmite Posted May 3, 2007 Share Posted May 3, 2007 Hi, I have part of a server only, and I want to create a sitemap using Google's sitemap generator (python). However, I don't know whether the server has python installed, and which command would run it if it is. Does anyone know how I can find out, and whether, if I just try to run the file, I would do any damage if it isn't installed (I presume not). Thanks Emma Quote Link to comment https://forums.phpfreaks.com/topic/49782-how-do-i-know-whether-my-server-has-python-installed/ Share on other sites More sharing options...
trq Posted May 3, 2007 Share Posted May 3, 2007 If you have access to a shell, type... python -v This will determin if Python is installed (its pretty standard on most Linux systems these days). No shell acccess? Put this in a php page. <?php $out = shell_exec('python -v'); echo "<pre>$out</pre>"; ?> Howvever, just because Python is installed does not mean mod_python is built into Apache. You'd need to contact your host to see I think. Quote Link to comment https://forums.phpfreaks.com/topic/49782-how-do-i-know-whether-my-server-has-python-installed/#findComment-244301 Share on other sites More sharing options...
marmite Posted May 4, 2007 Author Share Posted May 4, 2007 Thanks a lot. I think you saved me loads of time - the php page comes back blank ($out is '') so I guess python is not installed (?). Alternatively, perhaps the server is operating in "safe mode" which i keep reading about. In which case, I presume I couldn't run a python script on it anyway. I guess I'll have to make a sitemap some other way. If any of this sounds wrong, please let me know! Otherwise, thanks again for your help. Emma Quote Link to comment https://forums.phpfreaks.com/topic/49782-how-do-i-know-whether-my-server-has-python-installed/#findComment-245338 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.