-
Url rewriting on Postnuke 0.8
(News)
-
Main principles of the mod rewrite
For information, the URL rewriting is a module that you can activated in your apache to rewrite the links of a site in order to simplify their reading.
The idea is that the Pn Team also thought that the mod rewrite was not necessarily available / activated on all types of servers (particularly on Windows servers). Indeed, the Postnuke team offers rewritings based on tips already heavily used in management systems like blogs.
Before you begin, here is the format of a link without rewriting.
without rewriting
index.php?module=Users&func=logout Index.php? Users & module = func = logout
URL rewriting without mod rewrite
This rewriting reproduced a "virtual" Folders system on your site, links look like this
URL rewriting without mod rewrite
index.php/Users/logout
In terms of mechanism, it is very simple, when your Web server receives a request for a link, it loads instinctively page "index.html". In this index.php, the parameters of the request are recovered via the header (you can look in "phpInfo" there is a field $ _SERVER [ 'REQUEST_URI'] which corresponds to this information).Then these parameters are interpreted , between the first two "/" is the name of the module, between the two others, the function name. Now Postnuke know the name of the module and function to launch.
You can pass parameters too, for instance, if you want to load a forum with id=2, the links will look like this
URL rewriting without mod rewrite
index.php/Forum/viewforum/forum:2
Note that the url rewriting uses ":" to represent the parameters in a url. So you can't pass variables like this "index.php?variable=filter:3". (be carefull if you are using Pagesetter and his filters system).
URL rewriting with mod rewrite
Optimizing the previous version
In the previous example, all links contained index.php ... but it's ugly, and functionally this file contains no
information useful to load the asked module.This trick is useful when you have no mod rewrite, but if one has an "mod rewrite enabled" server,you can use a "lighter" version of the previous rewriting without an "index.html"
Here is an example
URL rewriting with mod rewrite :Optimizing the previous version
/Users/logout
Be careful, if one of your pictures is written this way
and you load the page /MyModule/main/. "/MyModule/main/test.png" which will be searched. Note that you can make a rewriting that redirect all links of the form "/*/*/*.(jpg | png | gif)" to "$ 3. (Jpg | png | gif)." (but it's ugly).
Mode file
This url rewriting is the classical version already used in previous versions of the cms, The rewrited links are lists of words (module name, the name of function) separated by dashes. Note that this version uses a large number of regular expressions rules to do the rewriting compared to the other one, which may increase the load of your server Web.
One example here ...
URL rewriting with mod rewrite : Mode file
module-Forum-viewtopic-topic-2903-start-0.html
Note that the "module" which one would have thought there's no point in it, is made for the support of the "old style" loading of modules.
URL rewriting customized
So here is the coolest feature, which allows you to customize the URL rewriting depending on the module you want to load. Just create a "encodeurl" function in your API module (pnuserapi) that takes as parameters, the information needed to create for output a fully customized rewrited link.
After, the loading of each page of the CMS, a "decodeurl" function in the API part of the module takes care to reformat the encoded url in a form understandable by the CMS.
You can find an example of the use of this method in the module "Pages" of values addons
Format of a encode and decode url
function pages_userapi_encodeurl($args)
function pages_userapi_decodeurl($args)
This feature is interesting because it allows us to have the hands on your url, not only before loading the page, but after loading this page, allowing you post-processing actions rather interessant.
This method allow you to
- put keywords in the url: (see Pages module)
- have a single version of your rewrited url : Indeed, through the post treatment you can recalculate the url and it does not conform to your requirements, you can redirect to the good link via a redirect 301 "Moved Permanently headers.
Use case of a url rewriting "no duplicate"
Notes: A small problem nevertheless for the use of this rewriting, which is limited to the type url "user". (more details here)
This article is a translation from this "how to" released on Postnuke-France
Generated on February 25, 2008.
-
Worm hijacks open source MySQL database
(News)
-
Security experts have warned that thousands of MySQL servers around the world could be press-ganged into launching a denial-of-service attack that could bring down the Web site of a company the size of Microsoft.
A worm, dubbed MySpool by security organisation SANS, is spreading rapidly amongst the MySQL user base. It automatically exploits MySQL servers and subsequently infects Windows systems when triggered by an Internet Relay Chat (IRC) server located in Sweden.
News taken from BlackHat.INFO
Generated on February 6, 2005.
-
Downloads on PostNuke.com Target of Hacker: Immediate Action Required if You've Downloaded PostNuke in the Past Three Days
(News)
-
The changes made by the hackers were in two places. First, during the installation routine all data submitted (this includes the server, the database credentials, the admin name and password) is sent to a different server. Second, in one file there was code allowing a malicious user to execute any shell command on the web server.
As noted before, immediate action is required from everyone who downloaded the .zip package between Sunday (24.Oct) at 23:50 GMT until Tuesday (26.Oct) at 8:30 GMT.
Required Actions
1. Immediately remove the affected file /includes/pnAPI.php and replace it on your server with the original one (either from a fresh download or from http://cvs.postnuke.com/viewcvs.cgi/Historic_PostNuke_Library/postnuke-devel/html/includes/pnAPI.php?rev=1.86&content-type=text/vnd.viewcvs-markup)
2. Check the access-logs for any entry containing 'oops='. If you find any call please contact the PostNuke Security Team via http://forums.postnuke.com/index.php?module=vpContact providing the access log for further investigation.
3. Change your database details, username, password and if possible, database name.
Future Safety Precautions
In the future to avoid downloading tampered files please compare the MD5 checksums with an independent source to ensure legitimacy, such as http://www.post-nuke.net. For those unfamiliar with MD5 it is a check you can use to make sure the download has not been tampered with and can be trusted. In order to compute a checksum you need an MD5 utility and you can find a variety of tools (for windows) here: http://lists.gpick.com/pages/Checksum_Tools.htm and another favorite is the free and platform independent open source project jacksum (http://www.jonelo.de/java/jacksum/) You can also find more information about this topic on Wikipedia at http://en.wikipedia.org/wiki/Md5
Finally, be assured we are working to find the hacker and will take any and all legal action when they are found.
About PostNuke
PostNuke is a community, content, collaborative management system, a C3MS providing webmasters with a set of tools to build a dynamically generated web site within minutes of downloading the software. It's backed by a team of dedicated, talented developers, designers, and volunteers with years of experience.
General Info About PostNuke:
Modular Structure, Customized Functionality through Third-Party Modules, Advanced User Group Permissions System, Multi-language Support (Approximately 36 Language Packs Available), Embedded WYSIWYG HTML Editor Activated on Most Text Entry Areas, Site Search, Advanced API (Application Programming Interface), Focused on High Level of Security, Easy-to-Use Guided Browser Based Installation, Easily Change/Customize Your Site's Look/Feel Through Plug-in Themes, Provides advanced content management features while promoting collaboration, communication and community around the content.
A Short List of Available Modules
News Publishing, Content Management, RSS Feeds, Voting Booth/Polls, Banners Module, Comments Module- allows other modules, including
Generated on October 26, 2004.
-
PHP 5.0.1 Released!
(News)
-
Version 5.0.1
12-Aug-2004
* Changed destructor mechanism so that destructors are called prior to request shutdown. (Marcus)
* Rewritten UNIX and Windows install help files. (Documentation Team)
* Updated several libraries bundled with the windows release which now includes libxml2-2.6.11, libxslt-1.1.7 and iconv-1.9.1. (Rob, Edin)
* Improved and moved ActiveScript SAPI to PECL. (Wez)
* Fixed unloading of dynamically loaded extensions. (Marcus, kameshj at fastmail dot fm)
* Fixed ReflectionClass::getMethod() and ReflectionClass::getProperty() to raise an ReflectionException instead of returning NULL on failure. (Sebastian)
* Fixed convert.* filters to consume remaining buckets_in on flush. (Sara)
* Fixed bug in mysqli->client_version. (Georg)
* Fixed bug #29606 (php_strip_whitespace() prints to stdout rather then returning the value). (Ilia)
* Fixed bug #29577 (MYSQLI_CLIENT_FOUND_ROWS undefined) (Georg)
* Fixed bug #29573 (Segmentation fault, when exception thrown within PHP function called from XSLT). (Christian)
* Fixed bug #29522 (accessing properties without connection) (Georg)
* Fixed bug #29505 (get_class_vars() severely broken when used with arrays). (Marcus)
* Fixed bug #29490 (.Net object instantiation failed). (Michael Sisolak).
* Fixed bug #29474 (win32: usleep() doesn't work). (Wez)
* Fixed bug #29449 (win32: feof() hangs on empty tcp stream). (Wez)
* Fixed bug #29437 (Possible crash inside array_walk_recursive()). (Ilia)
* Fixed bug #29431 (crash when parsing invalid address; invalid address returned by stream_socket_recvfrom(), stream_socket_getname()). (Wez)
* Fixed bug #29409 (Segfault in PHP functions called from XSLT). (Rob)
* Fixed bug #29395 (sqlite_escape_string() returns bogus data on empty strings). (Ilia, Tony)
* Fixed bug #29392 (com_dotnet crashes when echo'ing an object). (Wez)
* Fixed bug #29368 (The destructor is called when an exception is thrown from the constructor). (Marcus)
* Fixed bug #29354 (Exception constructor marked as both public and protected). (Marcus)
* Fixed bug #29342 (strtotime() does not handle empty date string properly). (Ilia)
* Fixed bug #29340 (win32 build produces invalid php_ifx.dll). (Edin)
* Fixed bug #29335 (fetch functions now use MYSQLI_BOTH as default) (Georg)
* Fixed bug #29291 (get_class_vars() return names with NULLs). (Marcus)
* Fixed bug #29264 (gettext extension not working). (Edin)
* Fixed bug #29258 (variant_date_from_timestamp() does not honour timezone). (Wez)
* Fixed bug #29256 (error when sending large packets on a socket). (Dmitry)
* Fixed bug #29236 (memory error when wsdl-cache is enabled). (Dmitry)
* Fixed bug #29147 (Compile Error in mnoGoSearch functions). (Sergey, Antony)
* Fixed bug #29132 ($_SERVER["PHP_AUTH_USER"] isn't defined). (Stefan)
* Fixed bug #29119 (html_entity_decode() misbehaves with UTF-8). (Moriyoshi)
* Fixed bug #29109 (SoapFault exception: [WSDL] Out of memory). (Dmitry)
* Fixed bug #29061 (soap extension segfaults). (Dmitry)
* Fixed bug #28985 (__getTypes() returning nothing on complex WSDL). (Dmitry)
* Fixed bug #28969 (Wrong data encoding of special characters). (Dmitry)
* Fixed bug #28895 (ReflectionClass::isAbstract always returns false). (Marcus)
* Fixed bug #28829 (Thread-unsafety in bcmath elementary values). (Sara)
* Fixed bug #28464 (catch() does not catch exceptions by interfaces). (Marcus)
Generated on August 13, 2004.
-
PostNuke included with YellowTip Web Server 2.0
(News)
-
Due to high demand, our developers have included a selection of the most popular Open Source packages with Web Server 2.0:
PostNuke
phpBB
b2evolution
Gallery
The YellowTip Web Server was developed to make available a highly professional and easily installable package of Apache2, PHP4, MySQL4, phpMyAdmin and Zend Optimizer for the Windows platform (Win2K, WinXP).
With a convenient all-in-one installer, all components are installed in a single directory and can be used immediately after the installation process has completed. An uninstaller allows you to remove the YellowTip WebServer from your computer.
YellowTip WebServer 2.0 is OpenSource under the GPL license.
Click here for more information about YellowTip WebServer.
Click here to download YellowTip Web Server 2.0.
Generated on May 6, 2004.
-
Interview: pnCommerce-Team
(News)
-
Who belongs to the pnCommerce team?
Patrick Cornelissen: First of all there is Mario G. (gzuki) from Priesendorf/Bavaria in Germany who just finished his military service. Next is Frank Schummertz (Landseer) from Stuttgart, Germany. He works as IT specialist in a consulting company. JimHadfield (JimHadfield) is from Big Lake, MN, USA and works there as web designer. I personally live in Bonn, Germany and study computer science and software development. And Sebastian Schürmann, who already introduced himself in another interview ;-) Then there is David, he was also with us at the developer meeting, but his is afk atm so that he also didn't participate in this interview.
Let's begin where it alle started: How did your Postnuke career start?
Patrick.c: I started with Postnuke ~2 years ago. PN was much easier to install and the administrative stuff was/is very comfortable. PN has a lot of 3rd party modules too, that was very impressive.
gzuki: And the good api!
Landseer: End of 2002 I was asked to take care of the homepage of a German dog breeder club. This is a static page with only a few regular updates and my intention was to create a portal site where everyone can contribute something. So I started searching for such kind of system, stumbled upon phpwebsite and phpNuke and finally came to PostNuke. Unfortunately they never agreed to use this system so the site is still not nuked :-(
But at the moment I am working on a nuked website of the company I am working for. It will consist of a external part with information using some static sites with Xexpress and internal sites for the employees with forums, download, employee pages, tim recording and so on.
JimHadfield: I looked at several sites and finally ended up using PN for a group (http://oldihc.org) in Dec. 2001. It's been a success since the very first day. I have PN installed on several sites with some custom modules on some of them.
When did you start working on your own module?
Patrick.c: We started the project ~February 2003
gzuki: joined the team March/April???
Landseer: The breeders club website should contain a webshop for some dog related stuff and so I began evaluating PostKart when Rex stopped development and Pat asked for volunteers to fork. I had plenty of time and so I started working on pncommerce. From January to March I worked 8 to 10 hours per day on pnc. Since two weeks I am also working on the timerecording module pnHora, which will be used on the internal webpage of the company I am working for. It is currently in pre-alpha state.
JimHadfield: From the very beginning ~February 2003
What is your development like? How do you work together?
Patrick.c: Development is a lot of work, but with a good team it's possible to handle it. We communicate by chat, ML, Forums and sometimes by telephone. We also had a developer meeing in august too. I hope that the impact on the community is big :-) because the need for a good shopping cart is evident, so we hope to get positive feedback from the users out there and maybe some more help.
Landseer: PN module development teams consists of people, who normally never meet each other in real life so I work on my own as the others do also. Important decisions have been discussed in our internal dev mailinglist or in our daily chat in our EuIRC channel #pn-commerce. This and email are the most important ways of communicationg with each other. Another big thing is the CVS at sourceforge. CVS is the best thing ever invented for people working at different places :-) Mid of August our first DevMeeting took place in Würzburg, where four of the team met for the first time (generally). Via webcam our documentation guru Jim was also connected. The main development has been done by a couple of developers who could easily agree when we had to make such decisions.
The impact of the community is big, even bigger, after we released the first alpha version. Now the people know what pnc can do and so they can give us suggestions where to go to and what to implement also. Sometimes it's hard to say "Not possible at the moment" :-).
JimHadfield: The response from the community has been fantastic. CVS is a lifesaver!
What is the biggest difficulty in your development?
Patrick.c: One problem, we had, is the bad documentation. The Module Developers Guide has a lot of unclear points and the api documentation documents functions that are not written yet. Dabase has restarted the API Documentation project, so I hope it will get better soon, but this was one of the major problems from my point of view. The unclear information flow from the PostNuke leaders should be more open. We module dev's need all informations about comming changes in API, workflow or whatever as soon as possible, to be able to consider this in our strategy. We don't have time to invent the wheel 4 or 5 times because the layout system has changed for example.
Landseer: Personally the biggest problem is that I had to learn PHP and the Postnuke API at the same time. I started programming in the late 80's with Basic, Oberon and C on an Amiga so the basics are there and the step to PHP was not so difficult.
JimHadfield: My biggest problem (?) was working with a bunch of guys that were great to work with! I don't usually get that lucky!
What features should the Postnuke .8 core have to simplify your work?
Patrick.c: The SSL support for the modurl function we gave the dev team. And Smarty :-)
Landseer: The templating engine that will be in .8 simplifies our work dramatically. We are already porting pnc to Smarty and see, how much code we are going to get rid of in pnuser/pnadmin without minimizing the shop's capabilities. Another needed thing would be generic SSL support in .8, we made a suggestion to the core devs (really easy thing), which did not make it into the .726 package, but maybe in the next one.
Which route will Postnuke/your module in your opinion go in the future?
Patrick.c: Finish Smartification, add custom properties and add the missing small tweaks. After that maybe a compatibility layer to make it possible to use the module on different Postnuke-descendants. Custom properties is one of the most demanded features. You can create for example a tshirt product with it and assign different sizes. The whole thing is very complicated because there are a lot of thigs that we have to keep in mind, so it may take a while until this is completely working.
Landseer: I don't see a clear future for Postnuke (which does not mean that I do not see any future for PostNuke!!). The information politic by the projects leaders is very poor and can be heavily improved. The open module developers mailing list is dead (at least I do not get anything from there), compared to the Xaraya dev list it is more than dead. We can be glad that the community is strong and giving support where it is needed.
JimHadfield: I have to agree with Frank.. Sometimes it is real hard to truly see where PN is going with all of their internal bickering. We will still produce a igh quality product/module that will work with it and others.
What should users of your module regard?
Patrick.c: we have some difficulties with our plugin system and windows servers, the rest works fine most of the time. 75% of all problems occur because people have not filled out the main settings, wrong permissions or missing files.
Landseer: The strongest point is that pncommerce is completely modular and that it can be easily extended. This makes it a very powerful shopping cart solution which will even get better with Smarty, there you can do things which are not possible right now. The 0.82 version still looks to much like PostKart, this is going to change in the next version. Maybe this is the weakest point. But "under the hood" there is nearly nothing from the old program left over, I guess that more than 98% of the code have been changed to meet our requirements. I think that there will be a time when you can see two completely different shops that both use pncommerce, but with their own templates and their own layout.
JimHadfield: The biggest problem?? People do not read the docs...
Anything else you always wanted to say about Postnuke/your module?
Patrick.c: We hope to provide a good module to the community and help Postnuke to cover more areas. In return I hope to get mor
Generated on October 9, 2003.
-
'Open Source' Database Poses Threat to Oracle
(News)
-
a low-cost commodity, just as the open-source Linux operating system is posing a threat to Microsoft Corp.'s Windows franchise.
One user of an open-source database is Cox Communications Inc. The Atlanta-based cable-TV operator is using the software to monitor the performance of more than 1.5 million cable modems providing customers with high-speed Internet access. Mark Cotner, manager of network application development, originally got the system up and running on spare hardware and free software he downloaded from the Web site of MySQL AB, based in Sweden. The database now has 2.4 billion rows of information, totaling about 600 gigabytes of data.
FURTHER READING
• Software Fight:1 Additional coverage, including related articles, videoclips, key documents and more.
• Meet the Players2: a look at the key players in the Oracle-PeopleSoft battle.
Once Cox management was sold on the idea, some executives suggested transferring the operation to an Oracle system, Mr. Cotner says. For Cox's system, the price for licensing Oracle's system would have totaled about $300,000, not including a service contract. But even after Cox upgraded to the commercial version of the MySQL database, the company's licensing costs were under $1,000. Mr. Cotner also pays $12,000 a year for support services.
"Spending the extra money wasn't really justified," Mr. Cotner says. "You have to have complaints before you decide to spend more money on Oracle, and we've been very happy."
Oracle remains the leader in the $13 billion-a-year market for relational databases, the underlying software needed to run more specialized business applications, such as those sold by SAP AG, PeopleSoft and Oracle itself. But the total database market is stagnant, Oracle has been losing market share to Microsoft and International Business Machines Corp., and prices are falling.
Of course, the spread of open-source software threatens all of the commercial database providers. And some analysts expect that Microsoft's SQL Server, which is generally targeted at smaller businesses, may be most immediately affected. But the premium prices Oracle traditionally has been able to command as the market leader have the farthest to fall.
"It's very hard to compete with free," says John Chen, chief executive of Sybase Inc., Dublin, Calif., the No. 4 database provider. "It lowers the price point."
Oracle executives will discuss industry trends Wednesday at an annual meeting with financial analysts at the company's headquarters in Redwood Shores, Calif. Ken Jacobs, Oracle's vice president for product strategy, says MySQL's offering "is certainly interesting, but I don't see it as competition for Oracle. Not now and not for some time to come."
He says the open-source offerings are years behind Oracle's products in terms of features and functionality. And he says Oracle doesn't specifically target the types of customers that are using MySQL to run simple Web sites, focusing instead on "mission-critical, transaction-processing applications" that crunch large amounts of data and require complex statistical analysis.
"For years I've heard people say the database is being commoditized and I don't believe that," Mr. Jacobs says, though he acknowledges that over time MySQL and other open-source offerings will compete with Oracle in some areas.
Several years ago, Microsoft dismissed the threat from Linux, but more recently it has focused on it as a primary competitor. Kevin Harvey, a venture capitalist with Benchmark Capital in Menlo Park, Calif., says open-source databases are at about the same stage of development as Linux was several years ago. Benchmark last month put up the majority of MySQL's $19.5 million round of venture financing.
"The software business is being commoditized in a lot of ways," Mr. Harvey says. Areas that are ripe for change, he argues, have three characteristics, all of which apply to database systems: They are in widespread use, the industry has settled on common standards, and new features are less important than price and performance. Like Linux, he says, MySQL will first be used in new, Web-based applications and then be pulled by customers into more traditional corporate-computing functions. "It erodes from the bottom up," Mr. Harvey says.
MySQL's chief executive, Marten Mickos, makes a virtue of his product's stripped-down simplicity. "Software shouldn't be glorified," he says. "We say, 'Let's do this as compactly as possible and then sell it at a price that blows the competition away.' "
Unlike some other open-source software companies, MySQL offers both a free open-source license and a traditional commercial license, for which the company charges a flat licensing fee of $440 for each server computer running the software.
MySQL has only about 4,000 paying customers out of approximately four million active installations, but the Finnish entrepreneur doesn't mind. "With four million users it can't be bad," Mr. Mickos says. "Big customers know that hundreds of thousands of clever Indians and Russians and Americans are using the product. The value of that [in finding bugs and adding features] is astounding. That's the true power of open source."
Oracle's pricing is based on either the number of users with access to the software or the number of microprocessors in the computer running the program. Oracle's "enterprise edition," for example, is priced at $800 a user or $40,000 a processor, plus a 22% annual fee for software updates. A less powerful "standard edition" is priced at $300 a user or $15,000 a processor, with the same 22% annual maintenance fee.
Pricing made the difference to Westone Laboratories Inc., a closely held maker of ear inserts for hearing aids and other devices in Colorado Springs, Colo. When Cal Pearson, Westone's information technology director, needed to replace the 120-employee company's overloaded customer tracking and financial database systems, he was quoted a price of more than $160,000 for Oracle's system.
Instead, Mr. Pearson's team downloaded MySQL onto a personal computer and spent less than $5,000. Even without paying for support, his developers were able to get answers to questions within minutes by posting messages on a mailing list of other MySQL users.
Now, Westone is expanding the system to three remote locations and linking its order entry system with its customer database. Mr. Pearson says he now is happily paying MySQL's modest licensing fee and several hundred dollars a year for support. "Even with my employee costs, I've yet to spend what would have been my initial expenditure on Oracle."
Write to David Bank at [email protected]
URL for this article:
http://online.wsj.com/article/0,,SB105769678653610900,00.html
For information about subscribing go to http://www.wsj.co
Generated on July 11, 2003.
-
Large Pharmaceutical Company Chooses PostNuke as Intranet Solution
(News)
-
People at Corporate are very happy with the Portal! Kicking some ASP sites butts!
:) I can't tell you the the name of the company for some issues; but, it's running on a Windows 2000 Server (this is because that is the approved O/S!) PHP 4.0 installed and we are connecting to an Oracle 9i Database! Works Perfectly!
Thanks to all of you in the community!
Keep the Good Work together!
Klax000
Generated on June 23, 2003.
-
Postnuke caching idea
(News)
-
9/11 where among others cnn.dk (which is one of the sites for which the caching was designed) went down due to insane load spikes.
As Karateka correctly states, outputting pure html can increase the performance up to 3000%. especially because you can then use i.e. a kernel web server to speed up things even more (zero-copying etc.).
Shortly put, the method worked like this:
The webserver served all pages (except pages that had to be dynamic (like welcome ) as a static page (ie. rewrite url -> static url). Then a backend system watched the Database for changes, and updated the relevant static pages, whenever a change occured that infected a given page.
This removed the normal "caching-delay" of caching systems, as every page was updated immediately, once the database change had occured (we used triggers, as it was Oracle).
This also meant that we had to find a way to allow for blocks, like "latest news" to function, without having to change every page on the system, because that block had to be updated (this was found to be best done (by the html-designers), by using Iframes - and putting that blocks in a seperate static file and letting the browser "compile" the page).
This approach, meant that the system could easily disable all none-static requests (or just give them low priority) if the load was high - keeping the rest of the site online.
A system like that, would be very cool for Postnuke, and the cool thing was that we didn't have to optimize our site-generating code - as we just inserted this caching system in front.
What do you think? would this be a good idea for Postnuke? if(!) it could be made to work with postnuke, it could be very cool.
--
Regards,
Klavs Klavsen - kl at vsen.dk - http://www.vsen.dk
Working with Unix is like wrestling a worthy opponent.
Working with windows is like attacking a small whining child who is carrying a .38.
Generated on January 27, 2003.
-
Successful PostNuke Phoenix Installation on Windows 2000 Server -- HOW TO
(News)
-
few hours trying to solve a problem that was just waiting for a reboot. Take my word for it, especially with the MySQL install.
The Config:
Hardware: PIII slot 1, 384 Megs RAM, 1 FAT32 drive(2 partitions), 1 NTFS drive (single partition)
Windows 2000 Server Sp3
IIS 5.0 included with windows 2000
PHP 4.2.3 (via installer)
MyODBC 2.50.39
mySQL 3.23.52
The Details
Windows Server
This is a multi role machine running DNS, Active Directory(AD) and other network services, and IIS. It's basically my intranet, Domain Controller(AD), File Server and development web server. It's locked down behind a router with its own security protocols, so if you hack the router, you still have to hack AD, which grants access through IP first, Domain second and user third. It's pretty tightly locked up, and its a good way to have a fairly secure development platform.
IIS
IIS is configured to run a default site, which is locked down using AD. If the machine dns name is theMachine, I can easily access the default web site using my browser and going to http://theMachine. The default site is basically a default installation with nothing on it and I use virtual directories to point to development file structures - this is documented in IIS documentation. Basically I took a default PostNuke installation file structure and copied it to a directory on one of my development partitions (I used a FAT32 partition -- no reason for it, just thought this may be a useful fact), and made that a virtual directory of the main site. If I name the virtual directory PNdev, I can now access that directory via http://theMachine/PNdev.
PHPDownload the installer version of PHP for Windows (link in heading title) stop the IIS serverexecute the php installer and follow the instructions (pay attention to the checkboxes for what kind of webserver you wish to install it on, there should be one for IIS 4.0 and up)reboot. After reboot run a search for php.ini(because I'm too lazy to look for it in the C:/Winnt folder), and change the register_globals to 'On'. NOTE: DOING THIS POSES A SECURITY ISSUE FOR THE WEBSERVER. Read about it in the PHP documentation. Now you're ready install mySQL.
MyODBC
I downloaded and installed this driver for MySQL because I'm developing some desktop packages that may be using MySQL in the future -- but it's part of the environment and thought I should mention it. Just do it if you're not sure.
mySQLdownload (link in title)and and unzip this file to it's own directory Go to IIS and stop the server!Install using the setup program and use all the default values,( if you install it other than to the default directories, don't come crying to me)reboot
After Rebooting, run a search for the my.ini file and delete it, if you don't find one - good - it means you need to create one.
Creating a my.ini file with winmysqladmin.exe
You will find a folder in c:\mysql\bin\ called winmysqladmin.exe, if you don't find it here, you screwed up somewhere or installed mysql in another directory - run a search to find it. Once you have located winmysqladmin.exe, I would advise putting a shortcut to it on your desktop.
Open winmysqladmin.exe, a window should pop up asking for a user name and password. Enter a username and password that you wish to use, this will be the MASTER USERNAME AND PASSWORD for your mysql installation. You will need this password very shortly, so write it down! Once you submit the info, look in the sys tray for an icon that looks like a trafficlight. If the 'light' is red, mySQL needs to be started. Do this by right clicking the icon, choose 'win NT' and then click 'start this service'. (If you wish to set more u/n & p/w for other users on their own dbs -read about in the mySQL documentation.)
Creating a Database with winmysqladmin.exe
If the traffic light icon is in the tray, open the gui by right clicking the icon, choose 'show me'. If not in the tray, open winmysqladmin.exe by opening from the shortcut you placed on your desktop earlier, or find it again and open it. When it opens, you will see the window appear and then disappear, look in the tray and you will see the traffic light. Right click the icon, choose 'show me'.
The GUI will appear, click on the 'Databases' Tab. Right click on the server name in the upper left frame and click 'create database'. Input a database name and click ok. This will create a new blank database. Now you are ready to install Postnuke.
PostNuke Install Notes
At this point, I am assuming that you have the files in place on the server and will refer to the directory that holds those files as 'POSTNUKEweb'. Some preliminary steps:make sure that config.php and config-old.php both are world-writable.Note that once the install/upgrade has been completed these files can be re-set to read-only.
your config file should be modified to reflect the username and password that you set up during the installation of mySQL. Remember? I told you to write them down!!! It should also reflect of the name of the database that you created with winmysqladmin.exe.
additionally your config.php file should be set to Windows. Do this by changing $pnconfig['system'] = '0'; to $pnconfig['system'] = '1'; on line 48.
KICK ITgo to your post nuke installation (i.e. http://POSTNUKEweb/install.php).
choose the language and click 'Set Language'. If this page just refreshes and you can't get beyond it, you need to change your php.ini file described above in the PHP heading.
when you get to the DB info page DO NOT check box for use with intranets, I check this on my first run through and could not log in after installation, by not checking it, I could log in fine. I have a feeling that its because of the server setup, but it works for me. You can play with this setting after install:make a backup copy of the pnSession.php file (located in the includes directory). Then, open the file in your favorite editor, and find the line (somewhere around line #88) that looks like this:
Code:
if (pnConfigGetVar('intranet') == false) {
You can toggle the intranet functionality by changing the boolean false to true and vice-versa on this line to see how you system/server/nuke responds.
By following these guidelines you can implement PostNuke pretty seemlessly on your Windows 2000 server. I haven't experimented with XP, win2k (non server), or 98, but I'll be sure to post my findings if I do.
Also, thanks to the entire dev team on PostNuke for creating a kickass solution platform --- you guys ROCK (and so does the community
Generated on October 8, 2002.