i was installed cakephp application on godaddy but something wrong i see this errors please anyone help my..the script work correctly but i cant login with users controller
Warning (2): session_start() [function.session-start]: open(/var/chroot/home/content/37/7269737/tmp/sess_5fngsu7g8llj60a9075mkkgh07, O_RDWR) failed: No such file or directory (2) [ROOT/7269737/html/cake/libs/cake_session.php, line 587]
Warning (2): session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/content/37/7269737/html/cake/libs/debugger.php:683) [ROOT/7269737/html/cake/libs/cake_session.php, line 587]
Warning (2): session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/37/7269737/html/cake/libs/debugger.php:683) [ROOT/7269737/html/cake/libs/cake_session.php, line 587]
Warning (2): Cannot modify header information - headers already sent by (output started at /home/content/37/7269737/html/cake/libs/debugger.php:683) [ROOT/7269737/html/cake/libs/cake_session.php, line 588]
Warning (2): Unknown: open(/var/chroot/home/content/37/7269737/tmp/sess_5fngsu7g8llj60a9075mkkgh07, O_RDWR) failed: No such file or directory (2) [Unknown, line ??]
Warning (2): Unknown: Failed to write session data (files). Please verify that the current setting of session.
You have to do following steps
Set permissions of write to /tmp folder that is default
Change php.ini to point to dir you have access instead of /tmp
Set Configure::write('Session.save', 'cake') and have them in cake
app/tmp where you can manage permissions definitely.
For that you have to changed the Session settings in the config/core.php file. There are several options. The default is to use php.ini settings for to save sessions.
For more details CakePHP Core Configuration Variables
The direct cause of this error is that you are unable to write in the directory /var/chroot/home/content/37/7269737/tmp/.
Either this folder does not exist, create it.
Or it is there, and you need to give it the 0644 permission level.
Hope this helps!
Related
I'm kinda new to SnowFlake. I've installed SnowSQL but when I'm trying to launch it's throwing the below error: I guess some issue in the config which I'm unable to figure out. Please advise!
PermissionError: [WinError 5] Access is denied: '%USERPROFILE%'
[27056] Failed to execute script bootstrap
It looks like the configuration​ options log_file and log_bootstrap_file also point to the %userprofile% directory by default. Maybe set those to the network location too? You can do this by putting the options in the config file or using the -o flag when calling the CLI as described here: https://docs.snowflake.net/manuals/user-guide/snowsql-config.html#snowsql-config-file
I'm getting an error when trying to upload any type of file via Content>Files>Add File. The error reads "The file filename could not be saved. An unknown error has occurred. The file in the Upload a new file field was unable to be uploaded."
I've read through many threads and most seem to indicate a permissions problem. I've checked that all directories are configured properly. Public files are set as sites/default/files; private files are set as sites/default/files/private; and temporary is set as sites/default/files/tmp.
Then I found this error in the server logs:
[Tue Mar 27 10:49:26.932464 2018] [proxy_fcgi:error] [pid 20750:tid 140070898026240] [client nn.nnn.nn.nn:63784] AH01071: Got error 'PHP message: PHP Warning: File upload error - unable to create a temporary file in Unknown on line 0\n', referer: http://ipaddress.com/file/add
Any ideas what might be wrong here?
Thanks,
CJ
This is definitely a permissions issue.
You mention the path of the different folders (public, private, and tmp), but that is a completely different thing.
What you need to check is that user running the webserver has permissions to write on those aforementioned folders.
Now, you don't mention what server are you using, so I'll assume you're running Apache, and the Apache user and group is called apache in CentOS and www-data in Ubuntu.
You should navigate to those folders (actually to the folder where this folders are placed) and type a ls -la sentence in the terminal, to get a list of permissions for them, as well as the name of the user that owns the folders.
The Apache user needs to access and write in those folders.
I have come across the similar problem once. Solution to this problem is to give the 'write' permission to 'others' as well on tmp directory. You might wonder that this is /tmp directory I am talking about, as while uploading a file it must pass through /tmp directory to the desired location.
So give the write (other) permission to /tmp and sites/default/files/tmp directory. Hope this will help.
I'm trying to bake some models that I started this morning, everything was fine then until I had to leave, so I did ctrl^c and exited Putty. Since logging back in everything seemed fine, except when I did ./cake bake and I got the following errors and warnings:
PHP Warning: SplFileInfo::openFile(/var/www/vhosts/toast.lancs.ac.uk/httpdocs/jahans/Wimbrick/app/tmp/cache/persistent/myapp_cake_core_file_map): failed to open stream: Permission denied in /var/www/vhosts/toast.lancs.ac.uk/httpdocs/jahans/Wimbrick/lib/Cake/Cache/Engine/FileEngine.php on line 355
Warning: SplFileInfo::openFile(/var/www/vhosts/toast.lancs.ac.uk/httpdocs/jahans/Wimbrick/app/tmp/cache/persistent/myapp_cake_core_file_map): failed to open stream: Permission denied in /var/www/vhosts/toast.lancs.ac.uk/httpdocs/jahans/Wimbrick/lib/Cake/Cache/Engine/FileEngine.php on line 355
Warning Error: _cake_core_ cache was unable to write 'cake_dev_eng' to File cache in [/var/www/vhosts/toast.lancs.ac.uk/httpdocs/jahans/Wimbrick/lib/Cake/Cache/Cache.php, line 323]
Warning Error: _cake_core_ cache was unable to write 'cake_console_eng' to File cache in [/var/www/vhosts/toast.lancs.ac.uk/httpdocs/jahans/Wimbrick/lib/Cake/Cache/Cache.php, line 323]
I tried using chmod -R 777 to edit the permissions, but the messages still persisted when I tried ./cake bake again. Then I tried baking my models anyway, I was able to choose which tables I wanted to bake just fine, but when it asked for my primary key it suggested 0 and after this it gave me the usual "does everything look okay?" message as if everything had worked fine, when I hadn't been able to see my fields, set any validation criteria or do anything useful at all.
Does anyone have any clues?
Thanks.
It turned out to be an external problem at work.
You are doing it wrong.
You need to read the docs on how to execute shells in CakePHP.
Always navigate into your APP dir:
cd /path/to/app
Then run it relative from there:
Console/cake bake
I almost managed to deploy a CakePHP-application on CentOS-server, but it still needs little configuration. I have enabled mod_rewrite in /etc/httpd/conf/httpd.conf and restarted apache-server.
Then I have put Cake core library in /home/user/cakephp-core/
I get message "500 internal error" when i try to go to this page through web-browser.
In apache-logs I found following messages:
PHP Warning: include(/$HOME/cakephp-core/lib/Cake/bootstrap.php): failed to open stream: Permission denied in /srv/www/site/public_html/main/index.php on line 96
PHP Warning: include(): Failed opening '/$HOME/cakephp-core/lib/Cake/bootstrap.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /srv/www/site/public_html/main/index.php on line 96
PHP Fatal error: CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your /cake core directory and your /vendors root directory. in /srv/www/site/public_html/main/index.php on line 101
it says something about "permission denied"... to whom I should give permissions and where? I gave "apache:apache" to tmp/-folder... Any ideas?
Simply read the log and try to understand it.
It pretty clearly tells you what has insufficient permissions. The linux command to set permissions is chmod. You also want to make sure, as the text already tells you, that your CakePHP core include path is correct. Double check that too.
I have been installed varnish module in drupal 7 while clicking on configure it shows an error page with title server error and if i come back to module menu there was another error log
like Warning: require_once(/var/www/magz/sites/all/modules/varnish/varnish.admin.inc): failed to open stream: No such file or directory in menu_execute_active_handler() (line 515 of /var/www/magz/includes/menu.inc).
I tried reinstalling and some other stuffs but the error is still there is there any solution for this
Did you checked if the path and file (folder) is valid? seems that the module requires certain file which are not there.
I've checked with version: 7.x-1.0-beta2 and no such issue occurred.
Just to close out that the read permissions would cause this, please follow the instruction from that: page - regarding access rights setting.