<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Try to look at the web server error logs as well.  On unix they are usually in /var/log/apache2/ or /var/log/httpd/ and named error_log or error.log.  I don't know where they are on windows systems, but maybe someone else could point you in the right location.  You could also use pg_last_error ($con); or pg_last_notice($con); to see the last error that would have been written to the log.  <div><br><div>
Paul <br><br>
</div>
<br><div><div>On Oct 27, 2009, at 2:33 AM, <<a href="mailto:nicklas.aven@jordogskog.no">nicklas.aven@jordogskog.no</a>> <<a href="mailto:nicklas.aven@jordogskog.no">nicklas.aven@jordogskog.no</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>
        
<div align="left">It might be that the webserver don't have authentication to access the database.</div>
        
<div align="left">That is controlled from the file pg_hba.conf in the data-directory in the postgresql installation.</div>
        
<div align="left">You should also check the file postgresql.conf in the same directory. At least if the webserver is on another machine than postgresql you have to change the line about listen_addresses so it looks like:</div>
        
<div align="left">listen_addresses = '*'</div>
        
<div align="left">if you want to let all ip-addresses in.</div>
        
<div align="left"> </div>
        
<div align="left">I don't know the details herer, but it might help you continue digging :-)</div>
        
<div align="left"> </div>
        
<div align="left">/Nicklas<br>
                <br>
                2009-10-27 André Mendonça wrote:<br>
                <br>
                Hi everyone, first e-mail here.<br>
                >I´m trying to insert a new point to a simple table called processos in a postgis database, using php, in a local server, with apache 2.2, php 5.2.12, postgre 8.3 and postgis 1.4.<br>
                ><br>
                >here is the piece of code:<br>
                ><br>
                >$sql = "INSERT INTO processos (id, the_geom) VALUES (1,(ST_PointFromText('POINT(-2 -62)',4291)))";<br>
                >pg_query($con, $sql);<br>
                ><br>
                ><br>
                ><br>
                ><br>
                >I can observe (with pg_affected_rows) there´s no new record.<br>
                ><br>
                >Executing the same query directly in pgsql, with the same database user, returns a successfully result. <br>
                ><br>
                >Any ideas on what´s wrong? I had never done any queries using php before, is there a way to see an error message when executing this kind of server-side request? tried firebug console but there´s nothing going on there...<br>
                ><br>
                >Thanks a lot!<br>
                ><br>
                >André Mendonça<br>
                >Universidade Federal do Paraná<br>
                >Curitiba - BR<br>
                ><br>
                ><br>
                ><br>
                ></div>
<hr>
        Com o Novo Internet Explorer 8 suas abas se organizam por cor. <a href="http://brasil.microsoft.com.br/IE8/mergulhe/?utm_source=MSN%3BHotmail&utm_medium=Tagline&utm_campaign=IE8">Baixe agora, é grátis!</a>
</div>

_______________________________________________<br>postgis-users mailing list<br><a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>http://postgis.refractions.net/mailman/listinfo/postgis-users<br></blockquote></div><br></div></body></html>