PHP problem with path of URL when submitting thread....

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Derek Fermstad
    New Member
    • Jan 2006
    • 26
    • 2.3.0

    PHP problem with path of URL when submitting thread....

    I am running PHP 5.2.5, and mySQL 5.0.51b.

    It's all running on a lotus domino server.

    In order to get domino to work with PHP, I have php running as a cgi. So I have to have cgi-force-redirect set to 0 in my php.ini.

    Here is what is happening:
    In my test 3.7 vB forum, if you submit a new thread, the thread gets saved, but the URL that you are redirected to, is losing the path info.

    For example, when you are posting a new thread, you are here:
    http://www.crazyspeed.com/crazyspeed/forums/newthread.php?do=newthread&f=2
    and then when you submit you end up here:
    http://www.crazyspeed.com/showthread.php?p=12#post12
    but you need to be here:
    http://www.crazyspeed.com/crazyspeed/forums/showthread.php?p=12#post12

    I am seeing similar problems when trying to run the upgrade process with my mySQL database from an older version of vBulletin. I think it was version 2.3. When I try to upgrade with the 3.7 upgrade scripts, there is a database error at step 5 saying some certain table doesn't exist. So I also tried upgrading with the 3.0.3 vB files first. That upgrade process has a similar problem to my 3.7 forum, a redirect is losing the path info.
    For example, from:
    www.crazyspeed.com/crazyspeed/vBulletin303Test/install/upgrade.php
    I end up here with an error that the file cannot be found:
    www.crazyspeed.com/upgrade.php?step=5
    The error is because the path isn't there. I tried replacing the path and leaving the ?step=5, but it takes me back to the same place, losing the path.

    Similarly, I've had other URL path related problems, for example there was one example where I got redirected to a url that had an extra slash after the php filename and before the query string... I can't recall the exact url right now, but something like this:
    www.server.com/path/path/script.php/?step=5

    And another example, when I was using bigdump.php to get my db export imported on another server, the bigdump.php was showing links and having automatic redirects, actually duplicate the path info, AND add the extra slash.

    So, I was trying to run:
    www.server.com/bigdump/bigdump.php
    The link to start the import, and the subsequent automatic redirects, took me to a URL like this:
    www.server.com/bigdump/bigdump.php/bigdump/bigdump.php/?start&etc.

    I had to go in and hard code the URL for the automatic redirects, to get it to work. the variable that the bigdump script was trying to use was something like:
    $_SERVER["PHP_SELF"]

    Now, I don't have enough php coding experience, but I'm assuming that is a PHP server variable, and I'm assuming vbulletin is using a similar variable to redirect various pages in my situations above. So I'm guessing this is being caused by something in my PHP setup configuration (php.ini), but I can't for the life of me figure out what. I have to have cgi-force-redirect = 0 in order for php to work at all on my server. And my server uses the php-cgi.exe file instead of php.exe. (On the other hand php 4 works for me with php.exe, but php 4 cannot seem to connect to either a mySQL 4 or mySQL 5 db - it errors out talking about the mysql server's requested authentication method not supported by client).

    I have played around with using "doc_root" or leaving it blank. I have played around with cgi-fix-pathinfo, and this doesn't seem to help either. If I set cgi.fix_pathinfo=0, then my php scripts stop working entirely.

    I'm 99% sure this is related to my php setup and I just need to find what php.ini variables need to be set to what to make this problem stop.

    Anyone have any ideas or had any similar experiences??

    Please any thoughts could help provide clues.

    Thanks,
    Derek
  • Derek Fermstad
    New Member
    • Jan 2006
    • 26
    • 2.3.0

    #2
    another possibly important piece of info

    You should also know that I am also trying to get my older version of vBulletin working on this same server, as an alternative solution, and so that I can eventually upgrade that version to 3.7 or higher, since that old version has the actual data for my community.

    Here is what I find so interesting, and at the same time baffling...

    I have the older version of vbulletin also installed on the same server, on php 5 and mysql 5. And on that forum, submitting a new thread WORKS fine! You get redirected to a page that says something about "thank you for posting and you'll be redirected to your post." etc. So, NO LOSING OF THE PATH INFO in that version.

    However, I have another problem with the old version of vbulletin. I had to export my data from a hosted server account (using phpMyAdmin) and then import it onto my server (using bigdump.php) and I have almost everything working, except for the fact that when i try to post a REPLY to any thread, (pre-import or post-import), I get a mySQL error:

    mysql error: Unknown column 'user.styleid' in 'on clause'

    mysql error number: 1054

    I also DO LOSE the path info in other various places, like when I log into the admin/index.php section of that forum, it logs me in but takes me to my server's root url. I have to re-type the admin/index.php url and then I'm in.

    Does this provide any extra clues as to what might be happening with PHP? vb staff, do you guys know what php server variables are being used by the scripts in these situations and can you trace that to tell me what php.ini variables need to be set to what?

    Any ideas?

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...