Page 1 of 1

Installation breaks Joomla on 2.5.4 (MS-SQL)

Posted: 13 Apr 2012, 00:58
by adrian.rodriguez
Hi,

I've tried to install phocagallery on Joomla 2.5.4 a few times and each time, all I get is the admin control panel sign in screen... and when I sign in, I get the message:

"You do not have access to the administrator section of this site."

Looks like the component folder for both the front end and the administrator section are there, but, none of the database tables have been inserted.

WHy I can't sign into Joomla anymore... not sure.

But I should mention I'm using IIS 7.5 for the server and on an MS-SQL database.

Looking at the install.bak.sql file, I can see that there are many references to database tables hard-coded as "jos_" which is not the prefix I'm using. Also, it appears this SQL file is not compatible with MS-SQL. Is phocagallery simply incompatible with MS-SQL? This is a major selling point of j!-2.5.x so I hope that this is not the case!

Anybody want to tell me how to adjust the sql file to get this working, or suggest why else this is not installing at all and locking me out of the site, forcing me to restore a backup? Thanks.

Re: Installation breaks Joomla on 2.5.4 (MS-SQL)

Posted: 18 Apr 2012, 22:38
by Jan
Hi, install.bak.sql is only bak file for manual installation, the prefixes should be changed before using the queries. Normally, Joomla! framework installs the database tables, with standard Joomla! prefixes, so there is no must to run the queries, but if they need to be run, they should be changed (see documentation)

Really no idea about "locking you out" and really not sure how some tables in database can do this? when they are not related to such feature :idea:

Jan

Re: Installation breaks Joomla on 2.5.4 (MS-SQL)

Posted: 26 Apr 2012, 01:08
by adrian.rodriguez
OK thanks... I have done a little more digging and apologize for even bringing up install.bak.sql, which is not even relevant as it turns out. I have since found that the tables are created by the controller file phocagalleryinstall.php, and none of the queries in that file are ready for ms-sql.

As far this error: "You do not have access to the administrator section of this site." Another user is finding this same problem in another extension: http://joomlacode.org/gf/project/joomla ... m_id=28399, who says "I've managed to get around this by going into MS SQL and updating my user usergroup map table to have the admin group_id as 7 instead of 8, which allows me to log back in. Eventually I can usually change it back to 8, but then the problem starts all over again."

If that gives you any clues as to why it's locking me out, let me know. I've already installed the database tables in MS-SQL manually and run install again (removing those queries as they are unneeded with tables already present) and still getting the lock-out response.

My main question is: does phocagallery have hard-coded queries anywhere besides the installation sql? Or does it call the db through the J!platform, which would then be able to handle ms-sql. In which case, I can try to go ahead and use the above-quoted workaround with user group mapping, and hopefully that will get phocagallery working on this installation.

Thanks.

Re: Installation breaks Joomla on 2.5.4 (MS-SQL)

Posted: 26 Apr 2012, 21:09
by Jan
Hi, Phoca Gallery uses fully features of Joomla! framework, so it does not access database without using Joomla! framework database methods.

Jan

Re: Installation breaks Joomla on 2.5.4 (MS-SQL)

Posted: 27 Apr 2012, 21:27
by adrian.rodriguez
Thanks for clarifying!

After doing some research, it appears that either phocagallery or more likely, Joomla itself, is not handling certain third-party component installs well.

I have rewritten the mysql statements in phocagalleryinstall.php, so that they work with MS-SQL. Installed those tables. I can contribute that file to you if you want to incorporate it into future versions of phocagallery.

Upon installation via the FTP method, I've added all the folders for phocagallery and placed all the files in the right places. When I go to install, I get knocked offline. Then I can't sign in as it says I'm not allowed into the admin area. At this point, I can change my group_id assignment to 7 instead of 8 (via manual database update), and am allowed to sign in again. Then, I can sign out, switch it back to 8, and signing in works again.

This gives me a hint that it might be a session issue related to that.

However, when I'm back into the system, I notice that the Joomla table #__extension has phocagallery but it has it as v. 2.7.9, not 3.5. (Maybe the FTP installer ZIP needs to be updated?) Also, the rows are there in #__menu, but they do not have the component_id. After manually entering the component_id for each menu item, I can get the menu items to appear in the back end.

From that point, I can see the main phocagallery admin control panel page.

However, no other subsection works, and I get a 500 error! Also, there's not a default category pre-defined.

Lots of things not going right, and I'm not sure what is happening from phoca's side or joomla's side. I'm hoping this post reply will give you a ton of info that could help you see something that can be done on your end, or point me to a bug I can report to Joomla itself.

I'm probably the only person in the world trying to use phocagallery with MS-SQL but I hope I can help more users following my path in the future.

Re: Installation breaks Joomla on 2.5.4 (MS-SQL)

Posted: 30 Apr 2012, 17:01
by Jan
Hi, Phoca Gallery should not have anything to do with database version - it does not matter if it is MySQL or MS-SQL, Phoca just uses the Joomla! framework to access the database, so then all needs to be checked there. I have never used MS-SQL in my life, so really cannot say, if or what can cause the problem. Maybe, there is really some SQL Query which MS-SQL does not understand correctly, but really no idea. For 500 error, just enable php error reporting and debug mode, which tells you more :idea:

Jan

Re: Installation breaks Joomla on 2.5.4 (MS-SQL)

Posted: 17 Jul 2012, 02:06
by nmwoods1
Exact same problem. Changed usergroup_map then changed it back, added a menu item, went into sub-section of Phoca component to look at categories and got 500 error. Joomla 2.5.4 MSSQL

Re: Installation breaks Joomla on 2.5.4 (MS-SQL)

Posted: 17 Jul 2012, 22:47
by Jan
Hi, then enable debug mode, maybe your MS-SQL will tell you more.

Jan