[PHP] Server Help

2001-08-24 Thread Andy Ladouceur
I recently realized users are able to access my base document root using opendir() and readdir()... I find this to be a big security risk.. I am wondering if anyone knows of any ways to limit it so that the user can only usephp on his level,and not be able to access any server files. I hope that

[PHP] disable_features

2001-08-24 Thread Andy Ladouceur
Hello, I am wondering if there is any way to limit the disable_feature command to certain directories, and if so, could I please see an example? Thanks, Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

[PHP] Echo/Print

2001-08-25 Thread Andy Ladouceur
I am fairly new to PHP Scripting, and I am learning from a book. Throughout the book, print is used as the basic command to output text/variables.. yet I see almost everyone in here uses echo. Might I ask what the differences of the two are, and if there are any benefits of using one over the

[PHP] Re: escaping special charecters upon submit

2001-08-25 Thread Andy Ladouceur
http://www.php.net/manual/en/function.addslashes.php That should work fine. -Andy [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have a form that submits data to a database, works great until someome puts in an apostrophe in the comments area...how do i

Re: [PHP] Echo/Print

2001-08-25 Thread Andy Ladouceur
Thanks! Helped a lot. -Andy Jeff Oien [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... You can read the notes lower on the page here to get a good idea: http://www.php.net/manual/en/function.print.php Jeff Oien I am fairly new to PHP Scripting, and I am

[PHP] disable_functions....

2001-08-25 Thread Andy Ladouceur
Does anyone know if its possible to use disable_functions on only specified directories, and not all? Hopefully its possible.. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list

Re: [PHP] disable_functions....

2001-08-26 Thread Andy Ladouceur
e manual.. -Rasmus On Sat, 25 Aug 2001, Andy Ladouceur wrote: Does anyone know if its possible to use disable_functions on only specified directories, and not all? Hopefully its possible.. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL P

[PHP] Cookieless =(

2001-08-26 Thread Andy Ladouceur
I love cookies. I hate it when they dont work. I was previously accessing cookies by just using their name (I had global_vars turned on), I recently decided to turn it off(for security reasons) and I can no longer even set cookies? Yes,cookies are enabled and everything..in fact,I never even

[PHP] Re: br appear in Text file

2001-08-27 Thread Andy Ladouceur
Hi Jack, The 'black box' you see is a newline, which can be removed by doing this: $string=str_replace(\n,,$string); $string=str_replace(\r,,$string); That will replace \n (The newlines) and \r (The returns) with nothing, getting rid of your problem. Hope this helps, -Andy Jack [EMAIL PROTECTED]

[PHP] $HTTP_POST_VARS

2001-08-27 Thread Andy Ladouceur
Hello all, I am wondering if there is a command or function to get a list of all the current '$HTTP_POST_VARS[variable]' variables? Or, a user-created way... Any helps appreciated, thanks! -Andy L. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: [PHP] $HTTP_POST_VARS

2001-08-27 Thread Andy Ladouceur
Ah, its that simple? -feels likea bit of an idiot- Thanks for the help! Tim [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... while (list($k,$v) = each($HTTP_POST_VARS)) { echo br$k = $v; } On Mon, 2001-08-27 at 21:48, Andy Ladouceur wrote: Hello all

Re: [PHP] $HTTP_POST_VARS

2001-08-27 Thread Andy Ladouceur
Thanks! -Andy Jason Murray [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am wondering if there is a command or function to get a list of all the current '$HTTP_POST_VARS[variable]' variables? Or, a user-created way... Any helps appreciated, thanks! You

[PHP] Re: Need help on putting variable into form

2001-08-27 Thread Andy Ladouceur
Well,think about it like this: If you did replace $comp name with ABC Company, this is what you'd get: input type=text size=30 name=comp_name value=ABC Company Not quite right, eh? This will solve your problem: print input type=text size=30 name=comp_name value=\$comp_name\; =) -Andy Hugh

Re: [PHP] Re: Need help on putting variable into form

2001-08-27 Thread Andy Ladouceur
-- From: Andy Ladouceur [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 27, 2001 8:35 PM Subject: [PHP] Re: Need help on putting variable into form Well,think about it like this: If you did replace $comp name with ABC Company, this is what you'd get: input type=text size

[PHP] Re: Formatting Dates in Form before submit

2001-08-27 Thread Andy Ladouceur
PHP is a processed before the output is sent to the browser, so a dynamic change like what you want with it isn't possible. And unfortunately,I dont know any JScript, or VBScript, so I can't help ya there.. =/ -Andy Traci P Sumpter [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL

[PHP] Disabling certain functions per directory

2001-08-27 Thread Andy Ladouceur
I'd like to use the disable_functions command from the php.ini file to disable certain functions for certain directories. I know it has to do with the httpd.conf file, but have no clue on how to go about doing it, can someone please post an example for me?With the directory I want things disabled

[PHP] Re: foo? bar? wtf?

2001-08-29 Thread Andy Ladouceur
Foo, and Bar, dont mean anything. They are simply example $vars for php... I was confused on this for a while, too... -Andy Seb Frost [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Why is it that every example uses foo and bar. In my head I put these together

[PHP] Re: Forwarding to another PHP page

2004-04-09 Thread Andy Ladouceur
Ash.. wrote: Hello, Thanks John (Holmes) for the clue on form-param-reading. Simple one, but shows I got a lot of basics to learn yet. Here I have another doubt I cant resist asking help for. What are the various ways of forwarding to another page. I tried header().. based on an example I found

[PHP] Re: Looking for a comprehensive PHP tutorial

2004-04-09 Thread Andy Ladouceur
Ash.. wrote: Hi, I am looking for a comprehensive handholder tutorial, that introduces the various aspects of PHP, step by step and let's u see the big picture. I have come across tons of PHP learnware which is like how to do this and how to do that. But that still doesn't introduce the language

[PHP] Re: Finding value in multi-dimensional array

2004-04-09 Thread Andy Ladouceur
Verdon Vaillancourt wrote: Hi, being somewhat of a noob, I hope I'm using the right language to phrase this question... In a project I am working with, I have a multi-dimensional array in session when a user logs in. Visually, it looks something like this... OBJ_user username = value

[PHP] Re: timestamp to readabe date and time ?

2004-04-10 Thread Andy Ladouceur
The second parameter of PHP's date() function takes a timestamp as an argument, this may be what you're looking for? Andy Damian Brown wrote: I need to output a date and time that shows more clearly than just outputting the timestamp what is the correct way to go about it ? I have looked at

[PHP] Re: timestamp to readabe date and time ?

2004-04-10 Thread Andy Ladouceur
And these are UNIX timestamps? Odd. I can't see date giving the wrong output, could you post the timestamp you're using? Thanks Andy Damian Brown wrote: I have tried that, but it gives a date in the future and all records have the same time the code is td?php echo date (l dS of F Y h:i:s A,

[PHP] Re: trying to output a hyperlink

2004-04-11 Thread Andy Ladouceur
When in doubt, view source. :) As John has already mentioned, you need text between the two tags to actually display in the browser. You probably would've seen your mistake a lot sooner if you viewed the page source when you first tried it out. Also, you can save yourself some time using PHP's

Re: [PHP] why doesn't this work ?

2004-04-17 Thread Andy Ladouceur
It's already been mentioned, but you do need to ensure you are using a .php extension on the file. Also, forgive me if this has already been covered, but are you sure the server even supports PHP? Try creating a new file with: ?php phpinfo(); ? And save it as something.php, check and see if it

Re: [PHP] why doesn't this work ?

2004-04-18 Thread Andy Ladouceur
want to make it into a php file because its a big html file and I just need this little script on it. Why cannot I embed php in html files? Andy Ladouceur [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] It's already been mentioned, but you do need to ensure you are using a .php extension

[PHP] Re: weird problem with index page

2004-05-16 Thread Andy Ladouceur
Try adding a trailing slash to the URL, and seeing if it works. If so, then try adding the apache configuration directive: UseCanonicalName off In either httpd.conf or an .htaccess file, and try accessing without the trailing slash. I had a similar issue and adding that fixed it. Andy Loll