RES: New to PHP and struggling with the basics

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Col Day :

Go to : "C:\Arquivos de programas\Apache Software Foundation\Apache2.2\conf"
or the folder in your machine.

Search for this file => httpd.conf 

Search for DocumentRoot "D:/webroot" put your work folder in my case
D:/webroot.

Search for this line and apply the same changes make in DocumentRoot
#
# This should be changed to whatever you set DocumentRoot to
#
<Directory "D:/webroot">

Search for DirectoryIndex, and add index.php to the list

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.html index.php
</IfModule>

Add on the end of the file this lines :

My php installation folder is D:/PHP/, change D:/PHP/ to your installation
folder.

#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir "D:/PHP/" 

# Php as Apache module
LoadModule php5_module "D:/PHP/php5apache2_2.dll" 

Restart apache.

Browse to localhost

Alejandro M.S.

-----Mensagem original-----
De: Col Day [mailto:colinday3@xxxxxxx] 
Enviada em: segunda-feira, 4 de outubro de 2010 06:31
Para: php-general@xxxxxxxxxxxxx
Assunto:  New to PHP and struggling with the basics

Hi all,

Working with the PHP5 for Dummies book (yup real noob, feel free to ridicule
(after telling me what I've done wrong)) and have installed Apache 2.2 and
PHP 5.3.3 onto a laptop running Vista. (yes I know!!!).

I've had Apache running fine with my basic web site created using Serif's
Webplus10 but wanted to experiment with PHP as I want an uploadable area on
my website for my friends and family to submit video/photos.

I've checked the install of PHP using php -v and I get the output that

PHP 5.3.3 (cli) (built: Jul 21 2010 20:10:20)

but when I try and go to the test.php file (below) I get an http 403 webiste
requires you to log in. Error message.

<html>
<head>
<title>PHP Test</title>
</head>
<body>
<p>This is an HTML line
<?php
 echo "<p>This is a PHP line</p>";
 phpinfo();
?>
</body>
</html>

This is the text of the test.php file which I have plonked down in
/apache/htdocs

What have I missed?

the Dummies book is quoting PHP 5.0.0 as the latest release so not too far
away really.

Thanks for your help.

Cheers.

Col Day



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux