Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP configuration: how to confirm that PHP is working

Status
Not open for further replies.

bionicfysh

Programmer
Sep 23, 2003
25
0
0
GB
Dear all,

After much time spent on various forums, and also browsing through 25 of the many posts in this forum, I still cannot find an answer to my problem. I have also taken the care to go to the main PHP page, and lloked at the FAQ.

I concluded that my question is either so trivial or that it has never happened to anyone else for it to be mentioned anywhere... ?


Anyway, enough boring info:

I have installed apache on Suse Linux 8.1, and together with it came extensions for Perl, PHP, and many more modules.
Apache is working fine (well, actually it is not recognizing my java/CGI scripts, but that's another post which I should write in a minute :) )

I have tried to write two simple php scripts:
one with <?php phpinfo ?>
another wone with a little bit more info, but just to say &quot;hello world&quot;
I have also copied simpe scripts from the web, and tried them on my locla apache server, but they all get the same trestment..

the browser (opera, mozilla, and MS explorer) tell me that &quot;I have decided to download a file of type application/x-http-php from (myserver)&quot;
and goes on to suggest either to run it with a specific application of my choice (???) or to download it (!!??!!)


I am very confused for in either case, it is not what I had plans for the users of my eventual website !


If anyone out there knows anything about this, please do let me know, cuz I have just spent 3 days on this matter alone.


Many thanks in advance.

Da Bionic fysh
 
You are missing a d in your
Code:
AddType
directive. It should be
Code:
AddType application/x-httpd-php .php
.

//Daniel
 
Dear all,

thanks for your comments.


Actually I am begining to believe that PHP is not running on the server (although it is installed on the system.)
can you tell me how to check wether it is running, or at least how to start ip, please.

As for the missing d, it was a type ;-)


thanks again

Bionic fysh
 
Do you have the
Code:
LoadModule
directive in
Code:
httpd.conf
?

//Daniel
 
hi Daniel,

Indeed, I did a grep LoadModule of my httpd.conf, and obtained a list of the modules in use by apache....

What can I check next ?

thanks again for your help

Bionic Fysh
 
Did you see a line starting with
Code:
LoadModule php4_module...
?

//Daniel
 
Hi Daniel,

Actually, no there is no reference to php4_Module.

Can you tell me what I can do about this ?
what do I need to install ? how can I check that it is installed ?
what do I need to configure ?
how do I check that it is configured ?


thanks again
 
Then I recommend you take a look in the PHP online manual here:
Look in the grey area on that page titled &quot;Example 3-4. Installation Instructions (Apache Shared Module Version) for PHP&quot;. You want to take a look at steps 14, 15, 16, and 17.

Want the best answers? Ask the best questions: TANSTAAFL!!
 
Hey Sleipnir214,

Many thanks for this doc. it's really good stuff.

thanks, I will try and will let you know if it does not work.
if it does, I shall not communicate any further on this matter, for I believe that you have more important things to do than read me say thank you :)

Anyway, please not that any of the posts above are blessed with my outmost gratitude !

ciao

Da bionic one
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top