The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Plesk to Cpanel/WHM PHP htaccess problem

Discussion in 'General Discussion' started by Kimber2, Dec 7, 2011.

  1. Kimber2

    Kimber2 Registered

    Joined:
    Dec 7, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Avon, Indiana, United States
    cPanel Access Level:
    Website Owner
    I recently moved from plesk to cpanel hosting, I have a dedicated server. In the moved the .htaccess file got stripped and I need help fixing an old web site.

    Here an older web page that this effects:/http://www.jansreadingroom.com/Christmas/giftsforguys.htm

    We use to use set the .htaccess

    Options All -Indexes
    AddHandler application/x-httpd-php .htm .html

    Then on the web page it self a php code example:


    <?php include 'http://www.janktheproofer.com/_tutorial.html'; ?>

    but now this method is not working or we are not fixing it correctly.

    Is it possible this site on cpanel does not have the php turned on?

    Any thoughts to help me with my research of why this happened would be greatly appreciated,
    Thanks you
    Kimberly
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Check /usr/local/apache/conf/php.conf file to see the directive for adding PHP there. If you are using suPHP with PHP 5 as the default, it probably has this instead:

    Code:
    AddType application/x-httpd-php5 .php5 .php4 .php .php3 .php2 .phtml
    This means you would do the following in the .htaccess file:

    Code:
    Options All -Indexes
    AddType application/x-httpd-php5 .htm .html
     
  3. Kimber2

    Kimber2 Registered

    Joined:
    Dec 7, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Avon, Indiana, United States
    cPanel Access Level:
    Website Owner
    Sorry but even after 12 years of web design work the back end still confuses me. Where do I check the /usr/local/apache/conf/php.conf at? I have no clue how to check this but will be researching it.

    I put in .htaccess
    Options All -Indexes
    AddType application/x-httpd-php5 .htm .html

    and got:

    Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/readfeb08/public_html/Christmas/stampcrafts.htm on line 20

    Warning: include(New Page 1) [function.include]: failed to open stream: no suitable wrapper could be found in /home/readfeb08/public_html/Christmas/stampcrafts.htm on line 20

    Warning: include() [function.include]: Failed opening 'http://www.janktheproofer.com/_tutorial.html' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/readfeb08/public_html/Christmas/stampcrafts.htm on line 20

    Thoughts? I will research the top part of the post which I am not sure how to check which I wait to hear back.
    Thank you
    Kimberly
     
  4. Kimber2

    Kimber2 Registered

    Joined:
    Dec 7, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Avon, Indiana, United States
    cPanel Access Level:
    Website Owner
    I found phpmyadmi and USER_PRIVILEGES but have no clue if that is the right place. And on the domain name I am working on, which is not the root domain, i found:

    Paths and Directories include_path Windows: "\path1;\path2" c:\php\includes" .:/usr/lib/php:/usr/local/lib/php

    thoughts?
     
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    In root SSH, you'd type the command:

    Code:
    cat /usr/local/apache/conf/php.conf
    This would show you the contents of that file. The file types listed there would normally show .php .php5 and so on. That is the line that you would use for the .htaccess file with the .htm and .html extensions.

    The current set of errors isn't related to the .htaccess file any longer. Those appear related to php.ini directives. What PHP handler are you using? You can see in WHM > Apache Configuration > PHP and SuExec Configuration area.

    Next, what is the coding on line 20 of /home/readfeb08/public_html/Christmas/stampcrafts.htm file?
     
  6. Kimber2

    Kimber2 Registered

    Joined:
    Dec 7, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Avon, Indiana, United States
    cPanel Access Level:
    Website Owner
    Hi and thanks so much for your help.

    I could not get into WHM > Apache Configuration > PHP and SuExec Configuration area because I did not have the root log in, only my main WHM log in with limited WHM access. So I called my host and told them what you said. They told me to make an .htaccess file with:

    AddType text/html .shtml .shtm .htm .html
    AddHandler server-parsed .shtml .shtm .htm .html
    Options Indexes FollowSymLinks Includes

    Options All -Indexes
    AddType application/x-httpd-php5 .htm .html

    The error message is now gone but it did not fix the problem of includes php. I have no clue where to go from here.

    Thanks for all your help
    Kimberly
     
  7. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Contacting your host to have them further help troubleshoot is likely the way to go. We do not have access to your account to investigate.
     
Loading...

Share This Page