install joomla using a SQL Server db as the main database
create a user account giving it the access level Registered
login in the front end with the newly created user account
going to the default home page (in this case the featured articles)
site error as follow:
An error has occurred while processing your request.
You may not be able to visit this page because of:
an out-of-date bookmark/favourite
a mistyped address
a search engine that has an out-of-date listing for this site
you have no access to this page
Go to the Home Page
Home Page
If difficulties persist, please contact the System Administrator of this site and report the error below.
0 new JDatabaseIteratorSqlsrv(*string*, cursor)
php 7
sqlsrv extension 4.0 non thread safe
IIS 7
joomla 3.6
SQL Server 2014
no. I was able to find out that the issue arises only with php 7, not with php 5.6
Can confirm this happens with fresh install of Joomla 3.6.
I found that this issue is occurring because the JDatabaseIterator class constructor cannot find the stdClass in PHP 7. The issue seems to resolve if you explicitly specify to PHP to look in the global namespace. Why you have to do this in this case? I don't know. I can only assumme some namespace is being used in one of the classes specific to SQL Server
So change in the JDatabaseDriver at libraries\joomla\database\driver.php
on line 1242
public function getIterator($column = null, $class = 'stdClass')
to
public function getIterator($column = null, $class = '\stdClass')
This is enough to fix this specific issue . However you should update the JDatabaseIterator class as well to avoid a similar issue.
So change in JDatabaseDriver at libraries\joomla\database\iterator.php
on line 76
public function __construct($cursor, $column = null, $class = 'stdClass')
to
public function __construct($cursor, $column = null, $class = '\stdClass')
That shouldn't be necessary. All code in the libraries/Joomla directory is
in the global namespace. Seems weird that it's acting otherwise.
On Thursday, August 4, 2016, Andrew notifications@github.com wrote:
Can confirm this happens with fresh install of Joomla 3.6.
I found that this issue is occurring because the JDatabaseIterator class
constructor cannot find the stdClass in PHP 7. The issue seems to resolve
if you explicitly specify to PHP to look in the global namespace. Why you
have to do this in this case? I don't know. I can only assumme some
namespace is being used in one of the classes specific to SQL ServerSo change in the JDatabaseDriver at libraries\joomla\database\driver.php
on line 1242
public function getIterator($column = null, $class = 'stdClass')
to
public function getIterator($column = null, $class = '\stdClass')
This is enough to fix this specific issue . However you should update the
JDatabaseIterator class as well to avoid a similar issue.So change in JDatabaseDriver at libraries\joomla\database\iterator.php
on line 76
public function __construct($cursor, $column = null, $class = 'stdClass')
to
public function __construct($cursor, $column = null, $class = '\stdClass')
This comment was created with the J!Tracker Application
https://github.com/joomla/jissues at issues.joomla.org/joomla-cms/11297
https://issues.joomla.org/tracker/joomla-cms/11297.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#11297 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAWfobDCwmjjoSL0r25ghjcf0D-eNj4nks5qcefOgaJpZM4JUGWU
.
Seeing the same problem on Joomla 3.6.4, PHP 7.0.12, Windows Server 2012 R2, IIS 8.5 MS SQL Server 2008 R2.
@williamsandy solution above solved the problem
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-12-04 15:39:29 |
Closed_By | ⇒ | brianteeman |
are you using some 3party extensions?