Problem with paths

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Problem with paths

Postby rezanew » 28. March 2010 07:32

Hello,
I have installed Xampp on my local host with windows XP to test Uber-Uploader on my localhost.
In order to test, I created a Virtual host to the "c:\test" folder by adding this code to the http-vhosts (I made the necessary changes in the host file):

Code: Select all
<VirtualHost test.com>
  DocumentRoot "C:\test"
  ServerName example.local

  CustomLog "C:\test\logs\example.local.access.log" combined
  ErrorLog "C:\test\logs\example.local.error.log"

  <Directory "C:\test">
    Options Indexes FollowSymLinks
Options +ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>


Now I have some problems with paths, for example in php when I set the path to the "/tmp/uber_tmp" it refer me to the "c:\tmp\uber_tmp", (While I want to refer me to c:\test\tmp\uber_tmp), but the path "tmp/uber_tmp" refer me to the correct directory (but in linux the first one works properly). and another problem with paths is the different referring of perl and php for the same pathes. for exampe pathe "/tmp/uber_tmp" in php and "/tmp/uber_tmp" in perl should be same (because they are same in writing), but php and perl are refer to defferent folders for this path...
And let me say that this scripts works properly on my linux host...
rezanew
 
Posts: 3
Joined: 28. March 2010 07:11

Re: Problem with paths

Postby Nobbie » 28. March 2010 10:54

rezanew wrote:Now I have some problems with paths, for example in php when I set the path to the "/tmp/uber_tmp" it refer me to the "c:\tmp\uber_tmp", (While I want to refer me to c:\test\tmp\uber_tmp), but the path "tmp/uber_tmp" refer me to the correct directory


Which "path" in which context? Example code?

rezanew wrote: (but in linux the first one works properly).


No, i dont think so (as it would be wrong what you call "works properly"), only in a so called "chroot"-Environment it behaves like that.

rezanew wrote:and another problem with paths is the different referring of perl and php for the same pathes. for exampe pathe "/tmp/uber_tmp" in php and "/tmp/uber_tmp" in perl should be same (because they are same in writing), but php and perl are refer to defferent folders for this path...
And let me say that this scripts works properly on my linux host...


Again, which context, examples please.
Nobbie
 
Posts: 8775
Joined: 09. March 2008 13:04

Re: Problem with paths

Postby rezanew » 28. March 2010 12:55

In the Folder c:\test (that I can access it with http://test.com on my local host -I change the test.com to 127.0.0.1 in my host file-) there is a config file like this (this is just few firs lines of that file):

Code: Select all
$TEMP_DIR                            = '/tmp/ubr_temp/';             // *ATTENTION * : The $TEMP_DIR value MUST be duplicated in the "ubr_upload.pl" file. (use an absolute path)
$DATA_DELIMITER                      = '<=>';                        // *ATTENTION * : The $DATA_DELIMITER value MUST be duplicated in the "ubr_upload.pl" file.

$_INI['block_ui_enabled']            = 1;                            // Enable/Disable block UI.
$_INI['cgi_upload_hook']             = 0;                            // Use the CGI hook file to get upload status. Requires CGI.pm >= 3.15.
$_INI['debug_ajax']                  = 0;                            // Enable/Disable AJAX debug mode. Add your own debug messages by calling the "showDebugMessage() " function. UPLOADS POSSIBLE.


and there is a Perl file in the cgi folder "c:\test\cgi", and the $TEMP_DIR is defined in it again with the value of "/tmp/ubr_temp/" like this:

Code: Select all
my $TEMP_DIR        = '/tmp/ubr_temp/';                    # * ATTENTION * : The $TEMP_DIR value MUST be duplicated in the "ubr_ini.php" file
my $DATA_DELIMITER  = '<=>';                               # * ATTENTION * : The $DATA_DELIMITER value MUST be duplicated in the "ubr_ini.php" file

my $DEBUG_PERL = 0;                                        # View version and environment variables (config will not be loaded)
my $THIS_VERSION = "3.8";                                  # Version of this script
my $UBER_VERSION = "6.8.2";                                # Version of UU
my $UPLOAD_ID = '';                                        # Initialize upload id


Now what I want:
- I want to change xampp setting (or Apache maybe) to get the same path in both Perl and Php (I mean I want to get "c:\test\tmp\ubr_temp" for $TEMP_DIR in both Perl and Php, while in this project I cant get)
- I want to change xampp setting in order to get this path "c:\test\tmp\ubr_temp" when I type "/tmp/ubr_temp/" in both Perl and Php!!

Thanks in advance
rezanew
 
Posts: 3
Joined: 28. March 2010 07:11

Re: Problem with paths

Postby Nobbie » 28. March 2010 14:04

I think, you are totally wrong here. You seem to have certain problems with the Upload Script, these problems are neither specific to PHP, nor to Perl, nor to Linux, nor to Windows. And of course it is as well not a Xampp problem.

As i dont know the script, you should contact the author and ask for support.
Nobbie
 
Posts: 8775
Joined: 09. March 2008 13:04

Re: Problem with paths

Postby rezanew » 28. March 2010 17:02

Thanks for your answer,
But I can run this script on my linux VPS. but I need it on my localhost...
rezanew
 
Posts: 3
Joined: 28. March 2010 07:11

Re: Problem with paths

Postby Nobbie » 28. March 2010 19:01

rezanew wrote:But I can run this script on my linux VPS. but I need it on my localhost...


So either install Linux on your local PC - or ask the script author for support.
Nobbie
 
Posts: 8775
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 56 guests