1
josez
DB insertion problem after site transfer
  • 2005/3/23 17:52

  • josez

  • Just popping in

  • Posts: 19

  • Since: 2005/2/11


Hi,
i'm currently transfering my XOOPS site to a different web-hoster.
after transfer i'm not able to post to forums and comments, etc.. allways getting "Could not insert forum post" error.

it's probably some promblem with writing to DB, but it's strange because using same user name and password i am able to insert or create tables on DB using PHPMyAdmin...

also it is not the problem with http referer (since i have changed the referer check procedure and posting worked on old site)

can anybody help me?

2
Mithrandir
Re: DB insertion problem after site transfer

9 times out of 10 it is caused by the HTTP REFERER being blocked.

Is this in a redirect screen, you get that message? Otherwise turn on MySQL debug and look for queries marked in red.

3
josez
Re: DB insertion problem after site transfer
  • 2005/3/23 18:21

  • josez

  • Just popping in

  • Posts: 19

  • Since: 2005/2/11


i have turned the MySQL debug on, but i was still getting only "errors none" or the orher message about not being able to post... there were no debug listings.
and now another error popped out - when i click administration menu i get "This is your first time to enter the administration section. Press the button below to proceed."
and when i click submit, the same page appears

4
Mithrandir
Re: DB insertion problem after site transfer

And you are sure the HTTP REFERER is not being blocked - or that the check is disabled? That would cause both of those errors.

Try - provided you use a firewall - to turn off your software firewall and try again. If it works, the firewall IS blocking the HTTP REFERER and that is causing problems.

5
josez
Re: DB insertion problem after site transfer
  • 2005/3/23 18:42

  • josez

  • Just popping in

  • Posts: 19

  • Since: 2005/2/11


i use windows (xp) firewall. i have turned it off and still have the problem. anhow, i use modified referer check function in file include/functions.php

function xoops_refcheck($docheck=1)
{
$ref xoops_getenv('HTTP_REFERER');
if (
$docheck == 0) {
  return 
true;
}
if (
$ref == '') {
  return 
true;//the very original
  //return true;//hacked code
}
if (
strpos($refXOOPS_URL) !== ) {
  return 
false;
}
return 
true;
}


i can think of two things which could cause the problem:
1. the DB is on a different server then the web (so i had to change 'localhost' in mainfile.php to actual server name)

2. the site domain is not yet transfered/registered so i left blank variable XOOPS_URL in mainfile.php and i'm testing the web by putting my hostname to file windows/system/etc/hosts on my computer along with the webhoster's server IP adress

6
josez
Re: DB insertion problem after site transfer
  • 2005/3/23 18:45

  • josez

  • Just popping in

  • Posts: 19

  • Since: 2005/2/11


ooouu.. now that bounced me to my eyes.. the third check in the procedure... and no host name.. sorry..

7
josez
Re: DB insertion problem after site transfer
  • 2005/3/23 18:47

  • josez

  • Just popping in

  • Posts: 19

  • Since: 2005/2/11


ok, it works now. problem solved. sorry for bothering, i'm stupid....

Login

Who's Online

253 user(s) are online (141 user(s) are browsing Support Forums)


Members: 0


Guests: 253


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits