Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

php coding issues


vampyr07au

Recommended Posts

OK.

 

I am new to OsCommerce ... I have never used it before ....

I am actually just helping out a friend to transport their website form one hosting company to another.

 

When we moved the site we moved it without exporting the databases properly or recreating them at the new hosting.

Had all sorts of issues with the databases not connecting and not being able to authenticate due to usernames etc.

Fixed all that and then found that although there was a working site the page was displaying a large number of deprecated code errors.

We found out that this was due to the fact that the original host used php ver 5.2 while new host used php ver 5.3

Spoke to the support people for our hosting company and they told me that since the code that was showing up as deprecated is no longer used in php 5.3 and the changes have accounted for the deprecated coding all I needed to do was to comment out the lines that were notes as being deprecated.

I did this and have now found myself getting the following error message:

 

Warning: session_save_path() [function.session-save-path]: SAFE MODE Restriction in effect. The script whose uid is 2696 is not allowed to access /tmp owned by uid 0 in /home/paradise/public_html/includes/functions/sessions.php on line 148

Warning: require() [function.require]: Unable to access includes/languages/.php in /home/paradise/public_html/includes/application_top.php on line 285

Warning: require(includes/languages/.php) [function.require]: failed to open stream: No such file or directory in /home/paradise/public_html/includes/application_top.php on line 285

Fatal error: require() [function.require]: Failed opening required 'includes/languages/.php' (include_path='.:/usr/lib/php') in /home/paradise/public_html/includes/application_top.php on line 285

 

 

Now the lines that are referred to here are these:

 

/includes/functions/sessions.php on line 148

 return session_save_path($path); 

 

and

 

/includes/application_top.php on line 285

 require(DIR_WS_LANGUAGES . $language . '.php'); 

 

 

 

Can anybody help with why this is happening?

 

Please bear in mind that I actually don't know anything about php and sql.

Link to comment
Share on other sites

I have been looking online but am not at all sure I understand just how to change the code without breaking it.

 

Current code is:

 function tep_session_register($variable) {
   global $session_started;

   if ($session_started == true) {
     return session_register($variable);
   } else {
     return false;
   }
 }

 function tep_session_is_registered($variable) {
   return session_is_registered($variable);
 }

 function tep_session_unregister($variable) {
   return session_unregister($variable); 

 

all 3 of the session_ items are giving errors on the site.

Link to comment
Share on other sites

OK have been doing some research and what I am finding is that this:

function tep_session_register($variable)

function tep_session_is_registered($variable) 

function tep_session_unregister($variable)

 

has been replaced with this:

$_SESSION["variable"]

 

Am just having a bit of trouble understanding how I am supposed to do this.

 

can anyone help me ?

 

Current code can be found in the post above.

Link to comment
Share on other sites

Mick,

 

I am not sure if the written instructions have the code edits for the sessions error, but if you check the files using a comparison tool you will find the code edits. Just apply them to your file.

 

 

 

Chris

Link to comment
Share on other sites

I'm another "newbie" and am having major trouble trying to figure out why my footer on the index page doesn't go all the way across the width, but if you click on a product - it's info page - the footer does.

 

I have no idea what is causing this and would appreciate some help.

 

www.wholesalewidgets.com

 

You'll see the index page footer aligns itself to the right, but click on any product or category, and the footer aligns correctly.

 

Any help would be tremendously appreciated.

 

Thanks!!

Link to comment
Share on other sites

Can you recommend a good and easy to use comparison tool ?

 

 

I use Beyond Compare. It's pretty slick. Its got a 30-day trial and then you have to pay, but I found if I uninstall it just before the 30-days, then re-install it, it resets the days counter.

Link to comment
Share on other sites

On a Linux system, "diff" is the standard comparison tool. On Windows, "fc" is very similar in function. Both will list the changed lines. If you want to look around, or even pay money, there are plenty of tools with fancy GUIs and color coded change reports.

Link to comment
Share on other sites

I've got Beyond Compare and am looking at using it however from what I'm seeing it is a comparison tool to compare 2 files to check differences.

 

The problem I have is that I don't have a second file to compare to.

 

What I need is a tool that will help me figure out what the correct code is in php 5.3 to replace the deprecated code from ver 5.2

 

I am so lost it isn't funny ....

 

I only have the one file which is written in php 5.2 but my new hosting uses ver5.3 and it doesn't like the deprecated functions.

Link to comment
Share on other sites

WWI

 

Having a look at your site.

The footer on your index page loads fine for me .. it is centred.

However it appears to be small in width than the one that appears on other pages.

 

 

I don't see it being centered. I do not see the footer going all across the width of the page. Also, column Right drops down on index but jumps back up on all the other pages. I can't figure out what in the world is causing these issues.

Link to comment
Share on other sites

WWI,

 

Can you post the code for the index page and then post the code for any one of the other pages for me so I can have a look.

 

I do see now that I have had time to have a proper look that there is some positioning issues on the index page.

 

Have you used any pre-formatted tables to create the columns ?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...