Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 7.0 fatal error: Cannot use Joomla\\String\\String as String because 'String' is a special class name #8817

Closed
Lyquix opened this issue Dec 30, 2015 · 6 comments

Comments

@Lyquix
Copy link

Lyquix commented Dec 30, 2015

Steps to reproduce the issue

Upgraded to PHP 7.0.1 in Ubuntu 14.04 using the following the steps:
$ add-apt-repository ppa:ondrej/php-7.0
$ apt-get update
$ apt-get install php7.0
$ a2dismod php5
$ service apache2 restart

Load home page of Joomla 3.4.7 site and get HTTP error 500. The following appears in Apache log:

[Wed Dec 30 16:27:01.296035 2015] [:error] [pid 11346] [client 192.168.56.101:58686] PHP Fatal error: Cannot use Joomla\String\String as String because 'String' is a special class name in /srv/www/joomla.lyquix.dev/public_html/libraries/vendor/joomla/registry/src/Format/Json.php on line 12

Expected result

Home page loaded without errors

Actual result

HTTP error 500

Apache error log shows:

[Wed Dec 30 16:27:01.296035 2015] [:error] [pid 11346] [client 192.168.56.101:58686] PHP Fatal error: Cannot use Joomla\String\String as String because 'String' is a special class name in /srv/www/joomla.lyquix.dev/public_html/libraries/vendor/joomla/registry/src/Format/Json.php on line 12

System information (as much as possible)

Ubuntu 14.04.2 LTS
PHP 7.0.1-4+deb.sury.org~trusty+1 (cli) ( NTS )
Apache server 2.4.7
Joomla 3.4.7

Additional comments

This is the first time I am submitting a bug here. I apologize if I am not following the right procedure or place. I would like to help.

@brianteeman
Copy link
Contributor

Joomla 3.4.x is not compatible with php 7 as stated in the release
announcement.
The next version 3.5 scheduled for release in Feb will be the first version
that is
On 30 Dec 2015 10:29 pm, "Lyquix" notifications@github.com wrote:

Steps to reproduce the issue

Upgraded to PHP 7.0.1 in Ubuntu 14.04 using the following the steps:
$ add-apt-repository ppa:ondrej/php-7.0
$ apt-get update
$ apt-get install php7.0
$ a2dismod php5
$ service apache2 restart

Load home page of Joomla 3.4.7 site and get HTTP error 500. The following
appears in Apache log:

[Wed Dec 30 16:27:01.296035 2015] [:error] [pid 11346] [client
192.168.56.101:58686] PHP Fatal error: Cannot use Joomla\String\String as
String because 'String' is a special class name in
/srv/www/joomla.lyquix.dev/public_html/libraries/vendor/joomla/registry/src/Format/Json.php
on line 12
Expected result

Home page loaded without errors
Actual result

HTTP error 500

Apache error log shows:

[Wed Dec 30 16:27:01.296035 2015] [:error] [pid 11346] [client
192.168.56.101:58686] PHP Fatal error: Cannot use Joomla\String\String as
String because 'String' is a special class name in
/srv/www/joomla.lyquix.dev/public_html/libraries/vendor/joomla/registry/src/Format/Json.php
on line 12
System information (as much as possible)

Ubuntu 14.04.2 LTS
PHP 7.0.1-4+deb.sury.org~trusty+1 (cli) ( NTS )
Apache server 2.4.7
Joomla 3.4.7
Additional comments

This is the first time I am submitting a bug here. I apologize if I am not
following the right procedure or place. I would like to help.


Reply to this email directly or view it on GitHub
#8817.

@Lyquix
Copy link
Author

Lyquix commented Dec 30, 2015

Got it. Thanks!

@Lyquix Lyquix closed this as completed Dec 30, 2015
@VGerris
Copy link

VGerris commented Jul 15, 2017

I have the exact same issue when I installed gk_portfolio_quickstart_J!3.
The error is :
[pid 16618] [client 127.0.0.1:34022] PHP Fatal error: Cannot use Joomla\String\String as String because 'String' is a special class name in /var/www/html/libraries/vendor/joomla/registry/src/Format/Json.php on line 12, referer: http://take1.unlockyoursoftware.com/administrator/index.php?option=com_admin&view=sysinfo

I am running Joomla 3.7.2. Would the install have messed up something?

I fixed it by extracting the full install over it, then I got back in.

@wojsmol
Copy link
Contributor

wojsmol commented Jul 16, 2017

This quickstart is probably not compatible with php 7.

@AndyGaskell
Copy link
Contributor

I had the same issue with a Joostrap quickstart recently, I guess a lot of Template developers don't keep their quickstart packages up-to-date, which is fair enough I suppose, as that'd be a fair amount of work.

Dropping the latest Joomla install over the top of the files fixed it fine, as mentioned above.

@Billy-Bill
Copy link

I fixed the issue by reversing to PHP 5.6 from 7.1, updated Joomla and the plugins and then switched back to PHP 7.1. In my case the Hostgator control panel has a PHP selector to do that. Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants