Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Running/Testing OSCommerce Locally


Guest

Recommended Posts

Hi All,

 

Simple question, but I'd rather err on the side of caution.

 

What do I need to install on my local system in order to run/test osc before uploading it to the store host?

 

TIA,

 

Dave

Link to comment
Share on other sites

xampp or wampp.

 

This includes apache, and php

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Geoffrey,

 

Downloaded and installed xampp. Install seems to go correctly, at least no error messages. Everything seems to be there. Now, how do I run my store files as if a customer was accessing the store online?

 

All installed files are in a folder - C:\xampp off the root.

Dave

 

xampp or wampp.

 

This includes apache, and php

Link to comment
Share on other sites

Normall it install to c:\probram files\xampp

 

In that directoy is one called htdocs

 

Unzip the download and either copy the contents of the directory catalo into htdocs. Or move the cATALOF DIRECTORY INTO HTDOCS.

 

Now from the Apache Friends Menu run Control XAMPP Server Panel.

 

Make sure apache and mysql are running

 

In a web browser enter the address

 

http://localhost/

 

or

 

http://localhost/catalog/

 

And away you go.......

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

I reinstalled into C:\Program Files\xampp . There is a folder named htdocs, but there in no folder named catalo (or catalog). What do you suggest on that? I'm assuming that if the catalo/catalog folder doesn't exist, I can't complete the steps you've given me below, right?

 

Normall it install to c:\probram files\xampp

 

In that directoy is one called htdocs

 

Unzip the download and either copy the contents of the directory catalo into htdocs. Or move the cATALOF DIRECTORY INTO HTDOCS.

 

Now from the Apache Friends Menu run Control XAMPP Server Panel.

 

Make sure apache and mysql are running

 

In a web browser enter the address

 

http://localhost/

 

or

 

http://localhost/catalog/

 

And away you go.......

Link to comment
Share on other sites

Sorry must proof read more thoroughly

 

for

 

Unzip the download and either copy the contents of the directory catalo into htdocs. Or move the cATALOF DIRECTORY INTO HTDOCS.

 

read

 

Unzip the OSC download and either copy the contents of the directory catalog into htdocs. Or move the catalog directory into htdocs.

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

I feel your pain, my fingers get ahead of my brain when I'm typing sometimes also.

 

I copied the contents of the osc/catalog folder to the xmapp/htdocs folder as well as the folder itself. Then, I made sure Apache and MySql were running. I entered http://localhost/catalog/ in my browser window (did it in both IE and Firefox, just to be sure). All I got was an error that reads 'Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again

'.

 

I know I'm wearing my welcome thin, but do you have any more ideas?

 

Dave

 

Sorry must proof read more thoroughly

 

for

 

Unzip the download and either copy the contents of the directory catalo into htdocs. Or move the cATALOF DIRECTORY INTO HTDOCS.

 

read

 

Unzip the OSC download and either copy the contents of the directory catalog into htdocs. Or move the catalog directory into htdocs.

Link to comment
Share on other sites

I have the same problem Dave.

 

C:\xampp\htdocs\catalog

 

I type in the browser http://localhost/catalog and receive the same error message - The page cannot be found

 

I don't know if having IIS activated has anything to do with it? Because if I type in http://localhost I'm greeted with a page that say's - Welcome to Windows XP Professional Your Web service is now running. You do not currently have a default Web page established for your users. To add documents to your default Web site, save files in c:\inetpub\wwwroot\.

 

Also I need too figure out how to get my database from my host to xampp... :blush:

- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Link to comment
Share on other sites

It seems to be a good idea to test before you upload it to go live.

 

However, there is no way( I couldn't find any solution) to test the security issues!

 

You are not able to setup a SSL server on you local machine to do the test.

Link to comment
Share on other sites

SSL is a commonly-used protocol for managing the security of a message transmission on the Internet. SSL uses a public-and-private key encryption system, which also includes the use of a digital certificate.

 

So to put simply it's security for your visitors and their private data when they enter information on your web-site

there's really no way to test that (none that I know of) on your local system

 

why would you need to anyway?

 

were you able to open your catalog through xampp?

Link to comment
Share on other sites

To get the store working on your local server.

 

1. install xampp.

2. access the xammpp control panel and start apache and mysql.

3. install both as services as well ( the checkboxes at the the left ) make sure the status shows as running for both.

4. try opening 127.0.0.1. that will open xampp default page. click on phpmyadmin. it will take you to 127.0.0.1/phpmyadmin/

5. there create a new database

6. Take the .sql backup of your store in a file and click on import and upload the file in the import interface.

7. Now in teh folder when you have installed the xampp. you will find a folder htdocs. Copy all your store files there.

8. open the includes/configure file and make suitable changes to reflect the new server 127.0.0.1 ( instead of your store path )

9. also change the database parameters accordingly.

10. make similar changes to admin/includes/configure.php file as well.

11. Try opening 127.0.0.1/index.php.. it should open the store as in teh web browser if all setting were done right :thumbsup:

 

OR

1. follow steps 1 to 5 as above

2. download the latest oscommerce install and unzip it to the htdocs folder in xampp installation directory.

3. try opening 127.0.0.1/index.php ( if the index.php file is in the htdocs folder if in a subfolder like htdocs/store.. then try 127.0.0.1/store/index.php )

4. you will be taken to a install interface. install with thenecessary details and a default oscommerce system is on your system

5. copy the configure.php file in includes and admin/includes folder to your store back up (you have downloaded).

6. now copy all your store files to the same location as the default installation ( replacing the existing files ).

7. got o database. delete all the tables created in the database by the default install.

8. import your sql back up to the database ad your site is up at 127.0.0.1/index.php ( if the index.php file is in the htdocs folder if in a subfolder like htdocs/store.. then try 127.0.0.1/store/index.php )

 

Let me know f you need more help.

:-" :-" :-" :-"

Cheers

Hari

 

Someone some hints on SSL please.. I dont know much about that one :(.. never meant that for a loca install ) :blush:

Link to comment
Share on other sites

Thank you Hari that was a big help in the right direction. I have gotten much closer to it working.

To get the store working on your local server.

 

1. install xampp.

---Previously done.

2. access the xammpp control panel and start apache and mysql.

---Did it

3. install both as services as well ( the checkboxes at the the left ) make sure the status shows as running for both.

---Did it

4. try opening 127.0.0.1. that will open xampp default page. click on phpmyadmin. it will take you to 127.0.0.1/phpmyadmin/

---Works now, did it

5. there create a new database

---Did it

6. Take the .sql backup of your store in a file and click on import and upload the file in the import interface.

---Did it

7. Now in teh folder when you have installed the xampp. you will find a folder htdocs. Copy all your store files there.

---Previously copied the entire catalog folder there

8. open the includes/configure file and make suitable changes to reflect the new server 127.0.0.1 ( instead of your store path )

---Changed it to http://localhost

9. also change the database parameters accordingly.

---'DB_SERVER', '' | 'DB_DATABASE', 'handesho_cars1' = same name

10. make similar changes to admin/includes/configure.php file as well.

---Ditto

11. Try opening 127.0.0.1/catalog/index.php.. it should open the store as in teh web browser if all setting were done right :thumbsup:

---Received error message - Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file or in the .htaccess file in your catalog directory.

 

Let me know f you need more help.

whistling.gifwhistling.gifwhistling.gifwhistling.gif

Cheers

Hari

 

Here is a copy of the .htaccess file in the C:\xampp\htdocs\catalog folder -

 

# $Id: .htaccess,v 1.3 2003/06/12 10:53:20 hpdl Exp $

#

# This is used with Apache WebServers

#

# For this to work, you must

 

include the parameter 'Options' to

# the AllowOverride configuration

#

# Example:

#

# <Directory "/usr/local/apache/htdocs">

#

 

AllowOverride Options

# </Directory>

#

# 'All' with also work. (This configuration is in the

# apache/conf/httpd.conf

 

file)

 

# The following makes adjustments to the SSL protocol for Internet

# Explorer browsers

 

<IfModule mod_setenvif.c>

 

 

<IfDefine SSL>

SetEnvIf User-Agent ".*MSIE.*" \

nokeepalive ssl-unclean-shutdown \

downgrade

 

-1.0 force-response-1.0

</IfDefine>

</IfModule>

 

# If Search Engine Friendly URLs do not work, try enabling the

# following

 

Apache configuration parameter

#

# AcceptPathInfo On

 

# Fix certain PHP values

# (commented out by default to prevent errors

 

occuring on certain

# servers)

#

#<IfModule mod_php4.c>

# php_value session.use_trans_sid 0

# php_value register_globals 1

#</IfModule>

 

I would assume changing the 1 to something else should fix the problem, I tried a 0 and a 2 with no luck. I can't seem to locate the php.ini file as mentioned in the error message, not sure where xampp might have that stored.

 

Any ideas how to tell xampp to turn ON register globals? :blush:

- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Link to comment
Share on other sites

Thank you Hari that was a big help in the right direction. I have gotten much closer to it working.

Here is a copy of the .htaccess file in the C:\xampp\htdocs\catalog folder -

 

# $Id: .htaccess,v 1.3 2003/06/12 10:53:20 hpdl Exp $

#

# This is used with Apache WebServers

#

# For this to work, you must

 

include the parameter 'Options' to

# the AllowOverride configuration

#

# Example:

#

# <Directory "/usr/local/apache/htdocs">

#

 

AllowOverride Options

# </Directory>

#

# 'All' with also work. (This configuration is in the

# apache/conf/httpd.conf

 

file)

 

# The following makes adjustments to the SSL protocol for Internet

# Explorer browsers

 

<IfModule mod_setenvif.c>

 

 

<IfDefine SSL>

SetEnvIf User-Agent ".*MSIE.*" \

nokeepalive ssl-unclean-shutdown \

downgrade

 

-1.0 force-response-1.0

</IfDefine>

</IfModule>

 

# If Search Engine Friendly URLs do not work, try enabling the

# following

 

Apache configuration parameter

#

# AcceptPathInfo On

 

# Fix certain PHP values

# (commented out by default to prevent errors

 

occuring on certain

# servers)

#

#<IfModule mod_php4.c>

# php_value session.use_trans_sid 0

# php_value register_globals 1

#</IfModule>

 

I would assume changing the 1 to something else should fix the problem, I tried a 0 and a 2 with no luck. I can't seem to locate the php.ini file as mentioned in the error message, not sure where xampp might have that stored.

 

Any ideas how to tell xampp to turn ON register globals? :blush:

 

well i had done this once.. give me a few minutes.. of you can just search for the file php.ini in the xampp folder. the php.ini file itself gives a lot of info in this regard. you can open it in a normal text editor ( no notepad PLEASE ) and search for REGISTER_GLOBALS and manually edit it.. I will try from myside and let you know the details if I get there before you do ;)..

 

cheers

Hari

Link to comment
Share on other sites

well i had done this once.. give me a few minutes.. of you can just search for the file php.ini in the xampp folder. the php.ini file itself gives a lot of info in this regard. you can open it in a normal text editor ( no notepad PLEASE ) and search for REGISTER_GLOBALS and manually edit it.. I will try from myside and let you know the details if I get there before you do ;)..

 

cheers

Hari

 

 

Also you will find a lot of php.ini files. I am not very sure which one is the ctual config file.. I compeltely forgot tht part.. :(

 

Hari

Link to comment
Share on other sites

Hey seems like editingt eh following file will work.. google helped out ;)

 

\xampp\apache\bin\php.ini

 

Regards

Hari

 

Thank you Hari I also found that and edited it. I am one more step closer I think... :huh:

 

When I type the URL of http://localhost/catalog/index.php or even (I changed it in my configure.php files also to match) http://127.0.0.1./catalog/index.php it takes me to the install directory and screen of osCommerce http://127.0.0.1/catalog/install/index.php automatically. :o

 

Any ideas why that is happening instead of letting me see my osC index.php file?

Or better yet any idea how to fix it?

 

:blush:

 

I truely appreciate all the help and am sorry to keep bothering for more. :(

- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Link to comment
Share on other sites

Dave

 

Long time since I have done this and I might have renamed everything in my xampp folder to get it working my way.

 

Try

 

http://127.0.0.1/xampp/

 

http://127.0.0.1

 

and / or

 

http://localhost/xampp

 

http://localhost

 

One of these should bring up the xampp intro page. You can change the php version from this page. Then you might need to edit the php.ini file

 

Using this info look at the directory structure and try to work out where the index page for osc is.

 

Could be

 

http://127.0.0.1/xampp/catalog/

 

Then when you open it it should start prompting you through the installation process. This will create the mysql db as it goes through.

 

jhande already had a shop set up and was copying it down to his local pc where, as I understand it, you are going to develop and test on your pc before moving it to your host server.

 

Think about using subversion/tortoise so you can get it working, take a copy, install a contribution get it working, take a copy etc.

 

Then if it all goes wrong you can restore to a known good point and start again.

 

(This will probably happen several times as missing semi-colons and curly brackets can be a pig to find)

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Thank you Hari I also found that and edited it. I am one more step closer I think... :huh:

 

When I type the URL of http://localhost/catalog/index.php or even (I changed it in my configure.php files also to match) http://127.0.0.1./catalog/index.php it takes me to the install directory and screen of osCommerce http://127.0.0.1/catalog/install/index.php automatically. :o

 

Any ideas why that is happening instead of letting me see my osC index.php file?

Or better yet any idea how to fix it?

 

:blush:

 

I truely appreciate all the help and am sorry to keep bothering for more. :(

 

Hey no issues at all.. proceed with teh install it wont overwrite any of the files.. it will write int eh configure file only.. then dont forget to import the database.. sorry not good at the install part of the oscommerce..

if you ahev the index.php file in xampp/htdocs file then you would be able to access it at 127.0.0.1/index.php .. at the end of the install you will get the exact URLs anyways.. let me know if you still see issues.

 

cheers

Hari

Link to comment
Share on other sites

Thank you guys for all your help, I truely do appreciate it. :thumbsup:

 

Ok, I finally got to see my index.php file in my browser screen. (w00t)

 

I fixed up my configure.php file naming structure problems, renamed my install directory, had to fix a password problem in my database and can view it with the URL of http://127.0.0.1./catalog/index.php

 

I now need to fix two more problems (error messages) if possible.

 

I need to install a tmp directory somewhere for the sessions -

Warning: session_start() [function.session-start]: open(/tmp\sess_bcbd970b2b0ea3a0b4e6cde4f45fe93b, O_RDWR) failed: No such file or directory (2) in C:\xampp\htdocs\catalog\includes\functions\sessions.php on line 97

warning.gif Warning: The sessions directory does not exist: /tmp. Sessions will not work until this directory is created.

 

I also need to change the permissions of the configure.php files within the xampp directory structure (I'm lost on that too) -

warning.gif Warning: I am able to write to the configuration file: C:/xampp/htdocs/catalog/includes/configure.php. This is a potential security risk - please set the right user permissions on this file.

 

The reason I am trying to get all this to work is because I have always had a copy of my store files/structure on my PC. I would edit files in Dreamweaver 8 but could not see hardly any changes and nothing but PHP place holders. I always had to save an old copy, upload my revised edition to the server to see how the changes took place. I'd like to see them either within Dreamweaver or at least on my PC before uploading on my sloowwww dialup.

- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Link to comment
Share on other sites

Thank you guys for all your help, I truely do appreciate it. :thumbsup:

 

Ok, I finally got to see my index.php file in my browser screen. (w00t)

 

I fixed up my configure.php file naming structure problems, renamed my install directory, had to fix a password problem in my database and can view it with the URL of http://127.0.0.1./catalog/index.php

 

I now need to fix two more problems (error messages) if possible.

 

I need to install a tmp directory somewhere for the sessions -

Warning: session_start() [function.session-start]: open(/tmp\sess_bcbd970b2b0ea3a0b4e6cde4f45fe93b, O_RDWR) failed: No such file or directory (2) in C:\xampp\htdocs\catalog\includes\functions\sessions.php on line 97

warning.gif Warning: The sessions directory does not exist: /tmp. Sessions will not work until this directory is created.

 

I also need to change the permissions of the configure.php files within the xampp directory structure (I'm lost on that too) -

warning.gif Warning: I am able to write to the configuration file: C:/xampp/htdocs/catalog/includes/configure.php. This is a potential security risk - please set the right user permissions on this file.

 

The reason I am trying to get all this to work is because I have always had a copy of my store files/structure on my PC. I would edit files in Dreamweaver 8 but could not see hardly any changes and nothing but PHP place holders. I always had to save an old copy, upload my revised edition to the server to see how the changes took place. I'd like to see them either within Dreamweaver or at least on my PC before uploading on my sloowwww dialup.

 

no issues man..

 

1. tmp folder issue..

 

create a new directory in catalog folder i believe as you had set in teh cache settings

 

2. change the permissions to read and execute alone.. that must work your way out.. but sometimes in windows it doesnt.. so in such a case just leave it cos anyway you re not going to upload the configure.php file onto the server ;)

 

cheers

Hari

Link to comment
Share on other sites

no issues man..

 

1. tmp folder issue..

 

create a new directory in catalog folder i believe as you had set in teh cache settings

 

2. change the permissions to read and execute alone.. that must work your way out.. but sometimes in windows it doesnt.. so in such a case just leave it cos anyway you re not going to upload the configure.php file onto the server ;)

 

cheers

Hari

 

Thanks again Hari

 

1. In my Admin Panel it shows the Session Directory as /tmp. So I went to my host CPanel > Filemanager and found this -

/home/handesho/tmp unfortunately I can not find any other tmp folder directory and of course here is the structure to the actual site - /home/handesho/public_html/catalog. I tried putting a tmp folder in C:\xampp, C:\xampp\htdocs, and C:\xampp\htdocs\catalog all of which didn't work. So I am at a lose as to what and where to place this folder. Maybe I can edit the sessions.php file in my xampp test folder so it stops looking for it somehow? Whichever way might be the easiest and I don't know either.

 

2. My problem is I do not know how to change the permissions of the file without my friendly CPanel > Filemanager.

 

I realize I could just ignore the error messages but there are so many duplicates on the top and bottom of the page I won't really get to see what my page edits look like.

- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Link to comment
Share on other sites

I appologize Dave for hijacking your thread. :(

 

I hope some of the problems that I have been having and getting help with have also been helpful for you.

 

Again, I am truely sorry... :blush:

- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Link to comment
Share on other sites

I appologize Dave for hijacking your thread. :(

 

I hope some of the problems that I have been having and getting help with have also been helpful for you.

 

Again, I am truely sorry... :blush:

 

common man.. problems are just as common as solutions .. it is good if all similar issues are brought in together.. thanks for asking so many it reveals the ignorance in me ;)

 

1. the /tmp.. do one thingin your local do you really nead a cache.. so diable cache and the sessionss file will not try to find it i feel ;)..

 

2. the errors messages are shown first and then the page is displayed.. the error messages donot show up on top of the page so you need not worry about that as well. however, if you do want to aoid such messages try the following:

i) make the file configure.php just read only.

 

I generally ignore the message.. sorry I myself dont know how to set permissions on windows :( :( somebody help .. :( :(

 

Hari

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...