Pure PHP Upload 2 Support Product Page
Just installed PurePHP and cannot upload files!
Reported 21 Dec 2006 03:26:55
1
has this problem
21 Dec 2006 03:26:55 John Wogick posted:
I just purchased PurePHP Upload and addon pack and created a simple page with file field and when I click submit not only does the file not upload but it does not go to the page I have selected either.Here is the code that Dreamweaver Creates:
<pre id=code><font face=courier size=2 id=code>
<?php require_once('ScriptLibrary/incPureUpload.php'); ?>
<?php
// Pure PHP Upload 2.1.3
if (isset($HTTP_GET_VARS['GP_upload'])) {
$ppu = new pureFileUpload();
$ppu->path = "images";
$ppu->extensions = "";
$ppu->formName = "form1";
$ppu->storeType = "path";
$ppu->sizeLimit = "";
$ppu->nameConflict = "error";
$ppu->requireUpload = "true";
$ppu->minWidth = "";
$ppu->minHeight = "";
$ppu->maxWidth = "";
$ppu->maxHeight = "";
$ppu->saveWidth = "";
$ppu->saveHeight = "";
$ppu->timeout = "600";
$ppu->progressBar = "";
$ppu->progressWidth = "300";
$ppu->progressHeight = "100";
$ppu->checkVersion("2.1.3"
$ppu->doUpload();
$uploadGoTo = "drivers/index.htm";
if (isset($HTTP_SERVER_VARS['QUERY_STRING'])) {
$uploadGoTo .= (strpos($uploadGoTo, '?')) ? "&" : "?";
$uploadGoTo .= $HTTP_SERVER_VARS['QUERY_STRING'];
}
header(sprintf("Location: %s", $uploadGoTo));
}
$GP_uploadAction = $HTTP_SERVER_VARS['PHP_SELF'];
if (isset($HTTP_SERVER_VARS['QUERY_STRING'])) {
if (!eregi("GP_upload=true", $HTTP_SERVER_VARS['QUERY_STRING'])) {
$GP_uploadAction .= "?".$HTTP_SERVER_VARS['QUERY_STRING']."&GP_upload=true";
} else {
$GP_uploadAction .= "?".$HTTP_SERVER_VARS['QUERY_STRING'];
}
} else {
$GP_uploadAction .= "?"."GP_upload=true";
}
if (isset($editFormAction)) {
if (isset($HTTP_SERVER_VARS['QUERY_STRING'])) {
if (!eregi("GP_upload=true", $HTTP_SERVER_VARS['QUERY_STRING'])) {
$editFormAction .= "&GP_upload=true";
}
} else {
$editFormAction .= "?GP_upload=true";
}
}
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script language='javascript' src='ScriptLibrary/incPureUpload.js'></script>
</head>
<body>
<form action="<?php echo $GP_uploadAction; ?>" method="post" enctype="multipart/form-data" name="form1" id="form1" onsubmit="checkFileUpload(this,'',true,'','','','','','','');return document.MM_returnValue">
<p align="center">
<input name="file" type="file" onchange="checkOneFileUpload(this,'',true,'','','','','','','')" />
</p>
<p align="center">
<input type="submit" name="Submit" value="Submit" />
</p>
</form>
</body>
</html>
</font id=code></pre id=code>
I have set the proper permissions on the upload folder and the returned url is:
www.mckeancountyraceway.com/upload.php?GP_upload=true
So the result is true but no file upload and the page that it should direct to is:
drivers/profile.php
Any ideas on this matter would be greatly appreciated.
Replies
Replied 30 Jan 2007 18:10:08
30 Jan 2007 18:10:08 Georgi Kralev replied:
Hi John,
Try to add the following lines before the line Pure PHP Upload 2.1.3
<pre id=code><font face=courier size=2 id=code>if( !isset( $HTTP_SERVER_VARS ) )
{
$HTTP_SERVER_VARS = $_SERVER;
}
if( !isset( $HTTP_GET_VARS ) )
{
$HTTP_GET_VARS = $_GET;
}
if( !isset( $HTTP_POST_VARS ) )
{
$HTTP_POST_VARS = $_POST;
}
if( !isset( $HTTP_POST_FILES ) )
{
$HTTP_POST_FILES = $_FILES;
} </font id=code></pre id=code>
I hope it will help you.
Regards,
Georgi Kralev
----------------------------------
Support - www.DMXzone.com
Try to add the following lines before the line Pure PHP Upload 2.1.3
<pre id=code><font face=courier size=2 id=code>if( !isset( $HTTP_SERVER_VARS ) )
{
$HTTP_SERVER_VARS = $_SERVER;
}
if( !isset( $HTTP_GET_VARS ) )
{
$HTTP_GET_VARS = $_GET;
}
if( !isset( $HTTP_POST_VARS ) )
{
$HTTP_POST_VARS = $_POST;
}
if( !isset( $HTTP_POST_FILES ) )
{
$HTTP_POST_FILES = $_FILES;
} </font id=code></pre id=code>
I hope it will help you.
Regards,
Georgi Kralev
----------------------------------
Support - www.DMXzone.com
Replied 18 Feb 2007 12:26:22
18 Feb 2007 12:26:22 Dave Buchholz replied:
George,
Is this problem related to PHP 5.2.0 as I have only encountered this since moving to the latest version of PHP
Is this problem related to PHP 5.2.0 as I have only encountered this since moving to the latest version of PHP
Replied 19 Feb 2007 11:41:33
19 Feb 2007 11:41:33 Georgi Kralev replied:
Hi Dave,
Indeed, this is PHP 5.
Do you experience the problem if you paste the following lines in your php page?
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
if( !isset( $HTTP_SERVER_VARS ) )
{
$HTTP_SERVER_VARS = $_SERVER;
}
if( !isset( $HTTP_GET_VARS ) )
{
$HTTP_GET_VARS = $_GET;
}
if( !isset( $HTTP_POST_VARS ) )
{
$HTTP_POST_VARS = $_POST;
}
if( !isset( $HTTP_POST_FILES ) )
{
$HTTP_POST_FILES = $_FILES;
}
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Note: They should be paste before the code the Pure PHP upload code.
Regards,
Georgi Kralev
----------------------------------
Support - www.DMXzone.com
Indeed, this is PHP 5.
Do you experience the problem if you paste the following lines in your php page?
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
if( !isset( $HTTP_SERVER_VARS ) )
{
$HTTP_SERVER_VARS = $_SERVER;
}
if( !isset( $HTTP_GET_VARS ) )
{
$HTTP_GET_VARS = $_GET;
}
if( !isset( $HTTP_POST_VARS ) )
{
$HTTP_POST_VARS = $_POST;
}
if( !isset( $HTTP_POST_FILES ) )
{
$HTTP_POST_FILES = $_FILES;
}
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Note: They should be paste before the code the Pure PHP upload code.
Regards,
Georgi Kralev
----------------------------------
Support - www.DMXzone.com
Replied 23 Feb 2007 16:29:38
23 Feb 2007 16:29:38 Dave Buchholz replied:
George,
The code you pasted solves the problem for me and I am able to upload with PHP 5.2.0
The code you pasted solves the problem for me and I am able to upload with PHP 5.2.0
Replied 23 Feb 2007 16:53:40
23 Feb 2007 16:53:40 Georgi Kralev replied:
Dave,
Thank you for your response. We will fix the extension for its next update (So, your will not have to put the code manually).
If you have any other questions or problem do not hesitate to contact us.
Regards,
Georgi Kralev
----------------------------------
Support - www.DMXzone.com
Thank you for your response. We will fix the extension for its next update (So, your will not have to put the code manually).
If you have any other questions or problem do not hesitate to contact us.
Regards,
Georgi Kralev
----------------------------------
Support - www.DMXzone.com
Replied 08 Oct 2010 20:26:19
08 Oct 2010 20:26:19 Dan Everton replied: