Jump to content

Recommended Posts

Posted

I installed PHPAction...all went well...but... When I created a test item for auction there appears to be an issue with the timestamp. You can see the single item here: http://auction.johnlathrop.com/index.php

 

Look at the date last created auctions...it is messed up. Dates are messed up in other display locations.

 

I'm wondering if anyone has had success with this program...or has seen the problem as well. I thought I would ask before I start digging into it...

Posted

It appears that the PHPAuction code has a problem with our version of MySQL...??? In any case these are my observations while looking at the listauctions.php file...

 

The code retrieves the date in typical fashion:

 

$tmp_date = mysql_result($result,$i,"starts");

 

The value of $tmp_date in my example is: 2007-02-21 22:45:33

 

Then the code attempts to parse out the year, month and day parts:

 

$day = substr($tmp_date,6,2);

$month = substr($tmp_date,4,2);

$year = substr($tmp_date,0,4);

$date = "$month/$day/$year";

 

The only problem with this that is it is picking up the dashes. The result is that the value of $date is "-0/2-/2007" as displayed.

 

I found that if I insert this line just before the date parsing the result is as desired:

 

$tmp_date = ereg_replace("/|-|:|\ |\.|,","",$tmp_date);

 

$tmp_date becomes "20070221224533" and $date becomes "02/21/2007"

 

Now I just need to find all of the other places in code where dates are used. This doesn't sound very "Fantastico". :shocking:

 

I'm not a PHP or MySQL expert...is there an easier solution?

Posted

A couple of files have code like this:

 

$ends = substr($item[ends],6,2)."/".substr($item[ends],4,2)."/".substr($item[ends],0,4);

 

That I changed to this:

 

$tmp_ends = $item[ends]; //added

$tmp_ends = ereg_replace("/|-|:|\ |\.|,","",$tmp_ends); //added

$ends = substr($tmp_ends,4,2)."/".substr($tmp_ends,6,2)."/".substr($tmp_ends,0,4); //added

 

The dates seem to work now...I think I found all of the spots that needed a fix. :shocking:

Posted (edited)

This is my last word on this subject of PHPAuction provided by Fantastico. Don't use it! :eek:

 

After the date parsing fixes I found a few more things I'm still working on:

 

1) Email confirmation when a user registers is not working...no email is sent. (However, an email confirmation is sent when a user submits an item to be sold...so, there's an opportunity for comparison)

 

2) SQL problem is encountered when a bid is entered...it is probably related to the timestamp:

 

Database access error. Please contact the site administrator.

update PHPAUCTION_auctions set current_bid=10000,starts=2007-02-22 23:25:28,ends=2007-02-25 23:25:28 where id="3c5d32571e80ee9d33e3d64f918c0755"

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '23:25:28,ends=2007-02-25 23:25:28 where id="3c5d32571e80ee9d33e3d64f918c0755"' at line 1

 

Too many problems with this product :shocking: ...but, I'm a little determined now to get it working. :wallbash:

Edited by LATH
Posted

Well, I got the bidding to work :) ...more date issues.

 

The registration confirmation email is working too...strange issue...won't even go into it.

 

I just want a cheap site to try to auction off 100s of old early 1900 postcards and other things...drop the bait and see if anyone bites...EBay is too expensive for this kind of thing.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...