#1
  1. No Profile Picture
    JRM
    Contributing User
    SEO Chat Discoverer (100 - 499 posts)

    Join Date
    Jul 2003
    Posts
    108
    Rep Power
    16

    PHP pages and php path info


    How can I make a php page work without putting the php path at the top of the code? I have non-root access. Can it be done in the .htaccess file?

    example:

    #!/usr/local/bin/php4
    <?php
    ....code here
    ?>

    Thank you,

    JRM
    Last edited by JRM; Aug 19th, 2004 at 11:04 AM.
  2. #2
  3. No Profile Picture
    Posts: 20, 574 (I wish!)
    SEO Chat Adventurer (500 - 999 posts)

    Join Date
    Jun 2004
    Posts
    764
    Rep Power
    15
    Originally Posted by JRM
    How can I make a php page work without putting the php path at the top of the code? I have non-root access. Can it be done in the .htaccess file?

    example:

    #!/usr/local/bin/php4
    <?php
    ....code here
    ?>

    Thank you,

    JRM
    You lost me?

    Doesn't .php files work?

    If not:
    1. Your server has not in installed
    2. you need to create an .htaccess file with the following line:

    AddType application/x-httpd-php .php

    PHP3 requires the following line instead:

    AddType application/x-httpd-php3 .php

    Dan
  4. #3
  5. No Profile Picture
    JRM
    Contributing User
    SEO Chat Discoverer (100 - 499 posts)

    Join Date
    Jul 2003
    Posts
    108
    Rep Power
    16
    Sorry for losing you there. I do have a .htaccess that has:

    AddType application/x-httpd-php .htm .html .php

    But if I don't have the #!/usr/local/bin/php4 at the top of my pages, it gives me an error: Internal Server Error Then I put it back in and it works fine.

    Would I need to put "application/x-httpd-php4"?

    Thank you

    JRM

Similar Threads

  1. Google indexing php pages?
    By confiden in forum Google Optimization
    Replies: 16
    Last Post: Nov 12th, 2004, 02:44 PM
  2. SpyderTrax on PHP pages?
    By Diana in forum Web Design, Coding and Programming
    Replies: 1
    Last Post: Feb 26th, 2004, 05:05 PM
  3. spydertrax & php
    By puterbug in forum Web Design, Coding and Programming
    Replies: 2
    Last Post: May 26th, 2003, 09:43 AM
  4. PHP pages and depth of spidering info needed
    By shedman in forum Google Optimization
    Replies: 19
    Last Post: Apr 3rd, 2003, 11:59 AM
  5. Php pages
    By francesco in forum Google Optimization
    Replies: 2
    Last Post: Mar 23rd, 2003, 12:00 PM

IMN logo majestic logo threadwatch logo seochat tools logo