LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-19-2003, 10:30 PM   #1
matt3333
Member
 
Registered: Dec 2002
Location: Winnipeg, Manitoba, Canada
Distribution: Slackware
Posts: 371

Rep: Reputation: 30
Question Php


i installed php but i dunno if it works???? im new to php can someone point me in the right direction?? something less confusing then www.php.net/install that site is ????????????? confusing anyone know a good newbie site for php???

plz help
Matt3333
 
Old 04-19-2003, 10:32 PM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
check it out
 
Old 04-19-2003, 11:12 PM   #3
matt3333
Member
 
Registered: Dec 2002
Location: Winnipeg, Manitoba, Canada
Distribution: Slackware
Posts: 371

Original Poster
Rep: Reputation: 30
maybe im just thick but im not understand this do i put the file phpinfo.php in my webserver directory??????? or in the folder that u said?????
i put it in my webserver folder which is /var/www/html and i went to it with my browers so blahblah.blahblah.org/phpinfo.php and it just showed what i typed does this mean its not installed propertly??? probably eh??? plz help

Matt3333
 
Old 04-20-2003, 12:21 AM   #4
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
grep php /etc/apache/httpd.conf (or wherever you keep your httpd.conf)

Post the output here. Best guess is that you just need to add a couple of lines.
 
Old 04-20-2003, 10:07 AM   #5
Shinjuku
LQ Newbie
 
Registered: Apr 2003
Distribution: Redhat 8
Posts: 14

Rep: Reputation: 0
Open up your text editor. Type the following:
PHP Code:
<?php
phpinfo
();
?>
Then save it in /var/www/html/ as phpinfo.php

Then open up your browser and go to http://localhost/phpinfo.php
 
Old 04-20-2003, 12:37 PM   #6
matt3333
Member
 
Registered: Dec 2002
Location: Winnipeg, Manitoba, Canada
Distribution: Slackware
Posts: 371

Original Poster
Rep: Reputation: 30
Ok i tried that and when i went to it it just showed what i typed the:
<?php
phpinfo();
?>
my httpd.conf file is under /etc/httpd/conf/httpd.conf
it wont let me paste it in here for some reason i dont know why but i put it in my server folder so just go to http://mattbennett.dyndns.org/httpd.conf thanks for your time

Matt3333
 
Old 04-20-2003, 12:58 PM   #7
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
You need to add this line:
Code:
LoadModule php4_module        libexec/libphp4.so
to load the php module, and this one:
Code:
AddType application/x-httpd-php .php
So apache knows that files with a .php extension should be sent through the php interpreter.
 
Old 04-20-2003, 01:04 PM   #8
matt3333
Member
 
Registered: Dec 2002
Location: Winnipeg, Manitoba, Canada
Distribution: Slackware
Posts: 371

Original Poster
Rep: Reputation: 30
Ok i added the loadmodule line into where the rest of the modules are but where do i add the addtype line???

Thank You
Matt3333
 
Old 04-20-2003, 01:06 PM   #9
matt3333
Member
 
Registered: Dec 2002
Location: Winnipeg, Manitoba, Canada
Distribution: Slackware
Posts: 371

Original Poster
Rep: Reputation: 30
Maybe into the addmodule line????
 
Old 04-20-2003, 01:18 PM   #10
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Well, your httpd.conf is a little strange, usually there is an addtype section ie:
Code:
# AddType allows you to tweak mime.types without actually editing it, or to
# make certain files to be certain types.
#
AddType application/x-tar .tgz
AddType image/x-icon .ico
but it is not in any other directive so you can most likely just add it to the bottom of the file.

Don't put it in the addmodule section.

Last edited by bulliver; 04-20-2003 at 01:19 PM.
 
Old 04-20-2003, 01:29 PM   #11
matt3333
Member
 
Registered: Dec 2002
Location: Winnipeg, Manitoba, Canada
Distribution: Slackware
Posts: 371

Original Poster
Rep: Reputation: 30
Ok i just added it like this #AddType application/x-httpd-php .php?? tell me if its fine where i put it??? i wasnt too sure where u meant by the bottom of it http://mattbennett.dyndns.org/httpd.conf

Thank-you

Matt3333
 
Old 04-20-2003, 01:32 PM   #12
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
I'm sorry, I gave you bunk advice, it needs to be inside the <IfModule mod_mime.c> directive...sorry
 
Old 04-20-2003, 03:55 PM   #13
matt3333
Member
 
Registered: Dec 2002
Location: Winnipeg, Manitoba, Canada
Distribution: Slackware
Posts: 371

Original Poster
Rep: Reputation: 30
Ohh ok its ok but where is this ifmodule??? i cant seem to find it but its probably right in front of me???????

matt3333
 
Old 04-20-2003, 04:13 PM   #14
matt3333
Member
 
Registered: Dec 2002
Location: Winnipeg, Manitoba, Canada
Distribution: Slackware
Posts: 371

Original Poster
Rep: Reputation: 30
Hmmm ok i didnt add the last one the addtype in the ifmodule i dunno where it is so maybe thats y this isent working but........ /libexec isent a dir on my computer and that libphp4.so isent a module????? i was looking around in there and it doesnt seem to have it????

Matt333
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Are PHP session variables held in memory when you leave a PHP site? Locura Programming 11 11-16-2008 08:37 PM
php5 apache2 mysql4 don't work, php does not seem to read php.ini atom Linux - Software 5 03-24-2005 11:05 AM
php apache or php cgi - php learner rblampain Linux - Security 3 12-17-2004 11:10 PM
PHP -- How to execute a shell script from PHP using FTP functions?? zoonalex Programming 3 07-29-2004 11:51 AM
Updating php 4.3.1 from tar and keeping current php configuration with mandrake 9.1 mrjeep Linux - General 0 04-02-2003 07:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration