SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Nov 2001
    Location
    Orange County, CA
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Storing Binary Data in MySQL, Chapter 11

    I'm currently working through the "filestore.php" file in Kevin's book. Which i must say is excellent, nice job Kevin, i've learned so much, i went though all 12 chapters in a day .

    I went through the page and only changed the dbConnections and all seems to work fine. I can upload, to the dB, I can view images, and I can delete.

    However, when i upload and/or delete an image from the dB i always get a 404 error in IE. When i hit back and refresh, the page displays the newly added image.

    My hosting company is running PHP 4.0.6 as CGI module.

    Could this be causing a problem with?
    PHP Code:
    header("Location: $PHP_SELF");
    exit(); 
    If so is there another way to pass $PHP_SELF to confirm the upload or deletion of a file?

    I've tried
    PHP Code:
    header("Location: echo $PHP_SELF"); 
    Thanks for the help.

    transmission complete - bret

  2. #2
    SitePoint Zealot theFinn's Avatar
    Join Date
    Oct 2000
    Location
    Edmonton
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try using $PATH_INFO insted of $PHP_SELF, I've found the systems that use the CGI module version have trouble with $PHP_SELF.
    - theFinn
    Creator and Project Manager, phpBB
    http://www.theFinn.net
    http://www.tarotclass.com

  3. #3
    SitePoint Member
    Join Date
    Nov 2001
    Location
    Orange County, CA
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thanks

    theFinn,
    Thanks for the help, unfortunately $PATH_INFO didn't work out. I changed the
    PHP Code:
    Header("Location: $PHP_SELF"); 
    To an echo(); and it seems to still be working fine.

    Files are uploaded and everything returns normal. It's probably like you said a weird thing that happens when PHP is running as a CGI Mod and handling $PHP_SELF.

    Thanks again.

    transmission complete - bret


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •