Jump to content

Apache, python, php4: where and how to setup?


linux n00b
 Share

Recommended Posts

When I installed Mandriva 2006, i picked server and then went in and made sure to pick mysql, php4, python and php5 seemed to be picked, also apache 2.x was selected and i picked apache 1.3x also

 

I tested php/mysql and it works but its PHP5 and its on Apache 2.x which is ok, but I wanted to know where the Apache 1.3x and PHP4 are setup, and how to access them

 

Also I put a file called hello.py

 

#!/usr/bin/env python

print "Content-type: text/html\n\n"
print "<html>Hello world! This is Python :)</html>"

 

I noticed python there isnt a env folder in /usr/bin/ but on top of that im a python n00b so im not even sure where it would be or how to modify my pythong script, i plan to learn some python but need to make sure things are setup, cuz when i goto

http://localhost/hello.py it just tries to download the file :(

 

Thanks in advance

Link to comment
Share on other sites

Also I put a file called hello.py

 

#!/usr/bin/env python

print "Content-type: text/html\n\n"
print "<html>Hello world! This is Python :)</html>"

 

I noticed python there isnt a env folder in /usr/bin/ but on top of that im a python n00b so im not even sure where it would be or how to modify my pythong script, i plan to learn some python but need to make sure things are setup, cuz when i goto

http://localhost/hello.py it just tries to download the file :(

 

Thanks in advance

 

This is a general issue in Python and the Web, python usually have frameworks, they dont work like php or perl which means that usually you use pythong through an API which is builted for that. You can always have apache + mod_python but there are some issues with that since well you start getting into a threading system which means that you need to built an object for everything.

 

At least that was my experience, which was a bit messy. However some frameworks are actually very easy and pleasant to use but another problem is that there are many of them and you really need to marry to one. However you can alwasy learn new ones and advance.

 

So the first one I have heard as very clean and good for newbies is called CherryPy, another is Quixote is another one which also is different in a sense and is a bit more robust. Webware for python is also very extensible and well there are few things that you might like about this one.

 

Finally if you want a CMS then you have to go with Plone which is build on top of Zope. If you think you are a bit overwelmed, dont worry we all have gone through this. But just like when you are making your mind about a CMS you just have to choose one and then go with it till you want to demand more.

 

Another language that you might try is Ruby which is famous for Ruby on Rails, to get it just instlall ruby and then a package called RubyGems.

Link to comment
Share on other sites

So the first one I have heard as very clean and good for newbies is called CherryPy, another is Quixote is another one which also is different in a sense and is a bit more robust. Webware for python is also very extensible and well there are few things that you might like about this one.

 

Finally if you want a CMS then you have to go with Plone which is build on top of Zope. If you think you are a bit overwelmed, dont worry we all have gone through this. But just like when you are making your mind about a CMS you just have to choose one and then go with it till you want to demand more.

 

Another language that you might try is Ruby which is famous for Ruby on Rails, to get it just instlall ruby and then a package called RubyGems.

 

Alright, well I'll probably be trying out PhpCake though

 

I'm guessing most webapps should be ok on php5 and apache 2.x. What i dont understand is that I know Mandriva had mod_python checked off, but the httpd.conf doenst list it in there, i cant find my apache 1.3x install cuz i know that was checked off also, who knows...

Edited by linux n00b
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...