php installation

  badgermansix 11:44 08 Jan 2006
Locked

I'm slowly getting there,
I am following instructions from "Sams teach yourself" "php,MySQl, and Apache"

I have installed MySQL,Apache and php, made a file with notepad in Apache - htdocs.

?php
phpinfo();
?>

Apache is running, I can get to the "click here" o.k. but I cannot get the "click here" to open.
What have I missed please?

  harristweed 13:33 08 Jan 2006

?php
phpinfo();
?>

should be


<?php
phpinfo();
?>

  badgermansix 13:47 08 Jan 2006

harristweed, sorry, I won't get far like that will I?

<?php
phpinfo();
?>

is what I did use.

  harristweed 13:58 08 Jan 2006

what did you do with the php.ini file?

  badgermansix 14:39 08 Jan 2006

>what did you do with the php.ini file?

I cut and pasted it to C:\Windows as instructed.

I did the same with php5ts.dll but to C:\Windows\System32

Thanks for your response.

  harristweed 09:12 09 Jan 2006

What alterations did you make to the (apache) httpd.conf file?

  badgermansix 09:12 09 Jan 2006

Ny more help please?

  harristweed 11:16 09 Jan 2006

You need to tell apache that you are using PHP. This is done in the httpd.conf file.

You will find this in apache/conf folder.

Open it notepad and look for :
#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#

THEN add

LoadModule php4_module c:/php/php4apache2.dll
AddType application/x-httpd-php .php

This is assuming you have php4 and apache2 and the path to you php is c:/php

If using php5......

LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php

# configure the path to php.ini
PHPIniDir "C:/php"

  badgermansix 12:08 09 Jan 2006

harristweed, I have printed your advice, will follow it through and come back later, thank you very much :-)

  badgermansix 14:02 09 Jan 2006

harristweed,

I have php5 in a dedicated "D" drive.
This is what I now have in the Httpd folder:-

#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
#LoadModule ssl_module modules/mod_ssl.so
LoadModule php5_module d:/php/php5apache2.dll
AddType application/x-httpd-php .php
#

Although I looked, I could not understand the following, is it in the http folder, I did do a "Edit - Find" but nothing?
# configure the path to php.ini
PHPIniDir "C:/php"

Thanks

  harristweed 14:19 09 Jan 2006

add:

# configure the path to php.ini
PHPIniDir "d:/php"

after
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
#LoadModule ssl_module modules/mod_ssl.so
LoadModule php5_module d:/php/php5apache2.dll
AddType application/x-httpd-php .php
#

i.e.

#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
#LoadModule ssl_module modules/mod_ssl.so
LoadModule php5_module d:/php/php5apache2.dll
AddType application/x-httpd-php .php
#

# configure the path to php.ini
PHPIniDir "d:/php"

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Galaxy Note 8 vs iPhone X

5 best 3D model websites

iPhone 8 vs iPhone X

WhatsApp : comment lire vos messages sans que l’expéditeur le sache