LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 03-24-2005, 02:02 PM   #1
animeresistance
Member
 
Registered: Feb 2004
Distribution: Slackware
Posts: 189

Rep: Reputation: 19
Question Slackware and PHP


Hi guys !

Well, i have a problem with PHP,, i just started learning the PHP script, i installed slackware 10.1 (recently bought the CDs from the slackware store to support this great distro ), and started the MySQL database server (that was kinda easy), but (yeah, big monster BUT), when i typed the script to test the PHP installation and then opened in the web browser, nothing happened.

Wonder if the PHP is correctly installed

I read the php manual, but i didn't understand it, because the PHP that cames with slack 10.1 is already installed, i tested the script but it only displays the script without the <? php .... ?> tags

Wonder if i'm doing something wrong, or does php is not initialized.

Here are my script....

------------- Script phpinfo() ------------------
<?php
phpinfo();
?>
-----------------------------------------------------

Well i will continue reading to see what i'm doing wrong.
 
Old 03-24-2005, 02:06 PM   #2
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,282

Rep: Reputation: 66
Edit /etc/apache/httpd.conf and uncomment this line near the bottom :
Include /etc/apache/mod_php.conf

You may want to edit the DirectoryIndex line as well like :
DirectoryIndex index.html index.php index.htm index.xhtml
 
Old 03-24-2005, 02:07 PM   #3
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Did you access it via apache? Can you see a request being made in the access_log?
 
Old 03-24-2005, 11:51 PM   #4
animeresistance
Member
 
Registered: Feb 2004
Distribution: Slackware
Posts: 189

Original Poster
Rep: Reputation: 19
ok, i edited those lines in the httpd.conf, but nothing happened.

Access via apache ?? How ??
 
Old 03-25-2005, 12:56 AM   #5
DaHammer
Member
 
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
Restart apache:

/etc/rc.d/rc.httpd restart

Then point your browser to the php script.
 
Old 03-25-2005, 05:17 AM   #6
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,282

Rep: Reputation: 66
Quote:
Access via apache ?? How ??
http://localhost
 
Old 03-25-2005, 05:35 AM   #7
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Rep: Reputation: 45
well just stick

<?php
phpinfo();
?>

in a file called ... test.php, and stick it in /var/www/htdocs/
restart apache
apachectl restart

and access it via
http://localhost/test.php

If it doesn't work, then you can see why in the apache logs
/var/log/apache/error_log
 
Old 03-26-2005, 09:05 AM   #8
animeresistance
Member
 
Registered: Feb 2004
Distribution: Slackware
Posts: 189

Original Poster
Rep: Reputation: 19
Thanks guys, you helped me a lot, i solved the problem, i just chenged the directory in the line of DirectoryRoot to the directory that has the PhP scripts that i'm programming (i'm just starting with PhP).

Well guys, thanks a lot, take care.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache with PHP in Slackware 9.0 traveldanimal Slackware 3 09-28-2004 12:41 PM
slackware, apache and PHP from .tgz - problems with PHP szymon Slackware 2 09-06-2004 04:57 PM
PHP with Slackware fuelinjection Linux - General 3 06-09-2004 07:08 AM
Apache/PHP Help on Slackware wenberg Linux - Software 7 01-03-2004 10:04 PM
Slackware 9 PHP doppelganger Slackware 1 04-22-2003 01:38 PM


All times are GMT -5. The time now is 11:44 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration