Page 1 of 1

preg_match() expects parameter 2

Posted: Mon Apr 11, 2005 5:35 pm
by ty_hill
Hello! I've just installed the script and set up a link. This link will be in an html email that goes out daily pointing the image to a page on a different server.

I am getting the following error when clicking on the image with the new link: Warning: preg_match() expects parameter 2 to be string, array given in /usr/local/apache/vhosts/autoremarketing.com/ccount/click.php on line 53
This ID doesn't exist!

The link looks like this: http://www.autoremarketing.com/ccount/click.php?id=1

The click.txt file has this entry in it: 1%%2005/04/11%%http://www.autoremarketingconferences.c ... on.html%%0%%

The ids.txt file has a "1" in it.

Can you help? What am I doing wrong? I think the script will be perfect for what I'm wanting to do once I get it working.

Thanks in advance for the time!

another weird thing along with the post above

Posted: Mon Apr 11, 2005 5:48 pm
by ty_hill
This doesn't look right to me. Shouldn't the link and ID be displaying?

Link statistics

Total links: 1
Total clicks: 0
Average clicks per link: 0.0

ID Clicks Added Web page Graph
Array

Note: For best performance you should remove links you don't use anymore by clicking the button. You can reset number of clicks on a link to 0 by clicking the button.

Posted: Mon Apr 11, 2005 8:41 pm
by Klemen
Hi,

I am not sure what could be causing this. Upload the three files in this archive to your server, should give me some debugging info:
http://www.phpjunkyard.com/extras/ccount_debug.zip

What server are you on?

Regards

files uploaded

Posted: Mon Apr 11, 2005 9:34 pm
by ty_hill
my script is located here: http://www.autoremarketing.com/ccount/.

i have uploaded the files you sent. let me know what else I can do or change.

thanks for you help!

Posted: Mon Apr 11, 2005 9:58 pm
by Klemen
Hello,

To be honest I really don't know what's wrong. I see you are on a FreeBSD server, it is possible that my scripts are just not compatible with FreeBSD. They have been tested and working on Linux, Windows and Mac OSX, but I never tested them on FreeBSD nor do I know of anyone who has.

I will probably have some more time this weekend, would you consider giving me access to your server and I will try to find the problem/edit the scripts to work there? If yes please contact me using my contact form:

http://www.phpjunkyard.com/contact.php

Regards

thanks anyway

Posted: Mon Apr 11, 2005 10:51 pm
by ty_hill
Well I appreciate your help and time anyway. This is the first php scripts we've put on this box. It could be our configuration. Thanks again!

had to edit

Posted: Sun Apr 17, 2005 1:53 am
by Lion king
i came across this site today and installed the script it did not work at first but i had to make a 1 vital change, this script is so simple and easy to use because u really dont need to change anything and u dont even have to change chmod if u have php 4.3.10

The only thing i change is the password.[/u]