Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
how to use php? I try <? phpinfo(); ?> but nothing happens. Apache is working well, and mysql too. What I must do to be able to use php ? ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    obs
    obs is offline
    Just Joined! obs's Avatar
    Join Date
    Dec 2004
    Posts
    14

    I cant use php


    how to use php? I try <? phpinfo(); ?> but nothing happens.

    Apache is working well, and mysql too.

    What I must do to be able to use php ?

    I found this:
    PACKAGE NAME: php-4.3.7-i486-1.tgz
    PACKAGE LOCATION: ./slackware/n

    so php must be installed on my system, cus i do "full" install.

  2. #2
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Location
    /dev/urandom
    Posts
    3,682
    Did you add the line to your apache2.conf to load the php4 module? It's actually probably in there, but commented (IIRC).
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

  3. #3
    obs
    obs is offline
    Just Joined! obs's Avatar
    Join Date
    Dec 2004
    Posts
    14
    I add only "Include /etc/apache/php_mod.conf" to httpd.conf but does not help.

    What else I must add?

  4. #4
    Just Joined!
    Join Date
    Dec 2004
    Location
    Dallas
    Posts
    10
    Its "Include /etc/apache/mod_php.conf" not php_mod.conf. That should get it working. Restart apache after you edit the config, of course.

  5. #5
    obs
    obs is offline
    Just Joined! obs's Avatar
    Join Date
    Dec 2004
    Posts
    14
    no, I just make mistake here in the forum. in the conf I write it right.

    I write in the php.ini doc_root = "/var/www/htdocs". is that corect ? or the path must be diferent?


    edit:
    I remove doc_root from php.ini and now its working... :D

  6. #6
    Just Joined!
    Join Date
    Dec 2004
    Location
    Dallas
    Posts
    10
    Quote Originally Posted by obs
    edit:
    I remove doc_root from php.ini and now its working...
    Glad to hear it.

  7. #7
    Linux Enthusiast puntmuts's Avatar
    Join Date
    Dec 2004
    Location
    Republic Banana
    Posts
    562
    A little offtopic but I noticed you are using an old PHP version and probably other software with security problems as well. Check the security section on the Slackware page and install the updated packages mentioned in there.

    Right now, Patrick V. is working to catch up with the patches (he was very ill for some time) so keep looking at those pages.

  8. #8
    Linux User Muser's Avatar
    Join Date
    May 2004
    Location
    Maryland
    Posts
    363
    Quote Originally Posted by puntmuts
    A little offtopic but I noticed you are using an old PHP version and probably other software with security problems as well. Check the security section on the Slackware page and install the updated packages mentioned in there.
    don't get php 5 though, cuz a lot of php scripts are still uncompatiable with version 5.

  9. #9
    Just Joined!
    Join Date
    Dec 2006
    Posts
    2

    Don't get it

    I know that this is an old subject but I'm having a similar problem.

    I don't want to use mysql as database so I didn't enabled it.

    I'm using Slackware 11 full install. Apache is running perfectly and I uncommented

    Include /etc/apache/mod_php.conf

    in the httpd.conf file.

    I created a hello.php file and put it in /var/www/htdocs/ directory

    It only has <? phpinfo(); ?>

    and when I try to see http://localhost:2002/hello.php I only see

    <? phpinfo(); ?>

    Someone could help me please?

  10. #10
    Linux Newbie
    Join Date
    Dec 2006
    Posts
    105
    I think it's to be <?php echo phpinfo(); ?>
    Unix, Linux tips...

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •