Scodigo, Inc.

Log In | Register

Cart Items:
0

Sandbox Username without the @ symbol for ftp:// wrapper testing?...

User icon

Immediate Caveat: I am very ignorant about these things, I am an 'if-then guy' not a 'server guy', so if I say something stupid don't be surprised and if I say something that is inadvertently questioning a decision or is in any way offensive to anyone about anything apologies in advance. With that out of the way I am going to proceed pretending that I know what I am talking about so that I don't have to continually include this caveat as I write.

Hi All,

From what I can see from phpinfo(), SmartPill has:
allow_url_fopen => On => On

So the ftp:// wrapper method of using the whole library of file function for my FTP needs would be supported.

So taking things one step at a time, I am already encountering a problem:

The '@' sign in the username is messing up the ftp filepath using ftp:// wrapper for fopen.

So when I run the code:
$f_filename = 'ftp_wrapper_readme.txt';
$f_url = 'ftp://smartpill@sandbox.scodigo.com:test@sandbox.scodigo.com';
$f_relative_path = '/';
$f_path_full = $f_url.$f_relative_path.$f_filename;
$f_handle = fopen($f_path_full,'r');
echo $f_handle;
die('

Buh-Bye!

');

I get:
PHP Warning: fopen(ftp://...@sandbox.scodigo.com:test@sandbox.scodigo.com/ftp_wrapper_readm...) [function.fopen]: failed to open stream: operation failed in Embedded code on line 5

Buh-Bye!

Assuming I have diagnosed the issue properly that fopen is choking on the two @ symbols in $f_path_full...

Two questions:
1. Is there a workaround for fopen where the username contains the @ symbol?
(cursory googling on the topic indicates 'no')

2. If not, would Scodigo consider creating an additional ftp user where the username did NOT have the @ sign.

Of course, any other assistance would be welcomed.

Thanks in advance for any assistance,
Brad

Works here

Micah Woods's picture

Hello Brad,

I tried the above code snippet here (on both Mac and Win) and I don't get an error. I'm also not able to read the file so I'm not sure what's wrong. It would take a bit of troubleshooting to figure this out so my recommendation is to stick with the ftp functions since they are working.

Regards,
Micah