[Xerte] XOT install - down the rabbit hole
Patrick Lockley
Patrick.Lockley at nottingham.ac.uk
Tue Dec 1 14:43:45 GMT 2009
Ah young grasshopper, your code shows much promise.
However, this code, I would suggest, is much more zen (obviously remove
the spurious bits post testing it works)
<?
/**
*
* upload page, used by xerte to upload a file
*
* @author Patrick Lockley
* @version 1.0
* @copyright Copyright (c) 2008,2009 University of Nottingham
* @package
*/
require("../../../config.php");
$page_sought = $_GET['path'];
$new_file_name = $xerte_toolkits_site->root_file_path . $page_sought .
$_FILES['Filedata']['name'];
echo $new_file_name;
if(move_uploaded_file($_FILES['Filedata']['tmp_name'], $new_file_name)){
}else{
}
?>
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: 30 November 2009 15:13
To: Xerte list
Subject: RE: [Xerte] XOT install - down the rabbit hole
Tarnation!
Found it. I must be one of the few working off IIS or something.
IIS has an issue with REQUEST_URI.
It just silently fails.
I added this to upload.php:
if (!isset($_SERVER['REQUEST_URI']))
{
$_SERVER['REQUEST_URI'] = substr($_SERVER['PHP_SELF'],1 );
if (isset($_SERVER['QUERY_STRING'])) {
$_SERVER['REQUEST_URI'].='?'.$_SERVER['QUERY_STRING']; }
}
Away to the races...
________________________________
Subject: RE: [Xerte] XOT install - down the rabbit hole
Date: Mon, 30 Nov 2009 14:12:57 +0000
From: Patrick.Lockley at nottingham.ac.uk
To: xerte at lists.nottingham.ac.uk
Anywhere after <?
And before ?>
Click on the link in question on the LHS and then look in the lower box
on the RHS
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: 30 November 2009 14:12
To: Xerte list
Subject: RE: [Xerte] XOT install - down the rabbit hole
Thanks Patrick.
Where in upload.php should the line go and where should it appear in
interface.
Tried it and got nothing on screen I could see.
________________________________
Subject: RE: [Xerte] XOT install - down the rabbit hole
Date: Mon, 30 Nov 2009 13:57:16 +0000
From: Patrick.Lockley at nottingham.ac.uk
To: xerte at lists.nottingham.ac.uk
Did you put the print_r($_SERVER) into the upload page?
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett
Sent: 30 November 2009 13:45
To: Xerte list
Subject: RE: [Xerte] XOT install - down the rabbit hole
>It only appears "truncated" as the upload data is provided in other
variables (rlovariable for example).
Ah. Thanks.
>What did fiddler show you?
http://www.hipgnosys.com/xerte_ot/index.php
http://www.hipgnosys.com/xerte_ot/edit.php?template_id=9
http://www.hipgnosys.com/xerte_ot/USER-FILES/9-Dave-Nottingham/preview.x
ml?myvar=1259588415664
http://www.hipgnosys.com/xerte_ot/modules/xerte/engine/upload.php?path=U
SER-FILES/9-Dave-Nottingham/media/
________________________________
Windows 7: I wanted simpler, now it's simpler. I'm a rock star.
<http://www.microsoft.com/Windows/windows-7/default.aspx?h=myidea?ocid=P
ID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_myidea:112009>
________________________________
Windows 7: It works the way you want. Learn more.
<http://www.microsoft.com/Windows/windows-7/default.aspx?ocid=PID24727::
T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen:112009v2>
________________________________
Bing brings you maps, menus, and reviews organized in one place. Try it
now.
<http://www.bing.com/search?q=restaurants&form=MFESRP&publ=WLHMTAG&crea=
TEXT_MFESRP_Local_MapsMenu_Resturants_1x1>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20091201/b3efd624/attachment.html
More information about the Xerte
mailing list