All I got was php.exe and php-win.exe with the installer I downloaded. Neither of them work, so I had to go back to using 5.1.2 Did I download the wrong installer? Is there some other one that has php-cgi.exe in it for version 5.2.13?

Another problem I have is mysqli quit working too. Just my lucky day I guess.

Warning: mysqli_connect() [function.mysqli-connect]: (/2003): in C:\asp\inputform\mysql_test.php on line 3

Apparently some sort of odd logon problem? phpmyadmin works fine though.

    I've never relied on the MSI installers for PHP... just seems like it would be much better to download the .zip version and install it yourself manually.

    As for your mysqli problem, we'd probably have to see your test script. You say phpmyadmin works fine.. but did you tell it to use the mysqli extension, or is it falling back to the mysql extension by default?

      bradgrafelman;10953392 wrote:

      I've never relied on the MSI installers for PHP... just seems like it would be much better to download the .zip version and install it yourself manually.

      As for your mysqli problem, we'd probably have to see your test script. You say phpmyadmin works fine.. but did you tell it to use the mysqli extension, or is it falling back to the mysql extension by default?

      The script blows up on the fetch statement. This same code worked previously. I accidently deleted something on Friday (caused by some automated code) which destroyed both PHP and MySQL, and my database which fortunately I converted over to SQL Server recently to test some ASP.NET code ... so I didn't lose all my data. I've got the older version of PHP working again though after running the "repair" option. MySQL works fine through phpmyadmin which uses the same host, userid, password, schema and port that the PHP script here uses. Makes no sense.

      phpmyadmin is using mysqli.

      <?php
      require_once 'clsLogin.php';
      require_once 'clsLogging.php';
      $x=test_this();
      print "===== RESULT : $x <br />";
      
      function test_this()
      {
      $retval = -1;
      $array = array();
      $mysqli = new mysqli(clsLogin::HOST, clsLogin::USER, clsLogin::PASS, clsLogin::DB, clsLogin::PORT);
      
      /* check connection */
      if (mysqli_connect_errno()) {
          printf("Connect failed: %s <br />", mysqli_connect_error());
          print "Exit!<br />";
          exit();
      }
      print "Continuing....<br />";
      try
      {
        if ($mysqli) {       
      //$sql = "SELECT * FROM v_artists";
      $sql = "SELECT * FROM `cd_artis`"; //$sql = "SELECT 1,'beatles'"; print "SQL statement text ready<br />"; if ($stmt = $mysqli->prepare($sql)) {
      if ($stmt->execute()) try {
      $stmt->bind_result($col0,$col1);
      } catch (Exception $e) { $err1 = "Caught exception: $e->getMessage()"; echo $err1; clsLogging::Writelog("mysql_test",$err1); } // below fetch causes this error: //The specified CGI application misbehaved by not returning a complete set of // HTTP headers. The headers it did return are "".
      clsLogging::Writelog("mysql_test","fetching...."); while ($stmt->fetch()) {
      $array[] = array("artistno"=>$col0,"artistname"=>$col1);
      }
      $stmt->close();
      } else print "prepare failed"; mysqli_close($mysqli); } // if ($mysqli) else print "mysqli failed somehow " . mysqli_connect_error() . "<br />"; } catch(Exception $e) { print $e->getMessage(); } $retval = count($array); return $retval; // count($array); } ?>
        Write a Reply...