Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

OsC not using secure (SSL) https for checkout


Guest

Recommended Posts

OK, I want you to do a little experiment. I've not worked my way all the way through the code but I've learned enough to wonder a couple things.

 

In catalog/includes/functions/html_output.php I want you to change one thing.

 

find, near the top...

 

// The HTML href link wrapper function

 

and change the following in that same line

 

from $connection = 'NONSSL'

 

to $connection = 'SSL'

 

Remember that you're doing this (take notes) and let's see what happens. It seems like the following lines should pick up the slack.

 

You can always change it back it we screw up.

 

bump the thread after you do it.

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

  • Replies 67
  • Created
  • Last Reply

okay, i'll try that . . .

 

but, I have a little bit of a problem right now. I swear I have only been messing around with the two configure.php files, but suddenly I have been getting an error at the top of the page when you load the site. I have been trying to use older configure.php files (I have been saving several copies since messing around with them, but the error persists). The error mentions /includes/functions/sessions.php and I know that I haven't even opened that file up. Here is the error:

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /hsphere/local/home/sirpsych/acehighsupply.com/includes/configure.php:46) in /hsphere/local/home/sirpsych/acehighsupply.com/includes/functions/sessions.php on line 67

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /hsphere/local/home/sirpsych/acehighsupply.com/includes/configure.php:46) in /hsphere/local/home/sirpsych/acehighsupply.com/includes/functions/sessions.php on line 67

Link to comment
Share on other sites

You've planted white space before or after the closing or opening tags in the file.

 

Look for white space at the end after ?>

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

You are a lifesaver!!!

 

Phew. . . not that is fixed,

 

I changed the html_output.php file. Still no change at all :(

Link to comment
Share on other sites

You are a lifesaver!!!

 

Phew. . . not that is fixed,

 

I changed the html_output.php file. Still no change at all :(

OK, I've got to stop for now. Let me think about this for a while. Two of these threads at one time means it's worth figuring out.

 

Change the html_output file back for now. I've got to work backwards from there. If one of the developers pops in he'll know right away I'd bet.

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

Thanks for the help!

 

html_output is back to the way it was. Hopefully a developer will peek in here. I would like to start taking orders in a week or so.

 

I will be taking a rest now, so I won't be back to this thread until tomorrow.

 

Thanks again.

Link to comment
Share on other sites

I must add here that I have the same problem (missing images while going on https); and I found out many messages on the net about this problem... but no clear answer. Therefore, it is surely worth to find a solution :)

 

Thank you :)

Link to comment
Share on other sites

I fixed it !!!!

 

 

In the catalog/includes/local/configure.php there was one more configure file no one knew about or forgot about I just set this file up exactly as the catalog/includes/configure.php and everything works fine...

Link to comment
Share on other sites

I fixed it !!!!

 

 

In the catalog/includes/local/configure.php there was one more configure file no one knew about or forgot about I just set this file up exactly as the catalog/includes/configure.php and everything works fine...

The standard distribution has no configure.php file in the local folder. :blink:

 

README

 

This directory contains local configuration information.

 

It also must contain a file named configure.php that can be used to override

the defaults set in application_top.php

 

Remember to execute PHP commands the file needs to start with <?php and end with ?>

 

Good that you found the problem but a mystery as to why it had the file at all.

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

YES!! It worked! I also had includes/local/configure.php. After changing the file, it works perfectly!

 

Thanks keithxtreme!

 

A lot of thanks go to AlanR. I really appreciate the time and effort you put in to help! I really owe you!

Link to comment
Share on other sites

What one of you should do is just delete that extra configure file (save a copy) and see what happens. It's an extra.

 

The readme file refers to settings in application_top.php which means that it goes back to old days when some of the configuration settings were in application_top.

 

It's good that the settings were consolidated into configuration.php because we'd have lots more puzzled newbies here.

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

My local/configure.php file has all of the SQL database login information. So, when I delete the file, I just get this error:

 

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /hsphere/local/home/sirpsych/acehighsupply.com/includes/functions/database.php on line 19

Unable to connect to database server!

Link to comment
Share on other sites

Here we go:

 

From application_top.php

 

// Set the local configuration parameters - mainly for developers

if (file_exists('includes/local/configure.php')) include('includes/local/configure.php');

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

My local/configure.php file has all of the SQL database login information. So, when I delete the file, I just get this error:

 

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /hsphere/local/home/sirpsych/acehighsupply.com/includes/functions/database.php on line 19

Unable to connect to database server!

What version of osC are you running. I'm looking at MS2

 

You'll find the version in application_top.php

 

// define the project version

define('PROJECT_VERSION', 'osCommerce 2.2-MS2');

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

Oh well...

 

Who knows why you've got it then? As you can see from the code I posted, as long as all of the correct data is in the "upper" one it's not needed since the code tests for its existence.

 

No big deal as long as you've got it working. I'll remember this one for the next pserson that has problems.

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

Well... Something I missed... I have also the latest distribution, but have not this file in the "inlcude/local" directory :blink: What can I do then to correct this mistake, and bring the images up??

Thank you,

Link to comment
Share on other sites

Shenphen, I don't know the details of your problem, but . . . I have a different site (not using OsC) with a different hosting company. For this site, all of the files that I want to have access under secure sites must be in a special SSL folder on the server. Therefore, I basically have to copy the entire site into that SSL folder. If I didn't, I would get errors when loading the pages - the errors would be that the images were not accessible. Like I said, I don't know the details of your problem, but perhaps your hosting company has a similar setup? Without accessing an OsC page, can you bring up a "secure" image with no errors?: i.e. https://your_url.com/images/image.jpg

Link to comment
Share on other sites

With my hosting company (oneandone.co.uk) there is no specific SSL forlder (as far as I'm aware of). If I just add an "s" to the usual "http", it loads the pages and the lock appears correctly; and clicking on the lock give the details about my certificate.

The pages secured work fine, except that the images do not show up...

And I struggling with this since many many days...

Link to comment
Share on other sites

if your images are not showing up in https mode, right click on the broken image and see what the properties are. if shows http://domain.com/imagename then they are not being translated properly.

this should be a fairly easy problem to resolve. i did not read the whole thing, have you made any modifications to the code regarding SSL? I konw there are a few posts on the forum, and if you make any changes to ssl then all bets are off of it working correctly.

Link to comment
Share on other sites

With my hosting company (oneandone.co.uk) there is no specific SSL forlder (as far as I'm aware of). If I just add an "s" to the usual "http", it loads the pages and the lock appears correctly; and clicking on the lock give the details about my certificate.

The pages secured work fine, except that the images do not show up...

And I struggling with this since many many days...

Post the URL.

 

1&1 is well understood here and you've most likely got a setting wrong.

 

You do not need a local/configure.php file and there is no secure folder on 1&1 severs.

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

Ok. My site is http://www.dharmaling.info

In fact, the problem is not specific to OsCommerce; but I became aware of it since I had to get some secure pages within OsCommerce...

You can see that the page is ok if you follow the link. But if you use the "https", images are not there! Yet, if I right click, the path is correct!!

It's "head-banging"! :blink:

Link to comment
Share on other sites

Where do you have the store? It's not at /catalog.

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

As far as the main page goes, you're right, no images with https. Most likely because all of the image links are relative and there's no base url defined on the page.

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...