nubby Posted April 5, 2008 Share Posted April 5, 2008 I know a fair amount of xHTML/CSS/Javascript but also want to move on to PHP. But I know PHP can't be ran like xhtml can through the browser, right? My hosting supports PHP, but it would be a pain to upload my files all the time testing to see if it worked right. So I did some searching around and found this: http://w3schools.com/php/php_install.asp It says what I need, so should I install that on my computer (I am running Ubuntu Linux). I do not plan on hosting anything on my computer, but I would like a quick way to have the ability of seeing if everything checks out with my PHP pages instead of uploading to my hosting via cpanel or ftp. Anything suggestions would be greatly appreciated. Quote Link to comment Share on other sites More sharing options...
unsider Posted April 5, 2008 Share Posted April 5, 2008 hhttp://en.wikipedia.org/wiki/Php Use your localhost for the time being, and when you're ready, upload them to a webserver via FTP. phpMyAdmin is a nice little app for interacting with your SQL DB. http://www.php.net Good place to start. Go purchase/DL some e-books, and find a few online tutorials. Good luck. Quote Link to comment Share on other sites More sharing options...
maexus Posted April 5, 2008 Share Posted April 5, 2008 XAMPP was a great all in one install back when I was running on Windows. I use MAMP now that I'm on OSX Quote Link to comment Share on other sites More sharing options...
nubby Posted April 6, 2008 Author Share Posted April 6, 2008 hhttp://en.wikipedia.org/wiki/Php Use your localhost for the time being, and when you're ready, upload them to a webserver via FTP. phpMyAdmin is a nice little app for interacting with your SQL DB. http://www.php.net Good place to start. Go purchase/DL some e-books, and find a few online tutorials. Good luck. Do you mind helping me set up the localhost thing? I am sort of new to this topic and do not know much about it. I am also on Ubuntu Linux, so I am not sure if it is different. Quote Link to comment Share on other sites More sharing options...
Catfish Posted April 6, 2008 Share Posted April 6, 2008 If you are using Ubuntu you should be able to use the synaptic package manager to install apache and php and mysql. You should just have to search for the names and install the packages accordingly. Usually it will set it up with a standard configuration to get things going. To start learning PHP I just use the PHP Reference manual. The manual for PHP is written and structtured really well. For other problems or if I want a function to do someting specific (like say, recursively reading a directory into an array) I just search for functions on the internet and finally if I need help with some specific problem come and ask here or some other forum. The only thing I will warn you about is if you're developing code on your local machine and upload it to your web host later, I would recommend doing some sample scripts first and upload and check that they don't throw warnings or do things that don't occur on your local machine. I recently put my (1 year's worth) of coding work onto my cousin's Ubuntu machine and had to spend 2 days modifying my code because it would throw warnings about things like missing parameters when I call functions and things. On my setup, those warnings didn't even appear in the output but on my cousins they did. Quote Link to comment Share on other sites More sharing options...
nubby Posted April 6, 2008 Author Share Posted April 6, 2008 If you are using Ubuntu you should be able to use the synaptic package manager to install apache and php and mysql. You should just have to search for the names and install the packages accordingly. Usually it will set it up with a standard configuration to get things going. To start learning PHP I just use the PHP Reference manual. The manual for PHP is written and structtured really well. For other problems or if I want a function to do someting specific (like say, recursively reading a directory into an array) I just search for functions on the internet and finally if I need help with some specific problem come and ask here or some other forum. The only thing I will warn you about is if you're developing code on your local machine and upload it to your web host later, I would recommend doing some sample scripts first and upload and check that they don't throw warnings or do things that don't occur on your local machine. I recently put my (1 year's worth) of coding work onto my cousin's Ubuntu machine and had to spend 2 days modifying my code because it would throw warnings about things like missing parameters when I call functions and things. On my setup, those warnings didn't even appear in the output but on my cousins they did. Okay, I am about to install the following packages: mysql-client-5.0 php5 apache2 Those packages also include other packages that are needed for them to run. But when I search php or mysql or apache there is tons of things to download, just hope I got the right ones. Quote Link to comment Share on other sites More sharing options...
ohdang888 Posted April 6, 2008 Share Posted April 6, 2008 just download and install XAMPP it has everything in it. Quote Link to comment Share on other sites More sharing options...
nubby Posted April 6, 2008 Author Share Posted April 6, 2008 just download and install XAMPP it has everything in it. Should I uninstall everything I just installed then? Also what do I do once I download and install it? Quote Link to comment Share on other sites More sharing options...
nubby Posted April 7, 2008 Author Share Posted April 7, 2008 Okay I installed XAMPP. When I enter http://localhost/ It just shows Index of / with apache2-default/ folder inside and when I click it it says 'It Works!'. So now what do I do? How can I upload things and actually view them? Quote Link to comment Share on other sites More sharing options...
trq Posted April 7, 2008 Share Posted April 7, 2008 You simply create php files and place them within your document root. Usually /var/www, you can find out for sure by searching for the DocumentRoot directive of your httpd.conf file. grep DocumentRoot /etc/apache2/httpd.conf Quote Link to comment Share on other sites More sharing options...
ohdang888 Posted April 7, 2008 Share Posted April 7, 2008 put all your pages in the "htdocs" folder... Quote Link to comment 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.