Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

split page results-?


redinpdx

Recommended Posts

Posted

HI, I'm extremely new to this anyone know how I can fix this error?

 

Warning: Missing argument 4 for splitpageresults() in /home/virtual/site19/fst/var/www/html/oscom/catalog/includes/classes/split_page_results.php on line 24

1064 - You have an error in your SQL syntax near 'p.products_id' at line 1

 

select count(*) as total p.products_id

Posted

what were you ding to get that error ie which page did you click from etc

Reddy to Rumble

 

Thank you osCommerce and all who Contribute to her!

Posted

did you edit either

 

catalog/includes/modules/product_listings.php

 

or

 

catalog/includes/classes/split_page_results.php

 

???

 

If so which one?

Reddy to Rumble

 

Thank you osCommerce and all who Contribute to her!

Posted

Hi Rumble,

 

I'm getting the same error:

 

Warning: Missing argument 3 for splitpageresults() in /home2/thedvdchart/www/catalog/includes/classes/split_page_results.php on line 24

 

Warning: Missing argument 4 for splitpageresults() in /home2/thedvdchart/www/catalog/includes/classes/split_page_results.php on line 24

 

It's happening on these pages for the affiliate program:

 

Payment Report

Clickthrough Report

Sales Report

 

I haven't modified any of the pages you listed. I have just started to work through the affiliate process modifying the relevant text area information.

 

Any ideas?

Posted

Variables 3 and 4 passed to split_page_results.php are &$sql_query, &$query_num_rows. These are being passed by reference (notice the & in front of the variable). I believe this may have changed at the latest version of PHP. I am not sure. Which version of PHP are you running? If they are missing, I am wondering if they are actually pointers to nulls being sent to the calss constructor.

Posted

Taking a shot in the dark but:

 

Another thing to check as well. Look in you php.ini file and see if you have a line that looks like this:

 

allow_call_time_pass_reference = Off

 

If yours is set to 'On', you may want to set it to 'Off' and see if the problem still occurs.

 

The line 24 reference in the error messages above is the line number in split_page_results.php where the class constructor is invoked.

Posted

Hi JH,

 

My PHP Version is 4.2.2. I will check the php.ini file for

allow_call_time_pass_reference = Off

 

Here's the code on the line that's throwing up the error:

function splitPageResults(&$current_page_number, $max_rows_per_page, &$sql_query, &$query_num_rows) {

 

Thanks.

  • 3 weeks later...
Posted

Hi JM,

 

I've changed php.ini file to:

 

allow_call_time_pass_reference = Off

 

PHP Version 4.2.2

 

Still getting the following errors at the top of the page:

 

Warning: Missing argument 3 for splitpageresults() in /home2/thedvdchart/www/catalog/includes/classes/split_page_results.php on line 24

 

Warning: Missing argument 4 for splitpageresults() in /home2/thedvdchart/www/catalog/includes/classes/split_page_results.php on line 24

 

Any more ideas?

  • 4 weeks later...
Posted

Fixed it. The line in the code was wrong.

 

Was...

$affiliate_clickthroughs_split = new splitPageResults($affiliate_clickthroughs_raw, MAX_DISPLAY_SEARCH_RESULTS);

 

Changed to...

$affiliate_clickthroughs_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $affiliate_clickthroughs_raw, $affiliate_clickthroughs_numrows);

 

All now working fine.

Archived

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

×
×
  • Create New...