ComposerDainis Posted June 28, 2003 Posted June 28, 2003 Hi All, I'm working on creating a test environment for osCommerce on my Win2000 Pro machine. I'm going to search around and try to compile some related posts as quotes, then I will start asking questions. I hope that's OK. The idea is for this topic to become a place where one can find information to get through the configuration fairly easily. --Dainis
ComposerDainis Posted June 28, 2003 Author Posted June 28, 2003 Hi Dainis, Yes .. you can set up your osCommerce store on a Windows system and then transfer the store to a UNIX server system. You'll need to make adjustments with the following files: /catalog/includes/configure.php /catalog/admin/includes/configure.php Within these files, you'll need to adjust the parameters of the system such as where certain directories are located and what database the store is using and of course the password to access the database. Pretty simple really. Unfortunately, I don't have the reference info for you to look up but there's lots of info in both the WIKI and this forum. I installed the osCommerce on my Windows 2000 Pro. I used the following method (downloaded and installed): 1) Apache HTTPD Server. I didn't want to use any Microsoft products as I was going to transfer the store to a UNIX server. Apache HTTPD Server is a Web Server. Similiar to Microsoft's IIS or Personal Web Server. http://www.apache.org/dyn/closer.cgi 2) PHP Server (extension I think). This allowed me to run PHP code on my Windows system. Most UNIX systems already have this installed but Windows doesn't. http://www.php.net/downloads.php 3) MySQL Database Server. Again, I wanted to stay consistent with systems set up on a UNIX server and therefore did not want to use other products or databases. http://www.mysql.com/downloads/index.html 4) phpMyAdmin. This is an easy to use interface between you and the MySQL database(s). http://www.phpmyadmin.net/ Install all the above and you pretty well have all the tools you need to set up a store on your Windows machine. You may have noticed that you didn't have to buy any of the products you downloaded and installed. These products are very powerful and well supported by the Internet community. This is one of the reasons for it's continuing growth and success. I hope this helps, Dave
ComposerDainis Posted June 28, 2003 Author Posted June 28, 2003 ok: The only way to learn any technology is pretty much just to jump in and start doing it. That is the secret that the IT Book Publishers never really tell you. That being so, ill write (to the best of my ability) a set of steps to help guide you down the path to having osCommerce running on a server you run maintain yourself. Remember that their will most likley be a lot of questions you will have along the way that well constructed google searches can answer for you. Since you are total newbie I will start completely from scratch. I recommend you use a win32 platform since it is much easier for newbies to operate than linux. (windows 2000 server is a good choice) Once you become tools and infrastructure expert consider moving to linux, its much more stable and secure, as well as free. Make sure you install ALL of the microsoft updates so that you can feel safe that your box is as secure as it can be, ie. fully patched! You'll need an internet connection that is always on (eg. DSL, Cable, etc.) You'll need either an ISP that offers you a "static IP address" If you cant get a static IP address than youll need to get a service such as is offered by dynip (www.dynip.com). Once your server is loaded (the os loads itself pretty well if you have fairly standard equipment) use the Add/Remove Programs | Add components applet (which is found on the control panel) and turn on IIS5 which is microsoft's web server application. Its good to learn with since its very easy and intuitive to use. In your progression as a tools expert youll one day probably want to swtich over to the apache http server since its arguably a more stable and secure platform. You will also want to have a good software-based firewall. I suggest BlackIce (from http://blackice.iss.net). Close all ports except for tcp port 80 (which is the port used for the web). Since you will be using win32 as an os (operating system), i suggest you use the compression utility called winrar. For windows, its the best around. Get it from www.rarsoft.com. Once your server is all set up, create the following directories on your server: (i'll use [drive] as a variable for whichever drive letter you wish to use.) (we will talk about what to put in the below directories soon enough, for now just create the directories) [drive]:lib (to put your language files and server infrastructure files in) [drive]:stage (to put downloaded files into and decompress) ok, you have a patched and working server, now we need to get the store set up. install the .zip binary version of each of the apps below to [drive]:stage php 4.2.3 (use 4.2.3, not the newest version) :: http://www.php.net/get/php-4.2.3-Win32.zip...p/from/a/mirror mysql 4.0.12 :: http://www.mysql.com/downloads/download.ph...zip&pick=mirror openssl :: http://gnuwin32.sourceforge.net/packages/openssl.htm curl :: http://curl.sourceforge.net/download.html 1) run the mysql installer setup program to the path [drive]:mysql 2) extract the php distribution files to [drive]:libphp 3) extract the openssl distribution files to [drive]:libopenssl 4) extract the curl distribution files to [drive]:libcurl there is more than you can imagine to be learned about mysql (database) and php (scripting language) alone, to say nothing of openssl and curl. fortunatly, to get osCommerce up and running you dont really need to be a pro. The osCommerce application will largely walk you through its own set up process. One additional tool I suggest you have before beginning is: mysqlstudio :: http://www.mysqlstudio.com This program will make your working with mysql far easier than arcane sql ddl (which is powerful stuff if you know it, but with a steep learning curve if you dont.. and mysqlstudio allows you to be just as effective for matters of administering mysql) Now finally download: osCommerce 2.2 ms1 :: http://prdownloads.sourceforge.net/tep/osc...s1.zip?download and extract the files. Run the mysqlstudio installation and connect to your mysql db as "root to localhost with no password". Once your connected, create a new database named oscommerce (or whatever you want to call it) You may also want to create a db user with the same name as your database. Set up the user to connect from '%' (this means any IP address) and set a password. Grant the above user all rights on the database youve created for oscommerce. You will need to remember this db and db user for the oscommerce web-based setup process when we get there. ok now to get iis5 and curl enabled php working. set the following environment variables: you can do this by right clicking my computer | properties | advanced | environment variables and then set new system variable. PHP_HOME = [drive]:libphp OPENSSL_PATH = [drive]:libopenssl PATH = [drive]:libphpbin;[drive]:libopensslbin; PATH will already exist, simply append it delimiting entries with a ";" Ok. Now open the IIS Manager Tool (which you will find in the control panel) and create a new web site by right clicking the top of the tree and clicking New Web Site. Name the web site and browse to the web sites file system root. You should put it in a place like [drive]:internetwww[yoursite_com]. Once you have created the web root, copy the oscommerce files into this directory. Now, right click your new web site in IIS Manager and choose the Home Directory Tab. Then click the Configuration Button. Next click the Add button. For the Executable field type: [drive]:libphpbinphp.exe "%s" %s For the Extension field type: .php For Verbs, Limit To: GET,HEAD,POST Check the Script Engine option if its not already. Now click OK Your web server should now be ready to run PHP as CGI. Next you must configure the copy the php.ini file to c:winnt Edit the file: Turn on global_variables Specify your MODULES_PATH and INCLUDES_PATH Enable the CURL module in the ini's MODULES section by removing the semicolon from in front of it. save the file and test your web server by creating a file called test.php the file should have the code in it: <? phpinfo(): ?> the result of running that page if every thing is set up ok is that you will see a lot information relating to your web server and your php configuration. make sure you see a section labeled curl. to test that curl is working properly create a file called testcurl.php with code: <?php $ch = curl_init ("http://www.google.com/"); curl_exec ($ch); curl_close ($ch); ?> When you run this file you should see your web sites url displaying google. At this point copy the oscommerce files into your web root, and run http://yourdomain.com/install/install.php This will initiate the applications normal setup process and from there, you customize the app to the best of your ability through trial and error. Hope this helps and good luck. :) -Alex
ComposerDainis Posted June 28, 2003 Author Posted June 28, 2003 OK, I've downloaded and installed: 1) Apache HTTPD Server. 2) PHP Server (extension I think). 3) MySQL Database Server. 4) phpMyAdmin APACHE Now, Apache appears when I browse http://localhost. That's great, but I'm now worried that I may be serving something over the Internet whenever I'm online. Is that the case? Do I have a major security hole in my system, now that Apache is running on it? It took me a while to find the directory from which Apache is serving documents, and I fished out: ServerRoot "C:/Program Files/Apache Group/Apache2" from httpd.conf. OK, that's great, but I'd like to be able to add other directories from which to serve my development pages, and I'm not sure how. So, here's more from httpd.conf: # DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs" Now, does this mean that I can do this: # DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs" DocumentRoot "C:/AnotherDir/AnotherDir" DocumentRoot "C:/MyDir/MyWebPages" DocumentRoot "C:/DevelopmentPages/Websites" ...and would that work? Can I have multiple Document roots? Then where would those files be served? At any rate, I see resolving this issue as the first step to getting an osCommerce test environment going on my machine. I hope this topic will be fun for everyone! Sincerely, Dainis
TB Posted June 28, 2003 Posted June 28, 2003 Check out this post here: http://www.oscommerce.com/forums/viewtopic.php?t=38964 Also, if you have any specific questions with setting up an Windows webserver or osC under a windows environment, feel free to post in forum and I'll help where I can. Cheers, Tony "The price of success is perseverance. The price of failure comes much cheaper."
Recommended Posts
Archived
This topic is now archived and is closed to further replies.