代码之家  ›  专栏  ›  技术社区  ›  GeoffreyF67

是什么导致这个行走错误?

  •  0
  • GeoffreyF67  · 技术社区  · 17 年前

    当我运行我的应用程序时,在推进中出现此错误:

    PropelException: Unable to open PDO connection [wrapped: SQLSTATE[HY000] [14] unable to open database file]
    

    我已经尝试了所有我能想到的,但是无法弄清楚是什么导致了这个问题。

    我的build.properties是:

    propel.project = LinkCannon2
    
    # The Propel driver to use for generating SQL, etc.
    propel.database = sqlite
    
    # This must be a PDO DSN
    propel.database.url = sqlite://Users/GMan/Public/Source/LinkCannon2/test/data/LinkCannon2TestDB.sq3
    
    propel.addGenericMutators = true 
    

    我的runtime-conf.xml是:

    <propel>
      <datasources default="LinkCannon2">
       <datasource id="LinkCannon2"> <!-- this ID must match <database name=""> in schema.xml -->
        <adapter>sqlite</adapter> <!-- sqlite, mysql, myssql, oracle, or pgsql -->
        <connection>
         <classname>DebugPDO</classname>
         <dsn>sqlite://localhost///Users/GMan/Public/Source/LinkCannon2/test/data/LinkCannon2TestDB.sq3</dsn>
        </connection>
       </datasource>
      </datasources>
        <debugpdo>
          <logging>
            <details>
              <method>
                <enabled>true</enabled>
              </method>
              <time>
                <enabled>true</enabled>
              </time>
              <mem>
                <enabled>true</enabled>
              </mem>
            </details>
          </logging>
        </debugpdo>
     </propel>
    </config>
    
    1 回复  |  直到 15 年前
        1
  •  1
  •   Jan Fabry    16 年前

    这可能不是pulple特有的问题,而是sqlite特有的问题。如果您搜索实际的错误消息( SQLSTATE[HY000] [14] unable to open database file ,您将找到有关设置正确权限的信息,以及确保执行php脚本的进程(例如,apache服务器)可以访问此文件的所有信息。

    推荐文章