Find the answer to your Linux question:
Results 1 to 6 of 6
Hi. I am trying to configure PHP to run on httpd. Whenever I try to browse to php.info (i.e. <?php phpinfo(); ?> ) it doesn't parse the code, and simply ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2006
    Posts
    14

    PHP install / config / make it work!


    Hi. I am trying to configure PHP to run on httpd. Whenever I try to browse to php.info (i.e. <?php phpinfo(); ?> ) it doesn't parse the code, and simply displays
    text. I thought that it might have been an issue with SULinux, but I have set the parameter to disabled at the moment.

    I have listed some info on the kernel and rpms that are installed relating to httpd, php and mysql.

    I would appreciate if someone could shed any light.

    2.6.20-1.2933.fc6


    php-common-5.1.6-3.4.fc6
    php-pdo-5.1.6-3.4.fc6
    php-mysql-5.1.6-3.4.fc6
    php-cli-5.1.6-3.4.fc6
    php-5.1.6-3.4.fc6

    system-config-httpd-1.3.3-1.1.1
    httpd-2.2.3-5
    httpd-manual-2.2.3-5

    MySQL-python-1.2.1-1
    libdbi-dbd-mysql-0.8.1a-1.2.2
    mysql-server-5.0.27-1.fc6
    php-mysql-5.1.6-3.4.fc6
    perl-DBD-MySQL-3.0007-1.fc6
    mysql-connector-odbc-3.51.12-2.2
    mysql-5.0.27-1.fc6

  2. #2
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    I hope your php.info file actually ends in .php

    phpinfo.php

    files get parsed based on their file extensions, html, htm, asp, php. so unless you configured .info to parse as php then that might be the problem

  3. #3
    Just Joined!
    Join Date
    Oct 2006
    Posts
    14
    Arghhh

    Four hours I have been sitting looking at this thinking, what have I done!

    Thanks jledhead.

    This now leads onto the next question, php info returns, without mysql, shouldn't rpm php-mysql enable with -mysql?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    it should. have you restarted apache since installing the rpm

  6. #5
    Just Joined!
    Join Date
    Oct 2006
    Posts
    14
    yeah restarted it and it still says without

    ./configure' '--build=i686-redhat-linux-gnu' '--host=i686-redhat-linux-gnu' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-kerberos' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--with-mime-magic=/usr/share/file/magic' '--without-sqlite' '--with-libxml-dir=/usr' '--with-xml' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--without-odbc' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter'

  7. #6
    Just Joined!
    Join Date
    Mar 2007
    Posts
    42
    Check in your httpd.conf file...
    It should be written some of this line...
    - LoadModule php5_module modules/libphp5.so
    - DirectoryIndex index.html index.php index.htm
    - AddType application/x-httpd-php .php .phtml
    - AddType application/x-httpd-php-source .phps

Posting Permissions

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