[PHP] complicated but fun, please help.
Okay here is what I have. I thought this was going to be a wham bam slam dunk. I need to update the poppasswd file on a Plesk system, I have it so the Plesk database gets updated, but I need to let people change their password from a web form, without having them need to login to the Plesk system. Where I am having problems at is when they need to update the poppasswd, which is a IMAP or QMAIL file. Plesk has files that will update the system, but it seems that I using the exec() and system() I can access those pl files. From the command prompt it works fine, html/php file doesnt work. Any thoughts? I would really appreciate the help, I'm doing this as a favor and would like to clear this off my plate. _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] complicated but fun, please help.
Yes sorry for not being clear. I am trying to use exec() and system(). I guess I'm trying to see if there is another way to do it, like write to a file and have acron job run every minute or so, or if there is some way to make it seem like I am doing this with the right permissions. From: Erik Price <[EMAIL PROTECTED]> To: Daniel McCullough <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED] Subject: Re: [PHP] complicated but fun, please help. Date: Mon, 17 Mar 2003 16:55:52 -0500 MIME-Version: 1.0 Received: from mxrelay.ptc.com ([12.11.148.30]) by mc5-f40.law1.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Mon, 17 Mar 2003 13:58:28 -0800 Received: from HQ-EXFE4.ptcnet.ptc.com (localhost [127.0.0.1])by mxrelay.ptc.com (8.9.0/8.9.0) with ESMTP id QAA22956;Mon, 17 Mar 2003 16:58:27 -0500 (EST) Received: from hq-mail1.ptcnet.ptc.com ([132.253.201.69]) by HQ-EXFE4.ptcnet.ptc.com with Microsoft SMTPSVC(5.0.2195.5329); Mon, 17 Mar 2003 16:56:11 -0500 Received: from ptc.com ([132.253.96.61]) by hq-mail1.ptcnet.ptc.com with Microsoft SMTPSVC(5.0.2195.5329); Mon, 17 Mar 2003 16:56:11 -0500 X-Message-Info: JGTYoYF78jEHjJx36Oi8+Q1OJDRSDidP Message-ID: <[EMAIL PROTECTED]> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en References: <[EMAIL PROTECTED]> In-Reply-To: <[EMAIL PROTECTED]> X-OriginalArrivalTime: 17 Mar 2003 21:56:11.0113 (UTC) FILETIME=[059A0D90:01C2ECD0] Return-Path: [EMAIL PROTECTED] Daniel McCullough wrote: Where I am having problems at is when they need to update the poppasswd, which is a IMAP or QMAIL file. Plesk has files that will update the system, but it seems that I using the exec() and system() I can access those pl files. From the command prompt it works fine, html/php file doesnt work. Any thoughts? I would really appreciate the help, I'm doing this as a favor and would like to clear this off my plate. You probably are logged into the command prompt as a different user than what the PHP binary runs as. If the PHP binary runs as a user named "apache", and you log in as "dmcullough" or "root", and the commands you are trying to execute are restricted only to being run by "dmcullough" or a group that "dmcullough" is in but "apache" is not, then PHP won't run them. I'm assuming that you are using the system() or exec() commands, your email is a little difficult to understand in that respect... sorry. Erik _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Flash book help please
My wife is a designer, not a technical person. She is learning Flash and she needs a book to learn and learn quickly how to do some things like click actions for a project. Can someone please give me an idea of 2-3 good flash books. _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] error message ... never seen this one before.
I get this error. Unknown column 'B' in 'where clause' From this code. $sql = "SELECT * FROM store"; $result = mysql_query($sql) or die(mysql_error()); $store = mysql_fetch_array($result); $count = mysql_num_rows($result); $id = $store['id']; $name = $store['name']; $address = $store['address']; $state = $store['state']; $groups = $store['groups']; for ($i=0; $i<$count; $i++) { $sql2 = "SELECT id FROM store_name WHERE name = ".$name[$i].""; $result2 = mysql_query($sql2) or die(mysql_error()); $store_name = mysql_fetch_object($result2); $sql3 = "SELECT id FROM store_address WHERE address = ".$address[$i].""; $result3 = mysql_query($sql3) or die(mysql_error()); $store_address = mysql_fetch_object($result3); $sql4 = "SELECT id FROM store_state WHERE state_name = ".$state[$i].""; $result4 = mysql_query($sql4) or die(mysql_error()); $store_state = mysql_fetch_object($result4); $build_sql .= $id." - ".$store_name." - ".$store_address." - ".$store_state." - ".$groups[$i]."\n"; } any thoughts? _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] strip single quotes
I'm trying to query the database using a string pulled out of the database and compare and get the id. I can do it to a certain point and what kills my query is single quotes. I CANNOT figure out how to escape it. I DID THIS: $address2 = str_replace("'", "", $address); that worked on some, but not all. $address = stripslashes($store['address']); $address = str_replace("'", "", $address); $address = htmlspecialchars($address); $address = addslashes($address); anyone Some errors I have gotten back "You have an error in your SQL syntax near 's Linen & Home'' at line 1" and "You have an error in your SQL syntax near 's 800 number.'' at line 1" _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] strip single quotes
I have this code in to try and strip single quotes out. But it does it to one but not the rest. $address = str_replace("\\\///", "", $store['address']); $address = str_replace("'", "", $address); $address = str_replace("'", "\'", $address); $address = addslashes($address); $sql2 = "SELECT * FROM store_name WHERE name = '".$store['name']."'"; //$build_sql .= $sql2.""; $result2 = mysql_query($sql2) or die(mysql_error()); $store_name = mysql_fetch_array($result2); $sql3 = "SELECT * FROM store_address WHERE address = '".$address."'"; any thoughts From: "John W. Holmes" <[EMAIL PROTECTED]> Reply-To: <[EMAIL PROTECTED]> To: "'Daniel McCullough'" <[EMAIL PROTECTED]>,<[EMAIL PROTECTED]> Subject: RE: [PHP] strip single quotes Date: Wed, 19 Mar 2003 21:49:10 -0500 MIME-Version: 1.0 Received: from dc-mx03.cluster1.charter.net ([209.225.8.13]) by mc10-f34.bay6.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Wed, 19 Mar 2003 19:04:29 -0800 Received: from [68.117.196.146] (HELO coconut) by dc-mx03.cluster1.charter.net (CommuniGate Pro SMTP 3.5.9) with ESMTP id 107067803; Wed, 19 Mar 2003 21:51:20 -0500 X-Message-Info: JGTYoYF78jEHjJx36Oi8+Q1OJDRSDidP Organization: U.S. Army Message-ID: <[EMAIL PROTECTED]> X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.3416 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 In-Reply-To: <[EMAIL PROTECTED]> Return-Path: [EMAIL PROTECTED] X-OriginalArrivalTime: 20 Mar 2003 03:04:29.0882 (UTC) FILETIME=[6C8DB1A0:01C2EE8D] > I'm trying to query the database using a string pulled out of the database > and compare and get the id. I can do it to a certain point and what kills > my query is single quotes. I CANNOT figure out how to escape it. > > I DID THIS: > $address2 = str_replace("'", "", $address); > > that worked on some, but not all. > $address = stripslashes($store['address']); > $address = str_replace("'", "", $address); > $address = htmlspecialchars($address); > $address = addslashes($address); > > anyone > > Some errors I have gotten back > "You have an error in your SQL syntax near 's Linen & Home'' at line 1" > and > "You have an error in your SQL syntax near 's 800 number.'' at line 1" You need to use addslashes() on any string you insert into your query. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] strip single quotes
another question is could this becoming from the table I am comparing it too? SELECT * FROM store_address WHERE address = '".$address."' where $address is fine but the other table is causing the error. how do I strip that result as well? I have this code in to try and strip single quotes out. But it does it to one but not the rest. $address = str_replace("\\\///", "", $store['address']); $address = str_replace("'", "", $address); $address = str_replace("'", "\'", $address); $address = addslashes($address); $sql2 = "SELECT * FROM store_name WHERE name = '".$store['name']."'"; //$build_sql .= $sql2.""; $result2 = mysql_query($sql2) or die(mysql_error()); $store_name = mysql_fetch_array($result2); $sql3 = "SELECT * FROM store_address WHERE address = '".$address."'"; any thoughts From: "John W. Holmes" <[EMAIL PROTECTED]> Reply-To: <[EMAIL PROTECTED]> To: "'Daniel McCullough'" <[EMAIL PROTECTED]>,<[EMAIL PROTECTED]> Subject: RE: [PHP] strip single quotes Date: Wed, 19 Mar 2003 21:49:10 -0500 MIME-Version: 1.0 Received: from dc-mx03.cluster1.charter.net ([209.225.8.13]) by mc10-f34.bay6.hotmail.com with Microsoft SMTPSVC(5.0.2195.5600); Wed, 19 Mar 2003 19:04:29 -0800 Received: from [68.117.196.146] (HELO coconut) by dc-mx03.cluster1.charter.net (CommuniGate Pro SMTP 3.5.9) with ESMTP id 107067803; Wed, 19 Mar 2003 21:51:20 -0500 X-Message-Info: JGTYoYF78jEHjJx36Oi8+Q1OJDRSDidP Organization: U.S. Army Message-ID: <[EMAIL PROTECTED]> X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.3416 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 In-Reply-To: <[EMAIL PROTECTED]> Return-Path: [EMAIL PROTECTED] X-OriginalArrivalTime: 20 Mar 2003 03:04:29.0882 (UTC) FILETIME=[6C8DB1A0:01C2EE8D] > I'm trying to query the database using a string pulled out of the database > and compare and get the id. I can do it to a certain point and what kills > my query is single quotes. I CANNOT figure out how to escape it. > > I DID THIS: > $address2 = str_replace("'", "", $address); > > that worked on some, but not all. > $address = stripslashes($store['address']); > $address = str_replace("'", "", $address); > $address = htmlspecialchars($address); > $address = addslashes($address); > > anyone > > Some errors I have gotten back > "You have an error in your SQL syntax near 's Linen & Home'' at line 1" > and > "You have an error in your SQL syntax near 's 800 number.'' at line 1" You need to use addslashes() on any string you insert into your query. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HELP HELP in a stand still
I dont know where my brain is today, obviously not with me. I had this working yesterday and then a server crash casued them to run the backup from teh day before and wiped all my work out. Can someone please get me back on track. HEre is the problem. I want to list a collection of items. Standard list. Within that list I want the selection of items that meet x criteria to be bolded and not to have a checkbox. I have that working fine, but its displaying the collection list three times, instead of once. I for the life of me cant remember what I did yesterday. http://www.heathermccullough.com/copelands/administration/new_store/build-d.php thanks _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Using PHP & Credit Card orders
Were you looking for online autho handlers or mod checks? Phil Schwarzmann<[EMAIL PROTECTED]> 04/01/03 08:29AM >>> Where can I find information on using PHP along with secure online Credit Card orders? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php