Jump to content

hstraf

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

hstraf's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello, I need some help to diagnose and determine what is causing this problem and (most importantly) how to correct it. Here is the error.  (I get a whole bunch just like this.. always the "undefined index: [i]variable_name[/i]" [quote]PHP Notice:  Undefined index:  [b]pasv [/b] in C:\xxx_path_xxx\domain.org\zzzzz\autoinstaller.php on line 87[/quote] Here is the code on line 87: [code]if ($_GET['pasv'] == "on") { $_SESSION['ftp_passive'] = "on"; }[/code] I believe the php error is caused because php is trying to "use" an undefined variable (called [i]pasv[/i]) for the first time, and the php config is somehow set to produce this warning. This is becoming more and more common to see now, and it seems to happen when my users have to re-install PHP.  So I think there is some setting in a more recent "default' php installation which is causing this. Does anyone have any idea what setting or configuration value can be set in PHP to "turn off" this warning?  (I tried setting the error_reporting(0); but that did not stop it.) Or must I rewrite my entire PHP program to "declare" all variable before they are used? Thanks for any help. 
  2. I am trying to write a simple script that will recursively copy all files from the script folder into an FTP target folder. The problem is that I only know what is the FULL filepath to where the files should go. But the [b]ftp_chdir()[/b] function won't work with this full path. It needs a path that is "[i]relative[/i]" to the current ftp location after logging in. For example: I have the full path: [b]/home/username/public_html/path/to/my/files/[/b] I need the relative path to their ftp root: [b]public_html/path/to/my/files/[/b] Is there any way for my script to somehow figure out what is the "relative to the ftp login root" for where the new folder should be located... based on the full file path? I have no idea beforehand what kind of server they'll be using.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.