php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29731 Using ftp_chmod errors out if you use a variable...
Submitted: 2004-08-18 13:34 UTC Modified: 2004-08-18 15:25 UTC
From: webmaster at acecoolco dot com Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 5.0.0 OS: Windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: webmaster at acecoolco dot com
New email:
PHP Version: OS:

 

 [2004-08-18 13:34 UTC] webmaster at acecoolco dot com
Description:
------------
If you do ftp_chmod($conn_id, 0777, "/blah/public_html/");
it works, if you set $blah = "0777"; and use ftp_chmod($conn_id, $blah, "/blah/public_html/"); or
ftp_chmod($conn_id, "$blah", "/blah/public_html/"); then if will end up chmodding 1417 or something...

Reproduce code:
---------------
If you do ftp_chmod($conn_id, 0777, "/blah/public_html/");
it works, if you set $blah = "0777"; and use ftp_chmod($conn_id, $blah, "/blah/public_html/"); or
ftp_chmod($conn_id, "$blah", "/blah/public_html/"); then if will end up chmodding 1417 or something...

Expected result:
----------------
chmod as should be...

Actual result:
--------------
chmods 1417 or so...

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-18 15:25 UTC] tony2001@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Read about using *chmod here: http://php.net/chmod
Short version: "0777" != 0777.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Jul 25 03:00:03 2025 UTC