Jump to content

holiks

Members
  • Posts

    83
  • Joined

  • Last visited

    Never

Posts posted by holiks

  1. ...and...

     

    Installing PHP for Apache as CGI binary

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

     

    If you wish to install PHP as a CGI binary, read this first:

     

    http://www.cert.org/advisories/CA-1996-11.html

     

    and then if you are really sure, insert these lines to your conf file:

     

    ScriptAlias /php/ \"c:/php/\"

    AddType application/x-httpd-php .php

    Action application/x-httpd-php \"/php/php.exe\"

     

    ..from php install.txt ...

  2. ok sorry i meant to say \"installed as a cgi Binary\" :P ...chk the windows installation txt my friend

     

    ...he did say phpTriad.

     

     

    /edit

    i said it would look for php in his php binary folder cuz he\'s using the default setup i imagine with apache

     

    ..anyway

     

    The Windows PHP installer is available from the downloads page at

    www.php.net. This installs the CGI version of PHP and, for IIS, PWS,

    and Xitami, configures the web server as well.

    Note that this version does *NOT* install any extensions or server

    api versions of PHP.

     

  3. ..maybe something along the lines of....

    
    <form>
    
    <input type="text" size="3" name="areacode" maxlength="3">
    
    -
    
    <input type="text" size="3" name="number1" maxlength="3">
    
    -
    
    <input type="text" size="4" name="number2" maxlength="4">
    
    <br>
    
    <input type="submit" value="submit">
    
    </form>
    
    

  4. i will ans to my best ability atm :P ..maybe someone else can add...

     

    1. Yes i believe its better to open the connection once and close it at end of script(which php does automatically anyway) ..in the case of more than 1 or 2 queries to be executed in the same script i would say yes ..use the mysql_pconnect. Of course this is all so that the server and client wouldn\'t have to re-establish connection with each other. Yes this has to do with server load/traffic..

     

    2. mysql_connect or mysql_pconnect? ...not sure ...i believe it depends on ur script ...lotta queries = pconnect ...little = connect ...this is what i know so far.

     

    //anyone plz correct me if needed :)

  5. ah you\'re asking quite the vague question. Search on google(great engine) for stuff like \"network security\" .. \"tcp/ip\" ...read some RFC\'s on the different network protocols...then maybe you can consider yourself ready to start learning about server security :- )

  6. ...maybe because of incorrect use of \'if\' statement?

    [php:1:b602e2cd6d]

    if(isset($_POST[\'submit\'])):

    {

    //do something

    } else {

    //do something else

    }

    [/php:1:b602e2cd6d]

    ..is wrong

    ..but you did use it right the second time which is maybe why that worked..

    [php:1:b602e2cd6d]

    if (isset($_GET[\'record\'])):

    //do something

    else: // Allow the user to enter a new author

    endif;

    [/php:1:b602e2cd6d]

    ..use the first if statement u mentioned like u did the second

  7. so i guess it would really hurt your webhost to take the same peek at the link u so graciously provided :lol:

     

    anyway i\'m thinking the prob lies somewhere here..

    [php:1:61351d7726]

    if (!($connection = @ mysql_connect($dbhost,

    $dbusername,

    $dbpasswd)))

    showerror();

    [/php:1:61351d7726]

    ..and guessing that showerror() is a mysql_error() return?

    ..andyou just did the following in include.php?

    [php:1:61351d7726]

    $dbhost = \'host\';

    $dbusername = \'name\';

    $dbpasswd = \'passwd\';

    [/php:1:61351d7726]

    ..if so i can\'t see why you get access denied unless it is a username/pass error.

  8. weird you have a firewall?

    and i don\'t know if phpTriad sets the following for you

    
    <IfModule mod_dir.c>
    
       DirectoryIndex index.html index.php
    
    </IfModule>
    
    

    and also in same file..

    
      ScriptAlias /php/ "c:/php/"
    
      AddType application/x-httpd-php .php
    
      Action application/x-httpd-php "/php/php.exe"
    
    

    ..chk if those are in apache.conf(httpd.conf) file

    and your browser has nothing to do with compatibility and apache ;-)

  9. 
    $queried_boss_id = 12;
    
    
    
    $sql = "select * from emp where bossid = \'$queried_boss_id\'";
    
    
    
    if(mysql_num_rows($sql) < 1)
    
    {
    
    
    
      $employees = \'No one\';
    
      $count = \'0\';
    
    
    
    } else {
    
    
    
      while($row = mysql_fetch_array($sql))
    
      {
    
         $employees .= \' \'.$row[\'userid\'];
    
         $count++;
    
      }
    
    
    
    }
    
    print "He is boss of $count";
    
    
    
    print "Their ideez being $employees";
    
    
    
    //untested
    
    

     

    ..hope this is going your way...

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