LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware and PHP (http://www.linuxquestions.org/questions/slackware-14/slackware-and-php-305583/)

animeresistance 03-24-2005 03:02 PM

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.

:confused: Wonder if the PHP is correctly installed :confused:

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. :study:

keefaz 03-24-2005 03:06 PM

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

david_ross 03-24-2005 03:07 PM

Did you access it via apache? Can you see a request being made in the access_log?

animeresistance 03-25-2005 12:51 AM

ok, i edited those lines in the httpd.conf, but nothing happened. :(

Access via apache ?? How ??

DaHammer 03-25-2005 01:56 AM

Restart apache:

/etc/rc.d/rc.httpd restart

Then point your browser to the php script.

keefaz 03-25-2005 06:17 AM

Quote:

Access via apache ?? How ??
http://localhost

xushi 03-25-2005 06:35 AM

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

animeresistance 03-26-2005 10:05 AM

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.


All times are GMT -5. The time now is 04:59 AM.