PHP pages want to download

Discussion in 'Server Operation' started by macmillaninc, Mar 11, 2010.

  1. macmillaninc

    macmillaninc New Member

    Hi all,
    I am at a loss. Some of the PHP pages want to download instead of open in a browser. I have read these forums (and others). I have searched and searched. I have checked my php.ini and httpd.conf. We cannot figure out what we are missing.

    Any ideas as to where we should look for this setting?

    Running: Fedora 12, php5, Apache 2, mySql

    Additionally, this is happening in OpenX 2.8.5
     
    Last edited: Mar 11, 2010
  2. topdog

    topdog Active Member

    Thats a problem with your http configuration which is not detecting those files as being handled by php
     
  3. macmillaninc

    macmillaninc New Member

    I have recently determined that this only happens with php page links that contain an "&". I am looking into the arg_separator options.

    It is strange that this was NOT happening before.
     
  4. macmillaninc

    macmillaninc New Member

    I'm stumped!
     
  5. BorderAmigos

    BorderAmigos New Member

  6. macmillaninc

    macmillaninc New Member

    The links are like this;

    ...domain.tld/openx/www/admin/advertiser-campaigns.php?clientid=57&campaignid=89
     
  7. macmillaninc

    macmillaninc New Member

    Are there any missing modules missing from my httpd.conf? (Especially php)

    LoadModule auth_basic_module modules/mod_auth_basic.so
    LoadModule auth_digest_module modules/mod_auth_digest.so
    LoadModule authn_file_module modules/mod_authn_file.so
    LoadModule authn_alias_module modules/mod_authn_alias.so
    LoadModule authn_anon_module modules/mod_authn_anon.so
    LoadModule authn_dbm_module modules/mod_authn_dbm.so
    LoadModule authn_default_module modules/mod_authn_default.so
    LoadModule authz_host_module modules/mod_authz_host.so
    LoadModule authz_user_module modules/mod_authz_user.so
    LoadModule authz_owner_module modules/mod_authz_owner.so
    LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
    LoadModule authz_dbm_module modules/mod_authz_dbm.so
    LoadModule authz_default_module modules/mod_authz_default.so
    LoadModule ldap_module modules/mod_ldap.so
    LoadModule authnz_ldap_module modules/mod_authnz_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 ext_filter_module modules/mod_ext_filter.so
    LoadModule mime_magic_module modules/mod_mime_magic.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 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_balancer_module modules/mod_proxy_balancer.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
     
  8. falko

    falko Super Moderator Howtoforge Staff

    The PHP module is loaded in /etc/httpd/conf.d/php.conf.
     
  9. macmillaninc

    macmillaninc New Member

    Does this look correct?

    #
    # PHP is an HTML-embedded scripting language which attempts to make it
    # easy for developers to write dynamically generated webpages.
    #
    <IfModule prefork.c>
    LoadModule php5_module modules/libphp5.so
    </IfModule>
    <IfModule worker.c>
    LoadModule php5_module modules/libphp5-zts.so
    </IfModule>

    #
    # Cause the PHP interpreter to handle files with a .php extension.
    #
    AddHandler php5-script .php
    AddType text/html .php

    #
    # Add index.php to the list of files that will be served as directory
    # indexes.
    #
    DirectoryIndex index.php

    #
    # Uncomment the following line to allow PHP to pretty-print .phps
    # files as PHP source code:
    #
    #AddType application/x-httpd-php-source .phps
     
  10. falko

    falko Super Moderator Howtoforge Staff

    Yes, this is ok.
     
  11. macmillaninc

    macmillaninc New Member

    Well, I am still stumped as to why these pages want to download instead of open in the browsers. This program it useless to me now. I must fix this problem soon. Any suggestions?
     
  12. macmillaninc

    macmillaninc New Member

    Would it be safe to remove php and re-install php?

    yum remove php

    yum install php
     
  13. macmillaninc

    macmillaninc New Member

    Well, I have screwed myself now. I cannot get php installed. YUM gives this error.

    Running rpm_check_debug
    ERROR with rpm_check_debug vs depsolve:
    php-common = 5.2.11-2.fc11 is needed by (installed) php-mhash-5.2.11-2.fc11.i586
    Please report this error in http://yum.baseurl.org/report
    php-mhash-5.2.11-2.fc11.i586 has missing requires of php-common = ('0', '5.2.11', '2.fc11')
     
  14. macmillaninc

    macmillaninc New Member

    This problem has been repaired! Updated PHP (long story, don't ask).
     

Share This Page