Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-09-2008, 02:13 AM   PM User | #1
ds67
New Coder

 
Join Date: Apr 2007
Posts: 72
Thanks: 4
Thanked 0 Times in 0 Posts
ds67 can only hope to improve
installing php, my SQL

Hello everyone:

I am newer than a newbie to php. My question is, if a hosting company includes my PHP and my SQL, should I download these programs to my personal computer, or use them through the hosting company. Also, if I should ever change hosting companies, could these files (any database info) be transferred to new hosting company?

Thanks so much,
ds67 is offline   Reply With Quote
Old 05-09-2008, 02:48 AM   PM User | #2
CFMaBiSmAd
Senior Coder

 
CFMaBiSmAd's Avatar
 
Join Date: Oct 2006
Location: Denver, Colorado USA
Posts: 2,711
Thanks: 2
Thanked 251 Times in 243 Posts
CFMaBiSmAd is a jewel in the roughCFMaBiSmAd is a jewel in the roughCFMaBiSmAd is a jewel in the roughCFMaBiSmAd is a jewel in the rough
When learning php, developing php code, or debugging php code, it is always best to do this on a local development computer. The learning/development/debugging cycle will occur faster.

You will also be in control of the php.ini settings so you can set the error_reporting level to E_ALL (and include E_STRICT if you are interested in writing code that is not dependent on old depreciated functions) and set display_errors on so that php will help you by telling you what it finds that is not correct.

A lot of code in the learning/development/debugging stage contains security problems. By not doing this on a live server, you don't open the possibility of a hacker taking over.

Then, only after your code is tested and working, put it on a live server.

Any of your files or databases on a hosting server can be backed-up/copied and moved.
__________________
If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.
CFMaBiSmAd is online now   Reply With Quote
Users who have thanked CFMaBiSmAd for this post:
ds67 (05-09-2008)
Old 05-09-2008, 03:20 AM   PM User | #3
ds67
New Coder

 
Join Date: Apr 2007
Posts: 72
Thanks: 4
Thanked 0 Times in 0 Posts
ds67 can only hope to improve
Thanks so much CFMaBiSmAd. This has been helpful (as simple as it may seem to you). Would you (or anyone) suggest using a local computer to create database using my SQL or setting it up through my hosting company?

Thanks again,
ds
ds67 is offline   Reply With Quote
Old 05-09-2008, 03:31 AM   PM User | #4
CFMaBiSmAd
Senior Coder

 
CFMaBiSmAd's Avatar
 
Join Date: Oct 2006
Location: Denver, Colorado USA
Posts: 2,711
Thanks: 2
Thanked 251 Times in 243 Posts
CFMaBiSmAd is a jewel in the roughCFMaBiSmAd is a jewel in the roughCFMaBiSmAd is a jewel in the roughCFMaBiSmAd is a jewel in the rough
For development purposes, setup mysql on your local computer as well.

There are several all-in-one Apache/php/mysql packages. The most up to date is XAMPP - http://www.apachefriends.org/en/index.html
__________________
If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.
CFMaBiSmAd is online now   Reply With Quote
Old 05-09-2008, 03:34 AM   PM User | #5
bdl
Regular Coder

 
Join Date: Apr 2007
Location: Camarillo, CA US
Posts: 590
Thanks: 4
Thanked 83 Times in 82 Posts
bdl is an unknown quantity at this point
If you intend to use MySQL on the web host (and I'm sure you do), you'll still need to setup the database on the host regardless of whether you do so on a local machine. I recommend getting the database structure and queries down first with some sample data, then transfer the empty structure to the host. It is also rather important that you understand SQL and the relational model before you venture to add any queries to your PHP code. The MySQL manual is invaluable and there is a relatively good tutorial.

While we're on the subject, the PHP manual is also the best reference you'll find.

Something that wasn't mentioned but is very important; make sure you match versions and configurations as closely as possible between your local machine and the host server. You don't want to have an entire application built around the latest bleeding edge versions of PHP & MySQL (and Apache, if applicable) and find out afterwards that your host is still using older versions.

If possible, sign up with a host that does have PHP 5 and MySQL 5, the most current versions; you'll find you have much more flexibility with these versions and eventually be able to do more.
bdl is offline   Reply With Quote
Old 05-11-2008, 04:31 AM   PM User | #6
ds67
New Coder

 
Join Date: Apr 2007
Posts: 72
Thanks: 4
Thanked 0 Times in 0 Posts
ds67 can only hope to improve
Hi All:

Like to thank everyone who tried to help me. I've been working on this Apache/php/mysql ALL DAY! I've tried to download them individually, I've tried the 'Apache Friends' all in one download. I keep getting a message something about the TCI/IP port 80 thing. Have no idea what I'm doing. Thought it could be done, but I guess I'm an *****. I'm exhausted

Thanks anyway.
ds67 is offline   Reply With Quote
Old 05-11-2008, 06:43 AM   PM User | #7
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
The port error occurs if you have a program running on that port. Usually instant messagers like Skype and Yahoo take up these ports. Its also possible that your previous installations didn't remove apache and it may still be running.
__________________
||||If you are getting paid to do a job, don't ask for help on it!||||
_Aerospace_Eng_ is offline   Reply With Quote
Old 05-11-2008, 09:29 PM   PM User | #8
Grant Palin
Regular Coder

 
Join Date: Jun 2002
Location: Victoria, BC, Canada
Posts: 962
Thanks: 0
Thanked 1 Time in 1 Post
Grant Palin is an unknown quantity at this point
It is good to do the development and testing on a local setup before uploading, as the process is faster and more secure,

One of the all-in-one packages is useful for getting up and running quickly, but I think it is better to install and configure the components (Apache, PHP, MSQL, etc) one by one, since you learn more that way. I've used this tutorial as a reference whenever doing this on a new PC - it is fairly current and very helpful.

For the port issue, this can happen if you have IIS or some other programs installed, as mentioned. After installing Apache, you cold try changing its port number to something other than the default 80, so as to remove the conflict.
Grant Palin is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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


All times are GMT +1. The time now is 09:16 AM.


Advertisement
Log in to turn off these ads.