HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   PHP pages want to download (http://www.howtoforge.com/forums/showthread.php?t=44016)

macmillaninc 11th March 2010 14:44

PHP pages want to download
 
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

topdog 12th March 2010 11:45

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

macmillaninc 12th March 2010 14:00

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.

macmillaninc 12th March 2010 16:51

I'm stumped!

BorderAmigos 17th March 2010 19:11

Can you post an example of links that don't work? If the ? is missing the server could be mistaking your arguments for file extensions and not seeing them as php.

Right: http://example.com/index.php?arg1=val1&arg2=val2
Wrong: http://example.com/index.php/arg1=val1&arg2=val2
Wrong: http://example.com/index.php&arg1=val1&arg2=val2
etc.

macmillaninc 17th March 2010 19:57

The links are like this;

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

macmillaninc 20th March 2010 16:31

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

falko 21st March 2010 23:46

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

macmillaninc 22nd March 2010 01:17

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

falko 22nd March 2010 15:52

Yes, this is ok.


All times are GMT +2. The time now is 09:27.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.