Jump to content

phpvox

Members
  • Posts

    50
  • Joined

  • Last visited

    Never

Posts posted by phpvox

  1. how can i make the below code compatble with PHP5.......this works fine with php4......what changed in php5 that it cant connect to database anymore ? thanks

     

    <?

      $connected = false;

      function c()

      {

          global $db_host, $db_login, $db_pswd;

     

          $db = @mysql_connect($db_host, $db_login, $db_pswd);

          $connected = true;

          return $db;

      }

     

    function q($q_str)

    {

        global $db_name, $connected;

        if(!$connected)

        {

        c();

        }

     

        $r = mysql($db_name, $q_str);

        return $r;

    }

     

    function d($db)

    {

        @mysql_close($db);

    }

     

    function e($r)

    {

      if(@mysql_numrows($r))

      return 0;

      else return 1;

    }

     

    function f($r){

      return @mysql_fetch_array($r);

    }

     

    function nr($r){

      return @mysql_num_rows($r);

    }

    ?>

     

  2. I would do with #3.........

     

     

    setting are everything eles is the same, this happenes when i click and upgrade to PHP 5....i get that error on line 19

     

     

    <?

      $connected = false;

      function c()

      {

          global $db_host, $db_login, $db_pswd;

     

          $db = @mysql_connect($db_host, $db_login, $db_pswd);

          $connected = true;

          return $db;

      }

     

    function q($q_str)

    {

        global $db_name, $connected;

        if(!$connected)

        {

        c();

        }

     

        $r = mysql($db_name, $q_str);

        return $r;

    }

     

    function d($db)

    {

        @mysql_close($db);

    }

     

    function e($r)

    {

      if(@mysql_numrows($r))

      return 0;

      else return 1;

    }

     

    function f($r){

      return @mysql_fetch_array($r);

    }

     

    function nr($r){

      return @mysql_num_rows($r);

    }

    ?>

     

  3. it has nothing to do with it............it works when i downgrade to php4.....its not the setting in the conf file, its the same info........

    <xml>

     

    </section>

    <section name="DATABASE CONFIGURATION">

    <field type="select" name="db_type" text="Select your database type" help="http://www.ThisWasRemovedByMe.com/products/ThisWasRemovedByMe/documentation/system_configuration.html#select_your_database_type">MySQL<enum val="MySQL">1</enum>

    </field>

    <field required="1" type="edit" name="db_host" text="Your database host" help="http://www.ThisWasRemovedByMe.com/products/ThisWasRemovedByMe/documentation/system_configuration.html#your_database_host">localhost</field>

    <field required="1" type="edit" name="db_login" text="Your database username" help="http://www.ThisWasRemovedByMe.com/products/ThisWasRemovedByMe/documentation/system_configuration.html#your_database_username">REMOVED</field>

    <field type="edit" name="db_pswd" text="Your database password" help="http://www.ThisWasRemovedByMe.com/products/ThisWasRemovedByMe/documentation/system_configuration.html#your_database_password">REMOVED</field>

    <field required="1" type="edit" name="db_name" text="Database name" help="http://www.ThisWasRemovedByMe.com/products/ThisWasRemovedByMe/documentation/system_configuration.html#database_name">REMOVED</field>

    </section>

     

    </xml>

     

  4. well why does it work as soon as i down grade to PHP4 and it works.......i have to upgrade to PHP5

     

    the script is encoded and im not getting support from the vendor.

     

    i think i have to change something in mysql

  5. as soon as i upgraded from PHP4 to PHP5 and i started getting the bellow error, its not connecting to the database no more, files and setting are the same.....this is a compatibility issue, how can i get a fix around this ??? i cant post the script here, its too big.....any help ??? ......thanks

     

    Warning: mysql() [function.mysql]: Access denied for user 'apache'@'localhost' (using password: NO)

  6. <xml>

    <section name="DATABASE CONFIGURATION">

    <field type="select" name="db_type" text="Select your database type">MySQL<enum val="MySQL">1</enum>

    </field>

    <field required="1" type="edit" name="db_host" text="Your database host (it may be an IP address)">localhost</field>

    <field required="1" type="edit" name="db_login" text="Your database username">DATABASE NAME</field>

    <field type="edit" name="db_pswd" text="Your database password">PASSWORD</field>

    <field required="1" type="edit" name="db_name" text="Database name">USER NAME</field>

    </xml>

  7. when I run zend optimizer 2.6.2 the window comes up messed up.."all of them"... it didnt do this before but im not sure why im getting wierd codes like that now, nothing changed in the server at all.....thanks a million

    [img]http://i14.tinypic.com/2r6o9q8.jpg[/img]
  8. Curl question

    Im trying to get my script to function, but it kept hanging, so I email my host and I was told the following:

    Go Daddy's HTTPs Proxy requires special options to be placed within any CURL session before it can be used with the HTTPS protocol. The following options will need to be entered into the CURL Session.

    curl_setopt ($ch, CURLOPT_HTTPPROXYTUNNEL, TRUE);
    curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
    curl_setopt ($ch, CURLOPT_PROXY, 'http://64.202.165.130:3128');
    curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE);


    Now how can I do that? This is my code:

    curl_setopt($ch, CURLOPT_URL,$url);
    curl_setopt($ch, CURLOPT_USERAGENT, $agent);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);

    Thanks in advance
×
×
  • 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.