How do I install Kohana v3.3.1 on Openshift? Do I create the PHP 5.3 cartridge and put the kohana files inside the php directory? Or do I create a Zend Server 5.6? I would like to use MySQL as well.
Kohana v3.3.1 requires PHP 5.3.3 or higher to work. I just created a PHP 5.3 Cartridge and git clone it to my harddrive and here is the file structure:
C:\mysite>ls -a
. .. .git .openshift README.md deplist.txt libs misc php
C:\mysite>
Inside the php directory
C:\mysite\php>ls -a
. .. health_check.php index.php
C:\mysite\php>
When I edited php\index.php to echo "Hello World" I was able to see Hello World in my browser at my Openshift address http://xxxx-xxxx.rhcloud.com/
Any assistance will be greatly appreciated!
EDIT 1
I listed the cartridges and discovered Do-it-Yourself 0.1
rhc cartridge list
Is this Do-it-Yourself 0.1 cartridge building what I need to do to get Kohana working on Openshift?
I would drop your code inside the basic php-5.3 application skeleton, and go from there.
You can add mysql to any application by listing it as a dependency during your rhc app create step, or by typing rhc cartridge add mysql from within your local project repo folder.
Once you get everything working, I would consider publishing the resulting repo to GitHub. This should allow others to spin up your openshift-compatible copy of Kohana by running:
rhc app create kohana php-5.3 mysql --from-code=http://github.com/YOUR_ACCOUNT/YOUR_PROJECT_NAME.git
(with YOUR_ACCOUNT and YOUR_PROJECT_NAME substituted into the above command)
Related
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!
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.
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.
I am in the beginning phase of trying out Laravel. I downloaded composer and have the Laravel installer on my web server. I want to just create a website with a CMS using Laravel 5 just so I can get a solid understanding of it. I am trying to figure out where to install the files. The docs say to install it in a directory using this command: "Laravel new ". This is where I am a little confused. Wouldn't I want this in the root directory of the website I will be creating? I tried to install it there but it doesn't work.
Where do I install the files so I can use it do build a CMS?
Basically you install laravel from composer, and point the root of your webserver to /public directory.
I am new to the Zend Framework. I just started using ZFTool 2. The documentation says I can create a project by running the command
zf.php create project <path>
When I try to create a project
C:\wamp\www>zf.php create project quickstart
I encounter the following error
Error: I cannot find the autoloader of the application.
Check if C:\wamp\www contains a valid ZF2 application.
All other commands seem to work fine except the above. I wouldn't expect the command to be trying to find the autoloader of the application in my www folder anyway escpecially because am attempting to create a new project
EDIT:
The same thing also happens when i run the command
C:\wamp\www>zf.php version
When you use composer to install zftool then it will auto install into vendor\zendframework\zftool
So that, you only need cd to root of application and then point to folder ztool(example: your application folder that store in c:\xampp\htdocs\zend)
c:\xampp\htdocs\zend> php ./vendor/zendframework/zftool/zf.php version
It will output bellow:
ZFTool - Zend Framework 2 command line Tool
The ZFTool is using Zend Framework 2.5.1
and it'll work for you.
http://rao5s.vn