Jump to content

DaveTomneyUK

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Posts posted by DaveTomneyUK

  1. Hi,

     

    I am trying to password protect 2 folders using .htaccess but if I add the below code I keep getting a 500 error.

     

    <Directory /home/user1/web-root/adm>
      AuthType Basic
      AuthName "Restricted Area"
      AuthUserFile /home/user1/.htadm
      AuthGroupFile "/dev/null"
      Require valid-user
    </Directory>
    
    <Directory /home/user1/web-root/mod>
      AuthType Basic
      AuthName "Restricted Area"
      AuthUserFile "/home/user1/.htmd"
      AuthGroupFile "/dev/null"
      Require valid-user
    </Directory>
    

  2. Hi,

     

    I am trying to block hotlinking of my images and files so it only allows me to hotlink on my main side and 2 subdomains. For example these are my 3 domains.

     

    1. http://maindomain.com

    2. http://forum.maindomain.com

    3. http://media.maindomain.com

     

    All my images and files are stored on my media subdomain and my other 2 sites 1. and 2. ask for the files. I have tried this script in a .htaccess file but it wont work.

     

      RewriteEngine On
    
      RewriteCond %{HTTP_REFERER} !^$
      RewriteCond %{HTTP_REFERER} !^http://(www\.|forum\.|media\.)?maindomain\.com [NC]
    
      RewriteRule \.(bmp|gif|jpe?g|png)$ /images/linking.jpg [R=302,L]
      RewriteRule \.(swf|mp3|wmv|zip)$ - [NC,L,F]
    

     

    Any ideas why it wont work, Please?

  3. Hi,

     

     

     

    Could someone please help me I am trying to make it so I store all my media files ".swf|.mp3|.wmv|.mpg|.mpeg|.jpg|.jpeg|.gif|.png" on a subdomain called "http://dl.mysite.com" but I need to make an .htaccess file so it blocks all referals to all my media files located on the subdomain "http://dl.mysite.com" so it allows only my domain to use the files.

     

     

     

    Allow:

      http://mysite.com

      http://xx.mysite.com

      http://dl.mysite.com

     

    Disallow:

      http://othersite.com

      http://xx.othersite.com

      http://dl.othersite.com

     

  4. Hi,

     

     

     

    I am using a server suite called DevSide but it does not seem to work right with the Panda Internet Security 2007 right as it does not ask if I want to start Apache, PHP or MySQL does anyone know of a package that would work right on Vista?

     

     

     

    Thankyou

     

  5. Hi,

    Does anyone know why I am getting this error on the bottom of my site the only way I can get shut of it is by adding a @ at the start of the include function.

    [code]
    Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/linux/user/htdocs/.inc/func/database.inc on line 75
    [/code]
  6. [!--quoteo(post=386362:date=Jun 21 2006, 01:24 PM:name=gfX)--][div class=\'quotetop\']QUOTE(gfX @ Jun 21 2006, 01:24 PM) [snapback]386362[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    Check in functions.php for any whitespace or characters after your closing PHP tag. Check for returns, etc. This is usually what causes that problem.

    More info: [a href=\"http://forums.phpcoin.com/index.php?showtopic=1629\" target=\"_blank\"]http://forums.phpcoin.com/index.php?showtopic=1629[/a]
    [/quote]

    Thats what I cannot work out it runs perfect on my localhost but if I upload it to my website it wont run right.
  7. Hi,

    Does anyone know how to fix this stupid bug I keep getting I have made 2 files for affiliates and links but ever time someone clicks a link they get this stupid error.

    Warning: Cannot modify header information - headers already sent by (output started at /home/linux/w/user/htdocs/inc/meta.php:6) in /home/linux/w/user/htdocs/inc/functions/functions.php on line 33
  8. Hi,

    I am new working with classes and have a question each of my files as a call at the top and bottom to include my header and footer like below

    [code]
    require_once("header.php");
    require_once("footer.php");
    [/code]

    Is it possible to include them in a class so all I would need to add in my files are something like.

    [code]
    $generate->header();
    $generate->footer();
    [/code]
  9. Hi,

    I am trying to count my tables using the COUNT(*) but having some trouble when making a custom function anyone know why it wont return nothing.

    I currently use this old code which works but it looks like old bad code.
    [code]
    $row = mysql_fetch_row(mysql_query("SELECT COUNT(*) AS numrows FROM table_news WHERE active='yes'"));
    $numrows = $row['numrows'];
    [/code]
    I tried making a function of my own but it wont work it returns nothing

    [code]
    function count($table, $where='') {
        if ($where != '') $where = "WHERE $where";
            $query_id = $this->mysql_query("SELECT COUNT(*) FROM $table $where", false, true);
            list($count) = $this->mysql_fetchrow($query_id, MYSQL_ASSOC);
            $this->mysql_freeresult($query_id);
            return $count;
        }

    $numrows = count('table_news', "active='yes'");
    [/code]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.