Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: PHP and Apache

  1. #1

    Unhappy PHP and Apache

    I have set up an apache web server and am trying to get php to work. however, when i go to the url of the php document in my browser it just comes up asking me where i want to download the file to. please help thanx

  2. #2
    Join Date
    Jun 2008
    Location
    Finland, European Union
    Posts
    1,879

    Default Re: PHP and Apache

    Naturally the first thing to ask is - have you installed php5 and php apache module, mainly the apache2-mod_php5 package.

  3. #3
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,683
    Blog Entries
    4

    Default Re: PHP and Apache

    And the next thing to ask is if you have added php5 to the list in APACHE_MODULES in /etc/sysconfig/apache2.

    I assume that the Apache and PHP packages are from OpenSUSE. Things get more complex if you try to install your own from upstream packages.

  4. #4

    Default Re: PHP and Apache

    what does

    rpm -qa | grep apache && rpm -qa | grep php

    give back?
    How much can you know about yourself if you've never been in a fight. - Fight Club

    Ben Kevan's Blog - That's me

  5. #5

    Default Re: PHP and Apache

    yes they're both installed :S and rpm -qa | grep apache && rpm -qa | grep php returns...

    apache2-mod_perl-2.0.3-54
    apache2-example-pages-2.2.4-70.4
    ant-apache-bsf-1.7.0-37
    apache2-2.2.4-70.4
    apache2-mod_php5-5.2.5-8.1
    ant-apache-log4j-1.7.0-37
    apache2-mod_mono-1.2.5-22
    apache2-devel-2.2.4-70.4
    ant-apache-regexp-1.7.0-37
    ant-apache-bcel-1.7.0-37
    apache2-prefork-2.2.4-70.4
    apache2-doc-2.2.4-70.4
    ant-apache-resolver-1.7.0-37
    ant-apache-oro-1.7.0-37
    apache2-utils-2.2.4-70.4
    apache2-mod_python-3.3.1-53
    php5-pdo-5.2.5-8.1
    php5-hash-5.2.5-8.1
    php5-xmlreader-5.2.5-8.1
    php5-dom-5.2.5-8.1
    apache2-mod_php5-5.2.5-8.1
    php5-tokenizer-5.2.5-8.1
    php5-iconv-5.2.5-8.1
    php5-sqlite-5.2.5-8.1
    php5-ctype-5.2.5-8.1
    php5-xmlwriter-5.2.5-8.1
    php5-json-5.2.5-8.1
    php5-mysql-5.2.5-8.1
    php5-5.2.5-8.1

  6. #6
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,683
    Blog Entries
    4

    Default Re: PHP and Apache

    What does

    Code:
    /usr/sbin/httpd2 -M | grep php5
    output?

  7. #7

    Default Re: PHP and Apache

    /usr/sbin/httpd2 -M | grep php5 gives:

    [Sat Jun 14 17:15:37 2008] [crit] Failed to remove dashboard file '/tmp/mod_mono_dashboard_XXGLOBAL_1', further actions impossible. Operation not permitted
    Loaded Modules:
    core_module (static)
    mpm_prefork_module (static)
    http_module (static)
    so_module (static)
    authz_host_module (shared)
    actions_module (shared)
    alias_module (shared)
    auth_basic_module (shared)
    authz_groupfile_module (shared)
    authn_file_module (shared)
    authz_user_module (shared)
    autoindex_module (shared)
    cgi_module (shared)
    dir_module (shared)
    include_module (shared)
    log_config_module (shared)
    mime_module (shared)
    negotiation_module (shared)
    setenvif_module (shared)
    status_module (shared)
    userdir_module (shared)
    asis_module (shared)
    imagemap_module (shared)
    perl_module (shared)
    python_module (shared)
    authz_default_module (shared)
    mono_module (shared)
    Syntax OK

  8. #8
    Join Date
    Jun 2008
    Location
    Finland, European Union
    Posts
    1,879

    Default Re: PHP and Apache

    php5 module isn't being loaded.

    Edit /etc/sysconfig/apache2, find a line called APACHE_MODULES="blah blah" and add php5 to the end of it, inside the quotes - make sure you don't edit the line with # in front of it.

    After that issue rcapache2 restart

  9. #9
    Join Date
    Jun 2008
    Location
    Talcahuano,Chile
    Posts
    58

    Lightbulb Re: PHP and Apache

    Quote Originally Posted by benashton24 View Post
    /usr/sbin/httpd2 -M | grep php5 gives:
    Code:
    $ a2enmod php5
    $ rcapache2 restart

  10. #10

    Default Re: PHP and Apache

    I've tried everything that has been suggested so far and it still isn't working has anyone got any other suggestions please?

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

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