Forum Moderators: phranque

Message Too Old, No Replies

localhost path

         

kumarsena

3:14 pm on Nov 5, 2003 (gmt 0)

10+ Year Member



hey guys,

im pretty new this apache, php and mysql thing and i just installed apache on my pc, as well as php. but how do i test my php code on my local machine. what will be the path to the files, should i keep my php files in a specific folder or can i keep it anywhere, apache is running and so is php, as an executable. i kept the php fiels in htdocs folder, and used the follwong path
[localhost...] v2/index.php3

but the file cannot be found.
apache is under C:/program files/apache group/apache/

while php is installed under c:/php

any help would be apreciated,

thanks
kumar

kumarsena

3:15 pm on Nov 5, 2003 (gmt 0)

10+ Year Member



and yes, i have configured the config file. to reflect path of php and php extensions it should use.

jdMorgan

12:44 am on Nov 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Can anybody give kumarsena some help here? <bump>
Thanks,
Jim

moltar

1:09 am on Nov 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I beleive the problem is in trailing slashes.

Here is the example of my config file:

ScriptAlias /_pHp4_/ "c:/php/"
AddType application/x-httpd-php .php .php3
Action application/x-httpd-php "/_pHp4_/php.exe"

I also had lots of problems long time ago, and as far as I remember it was because of slashes. Please try that and get back here.

DaScribbler

10:36 pm on Nov 8, 2003 (gmt 0)

10+ Year Member



To test PHP, create a sub-directory from your webroot, in your case your webroot would be c:/Program File/Apache Groub/apache/htdocs. Add a sub-directory (let's call it /test) now create a test page containing this code

<?php
phpinfo();
?>

and name this page test.php. Save it in c:/Program File/Apache Groub/apache/htdocs/test. Go to your browser and go to [localhost...]

As for the rest, you can find a very good step by step tutorial for installation and testing PHP, Apache, MySQL, Perl etc at this link...

DeveloperSide.Net [devside.net]

There you will find step by step instructions which are very easy to follow. Even gives you a few steps to test everything.