why ???

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
jazcyk
Posts: 385
Joined: Wed Sep 07, 2005 1:32 pm

why ???

Post by jazcyk »

Why does phpmyfaq use the most different datetime formats?
Almost each table seems to use its own format.

varchar(15), varchar(14), varchar(20), int(15), int(11) are found :shock:

Why not use the datetime (or timestamp when appropriate)? Actually It would make it easier to access data in a structured way with other clients.
jazcyk
Posts: 385
Joined: Wed Sep 07, 2005 1:32 pm

I forgot ...

Post by jazcyk »

the reason for this was that i tried to use the ip-tracking. I have been bothered by some or more idiot(s) who spams our faq with viagra-talk.

The table "faq_faqsessions" gives this time-info '1126182293' (int11) for a certain connection with a certain ip. How do I relate this info to the information in faq_faqfragen where time-info is in the format '20050927015550' (varchar20) ?

Further after update to 1.5.2 the "sessions" tracking in admin panel returns garbage like


Warning: opendir(/home/httpd/vhosts/webyog.com/httpdocs/faq/data): failed to open dir: No such file or directory in /home/httpd/vhosts/webyog.com/httpdocs/faq/admin/stat.main.php on line 29

Warning: readdir(): supplied argument is not a valid Directory resource in /home/httpd/vhosts/webyog.com/httpdocs/faq/admin/stat.main.php on line 30

Warning: closedir(): supplied argument is not a valid Directory resource in /home/httpd/vhosts/webyog.com/httpdocs/faq/admin/stat.main.php on line 41
0
Sessions (Visits):
2397
Visits per Day:

Warning: Division by zero in /home/httpd/vhosts/webyog.com/httpdocs/faq/admin/stat.main.php on line 48
0


The file stat.main.php exists with 1.5.2 and in another version (bigger) than was the case with 1.5.0.
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

the differen time formats have historical reasons.

I'll take a look at your issue.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
jazcyk
Posts: 385
Joined: Wed Sep 07, 2005 1:32 pm

/data -dir

Post by jazcyk »

I simply dont have the /data-dir.
I guess you never told me that I should copy this one. Or did you ?
jazcyk
Posts: 385
Joined: Wed Sep 07, 2005 1:32 pm

data dir

Post by jazcyk »

I created the data-dir and copied lastest datafile and the index.html in there and error disappeared.

i am REALLY surprised that the information found in the datafiles does not go in the database. Imposible to search the information a meaningful way when it is like this.

This "small" upgrade from 1.5.0 has been much too expensive when you must pay me for the time that I spend with it.

Please prepare the documentation on upgrade before releasing next upgrade!
jazcyk
Posts: 385
Joined: Wed Sep 07, 2005 1:32 pm

Situation ..

Post by jazcyk »

.. creating a /data-dir and copying data files from 1.5.0 into 1.5.2 removes the error msgs. from "View Sessions".

But logging of sessions is not functional any more:

Days:
21
Sessions (Visits):
2443
Visits per Day:
116.33
First Log:
08.09.2005 09:27:31
Last Log:
26.09.2005 06:04:32


And ten minutes later:

Days:
21
Sessions (Visits):
2445
Visits per Day:
116.43
First Log:
08.09.2005 09:27:31
Last Log:
26.09.2005 06:04:32

the value "2445" is what database says too. But writing to datafiles does not happen after update. The time value corresponding to "sid"variable is "1127834954"(int11);

How do I get it started again? It would be OK to and delete the data files (and even reset counter if necessary) , if that is what it takes! Any database manipulation I can handle I believe! After all that's my business.
jazcyk
Posts: 385
Joined: Wed Sep 07, 2005 1:32 pm

I hope ...

Post by jazcyk »

I hope it was a CHMOD problem only. The files in the /data-dir had no write-access after I copied them there. Now 1 entry is written after I set CHMOD to 777, so chances that that was it ..
Post Reply