Re: Breaking lines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



First, you're scaring the [bleep] out of me from a security standpoint
writing mysql passwords into files...

If you are NOT an expert in this stuff, stop now, please...

Next, you are missing the ';' at the end of each line to make valid
PHP code.

Finally, what you are saying about the password being a value and the
others not being a value is making no sense from your output provided.

You are either VERY confused (I.e., have no business trying to write
what you are trying to write) or you've posted inaccurate output and
we can't help you.

I'm not trying to be a jerk -- But you're opening yourself up to HUGE
potential risk, and it just doesn't seem like you have the experience
to do what you are doing.

If you *have* to proceed, consider hiring somebody to audit/review
your code and process when you are done.

http://phpsec.org is a MUST READ, and obviously to any regular reader,
Chris should be on your short-list of auditors.

On Tue, October 3, 2006 1:00 pm, Deckard wrote:
> Hi
>
> Yes, it worked, but there's this strange thing.
>
> The output of in to the file is:
>
> $stringData = "<?php \n\n\$hostname = '$hostname'\n\$database =
> 'wordlife'\n\$mysql_username = '$mysql_username'\n$mysql_user_password
> =
> '$mysql_user_password'\n\n?>";
>
> is:
>
> <?php
>
> $hostname = 'localhost'
> $database = 'wordlife'
> $mysql_username = 'gamito'
> blabla = 'blabla'
>
> ?>
>
> i. e., the variable $mysql_user_password within quotes is assuming its
> value, not the string $mysql_user_password, while the others are ok.
>
> *sigh*
>
> Warm Regards,
> Deckard
>
>
> Brad Bonkoski wrote:
>> Deckard wrote:
>>> Hello,
>>>
>>> I have this code to write three lines in a file (config.php):
>>>
>>> $stringData = '$hostname = ' . $hostname . '\n' . '$mysql_username
>>> = ' .
>>> $mysql_username . '\n' . '$mysql_user_password = ' .
>>> $mysql_user_password . '\n';
>>>
>>> but instead of breaking a line, it appears in the file the string
>>> \n
>>>
>>> How can i make the line break ?
>>>
>>> Any help would be appreciated.
>>>
>>> Best Regards,
>>> Deckard
>>>
>>>
>>
>> $stringData = '$hostname = ' . $hostname . "\n" . '$mysql_username =
>> ' .
>> $mysql_username . "\n" . '$mysql_user_password = ' .
>> $mysql_user_password . "\n";
>>
>> (double quotes around the \n character.)
>> -B
>>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux