LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-18-2005, 12:41 AM   #1
24jedi
Member
 
Registered: Jul 2003
Location: Richmond, VA
Distribution: LinuxLite
Posts: 77

Rep: Reputation: 15
PHP / MySQL Dev Environment


I need some guidance and I'm not sure where to post or start.

At home and work I have setup a FreeBSD 5.4 workstation for learning how to work with PHP / MySQL and Apache. While part of the process is to learn FreeBSD and to become more proficient in *nix, I also want to migrate towards PHP / MySql development

My web developement has primarily been HTML/XHTML/CSS and some ASP in a windows environement using notepad, Frontpage and Dreamweaver.

In either environment I have a windows workstation where I use Dreamweaver. I have setup a FreeBSD 5.4 workstation with PHP4, Mysql-4.x, Apache 1.3. I have been successful thus far setting up and configuring the FreeBSD box. All modules are working as best I can tell. Basically tested the MySQL using the Admintool from a remote pc and can see the existing databases, as well as made a quick test page with <?php phpinfo(); ?> all seems to work.

For development purposes, How can I connect from a remote pc to the FreeBSD box ? I am assuming ftp would be the easiest.

I guess what I am asking is how everyone uses their developement environment.
Do you work locally using VIM/VI/emacs...or what.

Thanks,

- Don
 
Old 06-18-2005, 01:55 AM   #2
beebop
Member
 
Registered: Sep 2004
Location: Bend, Oregon
Distribution: Ubuntu Breezy and FC4
Posts: 43

Rep: Reputation: 15
You'll definitely want to set up FTP on the BSD box. Then you could use your more powerful development tools on your local computer and upload the files back to the BSD box when you're done.

If you want to make small modifications, you could SSH into your BSD box, VI the file, and save it directly.

Setting up FTP and SSH is pretty easy. Set up the config files, start up and test the servers, then set it up so the servers automatically start on each reboot. Oh yeah, and get the firewall configured, too. If you google up some specific tutorials on the net, you could have it set up in 15 minutes.
 
Old 06-18-2005, 09:41 AM   #3
24jedi
Member
 
Registered: Jul 2003
Location: Richmond, VA
Distribution: LinuxLite
Posts: 77

Original Poster
Rep: Reputation: 15
Thankx beebop

I have ftp starting using inetd.conf and added inetd_enable="YES" to rc.conf. It works and I am able to ftp into /usr/home/MyAcct. However after reading a little about ftp, it appears that I can only ftp into by home folder.

The apache files live under /usr/local/www/apache/data

Do I go into the apache httpd.conf and change the DocumentRoot directive to my folder, or is there a permissions thing I can do to allow me to "roam" while in ftp, into my BSD dev box ?

This is the part I am a lttle fuzzy on.

Do I change the DocumentRoot directive?
Do I setup Alias ?
Do I setup Virtuals

This BSD developement box would only be used by me.

Thanks

-Don
 
Old 06-19-2005, 08:42 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Personally I'd day that if you want to do fixes/updates etc from your Windows/Dreamweaver box, get Putty which is a free version of SSH. SSH comes with SCP (and SFTP) included, so you don't need FTP.
In fact, I prefer SCP anyway, as you can put/get files from/to anywhere; it's just an extension of SSH.
Also, I prefer the syntax...
 
Old 06-20-2005, 12:41 AM   #5
beebop
Member
 
Registered: Sep 2004
Location: Bend, Oregon
Distribution: Ubuntu Breezy and FC4
Posts: 43

Rep: Reputation: 15
I know there is some boolean in the rc file that lets you roam above your home file. Something like rootlock... Can't remember.

And about Putty, I've heard good things about it, but seeing as I have never used it I don't have much to say about it. I guess if you do that you don't even have to set up an FTP server? Out of my realm

Last edited by beebop; 06-20-2005 at 12:42 AM.
 
Old 06-20-2005, 01:18 PM   #6
24jedi
Member
 
Registered: Jul 2003
Location: Richmond, VA
Distribution: LinuxLite
Posts: 77

Original Poster
Rep: Reputation: 15
beebop and chrism01

Thanks. I will look into putty. However I think I found what I was looking for.

In the httpd.conf file, there is a directive called UserDir. Basically from what I have found so far is by placing a folder called public_html in my home folder..

/usr/home/myacct/public_html/

I would place any of my html files (or php) into this folder.

Then from a remote machine, if I wanted to see how they looked, I would type the following url..

http://192.168.1.1/~myacct/

This will publish my web files located in the public_html folder.

I am sure there is probably some other way of doing this, but for now, it's a start.

Thanks

- Don
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL client/header/dev for PHP? kailun Slackware 1 03-04-2005 07:12 AM
Best PHP development environment? Bad_Bob Linux - Software 2 09-01-2004 08:13 PM
Problem getting PHP to recognize MySQL, Using PHP 4.0 and MySQL 4.0.20 d2army Programming 4 06-27-2004 08:54 PM
php4 mysql, installation, php-pages with mysql info stay empty dnla Linux - Software 2 03-14-2004 02:54 PM
Apache Mysql Php: mysql with php doesn't work breakerfall Linux - Networking 6 12-27-2003 08:59 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration