Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
Help with module, getting 404 on page load
  • Posted: 25.03.2005, 20:25
     
    mbuna
    rank:
    Helper Helper
    registered:
     July 2002
    Status:
    offline
    last visit:
    27.10.08
    Posts:
    166
    Howdy,

    I have a home grown module that was written by another person. I'm trying to add some functionality to it.

    So, I took a page that was working, copied to it to a new page and modified it.

    However when I go to the page via URL I get a 404 not found.

    EX: http://aquaria.info/modules.php?op=modload&name=database&file=photo_submit&id=525

    The page exists in the same dir as others that work with same perms:

    [root@fishgeeks database]# pwd
    /www/htdocs/fishgeeks/modules/database
    -rwxrwxr-x 1 www www 1151 Mar 25 09:11 photo_submit.php


    If I go to the page directly it loads, but doesn't work outside of postnuke:

    http://aquaria.info/modules/database/photo_submit.php

    Here is the code in the page:

    Code

    <?
     $modpath="modules/database/";
     $modfilepath="op=modload&name=database";
     include($modpath."DataBase.php");

    $db=new database();

    $sql="SELECT * FROM TBL_photos_updates where photo_id=$id";

    if($db->executequery($sql))
    {
      $selspeciesid=$res['species_id'];
      $txtinternal_filename=$res['internal_filename'];
      $txtexternal_filename=$res['external_filename'];
      $txtauthor_id=$res['author_id'];
      $txtsex=$res['fish_sex'];
      $txtfishage=$res['fish_age'];
      $txtdescription=$res['description'];
      $txtthumbnail=$res['thumbnail'];
    }
    else
    {
      header("location: sorry.php");
    }

    $sql="insert into TBL_photos( photo_id,species_id,internal_filename,external_filename,author_id,thumbnail,fish_sex,fish_age,description,show_flag) values('',$selspeciesid,'$txtinternal_filename','$txtexternal_filename',$txtauthor_id,'$txtthumbnail','$txtsex','$txtfishage','$txtdescription','T')";

    if($db->executequery($sql))
    {
      $sql="update TBL_photos_updates set new_photoflag='N' where photo_id=$id";
      if($db->executequery($sql))
        {
          header("location: modules.php?op=modload&name=database&file=photo_operation_update_list");
        }
    }
    else
      {
        header("location: sorry.php");
      }
    ?>


    The include exists: -rwxrwxr-x 1 www www 4176 May 15 2004 DataBase.php


    Any ideas what's going on here?

    TIA!

    --
    http://www.Aquaria.info --> 30k user PostNuke site
    http://www.EngineSubmittal.com -- Free search engine submission
  • Posted: 28.03.2005, 22:00
     
    mbuna
    rank:
    Helper Helper
    registered:
     July 2002
    Status:
    offline
    last visit:
    27.10.08
    Posts:
    166
    Is anyone able to help me with this?

    --
    http://www.Aquaria.info --> 30k user PostNuke site
    http://www.EngineSubmittal.com -- Free search engine submission

Extensions Moderation

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula