Imtay22
Apr 13 2007, 10:02 PM
| | I downloaded PHP 5.2.1 win32 installer and apache. Now what? I tested apache, and it came up with a message saying- It works! So, now what? how do I get php scripts to run using the localhost? What i mean is, where do I save the files so I can view them? Please Help!!! |
Reply
ghostrider
Apr 13 2007, 10:11 PM
Save the files in the www or public_html folder. Use http://127.0.0.1/ as your address for your computer.
Reply
Imtay22
Apr 13 2007, 10:16 PM
I am trying to install it on my computer, so i can test it before I upload it to the Trap. Where would I find those on my computer?
Reply
truefusion
Apr 13 2007, 10:58 PM
I'm guessing you just performed a typical Apache installation, meaning if you want your files to get "picked up" by the server, place them into your "htdocs" folder that is located in the Apache directory. Delete all files in there if you want, then just put all your site's files in there. To see if it shows your site, of course, go to http://localhost/ or http://127.0.0.1/. This is all said with the assumption that you have set up Apache to load up with PHP support.
Reply
shadowx
Apr 13 2007, 11:46 PM
I think Truefusion covered most of things, though remember that you need to have apache running to view your pages using the address TF posted above. To turn php on you will usually have either a "control panel" type program in your start menu or a program like "start php" or something like that.
Reply
jlhaslip
Apr 14 2007, 01:04 AM
Next thing will be to download and install a mysql Server from mysql.com. The easiest method to get up and running is to download and install all of these using XAMPP or WAMP. XAMPP is a single-click package that loads PHP, Apache, mysql, phpadmin, an FTP Server, a Mail Server and a bunch of stuff. There is a Tutorial around here that explains some stuff about it. If you have any questions, keep asking here.
Reply
Imtay22
Apr 14 2007, 12:55 PM
Ok thanks guys I will try to get this working! I will post back here if I have any more problems..
Reply
hitmanblood
Apr 14 2007, 01:18 PM
Well it seems like no one answered your question here yet as it appears. You may place php where ever you want on your computer however you have to adjust then your apache configuration file so that it knows where to search for the other classes and so on. If you don't know how to do it I'll write here a short tutorial in the folder where you have installed your apache server you should find this file and open it in any text editor httpd.conf and then you should find this line AddType application/x-tar .tgz and after this line you should write this or post it: CODE ScriptAlias /php/ "c:/inet/php/" AddType application/x-httpd-php .php AddType application/x-httpd-php .php3 AddType application/x-httpd-php .php4 AddType application/x-httpd-php .htm AddType application/x-httpd-php .html AddType application/x-httpd-php .phtml Action application/x-httpd-php "/php/php.exe Then save the file and voala you've got yourself configurated apache with php. But I would like to point that the best thing to use is xampp it is freeware software which sets up on windows based platform apache then php mysql and several other thing like mail server and so on and it can be easily extended. Good luck in programming.
Reply
Imtay22
Apr 14 2007, 01:46 PM
Can't find that line, but i found a simalar one- CODE #AddType application/x-gzip .tgz Should I place that under that one? @ Everyone else- I put my php files there and now all it comes up as is this- CODE <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"> <title>Testing PHP include functions.</title> </head> <body> <a href="?p=idx">Index</a> - <a href="?p=test">Test Page</a> <?php $page=$_GET['p']; switch($page){
case 'idx': include (".../includes/testphpinclude.html"); break; case 'test': echo 'Test!'; break; </body> </html> That is the code I put in the php file. Still help? Oh yeah, when I installed php, It auto configed the Apache Server.
Reply
rvalkass
Apr 14 2007, 01:57 PM
If you are using Windows along with the latest version of Apache then you need to put your files into the following folder: C:\Program Files\Apache Software Foundation\Apache2.2\htdocsAs PHP has automatically detected and configured your Apache installation, no changes to the configuration files should be necessary. Make sure Apache is actually running before trying to load the files. You should have a system monitor on the taskbar next to the clock. It's a pink feather with a dot at the bottom. If the dot is red then Apache isn't running. You need to left click the feather, choose Apache 2.2 and then Start. The dot should turn green, signifying that Apache is up and running. Also, to make sure PHP picks them up, make sure the files have the .php extension, and the starting and ending PHP tags. Your example above is missing the closing ?> PHP tag.
Reply
Imtay22
Apr 15 2007, 12:25 AM
Okay thanks everyone I hope it works now! I have index.php in the htdocs folder, and the include file in htdocs/includes/testphpinclude.html. It still is not showing anything when I click on Index. Im going to upload it to the trap. EDIT= When I uploaded to to the trap, it wored fine! Check it out here. That was weird..
Reply
truefusion
Apr 14 2007, 05:53 PM
QUOTE(Imtay22 @ Apr 14 2007, 01:12 PM)  [. . .] [1]could i just put no dots at all? [2]What should be in the include file? [1]If you have no dots, then the folder "includes" with all of its files in it would have to be located in the DOCUMENTROOT folder (which is probably "htdocs", assuming the file you're testing is located in the same folder; or whatever DOCUMENTROOT is set in the Apache httpd.conf file). Two dots mean "up one folder"; one dot means "current folder". If you have no dots but the path starts with a slash (/), then that means it'll look in the root folder. [2]Whatever you want.
Reply
Imtay22
Apr 14 2007, 05:12 PM
Ahhh ok or could i just put no dots at all? What should be in the include file? the text is- QUOTE Testing the php Include Function! Thank you guys for your help!
Reply
matak
Apr 14 2007, 05:01 PM
i think you have one extra dot in your include code.. CODE include (".../includes/testphpinclude.html"); should be CODE include ("../includes/testphpinclude.html");
Reply
Imtay22
Apr 14 2007, 04:15 PM
Ahh it works now it was truefusions find, I forgot to add This- }. Now I can't get the include() function to work. Weird.
Reply
Recent Queries:--
apache "up one folder" - 267.54 hr back. (1)
Similar Topics
Keywords : install, php, locally,
- How To Install Gzip ?
(2)
Mysql Adodb Connector, Need Help
where is it or how do I install the adodb connector for mysql? (2) Hello, sorry if its in the wrong post, but I suppose it has something to do with php because its the
language I am going to use to connect to my sql through this connector, if it is available which is
the question I am asking. Is the adodb connector available on trap17 hosting? if so where is it? I
have looked all over for it and I couldnt find it. If its not available, how can I install it? Is
there a way? Thanks in advance for any help. /smile.gif" style="vertical-align:middle" emoid=":)"
border="0" alt="smile.gif" />....
Code To Install Mysql Database Table?
(5) Can anyone show me example code of how to install a database table instead of me having to upload an
file with it in, so i can do it from a php page? Thanks in advance ;-)....
Gtk For Php
Help to Install GTK for PHP (1) Where I can get GTK for PHP and It port on WIN32 ?....
Phpbb Install Error
help w/ phpbb plz.... (2) ok, i type in eveything that phpbbb asked to install, and i use the info i got in the mail and made
a db, but it doesn't work at all.......instaed it says "An error occurred trying to update the
database You have an error in your SQL syntax; check the manual that corresponds to your MySQL
server version for the right syntax to use near ''' at line 1" what does this mean and
how do i fix this and install the forum?? i have tried to install this many times now but it never
works /sad.gif' border='0' style='vertical-align:middle' alt='sad.gif' /> ......
Postnuke Install Problems On Subdomains
(1) I'm trying to install PostNuke on a empty server I allready got PostNuke downloaded and uploaded
the downloaded files to the server but I can't get it to work. I'm trying to do this on 2
servers both are sub-domains and both support php. One of them has a MySQL database and MyAdmin but
I can't find them anywhere on the sub-domain. I'm pretty new to this and any advise would be
more then welcome to me. I tryed looking for a MySQL database to install but when I do I get
something like 30 different versions and don't know whitch one I need I tryed th....
PHP 5.0.0 Released!
Anyone has tried to install PHP5???? (8) Hey everybody, anyone make PHP5 works fine?? I tried but the MySQL dont work :-(....
Looking for install, php, locally,
|
*RANDOM STUFF*
*SIMILAR VIDEOS*
Searching Video's for install, php, locally,
*MORE FROM TRAP17.COM*
|
advertisement
|
|