[Typo3] Experience with odbc_connect, odbc_exec, etc.

Dmitry Dulepov typo3 at fm-world.ru
Mon Aug 1 16:54:29 CEST 2005


Hi!

Firsts, try the page with "?&no_cache=1" appended because you will not
see results of "die" due to typo3 caching. Even "$this->pi_USER_INT_obj"
will not help because it disallows caching only for this extension. For
debugging you can call $GLOBALS['TSFE']->set_no_cache() but make sure to
remove it for production :)

Secondly, with the given code you will not get content (if odbc_connect
succeeds) because you did not assign anything to $content :)

Do you run both your script and typo3 on the same machine? Your local
machine is probably Windows. ODBC might work there. What OS your typo3
system has? If it is linux, you need to check that ODBC is compiled into
PHP.

Dmitry.

Nick Weisser wrote:
> Hi listers,
> 
> I've got a little PHP script that selects and displays some tables from
> an Access database. The script works fine on my lokal machine, but...
> 
> When I try to put the script into a Typo3 extension, there is no output
> at all.
> 
> Even if I reduce the whole extension class to something like this
> 
> 
> <?php
> function main($content,$conf)    {
>         $this->conf=$conf;
>         $this->pi_setPiVarDefaults();
>         $this->pi_loadLL();
>         $this->pi_USER_INT_obj=1;   
>     
>         $conn = odbc_connect($cfg_dsn,$cfg_dsn_login,$cfg_dsn_mdp) or
> die(odbc_error());;
>            
>         return $this->pi_wrapInBaseClass($content);
>     }
> }
> ?>
> 
> there is NO OUTPUT AT ALL.
> 
> Could somebody please point me into the right direction if I've missed
> something?!



More information about the TYPO3-english mailing list