in reply to Re: use File::Path qw(make_path); fails with php 5.6.11
in thread use File::Path qw(make_path); fails with php 5.6.11

Sorry I am a newbie (really big time) We have a webpage that calls our perl program and passes the appropriate parameters. It worked when we used the old version of php and failed when I upgraded. Guess I should move this question to a php forum.

  • Comment on Re^2: use File::Path qw(make_path); fails with php 5.6.11

Replies are listed 'Best First'.
Re^3: use File::Path qw(make_path); fails with php 5.6.11
by Your Mother (Archbishop) on Jul 28, 2015 at 16:13 UTC

    Or you can show exactly what you did, in what context, and how it failed; error messages, log, etc. If it's Perl related we'll try to help. "This fails" is a difficult error report to dig into. :P The problem does sound to be in the PHP layer to me but again, that's a total guess.

Re^3: use File::Path qw(make_path); fails with php 5.6.11
by windjammer (Initiate) on Jul 28, 2015 at 17:03 UTC

    Problem solved, changed make_path to mkpath and all is well. Sorry to have wasted everyone's time.

      Hi windjammer, the docs from File::Path say:

      mkpath( $dir ) mkpath( $dir, $verbose, $mode ) mkpath( [$dir1, $dir2,...], $verbose, $mode ) mkpath( $dir1, $dir2,..., \%opt ) The mkpath() function provide the legacy interface of make_ +path() with a different interpretation of the arguments passed. T +he behaviour and return value of the function is otherwise ide +ntical to make_path().

      So it rather seems that the only problem that could be solved by changing:

      use File::Path qw/ make_path /;

      to

      use File::Path qw/ mkpath /;

      is that your code called make_path() with deprecated argument-passing syntax, and you upgraded from an older version of File::Path to a newer one in which the make_path() syntax has changed and mkpath() offered as a legacy alternative.

      So I am guessing that when you upgraded your PHP version, you may have also upgraded your Perl libraries ... did you use a shared host's one-button upgrade tool or something similar? If so, did it say that it was going to upgrade your Perl, too?

      Just a theory, but I found the fact that you fixed your problem by only changing the File::Path method used, to be quite interesting.

      The way forward always starts with a minimal test.