Jump to content

JJBlaha

Members
  • Posts

    55
  • Joined

  • Last visited

    Never

Posts posted by JJBlaha

  1. I checked the htaccess and somehow these lines were added, and are causing the problem.  I removed them and restarted apache and everything works.

     

    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://1subdomain.domain.com/.*$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://2subdomain.domain.com/.*$      [NC]
    ... all the others ...
    RewriteCond %{HTTP_REFERER} !^http://85subdomain.domain.com/.*$      [NC]
    RewriteCond %{HTTP_REFERER} !^http://86subdomain.domain.com/.*$      [NC]
    RewriteRule .*\.([a-zA-Z0-9\-]+)$ - [F,NC]
    

     

    How could this have been added to EVERY htaccess for every subdomain automatically?

  2. If you go directly to my site the page loads correctly.  If you click on a link to my site it says

     

    Forbidden
    You don't have permission to access /index.php on this server.
    
    Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. 
    

     

    This started without any changes to anything, as far as I can tell.

  3. I have a site with no domain, and I want to build the site on the server before i transfer the domain to it.  The url to the site looks like http://sub.host.com/~mystuff/index.php and It will be http://www.mydsomain.com/index.php when i transfer the domain when it is ready.  So my question is, is there a way where i can change one spot (like in htaccess or like a base tag or something) and have the rest of the links/images work when i change that one spot?

  4. no, i added those errors IN, there are no errors.

    $sql = "SELECT * FROM `random`";
    $result = (@mysql_query($sql, $dbh) or die(mysql_error()));
    print_r(@mysql_fetch_assoc($result));
    if($result) {
    $num = @mysql_num_rows($result);
    echo "num is" . $num;
    }

     

    prints 'num is'.  this means that $result is true, but that $num has a null value.  inserting into the table works, but if i try to retrieve data the variables are empty.

     

  5. ive gone into phpmyadmin, done a query that works, and copied in.  it is not the query, it has to be something else.  what that is i have no idea.  i have tried everything i can think of, nothing helps.  this code works on other servers.  so it has to be something with my server, but i do not know what.

  6. I have a mysql code like

     

    $sql = "SELECT * FROM table";
    $result = (@mysql_query($sql, $dbh) or die(mysql_error()));
    if($result) { echo "success!"; }

     

    This outputs 'success!'.

     

    If i then try to count the rows like this

     

    $sql = "SELECT * FROM table";
    $result = (@mysql_query($sql, $dbh) or die(mysql_error()));
    $num = mysql_num_rows($result);
    echo "num is $num";

     

    It outputs 'num is '.  I get the same type of thing when i try mysql_fetch_array.

  7. This code works from www.domain.com trying to access image.jpg is in www.domain.com/images

     

    if (is_file("http://www.domain.com/images/$img")){
    echo "$img";
    } else {
    echo "no image, sorry!";
    }

     

    It echoes image.jpg from www.domain.com and no image, sorry from sub.domain.com

  8. I start a session in www.domain.com/folder and as long as I stay on www.domain.com everything works fine.  I want to carry the session over to sub.domain.com, but this is not working.  The .htaccess file contains the line

     

    php_value session.cookie_domain “.domain.com”

     

    In public_html, public_html/folder, and public_html/sub, but it will not work.

  9. This is my issue, simplified down.

     

    http://sub.domain.com/page1.php

    <?php

    include('http://www.domain.com/main/page2.php');

    ?>

     

    http://www.domain.com/main/page2.php

    <?php

    echo "Test is ";

    echo $_GET['test'];

    ?>

     

    http://sub.domain.com/page1.php?test=test returns

    Test is

     

    And if i change page1.php to

     

    http://sub.domain.com/page1.php

    <?php

    echo "Test is ";

    echo $_GET['test'];

    ?>

     

    http://sub.domain.com/page1.php?test=test returns

    Test is test

     

    What is going on?

×
×
  • 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.