|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-08-16 10:16 UTC] marty at comitaustralia dot com
I have been using apache, php and postgresql for quite a while now. Recently I upgraded to the lates versions of all the components. Apache 1.3.26 PHP 4.2.2 Poistgresql 7.2.1 After the upgrade I found that I could read from the DB ie. select requests, but not write to the DB ie. insert, update. I get no error messages. I have tried everything including reinstalling apache, postgresql and php fresh, but have been unsuccessful. The only way I have been able to make everything work is to go back to PHP 4.1.2 and keep apache 1.3.26 and postgresql 7.2.1 Is there a bug in version 4.2.2 that prevents full control of postgresql?? Cheers, Marty PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 05 10:00:01 2025 UTC |
I have just upgraded to apache 2 and php 4.2.3 and have the same problem. I can execute the following successfully: if (!($myFile=fopen("product.txt", "r"))) { exit; } while (!feof($myFile)) { $elements=fgetcsv($myFile,1024); if (!($elements[7]=='?')) { $Sql = "INSERT into tblproduct (productid,productdesc,package,lastsale,price,gst,deleted) VALUES ('$elements[0]','" . addslashes($elements[1]) ."','$elements[2]','$elements[7]','$elements[3]','$elements[14]','f')"; if(!($Sqlexec = pg_exec($db, $Sql))) print ($elements[0]); } } fclose ($myFile); where product.txt is a comma seperated text file. However, when I try to execute the following I get no response from the server: function search($id,$name) { $db = pg_connect("dbname=jpm user=postgres"); $cuid = strtoupper($id)."%"; If ($id != "") { $strSql="SELECT custId, name, street, suburb FROM tblCust WHERE custId like '$cuid'"; } else { $strSql="SELECT custId, name, street, suburb FROM tblCust where name like '$name%'"; } $result = pg_exec($db, $strSql); $numrows = pg_numrows($result); if ($numrows==0) { ?> <h2 align="center">No entries were found matching the search data.</h2> <center> <input type="button" value="New Search" onclick="location.href='cust_records.php'"> </center> <? } if (($numrows==1)) {// && ($name=="")) { $res = pg_fetch_array ($result,0); show(); ?> <script> parent.showdata('<? print"$res[custid]" ?>','<? print"$res[name]" ?>'); </script> <?} ......... Everything works perfectly when I use PHP verision 4.1.2 Can someone please help? Marty