Server API CGI/FastCGI
System Linux
PHP Version 5.3.2

anyhting else you need, i can try and get

With some of these solutions i get 503/Forbidden, with others i get 404/not found and with others still, the php file will print as plain text to the browser window

I am running out of thigns to try, please help if you can

.htaccess -- have tried both of these

<Files FileName>
</Files>
<FilesMatch "^FileName(.*)$">
</FilesMatch>

With these between the tags

SetHandler application/x-httpd-php
ForceType application/x-httpd-php
SetHandler x-mapp-php
ForceType x-mapp-php
ForceType php5-cgi

With and without

Options +FollowSymlinks

I have also tried rewrite

Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.+)$ /$1.php [L,QSA]

along with the more direct

Options +FollowSymLinks
RewriteEngine on 
RewriteRule ^(FileName)(.*)$ FileName.php [L]

For testing, I have the file uploaded twice, as "FileName" and as "FileName.php"

    Can you show us the lines in httpd.conf where PHP is integrated with Apache?

    Also, have you been checking the Apache error log for error messages when you get 5xx errors?

      When it prints as text, no error, of course
      i tried

      <Files>
      DefaultType application/x-httpd-php
      </Files>

      got a 500 (internal server) with the error of Files needing additional arguments

      no error log on the forbidden

      and no access to the .conf file

        this server is waiting on the site to transfer

        currently I am using
        http://123.45.67.89/~name
        to view the page, which points to
        /home/name/www/

        would this be what is causing the issue? and when the domain transfer completes it will resolve itself?
        if thats what it is i am going to be in trouble with this redesign as it needs to complete before the transfer

          ok, with

          Options +FollowSymlinks
          RewriteEngine On
          RewriteRule ^(FileName)(.*)$1 FileName.php$1 [L]

          I got 403 / forbidden, File does not exist in the error log

            ignore the file does not exist... seems the server renamed the file to add the extension .OLD after it for some reason... unless someone who was troubleshooting and didnt tell me renamed it....

            things to ponder, investigate and people to damage 🙂

            problem does still exist though... it is printing my php script as plain text under most cases

              almost resolved, have a working code, but it REQUIRES a trailing slash in the URL

              RewriteRule ^(FileName)/(.*) /FileName.php?q=$1/$2 [L]

              returns http://url.tld/FileName.php?q=section1/section2/section3/section4/section5 -- which is perfect for what i need it to do, but if someone goes to

              http://url.tld/FileName -- with no trailing slash, it downloads the php file as text... this is bad

              i have tried

              RewriteRule ^FileName$ /FileName/ [L]
              RewriteCond %{REQUEST_FILENAME}.php -f
              RewriteRule ^/?([a-zA-Z0-9]+)/$ $1.php [L, R=301]
              RewriteCond %{REQUEST_FILENAME} !-f
              RewriteCond %{REQUEST_URI} !(.*)/$
              RewriteRule ^(.*)$ $1/ [R=301,NC,L]

              to fix it... doesn't work

              ANY help is appreciated

                finally!
                RESOLVED

                RewriteBase /
                RewriteCond &#37;{REQUEST_FILENAME} !-f
                RewriteCond %{REQUEST_URI} !\..+$
                RewriteCond %{REQUEST_URI} !/$
                RewriteRule (.*) /$1/ [R=301,L]

                This seemed to do it!

                  a year later

                  For Apache 2 is

                  ...
                  SetHandler php5-script
                  ...

                  Regards

                    Write a Reply...