Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ac pan

Pages: [1]
1
PHP / Re: 403 Error on submitting form
« on: November 11, 2018, 02:31:51 PM »
I had a similiar problem, in my case, the images was not loaded with forbidden message in the web developer console.

I tried many solutions suggested here, check folder and files permission and disable mod security and all that but failed.

In the end i select the webserver without nginx and varnish cache and it was resolved.

2
Installation / Re: need advice to install intl (extension php)
« on: November 10, 2018, 05:00:02 PM »
This is an old thread, i thought i would just add my solution for my environment:

CentOS 7.5 x64
Apache version: Apache/2.4.34
PHP version: 7.1.22 [PHP Switcher]
MySQL version: 10.1.37-MariaDB
------------------------------

Below is what i followed taken from https://unix.stackexchange.com/questions/345106/how-to-install-extenion-php-intl-in-centos7

----------------------------

There are two ways to install php-intl in centos-os (centos ver 2017.09), php version > 7.0

Update system, and try install php-intl directly
Install php-intl through IUS and REMI repositories
1. Update system, and try install php-intl directly
UPDATE SYSTEM command
sudo yum update

INSTALL php70-intl extension
sudo yum install -y php70-intl

2. Install php-intl through IUS and REMI repositories
INSTALL IUS repository (http://iuscommunity.org/pages/Repos.html#release-packages)
cd /opt/
sudo wget https://rhel7.iuscommunity.org/ius-release.rpm
sudo rpm -Uvh ius-release*.rpm


If getting epel error like epel-release = 7 is needed by ius-release-1.0-15.ius.el7.noarch you need to install epel-7 through following command, and retry above command

sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Update system via
sudo yum update

Retry ius install
sudo rpm -Uvh ius-release*.rpm

After IUS is successfully installed, run update system again through command sudo yum update


INSTALL php-intl THROUGH REMI REPOSITORY

Enable remi (temporarily) and install php-intl
sudo yum --enablerepo=remi install php-intl

IF getting ERROR like "Error getting repository data for remi, repository not found", you need to install remi repository first, then run above command

yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

IF getting ERROR like "php70-common-7.0.32-1.31.amzn1.x86_64 conflicts php-common < 5.5.22-1.98" then you need to install php70-intl directly in place of remi repository

sudo yum install -y php70-intl

------------------------------- Above is the instuction from the reference URL ---------------

Also i had a conflict of php_intl version ( 5.4.16-45.el7),

Error showed: "Package php-intl-5.4.16-45.el7.x86_64 already installed and latest version".

so i removed the old version first:

[root@cp ~]# yum remove php-intl

And removed the dependencies:

[root@cp ~]# yum remove  php-common-5.4.16-45.el7.x86_64

Than, list the available package:

[root@cp ~]# yum list php*intl

Installed Packages
php-intl.x86_64                     5.4.16-45.el7                      @base  (This was removed by me earlier)

Available Packages
php54-php-intl.x86_64               5.4.45-15.el7.remi                 remi-safe
php55-php-intl.x86_64               5.5.38-9.el7.remi                  remi-safe
php56-php-intl.x86_64               5.6.38-2.el7.remi                  remi-safe
php56u-intl.x86_64                  5.6.38-1.ius.el7                   ius
php70-php-intl.x86_64               7.0.32-1.el7.remi                  remi-safe
php70u-intl.x86_64                  7.0.32-1.ius.el7                   ius

php71-php-intl.x86_64               7.1.24-1.el7.remi                  remi-safe  (**I need this version)

php71u-intl.x86_64                  7.1.23-1.ius.el7                   ius
php72-php-intl.x86_64               7.2.12-1.el7.remi                  remi-safe
php72u-intl.x86_64                  7.2.11-1.ius.el7                   ius
php73-php-intl.x86_64               7.3.0~rc5-1.el7.remi               remi-safe

// install new php_intl version with its dependencies:

[root@cp ~]# yum install -y php71u-intl.x86_64

-------------
Success Log
-------------

[root@cp ~]# yum install -y php71u-intl.x86_64

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.0x.sg
 * extras: mirror.0x.sg
 * ius: hkg.mirror.rackspace.com
 * remi-safe: mirrors.thzhost.com
 * updates: mirror.0x.sg
Resolving Dependencies
--> Running transaction check
---> Package php71u-intl.x86_64 0:7.1.23-1.ius.el7 will be installed
--> Processing Dependency: php-common(x86-64) = 7.1.23-1.ius.el7 for package: ph                                                                                                             p71u-intl-7.1.23-1.ius.el7.x86_64
--> Running transaction check
---> Package php71u-common.x86_64 0:7.1.23-1.ius.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package              Arch          Version                    Repository  Size
================================================================================
Installing:
 php71u-intl          x86_64        7.1.23-1.ius.el7           ius        222 k
Installing for dependencies:
 php71u-common        x86_64        7.1.23-1.ius.el7           ius        1.1 M

Transaction Summary
================================================================================
Install  1 Package (+1 Dependent package)

Total download size: 1.3 M
Installed size: 9.1 M
Downloading packages:
warning: /var/cache/yum/x86_64/7/ius/packages/php71u-common-7.1.23-1.ius.el7.x86                                                                                                             _64.rpm: Header V4 DSA/SHA1 Signature, key ID 9cd4953f: NOKEY
Public key for php71u-common-7.1.23-1.ius.el7.x86_64.rpm is not installed
(1/2): php71u-common-7.1.23-1.ius.el7.x86_64.rpm           | 1.1 MB   00:01
(2/2): php71u-intl-7.1.23-1.ius.el7.x86_64.rpm             | 222 kB   00:01
--------------------------------------------------------------------------------
Total                                              1.0 MB/s | 1.3 MB  00:01
Retrieving key from file:///etc/pki/rpm-gpg/IUS-COMMUNITY-GPG-KEY
Importing GPG key 0x9CD4953F:
 Userid     : "IUS Community Project <coredev@iuscommunity.org>"
 Fingerprint: 8b84 6e3a b3fe 6462 74e8 670f da22 1cdf 9cd4 953f
 Package    : ius-release-1.0-15.ius.el7.noarch (installed)
 From       : /etc/pki/rpm-gpg/IUS-COMMUNITY-GPG-KEY
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : php71u-common-7.1.23-1.ius.el7.x86_64                        1/2
  Installing : php71u-intl-7.1.23-1.ius.el7.x86_64                          2/2
  Verifying  : php71u-common-7.1.23-1.ius.el7.x86_64                        1/2
  Verifying  : php71u-intl-7.1.23-1.ius.el7.x86_64                          2/2

Installed:
  php71u-intl.x86_64 0:7.1.23-1.ius.el7

Dependency Installed:
  php71u-common.x86_64 0:7.1.23-1.ius.el7

Complete!

---

If you spotted error in the output, it may be conflict with older or your existing php_intl installed package version.
Below is my log and what to look out for:

Error in the output i spotted that made me removed the conflict package
---

[root@cp ~]# yum install -y php71u-intl.x86_64

Resolving Dependencies
--> Running transaction check
---> Package php71u-intl.x86_64 0:7.1.23-1.ius.el7 will be installed
--> Processing Dependency: php-common(x86-64) = 7.1.23-1.ius.el7 for package: ph                                                                                                             p71u-intl-7.1.23-1.ius.el7.x86_64
--> Running transaction check
---> Package php71u-common.x86_64 0:7.1.23-1.ius.el7 will be installed
--> Processing Conflict: php71u-common-7.1.23-1.ius.el7.x86_64 conflicts php-com                                                                                                             mon < 7.1.23-1.ius.el7
--> Finished Dependency Resolution

Error: php71u-common conflicts with php-common-5.4.16-45.el7.x86_64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

*** Above showed conflict package to remove

[root@cp ~]# yum remove  php-common-5.4.16-45.el7.x86_64

--------------------------------------------------------------------------

After I installed the intl package, i logged in to CWP and use the PHP Version Switcher and ticked intl extension
and click save and build button.

After some time (30 minutes), i check that the building is completed from the alert message and log.
I restarted the apache, and clicked php info and the intl was shown on the page (before that it was not there).

The installation script that checked for intl also no longer prompted error for INTL not found.








Pages: [1]