Forum Moderators: coopster

Message Too Old, No Replies

Help I can't install PHP

         

retroking

9:56 pm on Oct 29, 2004 (gmt 0)

10+ Year Member



I don’t even know where to start. Two days over 14 bloody hours I am trying to install Apache2, MySQL, PHP and PhpMyAdmin. First I had a problem with Apache 2.0.48 but when I downloaded 2.0.53 and it installed fine. Next step Installing MySQL Servers and Clients 4.0.16 was the easiest part. Then I go for PHP and that’s the place where I feel sudden urge to swear uncontrollably.
My installation file is php-4.3.4-installer.exe I select standard install and of course it goes to C:\PHP
Oh yes, I forgot to mention that I am using Windows XP and I am doing tutorials on dynamic web sites from a book I just bought so I’m really following the steps from that book.
So I select:
Address for SMTP server: localhost
(From) address: me@localhost
Select the type of http server: Apache (I set Microsoft IIS 4 of higher on my laptop and it worked)
Now most of you probably know what happens next. Exactly! It throws at me Apache configuration window “ sorry, the software to automatically configure the Apache httpd.conf file has not yet been written. You will have to configure it manually”
But that’s not a problem
In Apache httpd.conf I change and save.
From -DirectoryIndex index.html index.html.var
Into - DirectoryIndex index.html index.html.var index.php
PhP.net says PHP can be installed as a CGI binary or Apache module … in my case it would be inserting into httpd.conf
ScriptAlias /php/ “c:/php/”
AddType application/x-httpd-php .php
Action application/x-httpd-php “/php/php.exe” – for the CGI connection, or
LoadModule php4_module “c:/php/sapi/php4apache2.dll”
AddType application/x-httpd-php .php – for the Apache module connection.
I tried both with no avail.
What should I do now? I installed and uninstalled hundred times tried using php-4.3.9 too.
So I have PHP installed but not configured to work with Apache2.
Skipping that I extract PhpMyAdmin into Apache’s myadmin folder inside htdocs then I open config.inc.php file in dreamweaver and edit
$cfg[‘PmaAbsoluteUri’]= ‘http:127.0.0.1/myadmin1’:
….
$cfg[‘blowfish_secret’]=’cookie’:
….
$cfg[‘Servers’][$I][‘auth_type’]=’cookie’: //Authentication method(config,http or cookie based)?
Save it and hoping to see login page for myadmin when I type htt://127.0.0.1/myadmin but I get something that looks like Unix code instead.
Am I right to believe that is because my PHP isn’t set-up properly? Must be … I tried PhpMyAdmin 2.5.4 and 2.6.0 versions
HELP!

coopster

10:37 pm on Oct 29, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



There are some really good threads in our PHP Forum Library [webmasterworld.com] that show step-by-step as well as other configuration directives to check during install. Have you had a look through them yet?

retroking

12:28 am on Oct 30, 2004 (gmt 0)

10+ Year Member



Thanks Coopster I’ve just read Henry0’s method, sounds very promising and considering what jdMorgan wrote about LoadModule’s priority order, where would you say is the best place to insert phpmodule command? Anyway, I’m gonna do it now it’s just pity we are talking about php5, because my book is based around php4

retroking

1:30 am on Oct 30, 2004 (gmt 0)

10+ Year Member



I did exactly as it says in henry0 installation up to the point were Apache is restarted after setting the path for Windows.
Got this error message :
“Syntax error on line 135 of C:/Program Files/Apache Group/Apache2/conf/httpd.conf:
AddType requires at least two arguments, a mime type followed by one or more files extensions “

Line 134, 135 is of course were I inserted LoadModule command
LoadModule php5_module C:/php/php5apache2.dll
AddType application/x-httpd-php
Have I missed something out here?
Oh, I see hery0 hasn.t finnised the line:

AddType application/x-httpd-php .php

coopster

5:43 pm on Oct 30, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



jdMorgan and I had a good discussion regarding the loading of modules after that message was posted. Using Apache 1.3, the order is definitely something to keep an eye on, but starting with Apache 2.0, things seemed to have changed. There are no definitive resolutions on my part yet, but perhaps it is time to get that thread started...

As far as henry0's documentation goes, you are correct. If you want files with a .php extension to be parsed by PHP, then you need to append that to the directive as you have. If you want other extensions to be parsed the same, you just keep adding them. See Apache's AddType [httpd.apache.org] directive for more information. For example, to parse .php, .html and maybe the .coopster extensions, you could do something like so...

AddType application/x-httpd-php .php .html .coopster

ergophobe

7:03 pm on Oct 31, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



it’s just pity we are talking about php5, because my book is based around php4

Just a word of encouragement retro - all the basic stuff is pretty much the same. Almost all PHP4 functionality will work fine. There are a few opbject-oriented things that PHP5 adds that may be useful, but you PHP4 book will no doubt be just fine for the time being.

Tom