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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache PHP config help

Status
Not open for further replies.

hannahsh

Technical User
Feb 18, 2002
82
GB
I have installed (Mandrake)Linux server with apache and PHP but getr question mark on php pages. I have hunted for proper installation/configuration details but struggled to find anything that makes sense.

I know apache is started (apachectl) so thats not an issue but I guess some configuration is needed to make them all work together

I get a blank page or from another box

Warning: Failed opening '/var/ for inclusion (include_path='') in Unknown on line 0

ps this is a test box cos I am trying to learn LINUX web admin, but failing miserably

anyone have some server build docs they have made for their staff to follow etc etc ??
 
When you compiled php did you add in the --with-apache=path to apache source and when you compiled apache did you add in the option --activate-module=src/modules/php4/libphp4.a? Also have you edited your httpd.conf file to include the following: AddType application/x-httpd-php .php .php3 .php4

Hope this helps
 
what ??? Im new to this so please forgive my ignorance

I installed apache and PHP4 with RPM !! and apachectl starts and stops ok so I guess something is ok. I have checked the .so files in the httpd.conf all is ok there.

The .php web page has a green question mark over them so I guess that the php extension isnt recognised ????

When I try and start/open the pages it asked for an application so I direct it to Konqueror it just loops with empty page

Where does AddType application/x-httpd-php .php .php3 .php4 go in the httpd.conf file ??

I just wanted to learn PHP/mysql, now I am finding this LINUX admin is just as much fun as NT !! all good fun
 
If it were me I would remove the RPM (but that is up to you)and compile the programs myself. From previous posts I have seen that you are using apache 1.3.26. There are know issues with version below 1.3.27 and for 2 series anything below 2.0.43. I like to compile the source myself so I better control over the installation. It also helps give a better understanding how the programs relate to each other.
That being said here is the part of my httpd.conf for php.
</IfModule>

#
# AddType allows you to tweak mime.types without actually editing it, or to
# make certain files to be certain types.
#
# For example, the PHP 3.x module (not part of the Apache distribution - see
# will typically use:
#
#AddType application/x-httpd-php3 .php3
#AddType application/x-httpd-php3-source .phps
#
# And for PHP 4.x, use:
#
AddType application/x-httpd-php .php .php3 .php4 .phtml
AddType application/x-httpd-php-source .phps
AddType application/x-tar .tgz
AddType application/x-miva-compiled .mvc
AddType application/x-miva-compiled .mv
Action application/x-miva-compiled /cgi-bin/mivavm

#
# AddHandler allows you to map certain file extensions to &quot;handlers&quot;,
# actions unrelated to filetype. These can be either built into the server
# or added with the Action command (see below)
#
# If you want to use server side includes, or CGI outside
# ScriptAliased directories, uncomment the following lines.
#
# To use CGI scripts:
#
AddHandler cgi-script .cgi

#
# To use server-parsed HTML files
#
#AddType text/html .shtml
#AddHandler server-parsed .shtml

#
# Uncomment the following line to enable Apache's send-asis HTTP file
# feature
#
#AddHandler send-as-is asis

hope this helps
 
Thanks Paladin

Having worked with Dos/Windows for 15 years turning to Linux has been fun, atleast my hair was already going so a few more threads won't be missed!

I am afraid I have cheated, using webserver install and yes RPM and even Webmin which is great.

I have done server support for over 5 years and now more and more of them are UNIX especially with apache so I thought I'd better get my finger out and see what all the fuss was about.

So I went out and bought a few dual processor compaq workstations and started what has been a VERY slow learning curve. Actually if truth be known, paint would have dried a lot faster, but I'm still here and determind to get through it to the bitter end.

I suppose cos I dont know if the code is right even that dont help so I will have to slowly work my way though what is going on. I understand your arguement about using compile but I never was any use/interested in programming so I guess at nearly 40 I'd better start and learn fast.
 
ok

I deleted 1.3.23 Apache using RPM and downloaded

apache 2.0.43
PHP 4.2.3

Only installed apache-2.0.43 thus far
I then configured, make install etc with --enable module=so

everything looked ok BUT

when I try apachectl start it says command not found, its highlighted in green in the KDE shell with * after it ??????????? what have I done wrong ???????

ooooooooooooooo bleeding unix, or should I say linux.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top