I'm trying out symfony so i started installing it on a remote mashine thru ssh (normal user, no root access)
when getting to the part where i want to generate the db-schema out of a existing mysql database with doctrine by issuing the following command:
./symfony doctrine:build-schema
i get the following errors:
Warning: require_once(): '/tmp/tmp_doctrine_models/User.php' is not a valid path for inclusions, since it includes /tmp/ in /home/users/mpretftp/test1/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Core.php on line 668
Warning: require_once(/tmp/tmp_doctrine_models/User.php): failed to open stream: Success in /home/users/mpretftp/test1/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Core.php on line 668
Fatal error: require_once(): Failed opening required '/tmp/tmp_doctrine_models/User.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/users/mpretftp/test1/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Core.php on line 668
by 'doing it the other way around', create the database.yaml like this:
User:
actAs: { Timestampable: ~ }
columns:
id: { type: integer, notnull: true }
hash: { type: string(255), notnull: true }
then trying out ./symfony doctrine:build --model i'm getting the following, even weirder error:
./symfony doctrine:build --model
>> doctrine generating model classes
>> file+ /tmp/doctrine_schema_70737.yml
Invalid schema element named "0" at path "Warning"
also, the hoster (of the remote mashine) has a comment on a joomla-error message. On one side i realize that joomla has nothing to do with symfony nor doctrine. But the error message resembles the first warning i pasted above: "... is not a valid path for inclusions,since it includes '/tmp/' in ....". The suggested sollution for the joomla-error is changing the /tmp/ path to /home/users/user/tmp in the joomla configuration
my best guess wou开发者_运维问答ld be that i need to convince doctrine to use another path as well. unfortunatly i cannot find such a configuration option for doctrine.
could anyone either tell me how to set the tmp path for doctrine/symfony or php or even the enviroment?, or where to continue 'debugging'?
Doctrine uses PHP's sys_get_temp_dir to determine the temporary path. I found this out by search the Doctrine source for 'tmp_doctrine_models'.
It seems a little strange that your host doesn't allow the temporary directory to be written.
精彩评论