An uncaught Exception was encountered [closed] - codeigniter

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
Type: Exception
Message: Session: Configured save path 'C:\Windows\Temp' is not writable by the PHP process.

Try to contact your host website about this error.
It's just a problem of permission for files/folders.
Configured save path 'C:\Windows\Temp' is not writable by the PHP process
means permission is forbidden by server for CodeIgniter to save sessions in temp folder. If you can't do that yourself, then kindly ask your host to fix that for you.

Related

How to delete a GitLab personal access token in docker using bash? [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 12 months ago.
Improve this question
Context
After having been able to add a GitLab personal access token using bash with:
add_gitlab_personal_access_token(){
local gitlab_username="$1"
local token_name="$2"
local personal_access_token="$3"
local docker_container_id="$4"
output="$(sudo docker exec -i "$docker_container_id" bash -c "gitlab-rails runner \"token = User.find_by_username('$gitlab_username').personal_access_tokens.create(scopes: [:api], name: '$token_name'); token.set_token('$personal_access_token'); token.save! \"")"
}
Attempts I
Using the docker exec and bash -c command as used in setting the token allows one to revoke the token:
revoke_token(){
local docker_container_id="$1"
local token="sometokenpersonalgitlabtoken"
output="$(sudo docker exec -i "$docker_container_id" bash -c "gitlab-rails runner \"PersonalAccessToken.find_by_token('$token').revoke! \"")"
echo "output=$output"
}
Issue
However, after trying to add the token again, it is still in GitLab, and GitLab returns:
DETAIL: Key (token_digest)=(somelongkeysasdfasdfasdfkeyending=) already exists.
so the revoke method does not actually delete the token, it merely revokes it.
Question
I was wondering how: *How can one delete the GitLab personal token in the docker container using bash (based on the $token_name)?
The answer to this question I think is: It's a feature, not a bug. I assume it is bad security practice to re-use a token, so instead of trying to delete an old token, I wrote a method that automatically generates random tokens.
The revoke method in the question works. It has been manually verified by checking whether the GitLab personal access token disappeared in GitLab browser.

Crontab and haproxy [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I have a strange behavior which i do not understand:
I'm running haproxy as loadbalancer and security shield in front of other web containers.
The haproxy is running fine and uses my configured letsencrypt file.
So far so fine.
When the ssl certificate is running out, a new one including all needed key files is generated and replaces the key files.
After that, the haproxy must reload its config.
Now: when i call
cd /etc/haproxy
service haproxy reload
or the script itself from commandline, everything runs absolutely fine.
As soon as i call it via cron, it doesn't work!?!?
There is no error, and the reconfigure script is run till its end.
/etc/haproxy/bin/request_letsencrypt_certificate.sh:
#!/bin/bash
cd /etc/haproxy
service haproxy reload
crontab -e as root:
# LetsEnrcrypt | recert
* * * * * /etc/haproxy/bin/request_letsencrypt_certificate.sh
(i changed to run every minute for testing purposes)
When using echo test>run.txt the file is created every minute, so the script is started successfully, but the service command seems to be not executed?
What could be thy problem, why on commandline it works, but from cron not?
Both action are taken with root permissions as root itself (and when dumping the user in cron-call via whoami in the script, "root" is confirmed at runtime)
Does it work if you change service to /sbin/service to ensure that it's in the PATH? You also probably don't need cd /etc/haproxy in the script.

elasticsearch will not start: Seccomp is present, but bootstrap check fails (Centos 7 / ES 6.4.2) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
CentOS Linux release 7.5.1804 (Core)
Configuring a production cluster, and ES refuses to start:
1:33:56,454][INFO ][o.e.t.TransportService ] [node-68795-C] publish_address {192.168.200.162:9300}, bound_addresses {192.168.200.162:9300}
[2018-10-28T21:33:56,467][INFO ][o.e.b.BootstrapChecks ] [node-68795-C] bound or publishing to a non-loopback address, enforcing bootstrap checks
[2018-10-28T21:33:56,494][ERROR][o.e.b.Bootstrap ] [node-68795-C] node validation exception
[1] bootstrap checks failed
[1]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
OK, so I go to check the presence of seccomp:
[$]# cat /boot/config-`uname -r` | grep CONFIG_SECCOMP=
CONFIG_SECCOMP=y
[$]# CONFIG_SECCOMP=y
So, looks and smells like seccomp is present.
What next?
The root cause: /tmp was mounted as noexec
It turns out that two or three bootstrap checks fail if /tmp is noexec.
Solve for /tmp, and all the other issues are resolved!

Image upload funcationality not working on server [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
In my application i upload new war file that time previous images not shown in application
my java application i store image in database..
It sounds like in you hibernate configuration you have hbm2ddl.auto property set to create or create-drop.
When set to create hibernate will drop the current schema and create a new one on startup. when set to create-drop, hibernate will drop the schema at the time of shutdown. so all of your data will be lost.
Check this answer.
If this is the case then make it update. This will update the schema if you made any changes to model but otherwise everything will be as it is.
If this is not the case then you need to show the configuration and code or check log if you are seeing any exceptions.

How to start and stop an "Automatic" process [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about programming within the scope defined in the help center.
Improve this question
I have an "automatic" mode process say "BPSAuto".
I need to keep thi process shut for certain time and later restart it.
I used bat file and sheduled the task to stop and start.
I used -->net start BPSAuto --- To start
And --> net stop BPSAuto --- To stop.
Now my problem is once I stop the process it again starts automatically. May be this is because it is in "Automatic" mode. Plesae help me to stop completely. And later restart.
Thanks in Advance...
sc config ServiceName start= <setting string>
note the space between start= and the setting for the service
Setting string can be one of:
boot
system
auto
demand
disabled
from sc config /?:
Modifies a service entry in the registry and Service Database.
SYNTAX:
sc config [service name] ...
CONFIG OPTIONS:
NOTE: The option name includes the equal sign.
type= <own|share|interact|kernel|filesys|rec|adapt>
start= <boot|system|auto|demand|disabled>
error= <normal|severe|critical|ignore>
binPath= <BinaryPathName>
group= <LoadOrderGroup>
tag= <yes|no>
depend= <Dependencies(separated by / (forward slash))>
obj= <AccountName|ObjectName>
DisplayName= <display name>
password= <password>

Resources