I have a PHPNuke / MySQL site working on linux, was even able to port it to windows without much problem. I work for the Canadian Federal Government, and this environment dictates I have to use IIS & Ms-SQL. After configuring IIS with PHP support, and converting the MySQL written database to ms-sql (available here), things are working well.
1-slight problem. Nuke uses a variety of reserved field names in other databasies, ie: top, view, time - to name a few. If you don't believe me, check your nuke_config , nuke_blocks, or nuke_sessions table.
I believe this to be a *HUGE* bug, as one of the great features of PHP Nuke is the fact it can run on multiple platofrms for it's front end or backend.
In the meantime it's hack & slash time, to change all the references to the_view, the_time, the_top, etc.
ArtificialIntel
Joined: Jan 31, 2004
Posts: -88
Posted:
Fri May 02, 2003 2:19 pm
it's not really a bug.
What you have to understand is that even though it takes a lot of skill to write a CMS such as PHP-Nuke, you can't expect the developers to know all the differences between database platforms, especially when the platform is like the MSSQL database which has security issues and is quite expensive.
The Nuke database was written and developed on a MySQL platform (which is THE most popular database server in existance), especially since it's free, and as such was written conforming to the MySQL database standards.
It's not FB's fault if Micro$oft are s**** enough to have "reserved" field names in their database server - I'd see that as a prime reason to change personally. (yes, I know you said you work for the Canadian Government who have that policy of M$, but that doesn't stop you making recommendations, especially if those recommendations are security related).
AI
steve Sergeant
Joined: May 02, 2003
Posts: 120
Location: Edmonton AB, Canada
Posted:
Fri May 02, 2003 2:30 pm
Quote:
It's not FB's fault if Micro$oft are s**** enough to have "reserved" field names in their database server - I'd see that as a prime reason to change personally. (yes, I know you said you work for the Canadian Government who have that policy of M$, but that doesn't stop you making recommendations, especially if those recommendations are security related).
I understand that it was written for MySQL, and all I'm saying in *ANY* language, it is bad coding practice to use variables such as "time" and "date".
Changing our entire database warehouse because a portal uses keywords in it's code, or because MySQL is apparently better is somewhat of a joke (no offense). MySQL doesn't begin to handle the business logic that something like MS-SQL, Oracle, Postgres handle. If we want to talk non-microsoft databases, then you're going to have the same problems with Oracle, as they too have time & date reserved.
I'm posting this as a bug because PHPNuke advertises they can be used with other databases, and it doesn't do so "out-of-the-box", so I see it as a bug.
If PHPNuke doesn't want to address it as a bug, that's perfectly fine, I have to convert it all anyways *shrugs*
I appreciate the link, it seems it has expanded in it's functionality since I last looked at it (I stand corrected AI). This still doesn't change the fact that I can't change my database environment to fix a code-bug (in my words)
I am a big advocate of Open Sourced software and have been pushing for a change in a lot of areas - using PHP/MS-SQL as opposed to Cold Fusion & Ms Access - when I first got here. Our whole group has been pushing Open Sourced technologies within the government as it's a direct cost-savings to tax payers, with increased support. I currently have pilots going with GIMP & OpenOffice, kBarCode, and a few other tools.
I have never said you guys were doing a bad job, in fact I'm extremely impressed with PHP Nuke's design. My only concern is doing all these changes to make it work with ms-sql will cause future problems for bug fixes & security patches.
It seems that I'll have to just be dilligent while applying patches etc, not a big deal. If I had a chance to push for an open sourced database, I would.
steve Sergeant
Joined: May 02, 2003
Posts: 120
Location: Edmonton AB, Canada
Posted:
Fri May 02, 2003 3:27 pm
Not to beat the dead horse here... but MS-SQL implements the
Code:
select * from blah limit 10
as
Code:
select top 10 from blah
Thanks for your help guys, it's gonna be a fun hack&slash.
Wee
Raven General
Joined: Mar 22, 2003
Posts: 5233
Location: USA
Posted:
Fri May 02, 2003 4:57 pm
I am very skilled and practiced in Oracle, MySQL, DB2, and SAS (dba functionality in all), and I want to chime in here. Steve's point is well taken however I would not agree that it is a 'bug'. It is a design flaw and there is a difference. Nuke was not designed with true portability in mind, regardless of what you might read. FB was short sighted in his (re)design. I say redesign because he basically forked off of a previous CMS. The very point that Steve addresses is also a huge gap/deficiency in the database layers that are built and in use. They do not check for the Reserved Words or this would be avoided. I myself am guilty of this practice and actually had determined a couple of months ago that I would start prefixing all of my application variables with a common prefix that is unique to my applications (or I hope are). Example, in my guestbook (kisgb), I plan in a future release to change all variables to start with kisgb_.
You know, that would be an interesting and fun project that I might undertake? Write a variable checker for reserved words in all of the major DB's . Opinions? Is it worth it?
I too am trying to port phpnuke to a Win 2k / MS SQL 7 platform. I ran accross the same problem with field names and thought I would post this after I did a search for how often count, view and top are used in queries. The fix is pretty simple and goes in either the db\mssql-odbc.php or db\mssql.php depending on the type you are using. I added the following to top of the sql_query function:
The regular expression is pretty simple, just checks for one of the reserved words (more can be added by simply seperating them with the or operator) surround by either spaces or commas. Make sure to replace it before the section that parses out the limit and changes it to a top statement or you will run into some problems.
steve Sergeant
Joined: May 02, 2003
Posts: 120
Location: Edmonton AB, Canada
Posted:
Wed Jun 11, 2003 6:37 pm
Nice ... I prefer that fix. I also found several Win 2k advanced server problems that prohibited Nuke from working.
If it's for a corporation and you use the hardening processes recommended by M$, you might see some problems with IE based browsers (mozilla based shouldn't have a problem)
Once I get a chance I'm going to setup a Nuke on Win site, for serious administrators of Win-servers.
Personally on my own time, I use Linux - however for work, I need to use Win 2k
*shrugs*
wonsul Nuke Cadet
Joined: May 25, 2005
Posts: 1
Posted:
Wed May 25, 2005 5:26 am
Hello, firstly, my english is really bad and what you will read was translated by GOOGLE, then do not pay too attention to the faults of synthaxe please. I have the same problem with mssql and I acknowledge not to have included/understood anything with the preceding messages. Then if somebody would like to say to me well so yes or not one can use mssql with phpnuke and how I would be grateful to him. Thank you
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum