General error: 1364 Field ‘phone’ doesn’t have a default value

SQLSTATE[HY000]: General error: 1364 Field ‘phone’ doesn’t have a default value (SQL: insert into `products` (`name`, `email`, `address`, `image`, `updated_at`, `created_at`) values (amti, kuam@gmail.com, sdafasdf, 642917381.jpg, 2021–05–11 10:58:35, 2021–05–11 10:58:35))

When I’m submit form then got General error field doesn’t have default value. let’s go to solve this.

👉 1 step go to your database and put change none>to Null and save.

Lets go to phpmyadmin

👉 Click on Structure

Click on change and change all field to None to Null and save

Set Null and click on save button

👁👁 Now its error has been solved and your data has been stored successfully.

Thanks

Tagged : / / / / / /

Laravel Error: Creating default object from empty value when store data

today,I am updating data in one table(package table), but I wrote different modal name Trip Category

So,be careful while you are updating data ,choose correct modal name

Tagged :

ERROR: Unable to store image in particular directory

today when i storing image then one error appears

Solution:I have given permission to that directory folder public folder after that my issue is resolved

chmod -R 777 ./public

refrence:https://stackoverflow.com/questions/34836602/laravel-uploading-file-unable-to-write-in-directory

Tagged : /

How to fix syntax error or access violation while use Group by

above error appear if you apply groupby in controller function is given below figure

Solution 1:In config/database.php at “mysql” change : ‘strict’ => true, to false

reference :https://stackoverflow.com/questions/49635699/laravel-distinct-on-join-results-not-working-in-query-builder

now Your bug resolved

Tagged : /

Error: Could not find cookbook cookbooks_test in your cookbook path, sk

rajeshkumar created the topic: ERROR: Could not find cookbook cookbooks_test in your cookbook path, sk

Error while uploading the cookbooks….

> knife cookbook upload cookbooks_test
ERROR: Could not find cookbook cookbooks_test in your cookbook path, skipping it
ERROR: Failed to upload 1 cookbook.

Solution:

You can pass path of the cookbooks via commend line using…

knife cookbook upload cookbooks_test -o /path/to/cookbook

Also, you can set the path in .chef/knife.rb. If .chef/knife.rb is missing, you can following commands…

knife configure --initial

But if you install the startter kit from manage.chef.io, you just need to replace all the files including .knife.rb

if you cookbooks files many places then you can set your .knife.rb like as below;

cookbook_path [ '.', '..', './cookbooks', '~/git/chef' ]

If you are still getting this error, make sure the metadata.rb has same name which you using to upload the cookbooks.
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Error: Network Error: getaddrinfo: nodename nor servname provided, or

rajeshkumar created the topic: ERROR: Network Error: getaddrinfo: nodename nor servname provided, or

Issues –

knife bootstrap uvo1t75faaktzc532w6.vm.cld.sr -x root -P Br356YS0iy --sudo --node-name firefox
Doing old-style registration with the validation key at /Users/rajesh.kumar/.chef/scmgalaxy-validator.pem...
Delete your validation key in order to use your user credentials instead

Connecting to uvo1t75faaktzc532w6.vm.cld.sr
uvo1t75faaktzc532w6.vm.cld.sr
> Existing Chef installation detected
uvo1t75faaktzc532w6.vm.cld.sr Starting first Chef Client run...
uvo1t75faaktzc532w6.vm.cld.sr [2015-08-20T12:10:17-04:00] WARN:
uvo1t75faaktzc532w6.vm.cld.sr * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
uvo1t75faaktzc532w6.vm.cld.sr SSL validation of HTTPS requests is disabled. HTTPS connections are still
uvo1t75faaktzc532w6.vm.cld.sr encrypted, but chef is not able to detect forged replies or man in the middle
uvo1t75faaktzc532w6.vm.cld.sr attacks.
uvo1t75faaktzc532w6.vm.cld.sr
uvo1t75faaktzc532w6.vm.cld.sr To fix this issue add an entry like this to your configuration file:
uvo1t75faaktzc532w6.vm.cld.sr
uvo1t75faaktzc532w6.vm.cld.sr ```
uvo1t75faaktzc532w6.vm.cld.sr # Verify all HTTPS connections (recommended)
uvo1t75faaktzc532w6.vm.cld.sr ssl_verify_mode :verify_peer
uvo1t75faaktzc532w6.vm.cld.sr
uvo1t75faaktzc532w6.vm.cld.sr # OR, Verify only connections to chef-server
uvo1t75faaktzc532w6.vm.cld.sr verify_api_cert true
uvo1t75faaktzc532w6.vm.cld.sr ```
uvo1t75faaktzc532w6.vm.cld.sr
uvo1t75faaktzc532w6.vm.cld.sr To check your SSL configuration, or troubleshoot errors, you can use the
uvo1t75faaktzc532w6.vm.cld.sr `knife ssl check` command like so:
uvo1t75faaktzc532w6.vm.cld.sr
uvo1t75faaktzc532w6.vm.cld.sr ```
uvo1t75faaktzc532w6.vm.cld.sr knife ssl check -c /etc/chef/client.rb
uvo1t75faaktzc532w6.vm.cld.sr ```
uvo1t75faaktzc532w6.vm.cld.sr
uvo1t75faaktzc532w6.vm.cld.sr * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
uvo1t75faaktzc532w6.vm.cld.sr
uvo1t75faaktzc532w6.vm.cld.sr Starting Chef Client, version 11.16.2
uvo1t75faaktzc532w6.vm.cld.sr Creating a new client identity for firefox using the validator key.
uvo1t75faaktzc532w6.vm.cld.sr resolving cookbooks for run list: []
uvo1t75faaktzc532w6.vm.cld.sr Synchronizing Cookbooks:
uvo1t75faaktzc532w6.vm.cld.sr Compiling Cookbooks...
uvo1t75faaktzc532w6.vm.cld.sr [2015-08-20T12:10:21-04:00] WARN: Node firefox has an empty run list.
uvo1t75faaktzc532w6.vm.cld.sr Converging 0 resources
uvo1t75faaktzc532w6.vm.cld.sr
uvo1t75faaktzc532w6.vm.cld.sr Running handlers:
uvo1t75faaktzc532w6.vm.cld.sr Running handlers complete
uvo1t75faaktzc532w6.vm.cld.sr Chef Client finished, 0/0 resources updated in 4.732276995 seconds
MAMSIT1026467:.chef rajesh.kumar$ knife bootstrap {{uvo1t75faaktzc532w6.vm.cld.sr}} --ssh-user {{root}} --ssh-password '{{Br356YS0iy}}' --sudo --use-sudo-password --node-name firefox1
Doing old-style registration with the validation key at /Users/rajesh.kumar/.chef/scmgalaxy-validator.pem...
Delete your validation key in order to use your user credentials instead

Connecting to {{uvo1t75faaktzc532w6.vm.cld.sr}}
ERROR: Network Error: getaddrinfo: nodename nor servname provided, or not known
Check your knife configuration and network settings

Solution –

I am not able to find the problem with the above commands but following commands is working perfectly....
knife bootstrap uvo1t75faaktzc532w6.vm.cld.sr -x root -P Br356YS0iy --sudo --node-name firefox

Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Error executing action `run` on resource ‘execute[/opt/opscode/embedded/bin/chps

rajeshkumar created the topic: Error executing action `run` on resource ‘execute[/opt/opscode/embedded/bin/chps

Error executing action `run` on resource ‘execute[/opt/opscode/embedded/bin/chpst -u opscode -U opscode /opt/opscode/embedded/bin/rabbitmqctl wait /var/opt/opscode/rabbitmq/db/rabbit@localhost.pid]’

Fix 1
So obviously RabbitMq is running, on port 5672, which can be verified through
> netstat -ltnp
tcp 0 0 127.0.0.1:5672 0.0.0.0:* LISTEN 1111/beam.smp

Fix 2
> /etc/init.d/rabbitmq-server stop

Fix 3:
Check your /etc/hosts file. That is not defined well.

Reference
discourse.chef.io/t/chef-server-missing-…and-pivotal-pem/7756
serverfault.com/questions/663310/chef-se…-fails-with-rabbitmq
discourse.chef.io/t/chef-12-server-dead-…nfigure-bombs/7435/7

Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Getting Error while executing Che recipe

rajbazar created the topic: Getting Error while executing Che recipe

Hi! Rajesh !
Installed Chef successfully on my Mac.
=================

Rajs-MacBook-Pro:~ Raj$ which chef
/usr/local/bin/chef
Rajs-MacBook-Pro:~ Raj$ chef -v
Chef Development Kit Version: 2.0.28
chef-client version: 13.2.20
delivery version: master (17c1b0fed9be4c70f69091a6d21a4cbf0df60a23)
berks version: 6.2.0
kitchen version: 1.16.0
inspec version: 1.31.1

====================
My Issue I’am not able to execute first and initial recipe .

Issue:
Raj$ vi server.rb
Rajs-MacBook-Pro:~ Raj$ chef-apply server.rb
Recipe: (chef-apply cookbook)::(chef-apply recipe)
* homebrew_package[httpd] action install

================================================================================
Error executing action `install` on resource ‘homebrew_package[httpd]’
================================================================================

Mixlib::ShellOut::ShellCommandFailed
Expected process to exit with [0], but received '1'
---- Begin output of ["brew", "info", "--json=v1", "httpd"] ----
STDOUT:
STDERR: Error: No available formula with the name "httpd"
---- End output of ["brew", "info", "--json=v1", "httpd"] ----
Ran ["brew", "info", "--json=v1", "httpd"] returned 1

Resource Declaration:

# In server.rb

1: package 'httpd'
2: service 'httpd' do

Compiled Resource:

# Declared in server.rb:1:in `run_chef_recipe'

homebrew_package("httpd") do
package_name "httpd"
action [:install]
default_guard_interpreter :default
declared_type :package
cookbook_name "(chef-apply cookbook)"
recipe_name "(chef-apply recipe)"
end

System Info:

chef_version=13.2.20
platform=mac_os_x
platform_version=10.12.6
ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin14]
program_name=/usr/local/bin/chef-apply
executable=/opt/chefdk/bin/chef-apply

[2017-07-24T10:46:03+01:00] FATAL: Stacktrace dumped to /Users/Raj/.chef/cache/chef-stacktrace.out
[2017-07-24T10:46:03+01:00] FATAL: Stacktrace dumped to /Users/Raj/.chef/cache/chef-stacktrace.out
[2017-07-24T10:46:03+01:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-07-24T10:46:03+01:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-07-24T10:46:03+01:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: homebrew_package[httpd] ((chef-apply cookbook)::(chef-apply recipe) line 1) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of ["brew", "info", "--json=v1", "httpd"] ----
STDOUT:
STDERR: Error: No available formula with the name "httpd"
---- End output of ["brew", "info", "--json=v1", "httpd"] ----
Ran ["brew", "info", "--json=v1", "httpd"] returned 1
[2017-07-24T10:46:03+01:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: homebrew_package[httpd] ((chef-apply cookbook)::(chef-apply recipe) line 1) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of ["brew", "info", "--json=v1", "httpd"] ----
STDOUT:
STDERR: Error: No available formula with the name "httpd"
---- End output of ["brew", "info", "--json=v1", "httpd"] ----

rajeshkumar replied the topic: Getting Error while executing Che recipe

I guess you are running this script in Mac

“Error executing action `install` on resource ‘homebrew_package[httpd]'”

Check the name of apache http package name in Mac. I guess its “httpd24” but need to verify first.
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Error Collection of Tomcat Log files

rajeshkumar created the topic: Error Collection of Tomcat Log files

Problem:

WEB-INF/lib/javaee.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

Problem:

WEB-INF/lib/jsp-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/jsp/JspPage.class

Regards,

Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Error 1227 (42000) at line 133: Access denied; you need the SUPER priv

rajeshkumar created the topic: ERROR 1227 (42000) at line 133: Access denied; you need the SUPER priv

ERROR 1227 (42000) at line 133: Access denied; you need the SUPER privilege for this operation
SQL query:
DELIMITER ; ;

/*!50003 CREATE*//*!50017 DEFINER=`s_snetus`@`localhost`*//*!50003 TRIGGER `inserttree` AFTER INSERT ON `account_owner` FOR EACH ROW BEGIN DECLARE s INTEGER; DECLARE t INTEGER; DECLARE ParentPath varchar(30); SET s=NEW.REPORTS_TO; SET t = NEW.ID; if s is NULL then insert into hierarchy_path values (t,t); else select PATH INTO ParentPath from hierarchy_path where ID = s; insert into hierarchy_path values (t,CONCAT(ParentPath,’,’,t)); end if; END */ ; ;
MySQL said:
#1227 – Access denied; you need the SUPER privilege for this operation
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :