Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

use File::Path qw(make_path); fails with php 5.6.11

by windjammer (Initiate)
on Jul 28, 2015 at 15:07 UTC ( [id://1136627]=perlquestion: print w/replies, xml ) Need Help??

windjammer has asked for the wisdom of the Perl Monks concerning the following question:

I have recently upgraded my php from 5.3.8 to 5.6.11 (security issues requirment).

Previous: PHP 5.3.8 (cli) (built: Sep 19 2011 13:29:27) Copyright (c) 1997-2011 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies Current: PHP 5.6.11 (cli) (built: Jul 15 2015 21:26:53) Copyright (c) 1997-2015 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies use File::Path qw(make_path);
Any idea why this fails?

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

    Since no one has stepped up to be serious- :P

    Perl is not PHP; and this is PerlMonks, hence the monk(y) snark. PHP and Perl cannot be mixed directly. If you are trying to use a Perl module in PHP, it is going to fail. You gave no indication of how you were actually using it or what failure message you got so we're just guessing here.

    Updating PHP will have no effect on your Perl installation. You might be looking for the mkdir function in PHP. There is plenty of online documentation of it and its usage. Perl also has one but they aren't the same and don't take the same arguments.

      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.

        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.

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

Re: use File::Path qw(make_path); fails with php 5.6.11
by 1nickt (Canon) on Jul 28, 2015 at 15:14 UTC

    Change

    use File::Path qw(make_path);

    to

    /* use File::Path qw(make_path); */

    and you should be fine.

    The way forward always starts with a minimal test.
Re: use File::Path qw(make_path); fails with php 5.6.11
by Your Mother (Archbishop) on Jul 28, 2015 at 15:09 UTC

    Because it's PHP. Ah, I'm just kidding. You're all right!

    Of all the off-topics in the world... windjammer had to wander into mine. :P

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1136627]
Approved by 1nickt
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2024-03-28 12:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found