![]() |
How do I run PHP on my PC? Hey there, Okay.. I'm trying to learn PHP. So, I tried installing WAMP but it gave some error while trying to run it... Then I tried XAMPP. It installed right and would run without errors.. But, it wouldn't recognize the PHP code on a test page I created. I unistalled XAMPP and installed EasyPHP. But, still the same problem. It wouldn't recognize the php code. The code on the test page is... Code: <html>Thank You, Sumit.:) |
Re: How do I run PHP on my PC? Why don't you give Apache a chance? It's very easy to install and integrate with PHP, even on Windows. Better yet, why don't you use the webserver where your website is running? It's already configured to run PHP correctly. |
Re: How do I run PHP on my PC? I use XAMPP and it works great for me. A few things to keep in mind... 1) Is XAMPP turned on? It's not enough just to have it installed - it must be turned on every time you start up your computer. What I did is copy the xampp_start file to my startup folder, so that it starts up automatically whenever I turn on my computer. 2) Are your php files in the C > xampp > htdocs folder? 3) And this is probably a dumb question, but did you name the files with a .php extension? (instead of .html) |
Re: How do I run PHP on my PC? Most PHP installs are not configured by default to recognize 'short' open tags <? as opposed to the full open tag: <?php You just learned a valuable lesson - don't use the short open tag if you're going to be distributing what you write. Many hosting environments don't have that option turned on. |
Re: How do I run PHP on my PC? Quote:
|
Re: How do I run PHP on my PC? Quote:
I've had 3 fixit clients over the last year whose problems were caused by WordPress plugin developers who used short open tags in their plugins. Regardless, in the case of the OP, if he hasn't configured Apache to recognize the short tags, he won't get any PHP output - probably will see the open/close tags and print lines as html. |
Re: How do I run PHP on my PC? Adding on to Steves comment, XAMPP is not configured to use short tags by default. As another note it is also a standard to use the Full php start tag <?php <? ?> is really not accepted anymore. |
Re: How do I run PHP on my PC? <?php is required. Other server-side script languages may also use the <? ?> characters to delimit server-side code. Specifying "php" tells Apache (or whatever) that the language within the delimiters is, in fact, php. |
Re: How do I run PHP on my PC? Quote:
Quote:
Quote:
|
Re: How do I run PHP on my PC? How are you getting to your php file? Are you using your localhost loopback? I've noticed that the quotes around your print string are not correct. Did this forum format them that way? |
Re: How do I run PHP on my PC? Install WAMP or XAMPP. |
Re: How do I run PHP on my PC? Download Xamp or Wamp server . You can get this software in sourforge.net In wamp server: paste your php file in "www" folder. Then Start the server. Now enter in browser as "localhost/path_to_file" For eg: if you store the file in www/newfolder, then the path to this file is: localhost/newfolder/filename.php In Xamp server: Paste in htdocs folder. Then follow above steps |
Re: How do I run PHP on my PC? You can use the <? short tag, but make sure it's enabled in the php.ini file. Did you get it working yet? If you're really frustrated, you could always just pay $5 per month and get a shared hosting account that has PHP ready to go. |
Re: How do I run PHP on my PC? Install php framework from their site & then write php codes & save it with the extension .php . It will work then. |
Re: How do I run PHP on my PC? Quote:
|
Re: How do I run PHP on my PC? InstalL XAMPP. The instructions on the website are very good and clear. Post here if you have any problems. :) |
Re: How do I run PHP on my PC? Quote:
In XAMPP are you able to see your phpinfo() page from localhost homepage? If you can see this it means that your php is at least partially working. |
Re: How do I run PHP on my PC? if you dont come right uninstall xampp and then install vertrigo VertrigoServ one stop WAMP environment
enjoy davewebsmith |
Re: How do I run PHP on my PC? Quote:
I would suggest a stand alone FTP client or using the file manager in CPanel to upload smaller websites. that way you are in full control of what you are uploading and overwriting at all time ps - it comes from years of experience and tons of overwrites ;) |
Re: How do I run PHP on my PC? Not sure what your trying to do, exactly. If you are developing, try the Nuspher PHP IDE. I believe they have a free trial. It installs PHP and a local webserver, and also works over remote connections. It is absolutely amazing, as it can show you the performance and other aspects of your app. If you are trying just to run a full stack locally, without doing your own development, WAMP is great. |
Re: How do I run PHP on my PC? You need to be careful when coding php locally on a Windows machine. Windows handles server file paths differently than web servers which almost always run a Linux variation. If your code deals with server paths you will need to make changes to get the script to run on a web server even though it works perfectly on your local Windows machine. |
Re: How do I run PHP on my PC? In the end it might be something simple like naming the file xx.html instead of xx.php :D |
Re: How do I run PHP on my PC? Quote:
If you end up banging your head against a brick wall, changing the wall won't necessarily help you any. When you get any errors, it's a very good idea to let us know what the error(s) are. Copy and paste them in here. Without them we are running blind and can't really help. Anyway, It sounds like you did get XAMMP to run if you saw the page being served but with the PHP not working and then you switched to easyphp. Go back to what you had working... Although I teach installing WAMP , XAMMP is the same beast with slight differences. If you are going to learn how to program, you are going to come across a whole lot of things that "don't work". The fun part is working out why and fixing them. It's good you came in here to ask for help, but please, be a little more descriptive when it comes to "it doesn't work". You can go to Google and search for "it doesn't work" but you aint going to get much luck with that either. So are you still having issues? Cheers Tim |
Re: How do I run PHP on my PC? Its very Simple !! Step 1 : Download WAMP server. Step 2 : Before installing WAMP server Remove IIS from the windows Step 3 : Install WAMP give the username as root and password blank Step 4 : By default install wamp in C:\ Step 5 : Open the C:\wamp\www Step 6 : Create a new file using any editor remove all the html tags Step 6 : Type this in the file Quote:
Step 8 : Open Local host either you can type in browser or you can click the WAMP icon near Time display. Step 9 : In that you will have list Localhost,PHP my admin Select localhost Step 10 : It display folders in the C:\wamp\www\ Step 11 : Select the file you need to Run Step 12 : Thats my friends... |
Re: How do I run PHP on my PC? You need to install wamp or xampp application. This applications contains php, mysql, apache and some other plugins that you need in order to run php in your pc. |
Re: How do I run PHP on my PC? WAMP and XAMPP are the best for automated installation and i never get any problem using them on localhost |
Re: How do I run PHP on my PC? are you use WampServer? |
Re: How do I run PHP on my PC? Hi, You have to follow some steps Quote:
|
Re: How do I run PHP on my PC? XAMPP will be the best for you problem. |
Re: How do I run PHP on my PC? Quote:
|
Re: How do I run PHP on my PC? Here's another idea, one I like to do ... Install VMPlayer, with a Ubuntu 10.04 OS. Developing PHP on Windows can be a real challenge (and I'm a professional) in ubuntu it's 2 easy commands to set it all up :) That being said ... If you are getting Errors, what are they?? Makes it easier for us to tell you exactly what your problem is. |
Re: How do I run PHP on my PC? Quote:
Testing your code on your home PC is a VERY good idea. This is how it really should be done. Once your happy with the owrk you can then upload it and over write all your files. Or better yet, you can setup SVN. |
Re: How do I run PHP on my PC? I uses WAMP, Maybe you just forget to uncheck the IIS in windows after installing Wamp, the file that you are doing need to be place on (c:\wamp\www\) and be sure that file you are saving has an .php extension (sample.php) how to browse that file: access "http://localhost/" there you will see wamp home page access "http://localhost/Folder/sample.php" Folder is the sample name of folder that is sample page located. |
Re: How do I run PHP on my PC? First install WAMP , XAMPP or MAMP on your computer so your computer will be your local server . |
Re: How do I run PHP on my PC? get your windows installer here: PHP: Installation on Windows systems - Manual there's instructions there as well. |
Re: How do I run PHP on my PC? Maybe you should look at the path in your web browser, with XAMPP, it has to be on the localhost path, like: "http://localhost/test.html" Further reading - I got the following on the XAMPP site: The link is: apache friends - xampp for windows Quote:
|
Re: How do I run PHP on my PC? I'm really enjoying having my whole web dev environment on a USB stick. Well all except for Photoshop (Allthough you can get Portable Gimp). The advantage is that I can use it on any Windows PC. I'm using portable versions of XAMPP, Notepad++, Heidi SQL, Filezilla .. you can get them all from PortableApps.com - Portable software for USB, portable and cloud drives |
Re: How do I run PHP on my PC? I've been using XAMPP, WAMP, EasyPHP but fall in love with Vertrigoserv now. Had problems in the past running Drupal and many other scripts but Vertrigo made me a very happy man now :D. You may want to try it out.. |
Re: How do I run PHP on my PC? @hilmymo Thanks of the suggestion of Vertrigoserv. Looks good. |
Re: How do I run PHP on my PC? I prefer WAMP very easy to use, maybe because I am use to it.But when I am still a begginer,I don't have any problem installing and using it. |
Re: How do I run PHP on my PC? XAMPP work great for me...don't know what may be the problem with yours. |
Re: How do I run PHP on my PC? have u turned on the wamp or xamp? have u put that file and name it *.php to the html or htdoc folder? if u have there's nothing wrong with it O.O |
Re: How do I run PHP on my PC? I agree with jminkler. Setup a development virtual machine with VMware Player and Ubuntu Server. When installing Ubuntu all you need to do is select the LAMP option. This is how I do my PHP development. Then install webmin so that you can configure FTP access to the server or you could use the built in file manager in webmin to transfer the files. |
Re: How do I run PHP on my PC? Quote:
<head> <title>PHP Test</title> </head> <body> <?php print “Hello, world”; ?> </body> </html> and then, you must save the file to sample.php try to install the wamp again and then try to run the php file. Hope it will help you fix your problem |
Re: How do I run PHP on my PC? Multiple options are there for you as you required three things editor for php , MYSQL server and Apache server on your machine but if you go for XAMP and WAMP then the file to be save are at different places to keep otherwise errors occured,. |
| All times are GMT -6. The time now is 05:43 AM. |