DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 13th June 2009
bsdnewbie999 bsdnewbie999 is offline
Package Pilot
 
Join Date: May 2008
Posts: 145
Thanked 0 Times in 0 Posts
Default php programming in openbsd.

What should I install in order to start php programming in oopenbsd?
What compiler to use?
Reply With Quote
  #2   (View Single Post)  
Old 13th June 2009
Oko's Avatar
Oko Oko is offline
Fsck Surgeon
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 733
Thanked 36 Times in 32 Posts
Default

Quote:
Originally Posted by bsdnewbie999 View Post
What should I install in order to start php programming in oopenbsd?
What compiler to use?
You do not need compiler for PHP. PHP is a scripting language which gets interpreted by HTTP server. You need to install PHP Apache module and start Apache sever in order to see how your code would look like on the web.

Just to program in PHP you need an editor. There are two good editors in the base nvi and mg editor.
Reply With Quote
  #3   (View Single Post)  
Old 13th June 2009
bsdnewbie999 bsdnewbie999 is offline
Package Pilot
 
Join Date: May 2008
Posts: 145
Thanked 0 Times in 0 Posts
Default

I see.
Reply With Quote
  #4   (View Single Post)  
Old 13th June 2009
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Thanked 112 Times in 104 Posts
Default

Basically you would want to install php5-core and any extensions you want or need beyond that (e.g. php5-mysql). The PHP interpreter (php) can be used stand alone for testing simple scripts but for most interesting stuff related to the web: you will need to do as Oko has said - and set it up for use with Apache via module or CGI. Using PHP with Apache on OpenBSD is trivial if the chroot is disabled, if apache/httpd is run under chroot, well then it gets a little more interesting
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
  #5   (View Single Post)  
Old 13th June 2009
bsdnewbie999 bsdnewbie999 is offline
Package Pilot
 
Join Date: May 2008
Posts: 145
Thanked 0 Times in 0 Posts
Default

Where should I put my php code in the /var/www/ ...etc?
Reply With Quote
  #6   (View Single Post)  
Old 15th June 2009
nacredata nacredata is offline
Port Guard
 
Join Date: May 2008
Posts: 12
Thanked 1 Time in 1 Post
Default

php code goes where your .html files go. in /var/www/htdocs

also create /var/www/tmp writable by user "www" if you want to use the default session cookie behavior while retaining chroot. If none of that makes sense, you may want to do more reading, as there may be too much to teach in the format of this forum.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Java and AI-programming idefix Programming 4 7th February 2009 01:41 PM
c programming - Modules corey_james Programming 3 6th November 2008 08:49 PM
Learning Programming Crypt Programming 35 27th October 2008 04:54 PM
GUI Programming bsdnewbie999 Programming 6 17th August 2008 12:19 AM
C programming - Lint corey_james Programming 14 16th May 2008 11:05 PM


All times are GMT. The time now is 10:27 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick