Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: .htaccess, config settings, or what?!

  1. #1
    rlhanson's Avatar
    rlhanson is offline Master Glow Jedi
    Join Date
    Aug 2007
    Location
    Chapman, Kansas
    Posts
    531

    Default .htaccess, config settings, or what?!

    History:
    I design my sites using php includes along with apache handlers to parse the php as html or php depending on the site's content.

    I designed my site and my customer site using the same design technique.

    Last week, cpanel did an auto-update which resulted in my site and my client's sites to quit displaying correctly.
    (Trouble ticket: HRU-6829-886) The resolution:

    Hello Lynne,

    We have recompiled both PHP4 and PHP5 on the Missy server so that both PHP4 and PHP5 are now fully supported by cPanel and can be recompiled/upgraded with help of cPanel tools.

    AddHandler application/x-httpd-php4 is now used for PHP4 and AddHandler application/x-httpd-php5 for PHP5. I have modified .htaccess files for the aforementioned sites and they all are working fine now.
    Thank You
    Sergey
    GlowHost Level 3 Support
    Yesterday, my customer contacts me as his site is throwing errors:

    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator, webmaster@customersite.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.


    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


    --------------------------------------------------------------------------------

    Apache/1.3.39 Server at www.customersite.com Port 80
    (Trouble ticket: JKM-3478-112) The resolution(s):

    1st resolution that seemed to be working...

    If you look in the error log, you will see

    [Tue Nov 6 14:25:28 2007] [error] [client xx.xxx.xxx.xx] Premature end of script
    headers: /home/username/public_html/search.php


    end of script means nothing was sent. Why?
    Heres your .htaccess

    AddHandler application/x-httpd-php4 .html
    # AddHandler application/x-httpd-php5 .php .php4 .php3 .phtml
    AddHandler application/x-httpd-php4 .htm

    It means only html and htm files are used by php, so a .php file goes nowhere.
    I modified the file and it now functions properly

    ----------------
    Thank you.

    John-Marc
    GlowHost.com
    Then I get 2nd resolution:

    ....I've replaced the string in your hoa/products.php

    include ("http://www.customersite.com/incfooter.html");

    by

    include ("/home/username/public_html/incfooter.html");

    and it resolved the issue.
    Thank You
    Alexander S
    GlowHost Technical Support
    Now, on every page except the aformentioned page: hoa/products.php
    this error is showing in the footer area:

    Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/username/public_html/search.php on line 250

    Warning: include(http://www.customersite.com/incfooter.html) [function.include]: failed to open stream: no suitable wrapper could be found in /home/username/public_html/search.php on line 250

    Warning: include() [function.include]: Failed opening 'http://www.customersite.com/incfooter.html' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php:/usr/local/bin/php') in /home/username/public_html/search.php on line 250
    Okay, I realize that I can go through and change all the files to the path that Alexander suggested...but....my site uses the exact same type of includes (except I have his as the actual full url, http://www.domain.com/documentname.html vs. /doumentname.html).

    What setting allows mine to display correctly?

    And why did a simple cpanel update screw me up so badly?

    (And yes, John-Marc, I have firebug installed.)
    Thank you,
    Lynne Hanson
    RL Hanson-Online

  2. #2
    sergey is offline Master Glow Jedi
    Join Date
    Aug 2005
    Posts
    472

    Default

    You will get the following error only if allow_url_fopen is disabled on the server.

    Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/username/public_html/search.php on line 250
    allow_url_fopen is enabled on your server. Please make sure that you don't have php.ini file inside of your folders with allow_url_fopen disabled.

    Code:
    allow_url_fopen = Off
    If you still face this problem, please open a trouble ticket and we will have a look into this issue.

  3. #3
    rlhanson's Avatar
    rlhanson is offline Master Glow Jedi
    Join Date
    Aug 2007
    Location
    Chapman, Kansas
    Posts
    531

    Default

    where would the php.ini file be located?
    Thank you,
    Lynne Hanson
    RL Hanson-Online

  4. #4
    rlhanson's Avatar
    rlhanson is offline Master Glow Jedi
    Join Date
    Aug 2007
    Location
    Chapman, Kansas
    Posts
    531

    Default

    Sergey -
    Is this something that changed with the php5? I looked at the settings for both sites and it seems I am running php4, my client's site is php5.

    Thanks!
    Thank you,
    Lynne Hanson
    RL Hanson-Online

  5. #5
    sergey is offline Master Glow Jedi
    Join Date
    Aug 2005
    Posts
    472

    Default

    Please open a trouble ticket to technical support department and we will have a look into your issue.

  6. #6
    rlhanson's Avatar
    rlhanson is offline Master Glow Jedi
    Join Date
    Aug 2007
    Location
    Chapman, Kansas
    Posts
    531

    Default

    okay, submitted a ticket with "per Sergey request" as I know Alexander and John-Marc are about to strangle me!
    Thank you,
    Lynne Hanson
    RL Hanson-Online

  7. #7
    sergey is offline Master Glow Jedi
    Join Date
    Aug 2005
    Posts
    472

    Default

    This has been fixed.

  8. #8
    rlhanson's Avatar
    rlhanson is offline Master Glow Jedi
    Join Date
    Aug 2007
    Location
    Chapman, Kansas
    Posts
    531

    Default

    WooHoo! Sergey's the bomb!
    Thank you,
    Lynne Hanson
    RL Hanson-Online

  9. #9
    sergey is offline Master Glow Jedi
    Join Date
    Aug 2005
    Posts
    472

    Default

    LOL Okay.

  10. #10
    jmarcv's Avatar
    jmarcv is offline Cranky Coder
    Join Date
    Jan 2005
    Posts
    354

    Default

    Strangle who? Huh?

    BTW - the php.ini file question. You can add one the same as you add the .htaccess and it will do the same thing - override the default settings for that dir.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16