Hello Guys I never Installed PHP on my PC Before, I used webserver before. Now I Installed XAMPP (that Install Apache,PHP,MySql) on my PC So how do I checked that PHP is installed or not ??? and Where should I place my file to run like in IIS server there is one folder in which you have to put all your files, is there any folder in php where you have to put your file to run ?? Plz. Help me in this silly questions (I used to do programming in Visual Basic but now I want to learn php so plz. help me in this) your suggession is also welcome to Learn PHP Easily Thanks in Advance
find your htdocs folder and drop any php file in it, then access it from http://localhost/whatever.php Try this one: <?php echo phpinfo(); ?> Code (markup): also I think if you just go to http://localhost XAMPP will have a php test page already. Just click on that.
1. create a regular HMTL file i.e. head / body into your empty body place the following code <? phpinfo(); ?> save the file - with .php file extension in the folder your apache is configured as your server-root ( if unsure, look into the apache config file to see where on your system apache server / starts then open the file with above code in your browser using http:// ... path to your file on your localhost you then will see a long page filled with all useful data of what you have on localhost if that works - then PHP works on your system else back to step 1 webmaster studies
C:\Inetpub\wwwroot is where ur files should be placed. On the web browser it is http://localhost/ if u create a file called info.php which contains JUST No blanks before: <?phpinfo();?> and save it in C:\Inetpub\wwwroot then u should go to http://localhost/info.php A php information page should be displayed with all of ur initial variables. Google phpinfo for an example
Currently I don't have IIS installed so where is Inetput/wwwroot folder Currently I only have Apache installed. So where is this type of folder in Apache ?? Waiting for your reply. Thanks
1. may be its time to study VERY basic apache stuff first http://httpd.apache.org/docs/1.3/misc/howto.html 2. apache config file name usually is ( depending on precise apache version ) either default-server.conf or httpd.conf search in your own PC for such filenames find the folder where you installed apache look at your config you may have to configure much more later on 3. Google search for apache howto windows
Hi I found httpd.conf on my PC This are the lines that I found in this file # # ServerRoot: The top of the directory tree under which the server's # configuration, error, and log files are kept. # ServerRoot "D:/Program Files/Apache Group/Apache" HTML: So i copy my test.php files in this directory but when i go to http://localhost/test.php then gives me error that "Page Can not be Found" Can you plz. guide me , did i select wrong folder to place my php files ?? Waiting for your reply. Thanks
I am a Linux professional and NO XP at all - you really should learn the basics of the basics by studying apache howto !! localhost is the Linux version and may NOT work on your XP hence another way to test is to use your local IP assuming you have local IP of 192.168.0.1 then a in your browser http: // with your local IP should show you some default start page if so - then test in the same path your php-test-page if you have such enormous problems with most basic user stuff - i recommend you to eaither first learn basics ot change job what you have now is far less than 1% of the work, problems and learning you will have in future weeks and months there are commercial tutorials online to teach such basics invest in your future its cheaper for all - and faster as well
I think there is no problem with Apache server because when I go to http://localhost/index.html.en then its showing index.html page of offline Apache installation. This is my path in local computer D:\Program Files\Apache Group\Apache\htdocs HTML: but when I go to http://localhost/test.php (File is there) so Instade of run this file they indicate us to download that file. So do I need to configure php.ini file to run php file from
of course absolutely NO it appears you have still april 1 i have zero sense for such jokes and waste of time NO space BEFORE the php code ... that means NO nbsp - NO blank however !!! ONE clean HTML page consisting of the traditional HTML elements html head /head body your code here /body /html in correct syntax of course obviously you have failed to configure apache for PHP that's why the page is offered for download instead of being displayed - that's a totally different story and way to basic. as said before its time to either change job - become baker, gardener, painter or whatever OR start learning the basics first but no more april fools HERE in dp forum - it's time to work for me an di have no more time for such jokes
When I installed php, I had to use <?PHP ?> for php code until I edited the php.ini file (I think, it could've been a different .ini) and then after that I was able to use <? ?>
you are talking about short tags in system php.ini it's a rather lazy method to use short tags ON default in professional SW should be short tags OFF
I'm not sure how you've managed to install Xampp without PHP running :S Xampp is made so everything is ready to go. I really have no idea whats happened. Are you running XAMPP on a remote box? It's not really made for that. If you tell me what Distro you're using I can give you a link for a fool-proof perfect set up Also, typing PHP -v at the command prompt is the quickest way to see if it's installed, which it will be if you used xampp
For getting the phpino all you need is the code <?php phpinfo();?> Code (markup): That was what I was trying to convey. And it was you who complicated the entire thing by asking me to try the code. I tried the code and I found no problem with it. Tats why I asked for clarification. I need no baby sitting. Thanks for the replies anyways. In your php.ini set the short_open_tag on short_open_tag = On Code (markup): If anybody needs help with installing Apache and PHP on Windows, feel free to pm me. I'll try my best to help you.