Results 1 to 4 of 4

Thread: [RESOLVED] View PHPS files

  1. #1

    Thread Starter
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Resolved [RESOLVED] View PHPS files

    I'm attempting to read a PHPS file but instead of it executing all I see is the PHP code. I've checked my apache httpd.conf file and it contains the below lines which I thought should do the job but it doesn't.

    Code:
    #########LoadModule php5_module c:/php/php5apache2_2.dll
    AddType application/x-httpd-php .php .php3 .phtml
    AddType application/x-httpd-php-source .phps
    How can I execute PHPS files?

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: View PHPS files

    application/x-httpd-php-source means 'show me the source code'. application/x-httpd-php means 'execute the code'. Change the extension to .php to cause it to be executed.

  3. #3
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: View PHPS files

    Quote Originally Posted by penagate
    application/x-httpd-php-source means 'show me the source code'. application/x-httpd-php means 'execute the code'. Change the extension to .php to cause it to be executed.
    thats not what he wants to do.

    Change your config:
    Code:
    #########LoadModule php5_module c:/php/php5apache2_2.dll
    AddType application/x-httpd-php .php .php3 .phtml
    AddType application/x-httpd-php-source .phps
    to this:
    Code:
    #########LoadModule php5_module c:/php/php5apache2_2.dll
    AddType application/x-httpd-php .php .php3 .phtml .phps
    My usual boring signature: Something

  4. #4
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: View PHPS files

    Thing is, I wouldn't recommend you use files with a phps extension as executable PHP scripts. It is like using an rtf extension for a jpeg file; a total pain when you need to move it to another location where the default is going to be what everyone expects it to be.

    Rename the scripts to .php extensions.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

Posting Permissions

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



Click Here to Expand Forum to Full Width