How can i Fix The "--search-engine" option does not exist in Magento 2 - magento

I have a problem when i try to setup magento on my localhost. I already active the elasticsearch and my elasticsearch version is 7.6.0. So, what is the problem and how can i fix it.
The "--search-engine" option does not exist

Please check the elastic search hostname using a database or may set it using the below command.
php bin/magento config:set catalog/search/engine elasticsearch7
php bin/magento config:setcatalog/search/elasticsearch7_server_hostname <elasticsearch_hostname>
php bin/magento config:set catalog/search/elasticsearch7_server_port <elasticsearch_port>

Related

No alive nodes found in your cluster for magento 2.4.1

I have installing magento 2.4.1 version and have integrated smile Elasticsearch module. I'm Faciung some issues. please help on this issues
1 exception(s):
Exception #0 (Elasticsearch\Common\Exceptions\NoNodesAvailableException): No alive nodes found in your cluster
Configurate image(Admin):
enter image description here
Check the configuration
First let's check if your configuration is correct:
Update your host and port: '[host]:[port]'. E.g.: 'localhost:9200' in Stores > Settings > Configuration > Catalog > Catalog > Catalog Search or if you are you are using Elastic Suite in Stores > Configuration > ElasticSuit > Basic configuration.
Update your indices alias name and indices name pattern in admin configuration same as above.
Clear cache by going to System > Cache Management or using this command (on your server in Magento installation folder):
bin/magento cache:clean
Reindex by visiting System > Index Management or running command below:
# Update catalog search
bin/magento indexer:reindex catalogsearch_fulltext
# Or reindex all indexers
bin/magento indexer:reindex
Check Elasticsearch
If the error still stands, it might be the issue with the elasticsearch service on your server. To solve this follow the steps below:
Log into your Magento instance.
Check if the elasticsearch is running:
sudo /etc/init.d/elasticsearch status
Try to start it if it's not running, or restart it if it's running:
# Start elasticsearch
sudo systemctl start elasticsearch
# Or restart elasticsearch
sudo systemctl restart elasticsearch
You've found the issue if you encounter an error here and your elasticsearch doesn't start. Solve the issue first. Continue when the elasticsearch starts.
Navigate to your Magento installation folder
Reindex all indexers
bin/magento indexer:reindex
Clear the cache
bin/magento cache:flush
Your problem should have been solved by now.
P.S. I believe this threat belongs to Magento Stackexchange. I have already answered the issue there.

Creating Schema automatically using migration in Laravel

Is it possible to create schemas automatically in the database when xampp is turning on? There is no information about it in the Laravel documentation, documentation says only how to do it manually by writing the command php artisan migrate.
Xampp includes a script called apache_startup.bat in the root directory, you can add the following line to it
c:\xampp\php\php.exe -f /path/to/laravel/app/artisan migrate
Then when the apache server starts, it should run that the equivalent of php artisan migrate to setup the database.
You can do php artisan make:migration [migration-name] - other than that, you have to fill the rest yourself.

Not work "Migrate" and mysql in laravel project

I install laravel and create project.
I Configed configuration file database and create database in mysql(mysql runnig in wamp server).
I want use migrate for create table in mysql,but i should wait a lot of time and see error.
What shoud i do?
This could help you run these command in terminal:
php artisan migrate --force
The migrate:refresh will roll back all of your migrations then execute the migrate command.this will re-creates your entire database.
php artisan migrate:refresh
This will absolutely help you,run this command:
php artisan migrate:fresh
if it did't help please chick out this:
https://laravel.com/docs/5.7/migrations
Probably you entered your mysql Server credentials in the database config, but you have to edit the .env file. Values in there overwrite config settings.

Cannot access laravel project via url http://localhost/myproject/public/

When I ran php artisan serve then copy this URL http://127.0.0.1:8000/. Its works. I want to access my project via url http://localhost/myproject/public/.
It returns blank page. And when I inspect the element it returns 500. Internal server error. Appreciate your help regarding this. Thank you.
Laravel version: 5.4
Php Version: 7.1.12
I can access the folders but when accessing the public folder itself. Returns blank page.
When run the php artisan serve. Its working
I found the answer to my question. It's the PHP version. Php7.0 does not support it
You can try doing:
composer install
Or In the root of your project try to run
php -S localhost:8000 -t public/
Check this answer of my prev. question. You should set symbolic link as the docs said.

Artisan Error: Failed to listen on localhost:8000 (reason: An attempt was made to access a socket in a way forbidden by its access permissions. )

I'm having problem starting my laravel installation. Whenever I type in the terminal php artisan serve, it throws me an error like below:
c:\wamp\www\blog>php artisan serve Laravel development server started
on http://localhost:8000/
[Sat Nov 05 21:18:39 2016] Failed to listen
on localhost:8000 (reason: An attempt was made to access a socket in a
way forbidden by its access permissions.)
1) First firewall restore to default
2) change artisan serve port using this command php artisan serve --port=3232
Trust me its works :)
I faced the same problem today. I just restarted the my machine, after that tried with the same port and it works!
Change artisan serve port using this command
php artisan serve --port=####
instead #### you can enter your own port number.
This will work sure.!
You need command prompt to run as administrator, that solves the problem most of the time.
First make sure your installed Laravel properly in your local machine.
When you execute php artisan serve , you better to run it with administrative priviledges.
In linux, I use
sudo php artisan localhost:8888 -t public
Make sure other requirements such as php version are upto date.
PHP >= 5.5.9
OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP Extension
Tokenizer PHP Extension
For more information refer this document.

Resources