I am silly, I the website had nothing in the db. I need to create a blank database and load with template data.
Therefore I needed to do
./symfony doctrine:build --db --and-load
Thank you everyone for your time and help.
Question
thanks to everyone in advance. I am having trouble setting up a symfony site on my local. It is not allowing me to ./load-db. I went and ./symfony project:permissions on the root directory and I am getting this error.
Permissions on the following file(s) could not be fixed:
- SF_ROOT_DIR/cache
- SF_ROOT_DIR/log
When I do tail -f /opt/dev/logs/azandmeapp/error_log I get this error
PHP Fatal error: Uncaught exception 'sfDatabaseException' with message 'PDOException was
thrown when trying to manipulate session data. Message: SQLSTATE[42S02]: Base table or
view not found: 1146 Table 'azandmeapp_site.http_session' doesn't exist' in
/opt/dev/kazaamprojects/azandmeapp/lib/vendor/symfony/lib/storage
/sfPDOSessionStorage.class.php:169\nStack trace:\n#0 [internal function]:
sfPDOSessionStorage->sessionWrite('tdga8vm70sh5b0e...', '')\n#1 {main}\n thrown in
/opt/dev/kazaamprojects/azandmeapp/lib/vendor/symfony/lib/storage/
sfPDOSessionStorage.class.php on line 169
i cant rm -rf the cache or the log.
Does anyone have an idea to help me. I surely do appreciate it.
La solution 2
I am silly, I the website had nothing in the db. I need to create a blank database and load with template data.
Therefore I needed to do
./symfony doctrine:build --db --and-load
Thank you everyone for your time and help.
Autres conseils
You have your problems with ./symfony project:permissions
probably because cache was initially created by your apache user so now you can't remove cache files.
What you need to do is make sure that directories
SF_ROOT_DIR/cache
SF_ROOT_DIR/logs
are empty and then you need to run a command
./symfony project:permissions
which should run without any problems. Simplest solution to empty cache
and logs
is rm * -rf
. If possible try to run this command as a root. If not you will have to remove cache and log files being an apache user. To accomplish this create a php script which you will run in a browser (so it will be run as a apache user) by hitting
http://localhost/yourProject/removeDirScript.php
Check this simple script which I used in similar case as yours. Only thing you need to do is change parameter of rmdir
function at the bottom of script.