Welcome Guest, Not a member yet? Register   Sign In
creating a registration system with CI4, and why is CI "better"?
#1

I'd like to create a registration system (with e-mail validation and remember me) and then present certain pages to the visitor based on being logged on or not.  How can I get started?  I'm still new to PHP, and have never used a framework before.

Also, why is using CI "better" than just pure PHP?

Any help or ideas would be most appreciated!
Reply
#2

This has already been built for CI 4 DRY

Myth:Auth

And if you also need this with an admin dashbaord

CodeIgniter 4 Application Boilerplate
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

Coolness. Thank you for the tips. Is it easy to implement?
Reply
#4

(10-21-2020, 06:46 PM)zoldos Wrote: Coolness. Thank you for the tips.  Is it easy to implement?

Starting fresh, no it is not that hard to implement.
instructions are very clear and Myth:Auth is amazing with a lot of fun futures including roles/user groups/permissions etc...
if you are new to CI though, you might want to get yourself familier with the core concepts of CI so you can better implement your Myth:Auth to your application.
Reply
#5

(This post was last modified: 10-26-2020, 01:10 AM by zoldos.)

(10-24-2020, 12:02 PM)Awlikhaleghi Wrote: Starting fresh, no it is not that hard to implement.
instructions are very clear and Myth:Auth is amazing with a lot of fun futures including roles/user groups/permissions etc...
if you are new to CI though, you might want to get yourself familier with the core concepts of CI so you can better implement your Myth:Auth to your application.

I'm new to CI but not coding.  I did a lot of C++ in the mid 90's and have dabbled with PHP for several years.  I'm hungry to learn!! Smile

(10-21-2020, 11:03 AM)InsiteFX Wrote: This has already been built for CI 4 DRY

Myth:Auth

And if you also need this with an admin dashbaord

CodeIgniter 4 Application Boilerplate

Hmm....I tried to install/update Composer in console but got this:

Code:
Problem 1
    - This package requires php >=7.2 but your PHP version (7.0.33) does not satisfy that requirement.
  Problem 2
    - The requested PHP extension ext-intl * is missing from your system. Install or enable PHP's intl extension.

and a bunch more.  I have PHP 7.3.22 so I don't know what's up.  Also, once composer is updated, how do I install myth?  I've already manually installed CI4 and have it running.  Thanks!
Reply
#6

(10-26-2020, 12:56 AM)zoldos Wrote:
(10-24-2020, 12:02 PM)Awlikhaleghi Wrote: Starting fresh, no it is not that hard to implement.
instructions are very clear and Myth:Auth is amazing with a lot of fun futures including roles/user groups/permissions etc...
if you are new to CI though, you might want to get yourself familier with the core concepts of CI so you can better implement your Myth:Auth to your application.

I'm new to CI but not coding.  I did a lot of C++ in the mid 90's and have dabbled with PHP for several years.  I'm hungry to learn!! Smile

(10-21-2020, 11:03 AM)InsiteFX Wrote: This has already been built for CI 4 DRY

Myth:Auth

And if you also need this with an admin dashbaord

CodeIgniter 4 Application Boilerplate

Hmm....I tried to install/update Composer in console but got this:

Code:
Problem 1
    - This package requires php >=7.2 but your PHP version (7.0.33) does not satisfy that requirement.
  Problem 2
    - The requested PHP extension ext-intl * is missing from your system. Install or enable PHP's intl extension.

and a bunch more.  I have PHP 7.3.22 so I don't know what's up.  Also, once composer is updated, how do I install myth?  I've already manually installed CI4 and have it running.  Thanks!

Well your composer is saying that your PHP version is 7.0.33, could you check if you have multiple phps installed?
To check your PHP version:
Code:
$ which php

$ /usr/bin/php
$ php -v
$ PHP 7.4.11 (cli) (built: Sep 29 2020 10:17:06) ( NTS )
if you have the right version and you still get the errors try locating all php version on your system

Stackoverflow: [/url][url=https://stackoverflow.com/questions/28318041/how-to-check-if-there-are-multiple-versions-of-php-installed-on-ubuntu-12-04-lts]How to check if there are multiple versions of PHP installed on Ubuntu 12.04 LTS - You could try this on Debian machines.

Regarding to ext-intl, if you're running on a Linux Debian machine simply run the following command to install it.
Code:
sudo apt-get install php7.2-intl
please note the version which is being installed (php7.2).

and about installing myth using composer, I have not tried that, I took the source and implemented it manually, changing Myth's default Namespaces to your application and placing the Myth files in their respctive directories would do the job.

Good Luck.
Reply
#7

Upgrade your php version to 7.2+ or higher.

Also you need to edit your php.ini file and remove the ; from the intl extension.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#8

(This post was last modified: 10-26-2020, 06:43 AM by zoldos.)

I get this with php -v in console:

Code:
PHP 7.0.33-0ubuntu0.16.04.7 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with the ionCube PHP Loader + ionCube24 v10.4.0, Copyright (c) 2002-2020, by ionCube Ltd.
    with Zend OPcache v7.0.33-0ubuntu0.16.04.7, Copyright (c) 1999-2017, by Zend Technologies

I tried the apt-get install and got:

Code:
condor1310:/usr/bin# sudo apt-get install php7.3
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7.3
E: Couldn't find any package by glob 'php7.3'
E: Couldn't find any package by regex 'php7.3'
condor1310:/usr/bin# sudo apt-get install php7.3.22-intl
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7.3.22-intl
E: Couldn't find any package by glob 'php7.3.22-intl'
E: Couldn't find any package by regex 'php7.3.22-intl'
condor1310:/usr/bin# apt-get install php7.3-intl
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7.3-intl
E: Couldn't find any package by glob 'php7.3-intl'
E: Couldn't find any package by regex 'php7.3-intl'

Sad

(10-26-2020, 06:32 AM)InsiteFX Wrote: Upgrade your php version to 7.2+ or higher.

Also you need to edit your php.ini file and remove the ; from the intl extension.

Having problems with the upgrade.  Can you assist on which command to use?  I'll also try the php.ini suggestion. Thanks!
Reply
#9

(10-26-2020, 06:38 AM)zoldos Wrote: I get this with php -v in console:

Code:
PHP 7.0.33-0ubuntu0.16.04.7 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with the ionCube PHP Loader + ionCube24 v10.4.0, Copyright (c) 2002-2020, by ionCube Ltd.
    with Zend OPcache v7.0.33-0ubuntu0.16.04.7, Copyright (c) 1999-2017, by Zend Technologies

I tried the apt-get install and got:

Code:
condor1310:/usr/bin# sudo apt-get install php7.3
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7.3
E: Couldn't find any package by glob 'php7.3'
E: Couldn't find any package by regex 'php7.3'
condor1310:/usr/bin# sudo apt-get install php7.3.22-intl
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7.3.22-intl
E: Couldn't find any package by glob 'php7.3.22-intl'
E: Couldn't find any package by regex 'php7.3.22-intl'
condor1310:/usr/bin# apt-get install php7.3-intl
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7.3-intl
E: Couldn't find any package by glob 'php7.3-intl'
E: Couldn't find any package by regex 'php7.3-intl'

Sad

(10-26-2020, 06:32 AM)InsiteFX Wrote: Upgrade your php version to 7.2+ or higher.

Also you need to edit your php.ini file and remove the ; from the intl extension.

Having problems with the upgrade.  Can you assist on which command to use?  I'll also try the php.ini suggestion. Thanks!

Ok that's no problem, here what you have to do.

I would remove the current PHP to prevent any possible conflicts.
then Install the php7 using the ondrej/php ppa repo.

Code:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.3
if you are still getting random errors try googling it.

this link will have all you need to install php on ubuntu machines.
https://computingforgeeks.com/how-to-ins...on-ubuntu/ (php7.4)

that'd install PHP7.3, but you need more than just php, you will have to install extensions.

Code:
sudo apt-get install php7.3-{bcmath,bz2,intl,gd,mbstring,mysql,zip,fpm} -y

these exts are usually required but you can choose depending on your needs.
Reply
#10

(10-26-2020, 04:39 PM)Awlikhalegi Wrote: I would remove the current PHP to prevent any possible conflicts.
if you are on a server and not a desktop do not remove your PHPs!!!!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB