Menu

Can't See Databases

Linda
2004-08-16
2013-04-17
  • Linda

    Linda - 2004-08-16

    I have loaded PCG onto a Windows box running Apache 2, PHPMyAdmin, MySQL, and PHP5.  For some reason I can not see any of my databases.

    Is there something in the configuration process I may have missed?

    Thank You
    Linda

     
    • Nilesh Dosooye

      Nilesh Dosooye - 2004-08-16

      if you could go to the main page with the frames.. then configuration wise, you should be ok. It might be some other erros with the account u used to access phpCodeGenie does not have the privilege to list databases..

       
    • Matt Vollmar

      Matt Vollmar - 2004-08-17

      So what I read here is that I can't use PCG if my user doesn't have privs to list Databases?  Because my ISP doesn't allow that.  I suppose I could just run it on my local box and upload the results, but it seems so much easier to do it direct.

       
    • Nilesh Dosooye

      Nilesh Dosooye - 2004-08-17

      PCG shouild not be put on production environments.. its a development tool and as such, its not good to run it on your ISP where your main website is. I would highly recommend only running it on your development or local machine and then after you test the generated application well, only then do you put it on your main hosting.

       
    • Linda

      Linda - 2004-08-17

      Could you point me to where you send the command for getting the database lists? 

      I am working on the localhost not across the network.  I have verified that I am using the correct password/username against database, but PCG still does not show me the list.

      Thank You
      Linda

       
    • Nilesh Dosooye

      Nilesh Dosooye - 2004-08-17

      The place where the list is being gotten is in the web/frames/leftFrame/leftBar.php file on line 19 and on lines 38..

      What you can try to do.. instead of

      $allDatabases = $thisDbQuery->getDatabases(); (line 19)

      and

      $allTables = $thisDbQuery->getTables(); (line 38).. you can hardcode ur own databases and tables

      e.g

      $allDatabases[] = "database1";
      $allDatabases[] = "database2";

      $allTables[] = "table1";
      $allTables[] = "table2";

      or if you want to dig deeper... open the app/common/database/databaseQuery.class.php file and look at the getDatabases and get Tables method..

      I hoppe that helps..

      Thanks,
      Nilesh

       
      • Paul Evans

        Paul Evans - 2004-10-23

        Hi,

        I just installed .3.02 under mandrake 10 with postgres 7.3x and I had to hard-code in the database name too. Otherwise it just shows the system tables, but no databases.

        I'm using a php-based cms on the same box with no problems.

        Also, ODBC just hangs on a blank screen. However, openoffice uses odbc to connect to it fine (all I have that uses odbc).

        Sorry I don't have time to figure this out right now.

        You've just saved me a heap of time and drudgery, Thanks Nilesh!!

         
    • Anonymous

      Anonymous - 2004-08-27

      I have loaded PCG onto a Windows XP box running IIS5, PHPMyAdmin, MySQL, and PHP4.3.4 For some reason I can not see any of my databases. The index page loads perfect but after the klik on the lamp, i see nothing. the htacces is not working but i have copied the "genieConfiguration.inc.php" on the index.php niveau.

      this is my config file.

      <?
         session_start();
         define("URL_ADDRESS","http://localhost/phpCodeGenie3/web");

         // Windows Server
         define("SITE_PATH","c:\\inetpub\\wwwroot\\phpCodeGenie3");   // no trailing slashes
         define("FILE_SEPARATOR", "\\&quot;);
         // win or nix
         define("OS_TYPE","win");

         define("WEB_SEPARATOR","/");
         define("APP_PATH",SITE_PATH.FILE_SEPARATOR."app");
         define("WEB_PATH",SITE_PATH.FILE_SEPARATOR."web");

         // Specify the language that you want to use phpCodeGenie in
         // You can make your own language file if it does exist yet
         // and send your contribution back to phpCodeGenie
         define("LANGUAGE_FILE",APP_PATH.FILE_SEPARATOR."language".FILE_SEPARATOR."lang_english.inc.php");

         define("CONFIG_COMPONENT",APP_PATH.FILE_SEPARATOR."settings");
         define("CONFIG_FILE",CONFIG_COMPONENT.FILE_SEPARATOR."definitions.inc.php");
         include_once(CONFIG_FILE);

      ?>

       
      • Nilesh Dosooye

        Nilesh Dosooye - 2004-08-27

        copying the genieconfiguration to the index.php level.. will only amkes the files at the niveau work... the genieconfiguration need to viewable by every folder in the entire PCG application.. that's basically waht the .htaccess directive would have done. If you cannot get .htaccess to work, you can put the genieconfiguration file in the php include directory. that would make it seen by all php scripts anywhere..

         
    • Anonymous

      Anonymous - 2004-08-27

      Thanks, Nilesh

      PCG is fuctioning well now. thanks again for the quick response.

       
    • Ralph Roberts

      Ralph Roberts - 2004-10-28

      Code Genie is WONDERFUL!!!!

      ... but I could not see PostgreSQL files either... however, it was a simple fix:

      In app/common/database/databaseQuery.class.php, on line 476 (in the getDatabases function) just add

      ($this->getDatabaseType()=="postgres")

      --Ralph

       
      • Nilesh Dosooye

        Nilesh Dosooye - 2004-10-28

        Hi Ralph,

        Thanks for pointing this out.. I had totally forgotten I had put that in there... I need to put some documentation about it somewhere. So when you added ="postgres".. did it work??

        because according to the adodb documentation, the MetaDatabases() works only for ODBC, MySQL and ADO..

        The text in ADODB Docs says

        "MetaDatabases() - Returns a list of databases available on the server as an array. You have to connect to the server first. Only available for ODBC, MySQL and ADO."

        Thanks,
        Nilesh

         
    • Ralph Roberts

      Ralph Roberts - 2004-10-29

      Yes, it gives me the list of PostgreSQL databases ... can't generate workable code for them, of course, until some more work is done on the templates (as you've already described, still have MySQL stuff mostly).

      However, after making the change, I can see and actually connect with Postgres databases. I'll experiment with manually editing some of the code and see if it will work.

      Overall, I realize the project is still in development and, again, am very pleased with what I see so far (as I was with 1.0).

      All the best to you and thanks!

      --Ralph

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.