How Can I install OctoberCMS with PHP Version 5.x? - php

I have Windows 10, Xampp installed with PHP Version 5.x and I want to install OctoberCMS with Installation wizard https://octobercms.com/docs/setup/installation but I noticed that OctoberCMS requires PHP 7.0 or higher to achieve this and I have version 5.x.
So How can I install OctoberCMS with PHP Version 5.x ?

OK Guys, Eventually I have come up with the solution to install OctoberCMS with PHP Version 5.x.
Remember, these steps can be varied based on your operating system and the things which you have installed in your system.
First go to OctoberCMS Change log -
https://octobercms.com/changelog and find Build 419 has the php
version 5.x support.
Then go to OctoberCMS release list - https://github.com/octobercms/october/releases and click on the version you need to install which is v1.0.419. Install the zip to the root of xampp/htdocs and extract the folder.
Then inside the same folder which extracted, run this composer install.
After this, run php artisan october:env .. You can run C:\xampp\php\php.exe artisan october:env if you are having an error php is not recognized as an internal or external command.
After php artisan october:env, .env file is created. There you need to modify your database settings like database name, port (put 3306 for localhost etc) by opening this file which will be in same folder.
Then run php artisan october:up or C:\xampp\php\php.exe artisan october:up. It will create database tables and your admin user will be created with User: admin, Password: admin (You can change this after logging IN). And backend url will be something like http://example.com/backend.
Once its done, you can cut paste all your extracted folder files to root .. like from C:\xampp\htdocs\youproject\version419 to C:\xampp\htdocs\youproject\.
Hope this helps.

Related

Cannot create a user in Voyager (laravel 6.x)

I've installed the admin package Voyager (without dummy data) on my Laravel project and when I want to create a user to access the admin panel with the following command: php artisan voyager:admin admin#admin.com --create, I get the following error:
After a little bit of searching, I found this link: https://github.com/the-control-group/voyager/issues/5082 => saying that this command does not work with PHP 7.4 and to make it work, I should either upgrade to PHP 7.4.1 or downgrade to PHP 7.3.
I'm using Wamp Server and decided to downgrade to PHP 7.3.12 since this version exists by default in C:\wamp64\bin\php
I have also edited composer.lock and composer.json in my project and then ran the command composer dump-autoload. But it still doesn't work. Am I missing something?
Had the same issue, upgraded to php 7.4.27 and it worked.

Laravel php artisan serve page not found

Hello guys i'm trying to build\start a PHP existing web app made with Laravel. I made this:
1.Installed XAMPP for PHP version 7.4, also configure Apache Server and tested with localhost and that is working
2.Installed composer and connected with PHP version 7.4
3.Intalled Node.js
4.npm install in the project
5.composer install in the project add the missing packages
In VS Code terminal I add command php artisan serve on adress http://127.0.0.1:8000/ to run the application. But I get :
This page isn’t working127.0.0.1 sent an invalid response.
ERR_INVALID_REDIRECT
Any suggestion?

Symfony "no PHP binaries detected"

Ive been just starting to learn Symfony PHP framework, and Ive run into some problems with its configuration.
When trying to create a new project with command line like so:
symfony new --full my_project
I kept getting a simple error message:
no PHP binaries detected
and no files were created in the current folder. I searched on the net, and found out that Symfony apparently isnt able to find the location of my php.exe, despite it already being set in my system variables. And there was no information about how to properly configure this in Symfony.
How do I fix this error?
Turns out Symfony already contains functions to autodetect installed PHP versions from system variables. The command to fix the Symfony configuration is this:
symfony local:php:refresh
My next attempt to create a new project work fine after that.
Also, I suspect this error was the result of me installing PHP files after installing Symfony.
symfony local:php:refresh
doesn't always work. If your php is not in [/usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /usr/games /usr/local/games /snap/bin] and a few other locations (check with symfony local:php:list -vvv) then symfony won't find it.
I compiled my own PHP from source and installed versions 7.4.20 and 8.0.7 in /home/username/php/7.4 and /home/username/php/8.0. If I want to use my PHP 8.0.7, then I have to make a symlink because updating the $PATH doesn't help.
sudo ln -s /home/username/php/8.0/bin/php /usr/local/bin/php
This works and symfony finds it.
Follow below steps:
Step 1: download & Install xampp in your system
Step 2: open the xampp folder.
find php folder and hit enter
Step 3: copy the path and paste in your system environment
Step 4 : run
php -v
you are good to go!

Using Laravel 5.4 in PhpStorm

Am trying to configure my PhpStorm to use Laravel 5.4 but don't know how to go about it. I have composer installed globally. And this are the steps I have already taken.
1.Go to Settings -> Languages & Frameworks -> PHP -> Composer
Set the composer.phar path to C:\ProgramData\ComposerSetup\bin\composer.phar
but am unable to locate the PATH to COMPOSER.JSON.
Who can give me the steps to configuring Laravel in PhpStorm.
Am using XAMPP
Reinstall composer and check that the PHP path is correct, if you run composer in the terminal you should see this do something, if not it is not installed correctly, similarly if you run php -v this will show the PHP version.
In your Laravel directory there should be a composer.json file, if not run composer init to create one

cannot run 'symfony' command on windows

I came from frontend stack so I can misanderstand something when I'm learning symfony3.
I downloaded Symfony according to documentation with:
php -r "readfile('https://symfony.com/installer');" > symfony
To make php command available i added some values to the enviroment PATH variable (according to this tutorial: https://seiler.it/installing-symfony-framework-into-xampp-for-windows/ - step 2.3) like this:
c:\xampp\mysql\bin;c:\xampp\php;c:\xampp\php\PEAR;C:\xampp\php\symfony
As you see I'm using xampp for PHP development. I added that last, because i copied that downloaded symfony file to c:\xampp\php\symfony directory.
OK, now if i want to use symfony command, like
symfony new project
I need to go to directory where there is that symfony file and add 'php' before, like
php symfony new project
Because simple 'symfony new project' doesn't work (error msg tells about that command isn't known by Windows). How can i fix it?
In frontend there is something like npm (node package manager) with which you can install library/tool locally in directory or globally (to run it in terminal from any place on the computer). Is there is any equivalent in PHP development? I tried to install this by pear (from mentioned tutorial in step 7), but it installed me symfony 1.x version (and error of running that command was that there is no task like 'new') and i want to learn 3, not 1.
I tried to get composer, but i don't see where can i install there symfony globally.
So, how to run symfony globally? What am I missing?
From this doc:
In Windows, move the symfony file to a directory that's included in the PATH environment variable to create the global command or move it to any other directory convenient for you
idea
Install and use Git Bash. Gives you more futures then the windows CLI.
Performance
To run a ten times more fast environment for Symfony i prefer a Linux OS.

Categories