Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2010
    Posts
    16

    Question Unanswered: Getting Apache to work with PHP

    Can you tell me what I need to change in either my httpd.conf file or my php.ini file to get PHP to work with Apache version 2.2.11. I'm using PHP version 5.2.9, however whenever I create a PHP file in my /var/www/html/ directory and then browse to it, my browser tries to download the php file instead of executing/displaying it as it should do. I have these httpd.conf and php.ini files on my server, and at these different locations: (I'm running Fedora)

    /etc/httpd/conf/httpd.conf

    /usr/local/lib/php.ini
    /usr/local/php/php-5.2.9/php.ini
    /etc/php.d/php.ini

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    so Apache isn't recognising the PHP module.
    you need to look at the apache and/or php logs and try to see if there is an error message there
    if this is a development machine, personally I'd be tempted to download a copy of XAMPP and install that.
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Jan 2010
    Posts
    16

    Question undefined symbol: sqlite3ExprDelete

    Thanks. This is what it spits out at the command line when I start Apache. I don't even know where its referencing sqlite3 from??? Any ideas?

    -----
    # apachectl start
    httpd: Syntax error on line 234 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/libphp5.so into server: /usr/local/apache2/modules/libphp5.so: undefined symbol: sqlite3ExprDelete
    -----

    Here is a list of all the modules being loaded (none of them say sqlite...)

    -----
    # more httpd.conf | grep LoadModule

    # have to place corresponding `LoadModule' lines at this location so the
    # LoadModule foo_module modules/mod_foo.so
    LoadModule access_module modules/mod_access.so
    LoadModule auth_module modules/mod_auth.so
    LoadModule auth_anon_module modules/mod_auth_anon.so
    LoadModule auth_dbm_module modules/mod_auth_dbm.so
    LoadModule auth_digest_module modules/mod_auth_digest.so
    LoadModule ldap_module modules/mod_ldap.so
    LoadModule auth_ldap_module modules/mod_auth_ldap.so
    LoadModule include_module modules/mod_include.so
    LoadModule log_config_module modules/mod_log_config.so
    LoadModule logio_module modules/mod_logio.so
    LoadModule env_module modules/mod_env.so
    LoadModule mime_magic_module modules/mod_mime_magic.so
    LoadModule mime_magic_module modules/mod_mime_magic.so
    LoadModule cern_meta_module modules/mod_cern_meta.so
    LoadModule expires_module modules/mod_expires.so
    LoadModule deflate_module modules/mod_deflate.so
    LoadModule headers_module modules/mod_headers.so
    LoadModule usertrack_module modules/mod_usertrack.so
    LoadModule setenvif_module modules/mod_setenvif.so
    LoadModule mime_module modules/mod_mime.so
    LoadModule dav_module modules/mod_dav.so
    LoadModule status_module modules/mod_status.so
    LoadModule autoindex_module modules/mod_autoindex.so
    LoadModule asis_module modules/mod_asis.so
    LoadModule info_module modules/mod_info.so
    LoadModule dav_fs_module modules/mod_dav_fs.so
    LoadModule vhost_alias_module modules/mod_vhost_alias.so
    LoadModule negotiation_module modules/mod_negotiation.so
    LoadModule dir_module modules/mod_dir.so
    LoadModule actions_module modules/mod_actions.so
    LoadModule speling_module modules/mod_speling.so
    LoadModule userdir_module modules/mod_userdir.so
    LoadModule alias_module modules/mod_alias.so
    LoadModule rewrite_module modules/mod_rewrite.so
    LoadModule proxy_module modules/mod_proxy.so
    LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
    LoadModule proxy_http_module modules/mod_proxy_http.so
    LoadModule proxy_connect_module modules/mod_proxy_connect.so
    LoadModule cache_module modules/mod_cache.so
    LoadModule suexec_module modules/mod_suexec.so
    LoadModule disk_cache_module modules/mod_disk_cache.so
    LoadModule file_cache_module modules/mod_file_cache.so
    LoadModule mem_cache_module modules/mod_mem_cache.so
    LoadModule cgi_module modules/mod_cgi.so
    LoadModule php5_module /usr/local/php-5.2.9/modules/libphp5.so

    -----

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    so your problem is in the apache config file
    you need to investigate why it...
    Cannot load /usr/local/apache2/modules/libphp5
    off hand it looks like its missing the sqllite files, which IIRC are now part of the standard PHP build
    it could be that there is a parameter on line 234 of /usr/local/apache2/conf/httpd.conf
    you need to investigate what that line says

    you could try reinstalling PHP
    you could try removing PHP and then reinstalling
    you could try installing a more recent version of PHP
    you could try removing apache and then reinstalling
    you could try installing XAMPP
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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