Re: [PHP] link to a css file requires .css ???

2009-08-17 Thread Devendra Jadhav
Just use following .htaccess rewrite rule RewriteRule ^some.css$ some.php and this is the perfect solution. On Mon, Aug 17, 2009 at 3:14 AM, Adam Shannon a...@ashannon.us wrote: On Sun, Aug 16, 2009 at 4:37 PM, Daniel Kolbo kolb0...@umn.edu wrote: Hello, I realize this is more of an

[PHP] is there a better way to know from which php file the request comes from ??

2009-08-17 Thread nashrul
This is a newbie question... Let's say there are 3 php files, page1.php, page2.php and page3.php. Form submission from page1.php or page2.php will take user to page3.php. I know that we can use parameter that is appended in the action attribute of the form (e.g FORM METHOD=POST

Re: [PHP] is there a better way to know from which php file the request comes from ??

2009-08-17 Thread Ashley Sheridan
On Mon, 2009-08-17 at 02:17 -0700, nashrul wrote: This is a newbie question... Let's say there are 3 php files, page1.php, page2.php and page3.php. Form submission from page1.php or page2.php will take user to page3.php. I know that we can use parameter that is appended in the action attribute

RE: [PHP] running str_replace, it misbehaves!

2009-08-17 Thread Ford, Mike
-Original Message- From: Allen McCabe [mailto:allenmcc...@gmail.com] Sent: 16 August 2009 22:07 [...] Here is an example of my code: [code] ?php //ENCRYPT FUNCTIONS function format_string($string,$functions) { $funcs = explode(,,$functions); foreach ($funcs as $func)

Re: [PHP] is there a better way to know from which php file the request comes from ??

2009-08-17 Thread kranthi
HTTP_REFERRER is transparent, but if can be messed with very easily. I prefer use of $_SESSION vars if security is needed in my application (epically when a page is shown after a POST request) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] link to a css file requires .css ???

2009-08-17 Thread kranthi
A browser will always parse link .. tag regard less of the extension. the only condition is that the file should provide a mine type 'text/css' for css files. https://developer.mozilla.org/en/Incorrect_MIME_Type_for_CSS_Files -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Another date exercise

2009-08-17 Thread kranthi
dont you think http://in3.php.net/strtotime is a solution to your problem ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Cannot exec in my own directory

2009-08-17 Thread kranthi
see if can run the same php file via CLI. does script.sh run without any problems ? then, probably something linke SELinux is preventing httpd from running scripts. you have to contact your system administrator to get this fixed. -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Cannot exec in my own directory

2009-08-17 Thread Dotan Cohen
see if can run the same php file via CLI. does script.sh run without any problems ? then, probably something linke SELinux is preventing httpd from running scripts. you have to contact your system administrator to get this fixed. You are right. Running the php script from the CLI in an SSH

Re: [PHP] Cannot exec in my own directory

2009-08-17 Thread kranthi
Did you check SELinux options ?? I have a similar problem. For some unknown reason scan_dir() is not able to read /home/user when run as Apache module. but the CLI is giving expected results. I did not find any work around, but had to read /var/www which is the home directory of 'apache' (this is

Re: [PHP] Cannot exec in my own directory

2009-08-17 Thread Dotan Cohen
Did you check SELinux options ?? I do not have root access to that server. I have a similar problem. For some unknown reason scan_dir() is not able to read /home/user when run as Apache module. but the CLI is giving expected results. I did not find any work around, but had to read /var/www

Re: [PHP] Cannot exec in my own directory

2009-08-17 Thread Ashley Sheridan
On Mon, 2009-08-17 at 19:23 +0530, kranthi wrote: Did you check SELinux options ?? I have a similar problem. For some unknown reason scan_dir() is not able to read /home/user when run as Apache module. but the CLI is giving expected results. I did not find any work around, but had to read

Re: [PHP] Cannot exec in my own directory

2009-08-17 Thread Dotan Cohen
That's a potential security flaw waiting to happen. A script like this shouldn't be kept in a web-accessible directory. Thanks, Ash. That directory is HTTP-password protected. -- Dotan Cohen http://what-is-what.com http://gibberish.co.il -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] Cannot exec in my own directory

2009-08-17 Thread Ashley Sheridan
On Mon, 2009-08-17 at 17:01 +0300, Dotan Cohen wrote: Did you check SELinux options ?? I do not have root access to that server. I have a similar problem. For some unknown reason scan_dir() is not able to read /home/user when run as Apache module. but the CLI is giving expected

Re: [PHP] Cannot exec in my own directory

2009-08-17 Thread Dotan Cohen
Just out of curiosity, have you been able to run even the most basic of scripts from PHP, like a plain old BASH 'echo' statement or something? I only ask, because sometimes within the shell scripts themselves are calls to other command line programs (even something as simple as 'ls') which

Re: [PHP] Another date exercise

2009-08-17 Thread tedd
At 3:40 PM +0530 8/17/09, kranthi wrote: dont you think http://in3.php.net/strtotime is a solution to your problem ? No, it's not a solution to my problem -- I have he problem solved. I was just asking if anyone wanted to submit their php solution. It was only an exercise. I know there are

Re: [PHP] Cannot exec in my own directory

2009-08-17 Thread kranthi
That's a potential security flaw waiting to happen. A script like this shouldn't be kept in a web-accessible directory. /var/www is not the document root. document root is /var/www/html so I dont think there's a problem. /var/www (usually your server root) I am mistaken regarding this. for

Re: [PHP] Cannot exec in my own directory

2009-08-17 Thread Ashley Sheridan
On Mon, 2009-08-17 at 20:16 +0530, kranthi wrote: That's a potential security flaw waiting to happen. A script like this shouldn't be kept in a web-accessible directory. /var/www is not the document root. document root is /var/www/html so I dont think there's a problem. /var/www (usually

Re: [PHP] Another date exercise

2009-08-17 Thread tedd
At 4:22 PM -0400 8/16/09, Paul M Foster wrote: On Sun, Aug 16, 2009 at 08:36:17AM +0100, Lester Caine wrote: -snip- But as has been said, the real solution is a date picker. I *hate* date pickers. They slow down input. I can type 082309Enter faster than I can ever do it with a date picker.

Re: [PHP] Another date exercise

2009-08-17 Thread Luke
2009/8/17 tedd tedd.sperl...@gmail.com At 4:22 PM -0400 8/16/09, Paul M Foster wrote: On Sun, Aug 16, 2009 at 08:36:17AM +0100, Lester Caine wrote: -snip- But as has been said, the real solution is a date picker. I *hate* date pickers. They slow down input. I can type 082309Enter faster

Re: [PHP] Another date exercise

2009-08-17 Thread tedd
At 4:10 PM +0100 8/17/09, Luke wrote: What would be really cool is if someone wrote a PHP script that generates some Javascript code that could do this. I mean while we're on the subject of complicating things ;) -- Luke Slater :O) While writing/creating javascript from php can be done,

Re: [PHP] Another date exercise

2009-08-17 Thread Luke
2009/8/17 tedd tedd.sperl...@gmail.com At 4:10 PM +0100 8/17/09, Luke wrote: What would be really cool is if someone wrote a PHP script that generates some Javascript code that could do this. I mean while we're on the subject of complicating things ;) -- Luke Slater :O) While

Re: [PHP] Sanitizing mysql inserts of user data

2009-08-17 Thread Ben Dunlap
Note: If this function is not used to escape data, the query is vulnerable to SQL Injection Attacks. Does that necessarily imply this: If this function is used to escape data, the query is not vulnerable to SQL Injection Attacks.? Logically, it does _not_ mean the same thing. Definitely

Re: [PHP] is there a better way to know from which php file the request comes from ??

2009-08-17 Thread Ben Dunlap
This is a newbie question... Let's say there are 3 php files, page1.php, page2.php and page3.php. Form submission from page1.php or page2.php will take user to page3.php. I know that we can use parameter that is appended in the action attribute of the form (e.g FORM METHOD=POST

Re: [PHP] Sanitizing mysql inserts of user data

2009-08-17 Thread Paul M Foster
On Mon, Aug 17, 2009 at 10:10:47PM +0300, Dotan Cohen wrote: Logically, it does _not_ mean the same thing. Definitely not -- it would be a bit presumptuous to claim If you do X, the query is not vulnerable to SQL injection attacks for just about any value of X. That is what I

Re: [PHP] Sanitizing mysql inserts of user data

2009-08-17 Thread Ben Dunlap
$stmt = $db-prepare(SELECT priv FROM testUsers WHERE username=:username AND password=:password); $stmt-bindParam(':username', $user); $stmt-bindParam(':password', $pass); $stmt-execute(); [8] I haven't followed this thread, so I don't know what you mean by, I do not see how there could

Re: [PHP] is there a better way to know from which php file the request comes from ??

2009-08-17 Thread Tom Worster
On 8/17/09 5:24 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Mon, 2009-08-17 at 02:17 -0700, nashrul wrote: This is a newbie question... Let's say there are 3 php files, page1.php, page2.php and page3.php. Form submission from page1.php or page2.php will take user to page3.php. I

Re: [PHP] is there a better way to know from which php file the request comes from ??

2009-08-17 Thread Tom Worster
On 8/17/09 5:17 AM, nashrul anas_a...@yahoo.com wrote: This is a newbie question... Let's say there are 3 php files, page1.php, page2.php and page3.php. Form submission from page1.php or page2.php will take user to page3.php. I know that we can use parameter that is appended in the action

Re: [PHP] is there a better way to know from which php file the requestcomes from ??

2009-08-17 Thread Shawn McKenzie
nashrul wrote: This is a newbie question... Let's say there are 3 php files, page1.php, page2.php and page3.php. Form submission from page1.php or page2.php will take user to page3.php. I know that we can use parameter that is appended in the action attribute of the form (e.g FORM METHOD=POST

[PHP] SMDR/CDR daemon/processor

2009-08-17 Thread Jim Lucas
I was asked the other day to build a Station Message Detail Recording (SMDR) or Call Detail Record (CDR) processor for a client. I started searching for examples of such a thing. I mostly found commercial apps to handle the job. I could not find anything on Hotscripts, phpGround.com, and a few

Re: [PHP] is there a better way to know from which php file the requestcomes from ??

2009-08-17 Thread Eddie Drapkin
On Mon, Aug 17, 2009 at 5:31 PM, Shawn McKenzienos...@mckenzies.net wrote: nashrul wrote: This is a newbie question... Let's say there are 3 php files, page1.php, page2.php and page3.php. Form submission from page1.php or page2.php will take user to page3.php. I know that we can use parameter

Re: [PHP] is there a better way to know from which php file the requestcomes from ??

2009-08-17 Thread Shawn McKenzie
Eddie Drapkin wrote: On Mon, Aug 17, 2009 at 5:31 PM, Shawn McKenzienos...@mckenzies.net wrote: nashrul wrote: This is a newbie question... Let's say there are 3 php files, page1.php, page2.php and page3.php. Form submission from page1.php or page2.php will take user to page3.php. I know

[PHP] daemon without pcntl_fork

2009-08-17 Thread Jim Lucas
Does anybody know how to use PHP as a daemon without the use of pcntl_fork. http://php.net/pcntl_fork I don't want to have to have a person have a special/custom compilation of PHP just to run a simple daemon. My system: OpenBSD 4.5 w/PHP v5.2.8 I want to launch a daemon out of the

Re: [PHP] SMDR/CDR daemon/processor

2009-08-17 Thread Per Jessen
Jim Lucas wrote: I was asked the other day to build a Station Message Detail Recording (SMDR) or Call Detail Record (CDR) processor for a client. I started searching for examples of such a thing. I mostly found commercial apps to handle the job. What sort of processing do you need? I just

Re: [PHP] daemon without pcntl_fork

2009-08-17 Thread Lars Torben Wilson
2009/8/17 Jim Lucas li...@cmsws.com: Does anybody know how to use PHP as a daemon without the use of pcntl_fork. http://php.net/pcntl_fork Hi Jim, AFAIK you can't. Read on. . . I don't want to have to have a person have a special/custom compilation of PHP just to run a simple daemon. My