开发者

What is causing this propel error?

开发者 https://www.devze.com 2022-12-08 22:05 出处:网络
I\'m geting this error in propel whenI run my app: PropelException: Unable to open PDO connection [wrapped: SQLSTATE[HY000] [14] unable to open database file]

I'm geting this error in propel when I run my app:

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

I've tried everything I can think of but can't figure out what is causing the problem.

my build.properties is:

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 

And my runtime-conf.xml is:

<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>


This is not probably not a problem specific to Propel, but to SQLite. If you search for the actual error message (SQLSTATE[HY000] [14] unable to open database file), you will find information about setting the right permissions and all that to make sure the process that executes the PHP script (for example, the Apache server) has access to this file.


Your dsn entry in runtime-conf.xml as well as your url in your build.properties don't seem correct.

Make sure that the patths are correct based on the platform you're using.

0

精彩评论

暂无评论...
验证码 换一张
取 消