Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Cant upload a csv file to server:
Old 09-13-2007, 07:08 AM Cant upload a csv file to server:
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 960
Name: Darren
Location: England
Trades: 0
Hi

I have a database installed that can accept a csv file.
when I installed onto a new server, it wont upload. is there anything obvious in the phpinfo that could be causing this? also, the login page wont work on this server.
just reloads the page again when submitting the user and pass

Code:
<?php
	/* 	
		
		filename: 		login.php
	 	version: 		1.1
		last revision:	23/11/02
		description:	admin logon authentication - password check and session creation	
		
	*/ 
	

	
	
	if (!$HTTP_POST_VARS['submit'])
	{
?>
		<script language="JavaScript">
		<!--
		function validateForm(form)
		{ 
			if (form.username.value == "")
			{ 
			   alert("Please Enter a Username."); 
			   form.username.focus( ); 
			   return false; 
			}
			else if (form.password.value == "")
			{ 
			   alert("Please Enter a Password."); 
			   form.password.focus( ); 
			   return false; 
			}	
		}
		-->
		</script>
		<style type="text/css">
<!--
BODY
{
}
A
{
    COLOR: #003366;
    TEXT-DECORATION: none;
}
A:hover
{
    TEXT-DECORATION: underline;
}
.small
{
    FONT-SIZE: 8pt;
    FONT-FAMILY: Verdana;
}
.std
{
    FONT-SIZE: 8pt;
    FONT-FAMILY: Verdana;
	COLOR: #000000;
}
.header
{
    FONT-SIZE: 8pt;
    FONT-FAMILY: Verdana;
    FONT-WEIGHT: BOLD;
	COLOR:#000000;
}
.bigheader
{
    FONT-SIZE: 8pt;
    FONT-FAMILY: Verdana;
	FONT-WEIGHT: BOLD;
    COLOR:#FFFFFF;
}
.error
{
    FONT-SIZE: 8pt;
    FONT-FAMILY: Verdana;
	COLOR:#FF0000
}
.headertable
{
	FONT-SIZE: 8pt;
    FONT-FAMILY: Verdana;
	FONT-WEIGHT: regular;
    COLOR:#FFFFFF;
    BACKGROUND-COLOR:#000066;
}
.stdtable
{
	FONT-SIZE: 8pt;
    FONT-FAMILY: Verdana;
	FONT-WEIGHT: regular;
    COLOR:#000066;
}
-->
</style>
<table width="60" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td><img src="new/1_r1_c12.gif" width="348" height="120"></td>
    <td><img src="new/1_r1_c5.gif" width="350" height="120"></td>
  </tr>
</table>
<table width="630" align="center" cellspacing="0">
  <tr align="center"> 

          <td valign="top"> 

                        
        <table border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td width="3"></td>
            
          <td width="593" colspan="3">&nbsp;</td>
            <td width="3"></td>
          </tr>
          <tr> 
            
          <td>&nbsp;</td>
            <td align="center" valign="middle" colspan="3">
              <table border="0" cellspacing="0" cellpadding="4" width="98%">
                <tr align="center"> 
                  <td class="small" colspan="8">&nbsp; 
				  <form name="Login" action="login.php" method="post">
		Username: <input type="text" name="username"/>
		Password: <input type="password" name="password"/>
		<input type="submit" name="submit" value="submit" onClick="return validateForm(form)">
		</form>
				  </td>
                </tr>
              </table>
            </td>
            <td></td>
          </tr>
          <tr> 
            
          <td rowspan="2">&nbsp;</td>
          <td rowspan="2">&nbsp;</td>
            <td class=small align="center"> 
              <table width="98%" border="0" cellspacing="0" cellpadding="0">
                <tr> 
                  <td class=small>&nbsp;</td>
                  <td align="right">&nbsp;</td>
                </tr>
              </table>
            </td>
            
          <td rowspan="2" align="right">&nbsp;</td>
            
          <td rowspan="2">&nbsp;</td>
          </tr>
          <tr> 
            
          <td valign="bottom">&nbsp;</td>
          </tr>
        </table>

            <p>&nbsp;</p>

          </td>

        </tr>

      </table>
	
		
<?php
	}
	else
	{
		// include session authentication file
		include_once("session.php");
		
		// include the wykes website configuration file
		include_once("web_conf.php");
		
		// set login variables
		$strInvalid = "The username or password you have entered is invalid. Please try again: <p><a href=\"login.php\">Login</a><p>";
		$username = $HTTP_POST_VARS ["username"];
		$password = $HTTP_POST_VARS ["password"];
		
		// test for blank entries
		if (($username == "") || ($password == ""))
		{
			
			echo($strInvalid);
			return;
		}
		
		// test the password
		if(($password == $AUTORACKPASSWORD)&&($username == $AUTORACKUSERNAME))
		{
			// Create session and set authenticated flag	
			if (!session_start())
				echo("Not able to create Session");
			if (!session_register("isAuthenticated"))
			{
				echo("Could not add isAuthenticated variable to session.");
				return;
			}
			$HTTP_SESSION_VARS ['isAuthenticated'] = "loggedIn";	
			$HTTP_SESSION_VARS ['SessionExpired'] = "<p>User session has expired. Please login again: <a href=\"login.php\">Login</a><p>";	
			include_once("upload.php");
		}		
		else
		{
			
			echo($strInvalid);
			return;
		}
	}
?>

http://www.thule-professional.co.uk/info.php

thanks
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."

Last edited by rolda hayes; 09-13-2007 at 08:28 AM..
rolda hayes is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-13-2007, 10:57 AM Re: Cant upload a csv file to server:
metho's Avatar
Ultra Talker

Posts: 481
Location: Gold Coast - Brisbane QLD, Australia
Trades: 0
PHP tags help - a lot.
PHP Code:
<?php
    
/*     
        
        filename:         login.php
         version:         1.1
        last revision:    23/11/02
        description:    admin logon authentication - password check and session creation    
        
    */ 
    

    
    
    
if (!$HTTP_POST_VARS['submit'])
    {
?>
        <script language="JavaScript">
        <!--
        function validateForm(form)
        { 
            if (form.username.value == "")
            { 
               alert("Please Enter a Username."); 
               form.username.focus( ); 
               return false; 
            }
            else if (form.password.value == "")
            { 
               alert("Please Enter a Password."); 
               form.password.focus( ); 
               return false; 
            }    
        }
        -->
        </script>
        <style type="text/css">
<!--
BODY
{
}
A
{
    COLOR: #003366;
    TEXT-DECORATION: none;
}
A:hover
{
    TEXT-DECORATION: underline;
}
.small
{
    FONT-SIZE: 8pt;
    FONT-FAMILY: Verdana;
}
.std
{
    FONT-SIZE: 8pt;
    FONT-FAMILY: Verdana;
    COLOR: #000000;
}
.header
{
    FONT-SIZE: 8pt;
    FONT-FAMILY: Verdana;
    FONT-WEIGHT: BOLD;
    COLOR:#000000;
}
.bigheader
{
    FONT-SIZE: 8pt;
    FONT-FAMILY: Verdana;
    FONT-WEIGHT: BOLD;
    COLOR:#FFFFFF;
}
.error
{
    FONT-SIZE: 8pt;
    FONT-FAMILY: Verdana;
    COLOR:#FF0000
}
.headertable
{
    FONT-SIZE: 8pt;
    FONT-FAMILY: Verdana;
    FONT-WEIGHT: regular;
    COLOR:#FFFFFF;
    BACKGROUND-COLOR:#000066;
}
.stdtable
{
    FONT-SIZE: 8pt;
    FONT-FAMILY: Verdana;
    FONT-WEIGHT: regular;
    COLOR:#000066;
}
-->
</style>
<table width="60" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td><img src="new/1_r1_c12.gif" width="348" height="120"></td>
    <td><img src="new/1_r1_c5.gif" width="350" height="120"></td>
  </tr>
</table>
<table width="630" align="center" cellspacing="0">
  <tr align="center"> 

          <td valign="top"> 

                        
        <table border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td width="3"></td>
            
          <td width="593" colspan="3">&nbsp;</td>
            <td width="3"></td>
          </tr>
          <tr> 
            
          <td>&nbsp;</td>
            <td align="center" valign="middle" colspan="3">
              <table border="0" cellspacing="0" cellpadding="4" width="98%">
                <tr align="center"> 
                  <td class="small" colspan="8">&nbsp; 
                  <form name="Login" action="login.php" method="post">
        Username: <input type="text" name="username"/>
        Password: <input type="password" name="password"/>
        <input type="submit" name="submit" value="submit" onClick="return validateForm(form)">
        </form>
                  </td>
                </tr>
              </table>
            </td>
            <td></td>
          </tr>
          <tr> 
            
          <td rowspan="2">&nbsp;</td>
          <td rowspan="2">&nbsp;</td>
            <td class=small align="center"> 
              <table width="98%" border="0" cellspacing="0" cellpadding="0">
                <tr> 
                  <td class=small>&nbsp;</td>
                  <td align="right">&nbsp;</td>
                </tr>
              </table>
            </td>
            
          <td rowspan="2" align="right">&nbsp;</td>
            
          <td rowspan="2">&nbsp;</td>
          </tr>
          <tr> 
            
          <td valign="bottom">&nbsp;</td>
          </tr>
        </table>

            <p>&nbsp;</p>

          </td>

        </tr>

      </table>
    
        
<?php
    
}
    else
    {
        
// include session authentication file
        
include_once("session.php");
        
        
// include the wykes website configuration file
        
include_once("web_conf.php");
        
        
// set login variables
        
$strInvalid "The username or password you have entered is invalid. Please try again: <p><a href=\"login.php\">Login</a><p>";
        
$username $HTTP_POST_VARS ["username"];
        
$password $HTTP_POST_VARS ["password"];
        
        
// test for blank entries
        
if (($username == "") || ($password == ""))
        {
            
            echo(
$strInvalid);
            return;
        }
        
        
// test the password
        
if(($password == $AUTORACKPASSWORD)&&($username == $AUTORACKUSERNAME))
        {
            
// Create session and set authenticated flag    
            
if (!session_start())
                echo(
"Not able to create Session");
            if (!
session_register("isAuthenticated"))
            {
                echo(
"Could not add isAuthenticated variable to session.");
                return;
            }
            
$HTTP_SESSION_VARS ['isAuthenticated'] = "loggedIn";    
            
$HTTP_SESSION_VARS ['SessionExpired'] = "<p>User session has expired. Please login again: <a href=\"login.php\">Login</a><p>";    
            include_once(
"upload.php");
        }        
        else
        {
            
            echo(
$strInvalid);
            return;
        }
    }
?>
__________________
I do
Please login or register to view this content. Registration is FREE
based.
Spend a lot of time in
Please login or register to view this content. Registration is FREE
.
And
Please login or register to view this content. Registration is FREE
chews up the rest.
metho is offline
Reply With Quote
View Public Profile Visit metho's homepage!
 
Old 09-13-2007, 11:00 AM Re: Cant upload a csv file to server:
metho's Avatar
Ultra Talker

Posts: 481
Location: Gold Coast - Brisbane QLD, Australia
Trades: 0
Would session.use_only_cookies be on by chance?
__________________
I do
Please login or register to view this content. Registration is FREE
based.
Spend a lot of time in
Please login or register to view this content. Registration is FREE
.
And
Please login or register to view this content. Registration is FREE
chews up the rest.
metho is offline
Reply With Quote
View Public Profile Visit metho's homepage!
 
Old 09-13-2007, 11:26 AM Re: Cant upload a csv file to server:
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 960
Name: Darren
Location: England
Trades: 0
yes but they are in this server setup and the login works fine

http://www.vantidy.co.uk/info.php
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Cant upload a csv file to server:
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.22737 seconds with 12 queries