Closed Thread
Results 1 to 10 of 10

Thread: Error 500 on CSS query

  1. #1
    eltoni0 is offline x10Hosting Member eltoni0 is an unknown quantity at this point
    Join Date
    Oct 2009
    Posts
    10

    Error 500 on CSS query

    Hi,

    I've got a CSS included in all my pages headers. It's supposed to be generated from a PHP file.
    Code:
    <link rel="stylesheet" type="text/css" media="screen" href="http://www.thk-clan.co.cc/forums/extensions/pun_colored_usergroups/styles.css.php" />
    However, that file doesn't generate any CSS but nginx generates an error 500 instead when queried.
    Click here to load the file

    Here is the code of the PHP file involved:
    PHP Code:
    <?php

    header
    ('Content-type: text/css; charset: UTF-8');
    define('FORUM_ROOT''../../');

    require 
    FORUM_ROOT.'include/essentials.php';
    require_once 
    FORUM_CACHE_DIR.'cache_pun_coloured_usergroups.php';

    echo 
    $pun_colored_usergroups_cache;

    ?>
    The two required PHP files exist and can both be loaded (verified).
    Any clue would be welcome. The answer is probably in server logs but I can't read then (can I ?)

    Thank you in advance!
    Last edited by eltoni0; 08-04-2011 at 11:52 AM. Reason: rendered php code

  2. #2
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,635

    Re: Error 500 on CSS query

    Where is FORUM_CACHE_DIR defined?

    Also, without knowing what is in the other two files, it is impossible to say. One of the included files might be the problem.
    Last edited by descalzo; 08-04-2011 at 11:10 AM.
    Nothing is always absolutely so.

  3. #3
    eltoni0 is offline x10Hosting Member eltoni0 is an unknown quantity at this point
    Join Date
    Oct 2009
    Posts
    10

    Thumbs down Re: Error 500 on CSS query

    No they're not, I have already checked that and the variables are well defined.

    The problem apparently comes from nginx that doesn't execute PHP in my subdirectory public_html/forums/extensions/pun_colored_usergroups/.

    To make sure of that, I have created a test file and placed it in the same subfolder :
    PHP Code:
    <?php
    echo 'work';
    ?>
    Same result, error 500. Have a look:
    Test file in extension subdir
    Last edited by eltoni0; 08-04-2011 at 11:51 AM. Reason: added infos

  4. #4
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,635

    Re: Error 500 on CSS query

    Permissions on the file and the directories?
    Nothing is always absolutely so.

  5. #5
    eltoni0 is offline x10Hosting Member eltoni0 is an unknown quantity at this point
    Join Date
    Oct 2009
    Posts
    10

    Lightbulb Re: Error 500 on CSS query

    I have double-checked :

    extension directory (and subdirs) 0777
    All files 0644

    The upper folders are all in 755, 644 for all files.

    It works on a test webserver of mine running Debian and a default apache2, with the same rights on folders and files of course.
    Last edited by eltoni0; 08-04-2011 at 12:56 PM.

  6. #6
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,635

    Re: Error 500 on CSS query

    Directories should be 0755.
    Nothing is always absolutely so.

  7. #7
    eltoni0 is offline x10Hosting Member eltoni0 is an unknown quantity at this point
    Join Date
    Oct 2009
    Posts
    10

    Talking Re: Error 500 on CSS query

    OH, thanks a lot, that did it.

    Is that specific to nginx?

  8. #8
    essellar's Avatar
    essellar is offline Community Advocate essellar has a spectacular aura about
    Join Date
    Feb 2010
    Location
    Toronto, Ontario, CA
    Posts
    1,152

    Re: Error 500 on CSS query

    No, but it is a best practice from a security standpoint (and arguably an essential in a shared hosting environment since it can help prevent cross-account shenanigans), and having it enforced at the meta level is a Good Thing™.
    “Beware of bugs in the above code; I have only proved it correct, not tried it.” --Donald Knuth
    "It was as if its architects were given a perfectly good hammer and gleefully replied, 'neat! With this hammer, we can build a tool that can pound in nails.'" -- Alex Papadimoulis (on TheDailyWTF.com)

  9. #9
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,635

    Re: Error 500 on CSS query

    And the servers actually run Apache, not nginx. nginx is the load-balancing front end.
    Nothing is always absolutely so.

  10. #10
    eltoni0 is offline x10Hosting Member eltoni0 is an unknown quantity at this point
    Join Date
    Oct 2009
    Posts
    10

    Smile Re: Error 500 on CSS query

    Thank you both for the information and support.

    Ticket can now be closed.

Closed Thread

Similar Threads

  1. MySql Query FUSH HOSTS responded with error
    By just2awesome_50 in forum Free Hosting
    Replies: 2
    Last Post: 06-22-2011, 04:33 PM
  2. SQL query error table
    By koheli59 in forum Free Hosting
    Replies: 0
    Last Post: 04-13-2011, 07:17 AM
  3. Can't access Cpanel and there is a 'MySQL Query Error'
    By watergrave in forum Free Hosting
    Replies: 0
    Last Post: 04-15-2010, 11:30 AM
  4. Error: with query id #7
    By Tenant in forum Programming Help
    Replies: 1
    Last Post: 08-17-2009, 06:55 PM
  5. query error
    By moyles in forum Free Hosting
    Replies: 0
    Last Post: 12-08-2007, 04:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers