Posted: Sat Nov 12, 2005 3:47 pm Post subject: Sorry, such file doesn't exist...
When trying to upload pictures via url, or when trying to change for instance an album title the popup window says "Sorry, such file doesn't exist..."
The fist pop-up works fine. I mean, I can see the initial screen, but when I press the 'save' or 'send url' button the "Sorry, such file doesn't exist.."-part shows up.
The fun is, that when I use the gallery directly, so without php-nuke via http://www.walrecht.net/modules/gallery, it all works fine (I can upload, change album titles, etc). So I guess it is the phpnuke integration that is somehow not comple, or wrong.
I would like gallery to function within php-nuke, so does anyone have a suggestion?
I also have the html source of a Sorry, such file doesn't exist..-window, perhaps that could be of assistance:
<!-- This is a hack that's needed for the GR applet to be able to
call add_photos_refresh.php without a big ugly page popping up:
we hide the page inside the second (hidden) frame in this set. -->
----
Give us your Gallery/webserver information to get a faster answer.
Get this information from the PHP diagnostic (in the configuration wizard).
Gallery URL: http://www.walrecht.net/modules.php?name=gallery
Gallery version: 1.5.1
Apache version:3.1b (Unix) mod_ssl/2.8.16 OpenSSL/0.9.6k, release 10328100
PHP version (don't just say PHP 4, please):4.3.4
Graphics Toolkit:NetPBM
Operating system: Linux
Web browser/version (if applicable): Firefox / IE
PHP-nuke version 7.8
The CONFIG lines from the top of your block file(s):
Your gallery config.php file:
Code: ›
<?php
/*
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2005 Bharat Mediratta
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*
* $Id: gpl.txt,v 1.7.2.1 2005/09/12 22:41:29 dmolavi Exp $
*/
?>
<?php
/*
* Protect against very old versions of 4.0 (like 4.0RC1) which
* don't implicitly create a new stdClass() when you use a variable
* like a class.
*/
if (!isset($gallery)) {
$gallery = new stdClass();
}
if (!isset($gallery->app)) {
$gallery->app = new stdClass();
}
/* Version */
$gallery->app->config_version = '93';
/* Features */
$gallery->app->feature["zip"] = 0; // (missend <i>zipinfo</i> -- dit is optioneel, missend <i>unzip</i> -- dit is optioneel)
$gallery->app->feature["rewrite"] = 1;
$gallery->app->feature["mirror"] = 0; // (missend <i>mirrorSites</i> -- dit is optioneel)
Posted: Tue Nov 15, 2005 5:34 am Post subject: Re: Sorry, such file doesn
I'm having this same problem. I tried the CVS as dari suggested, but to no avail.
I did a little poking around in modules.php to see if I could possibly figure out what was going on. Here's what I discovered:
The are four instances of the message "Sorry, such file doesn't exist". I simply added a numeric identifier to each string to isolate which instance of the message was being displayed, and it turned out to be the first instance as shown below (formatted for clarity):
if ($view == 0)
{
$modpath.="modules/$name/" . $file . ".php";
if (file_exists($modpath))
{
include($modpath);
}
else
{
die("(0) Sorry, such file doesn't exist...");
}
}
Once I determined that, I proceeded to add a check into the die function to display $modpath, $name and $file.
I again attemtped to change the name of the album, and I discovered that $name was set to an empty string.
Again looking at modules.php, I could see that $name was apparently set when modules.php was parsed:
Code: ›
<?php
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2005 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
define('MODULE_FILE', true);
require_once("mainfile.php");
$module=1;
$name =$_GET['name'];
$name =trim($name);
I decided to add a print statement immediately following the trimming of $name:
Code: ›
print( "*** name=$name\n" );
Once again, I attempted to change the album name. Now when the popup window appeared for editing the name, it had *** name=Gallery at the top as one would expect. However, upon entering a new name and clicking the Save button, the error message was generated as before, but with $name set to an empty string, and the error message generated as previously described.
With Firefox, I opened up Page Info for the popup window and the referring URL to that page was:
Joined: Mar 03, 2003 Posts: 6274 Location: Washington Township, NJ, USA
Posted: Tue Nov 15, 2005 8:14 am Post subject: Re: Sorry, such file doesn
a good workaround would be to access your gallery in standalone mode (ie www.yoursite.com/modules/gallery ) and then add photos that way. _________________
Posted: Tue Nov 15, 2005 8:35 am Post subject: Re: Sorry, such file doesn
Yup that's the work arround, but full control within phpnuke would be nice
We 'll use the work arround for now, we 'll create a completely new site pretty soon. Perhaps that will solve some of our problems.
Posted: Tue Nov 15, 2005 8:58 am Post subject: Re: Sorry, such file doesn
If anyone's interested, here's how I fixed the problem. Inside modules.php, I added this line:
if( $name == '' ) $name = $_REQUEST[ 'name' ]; // note: those are TWO single quotation marks in the comparison, not one double quote
See the code block for details.
Code: ›
<?php
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
$name =$_GET['name'];
/* Copyright (c) 2005 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
define('MODULE_FILE', true);
require_once("mainfile.php");
$module=1;
$name =$_GET['name'];
if( $name == '' ) $name = $_REQUEST[ 'name' ]; // <== add this line
Posted: Sun Apr 23, 2006 1:18 am Post subject: Re: Sorry, such file doesn't exist...
I will also like to post a VERY big thank you, solution works perfectly. Weird thing is, I just updated from 1.5.1 to 1.5.3, and suddenly this problem appeared.
put this one line in, and problem solved .. Not the cleanest coding hack, but hell, it works
I'm still curious about exactly what is borked, but for now, don't have time to find out
Posted: Wed Sep 20, 2006 5:58 am Post subject: Re: Sorry, such file doesn't exist...
OMG THANK YOU so much for this! I have been digging and digging to be able to FULLY integrate Gallery 1.5.3 into my nuke site and this little snippet of code was the answer!
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum