[PHP] [PHP]: permission problem www-data
Hi Everyone, I am creating a file in PHP script which takes a value from a form and writes it to a file. However, i don't have the mode permission for the file instead it is owned by www-data.What can i do to ensure that the file is owned by me. drwxr-xr-x 2 www-data www-data 4096 2011-01-17 22:01 18757170111.0 -rw-r--r-- 1 www-data www-data 40 2011-01-17 23:39 32238.hydro Thanks.
Re: [PHP] [PHP]: permission problem www-data
Hi Ash, I have tried to use chown but i am getting the error Warning: chown() [function.chown]: Operation not permitted I would like to know why the apache(www-data) owns the file rather than the user (me). Thanks. On Tue, Jan 18, 2011 at 11:53 AM, a...@ashleysheridan.co.uk a...@ashleysheridan.co.uk wrote: you could use the chown method in php, which should do what you need. Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: Moses jam...@gmail.com Date: Tue, Jan 18, 2011 09:44 Subject: [PHP] [PHP]: permission problem www-data To: php-general@lists.php.net Hi Everyone, I am creating a file in PHP script which takes a value from a form and writes it to a file. However, i don't have the mode permission for the file instead it is owned by www-data.What can i do to ensure that the file is owned by me. drwxr-xr-x 2 www-data www-data 4096 2011-01-17 22:01 18757170111.0 -rw-r--r-- 1 www-data www-data 40 2011-01-17 23:39 32238.hydro Thanks.
[PHP] how can one run python script in php
Hi Everyone, I am trying to run a python script in php using exec or system command, but there is no answer. musa
[PHP] http request
Hi Everyone, I would like to know whether there is a http request PHP script. I would like to use in cases where a background script is running for sometime and outputs the results in PHP once the script has been executed. Thanks. musa
Re: [PHP] How to create an intermediary page between two pages
Dear Folks, Thanks Tedd for the reply. Do you have a simple example to ilustrate your great idea. Thanks. On Sat, May 23, 2009 at 3:47 PM, tedd tedd.sperl...@gmail.com wrote: At 2:20 PM +0200 5/23/09, Moses wrote: Hi Folks, I would like to know whether you can connect two pages via an intermediary page. For example if you have main.php, which is a form whose action is directed to function.php. Function.php process the information from main.php then displays the result. This can take roughly 6 seconds or more. Is it possible to create an intermediary page which alerts the user that the his/her request is being processed in few seconds, then ultimately redirects to function.php (display results). Any idea shall be appreciated. Thanks. Moses Moses: Two things: 1. Anytime the user has to wait, provide a notice of what's happening, such as wait gif to let them know something is happening. Here are some examples: http://webbytedd.com/bb/wait/ 2. Why two scripts? Why not just create a single script? I often have a single script that simply submits forms to itself and evaluates the contents. If the contents pass inspection, then the script moves on to the next step. If not, then the script shows the user where the problem is and ask for the user to fill the form out correctly. I often couple this with javascript to provide more immediate interaction with the user, such as checking proper email format, password and password-confirmation being equal, input required fields, and other client-side stuff. This helps with preparing the data before submission. But I ultimately check and validate all incoming data server-side before doing anything important with it. There's no rule that says everything must be done in separate pages/scripts. Consider this, use a $step variable and set the initial value to 0. Drop the user into the first form and use a input type='hidden' name='step' value='1' within that form. When the user clicks submit, then $step = $_POST['step'] will equal 1 and process the data submitted via a switch or if statement. If everything is Okay, then continue to the next part. If not, then set $step=0 and start over again. Some of my forms have up to ten steps and that's the way I do it. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com
[PHP]Cannot output the same data from text file in PHP
Hi Folks, I have a written a script in PHP which outputs the result from a text file. The PHP script is as follows: ?php $alldata = file(result.txt); echo tabletrtd; foreach($alldata as $line_num = $line) { echo $line.br; } echo/td/tr/table; ? I have attached the result.txt file. However the output of the script is as follows: Query: 1 atggcaatcgtttcagcagattcgtaattcgagctcgcccatcgatcctcta 60 Sbjct: 1 atggcaatcgtttcagcagattcgtaattcgagctcgcccatcgatcctcta 60 which is not exactly as in the result.txt file in that the pipelines are displaced. Any pointer to this problem shall be appreciated. Thanking you in advance. Moses Query: 1 atggcaatcgtttcagcagattcgtaattcgagctcgcccatcgatcctcta 60 Sbjct: 1 atggcaatcgtttcagcagattcgtaattcgagctcgcccatcgatcctcta 60 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Email Setup problem
Hi Everyone I have tried to configure my php.in file so as allow me to send email in PHP from local server. I added the lines in php.ini file sendmail_path = /usr/sbin/sendmail -t sendmail_from = n...@localhost Therafter restarted my apache by: sudo /etc/init.d/apache2 restart However, I get the following error when I restart mt apache apache2: Could not reliably determine the server's fully qualified domain name, using 12... for ServerName Thanks. Moses
[PHP] integrating perl and PHP problem
Hi Everyone, I have a perl program which I would like to display its results in PHP. I have read PHP book and the solution is to convert the perl program which is not easy. I have tried a simple example but it is not working. The perl script is #! /usr/bin/perl -w print hello world and the Php script is ?php $result = exec(/var/www/hello.pl,$dirout); foreach($dirout as $line) { echo $line\n; } ? Thanks.
[PHP] Re: Screen Shots
Mark McWhirter wrote: Is there any way that I can get a script to take a screen shot every minute of all the users using my php website? Why not add a state capture inclusion (require) to each of your pages? Have it grab, for instance, the user's IP address, the session ID, the URL of page, and the user's login information if that's available. Dump the result into a tracking table in your database. In the admin part of your site, add a page which formats the tracking info nicely, perhaps selected by time period. There's no need to do a screen capture. You own the information. I don't see why it shouldn't be legal to capture it and display it to yourself considering all the folks who do full click tracking. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Screen Shots
Dotan Cohen wrote: On 22/10/06, Fred Moses [EMAIL PROTECTED] wrote: Mark McWhirter wrote: Is there any way that I can get a script to take a screen shot every minute of all the users using my php website? Why not add a state capture inclusion (require) to each of your pages? Have it grab, for instance, the user's IP address, the session ID, the URL of page, and the user's login information if that's available. Dump the result into a tracking table in your database. In the admin part of your site, add a page which formats the tracking info nicely, perhaps selected by time period. There's no need to do a screen capture. You own the information. I don't see why it shouldn't be legal to capture it and display it to yourself considering all the folks who do full click tracking. And how does that produce a screenshot? Dotan Cohen http://what-is-what.com/what_is/virus.html It doesn't. Why do you need a screen shot when you can get a history page any time you want to? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] IP Address
Is there a function which returns the IP address of the requestor of the current page? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: postback for php
Miles Thompson wrote: At 11:48 AM 10/18/2006, M.Sokolewicz wrote: Ross wrote: Looked on google and not found a satisfactory answer. Doies anyone have a funtion to do this? R. please explain, in details, what it is you're looking for. postback for php - a function to do this doesn't mean squat to most people. Please EXPLAIN. - tul Yes, not a helpful description. Maybe he means a callback function which would do something like echo 'a href='. $_SERVER['PHP_SELF'] .'Please try again/a'; and he may have to pass a variable string. M. First approximation: Postback is an ASP.NET mechanism for running server side code as part of a page execution cycle when the user clicks a control which has been set up for this. a href='. $_SERVER['PHP_SELF']... is an example. A more general example in the PHP world is creating a form with the action referring to the same page. At the beginning of the page, one checks for an action field the value of which is used to dispatch to some code relevant to the action. Both systems can yield similar effects. For more info, just Google postback. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL Connection
Hello, Thanks it works now Regards Moses Hello, This seems not to be working, I am using win2000 and a newbie. please simplify this process. ERROR 1045: Access denied for user: '@127.0.0.1' (Using password: NO) mysql GRANT ALL PRIVILEGES ON *.* TO [EMAIL PROTECTED] - IDENTIFIED BY 'cludiana' WITH GRANT OPTION; ERROR 1045: Access denied for user: '@127.0.0.1' (Using password: NO) mysql Regards moses -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MySQL Connection
Hello, Would be grateful if someone couldkindly point me in the right direction. Whenever I try to connect to mysql server, I get these messsage back 1. mysql GRANT ALL PRIVILEGES ON *.* TO moses@% IDENTIFIED BY cludiana; ERROR 1045: Access denied for user: '@127.0.0.1' (Using password: NO) mysql 2. mysql GRANT ALL PRIVILEGES ON *.* TO moses@% IDENTIFIED BY cludiana; ERROR 1045: Access denied for user: '@127.0.0.1' (Using password: NO) mysql what could be wrong. Help please . Regards Moses -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL Connection
Hello, This seems not to be working, I am using win2000 and a newbie. please simplify this process. ERROR 1045: Access denied for user: '@127.0.0.1' (Using password: NO) mysql GRANT ALL PRIVILEGES ON *.* TO [EMAIL PROTECTED] - IDENTIFIED BY 'cludiana' WITH GRANT OPTION; ERROR 1045: Access denied for user: '@127.0.0.1' (Using password: NO) mysql Regards from:Lars Torben Wilson [EMAIL PROTECTED] date:Wed, 18 Jun 2003 01:17:15 to: [EMAIL PROTECTED] cc: [EMAIL PROTECTED] subject: Re: [PHP] MySQL Connection On Tue, 2003-06-17 at 17:13, [EMAIL PROTECTED] wrote: Hello, Would be grateful if someone couldkindly point me in the right direction. Check the MySQL documentation. You also might want to ask on the MySQL mailing list. http://www.mysql.com/doc/en/Default_privileges.html http://www.mysql.com/doc/en/Access_denied.html It appears, however, that mysqld is not recognizing the authority of whoever you're connected as to modify the grant tables. Try connecting as the admin user. Good luck, Torben Whenever I try to connect to mysql server, I get these messsage back 1. mysql GRANT ALL PRIVILEGES ON *.* TO moses@% IDENTIFIED BY cludiana; ERROR 1045: Access denied for user: '@127.0.0.1' (Using password: NO) mysql 2. mysql GRANT ALL PRIVILEGES ON *.* TO moses@% IDENTIFIED BY cludiana; ERROR 1045: Access denied for user: '@127.0.0.1' (Using password: NO) mysql what could be wrong. Help please . Regards Moses -- Torben Wilson [EMAIL PROTECTED]+1.604.709.0506 http://www.thebuttlesschaps.com http://www.inflatableeye.com http://www.hybrid17.com http://www.themainonmain.com - Boycott Starbucks! http://www.haidabuckscafe.com - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php