Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    9
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Question Help - is my hosting set up wrong for PHP, or am I missing an index.html page?!

    Ladies & Gents.

    Please help! My partner is a small business owner in the UK who had a site designed in 2007. She's just recently gone on a cost cutting exercise and was looking at cutting the cost of her hosting. Her site was privately hosted by the lady that designed it. She was paying £50 a year, plus a retainer of £100 p.a for upto 3 small changes a month to be made to the site. I dont think she ever made more than 3 changes to the site since it was built.

    She needed to have her site moved to a bigger, more secure hosting company to satisfy her customers data protection compliance.

    She transferred the domain over to a 1and1 hosting package that supports PHP as she was told that was the code used to write her site. Her web designer emailed the files over in a zip, so that we could upload via FTP, thinking it would be a straightforward process. We upload the files no problem via an FTP client to the domain (which has been fully transferred, we tested an HTML site on there too, after a few 'fails'). Every time I/we upload the site and wait 10 minutes or so, we get an 'Error 500' message. This is a complete list of all the files we have in the zip folder from the designer:

    cgi-bin
    data
    images
    include
    mail
    pdfs
    text
    .htaccess
    404.shtml
    detail.php
    google4bf11929b1645776.html
    index.php
    robots.txt

    Do I need to specify the root directory to something other than '/.' in the Admin section of the hosting site? I know a little HTML, but you know what they say about a little knowledge being a dangerous thing :/ !! Am happy to zip up the file and email it if anyone could kindly have a look, otherwise we're horribly stuck!

    Thank you!

  • #2
    Regular Coder
    Join Date
    Jun 2009
    Posts
    146
    Thanks
    3
    Thanked 21 Times in 21 Posts
    Index.php will work as the default file type. You need to login to your control panel and view the error log to find the cause of the 500 error.

  • Users who have thanked itxtme for this post:

    jim5358 (01-09-2012)

  • #3
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    9
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by itxtme View Post
    Index.php will work as the default file type. You need to login to your control panel and view the error log to find the cause of the 500 error.
    Thank you very much for taking the time to reply. I'll get stuck in now and have a look. Is there a particular subfolder/file I should be looking for/at??

  • #4
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    9
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Still cant find what is is.... :/

  • #5
    Regular Coder
    Join Date
    Jun 2009
    Posts
    146
    Thanks
    3
    Thanked 21 Times in 21 Posts
    The error could be anything. I am not familiar with 1&1 hosting so do not know what contro panel they use. Basically you need to view your web servers error log to see what is causing the 500 error, a 500 error produces in the log something similar

    Code:
    [Wed Dec 14 12:08:07 2011] [error] [client ] Premature end of script headers: redirect.cgi
     [Wed Dec 14 12:08:07 2011] [error] [client ] File does not exist: /home/user/public_html/500.shtml
     [Wed Dec 14 12:08:08 2011] [error] [client ] daemon couldn't find CGI process for connection 279
    Until that information is avaliable we can be of know help. This may have nothing to do with PHP. You may need to contact your hosting support to get info on how to access the logs

  • Users who have thanked itxtme for this post:

    jim5358 (01-09-2012)

  • #6
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,647
    Thanks
    2
    Thanked 406 Times in 398 Posts
    Create a text file like test.html and see if you can pull it up without error. The problem could be caused by your .htaccess file having directives in it that aren't valid with the server 1and1 uses due to their configuration being different than your previous host. Either way definitely locate the error logs as the previous poster suggested as that will generally point you to the exact issue.

  • Users who have thanked Inigoesdr for this post:

    jim5358 (01-09-2012)

  • #7
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    9
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Ok! I'm making progress thanks to your help. I cant get an error log from anywhere in the 1and1 control panel, but have been trying a process of elimination.
    By selectively uploading files, I have now managed to get the home page to show up when I load all the files EXCLUDING the .htaccess file. Unfortunately, none of the links work to the 'sub' pages, I am getting a .404 error when I try and access each of these. If you want to see for yourselves, please feel free to look: http://www.english-works.co.uk/
    So am I correct in thinking the error is in the .htaccess file?
    This is the code in the file I have pasted in from notepad:

    DirectoryIndex index.php index.html
    AddType 'text/html; charset=ISO-8859-1' html
    php_value include_path "./:../:.../"
    php_flag register_globals on

    Options +FollowSymLinks

    RewriteEngine on
    RewriteBase /

    #code to rewrite static to dynamic for detail pages
    RewriteRule ^intensive-english-courses/([^/]+)\.html /detail.php?option=$1&detailType=T [L]
    RewriteRule ^course-structure/([^/]+)\.html /detail.php?option=$1&detailType=TB [L]
    RewriteRule ^learn-english/([^/]+)\.html /detail.php?option=$1&detailType=C [L]
    RewriteRule ^thankyou.html /detail.php?option=thankyou&detailType=T [L]


    Any thoughts/suggestions greatly appreciated!

    Jim

  • #8
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,647
    Thanks
    2
    Thanked 406 Times in 398 Posts
    Comment out these lines and see if it works:
    Code:
    #AddType 'text/html; charset=ISO-8859-1' html
    #php_value include_path "./:../:.../"
    #php_flag register_globals on

  • #9
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    9
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Inigoesdr View Post
    Comment out these lines and see if it works:
    Code:
    #AddType 'text/html; charset=ISO-8859-1' html
    #php_value include_path "./:../:.../"
    #php_flag register_globals on

    THANK YOU. Can tell you how grateful we are for your help, this has been the cause of a weeks sleepless nights! I'm going to look this up so I understand WHY and see if I can get my head round php properly.

    Thank you once again - LEGEND!!!

  • #10
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,647
    Thanks
    2
    Thanked 406 Times in 398 Posts
    Quote Originally Posted by jim5358 View Post
    I'm going to look this up so I understand WHY and see if I can get my head round php properly.
    Those php_* directives are only available when PHP is running as an Apache module, and most hosts don't run PHP as a module anymore in my experience. The AddType directive is only available when the mod_mime module is installed in Apache, and it can be disabled too.


  •  

    Posting Permissions

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