Jump to content

jtravis

Members
  • Posts

    16
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

jtravis's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. [!--quoteo(post=363358:date=Apr 10 2006, 12:51 PM:name=thorpe)--][div class=\'quotetop\']QUOTE(thorpe @ Apr 10 2006, 12:51 PM) [snapback]363358[/snapback][/div][div class=\'quotemain\'][!--quotec--] If this is all this cron job is going to do and these values aren't going to be in any way dynamic, why not just hard code the values into the script? [/quote] Good point! I guess I was thinking so outside the box that I didn't think to look inside of it. I suppose part of it was I wasn't for certain how the script ran as it's a third-part mod and was wanting to see if this way would be easier. But to be honest. I never even thought of that. LMAO! Thanks again.
  2. I suppose my example was poor, or I'm just not grasping the concept. Would this work or must I use the $argv? [code]//Parse the text to get the values. parse_str('download=tempfile&dltype=froogle'); //Replaced $_GET with $_SERVER in attempt to run from cli $ep_dltype = (isset($_SERVER['dltype'])) ? $_SERVER['dltype'] : $ep_dltype;[/code]
  3. Just making sure I understand. I would have to alter the original script to look for the $argv value instead of the $_GET values or both. How is using parse_str() different from $_SERVER['argv'] (I was RTFM ;))? Just curious. Is the $argv an associative array as well? Meaning instead of using a numerical index, can I reference it by name as in $_GET? Thanks for your reply! Much appreciated!
  4. Hey all! I was wondering if anyone would know how to run a php script from a shell script or cron job and pass $_GET data to it? I have a script for my cart (that was a module that I didn't code) that generates a file to be uploaded to Froogle. So basically, I'm wanting something like this in my script. php -q /path_to_file/file.php?data1=value1&data2=value2 Is this possible? Thanks!
  5. I can't be much help here except ask are you able to view your site thorugh your browser using either name or IP? Can you navigate to any files? Other than checking to insure apache is using the correct servername and your host file has the correct entries, I'm out of ideas there. I'm having another issue with dreamweaver and SAMBA that maybe someone can help with. If I connect to my share where my site is using Windows explorer, I can make all the edits I want to any file without any problems. If I connect to the share through Dreamweaver, I can view fine. When I edit a file and then try to save that file, I receive "access denied". No here's the really messed up thing. After I receive the error above, I can download or view the file through Explorer, and the file has INDEED BEEN EDITED. For some unknown reason, Dreamweaver thinks that it was denied, but it really wasn't...err something... This has worked quite well in the past and only started once I changed the share path to an abosolute path as opposed to using a sym link to get me there. The permissions are for everything there are set the way they should be and probably a bit too open from a security stand point.
  6. Is this on a linux box? I had a problem with php.ini a few days ago because I actually had more than one file. Apparently, when I emerged (Gentoo) php4 months ago, it failed the first time and the script didn't remove the php.ini file when I emerge -C... I ended up having to reinstall it.
  7. Is this on a linux box? I had a problem with php.ini a few days ago because I actually had more than one file. Apparently, when I emerged (Gentoo) php4 months ago, it failed the first time and the script didn't remove the php.ini file when I emerge -C... I ended up having to reinstall it.
  8. Sweet!. Thanks keeB! BTW, I've implemented your idea for debugging.
  9. Hello all, I'm needing a function or at least a good idea on how to check the value of a string to see if it is in a valid date format before inserting into mysql. I've been looking at the string functions, but if there is something easier to use, I'd rather use that. Form to take input. [code]<td><p align="center"><strong>Date Issued<br>       </strong><span class="style3">(Enter '00' for the day if unknown.)</span> </p></td>     <td> <input name="dateIssued" type="text" maxlength="10">       <br>     <span class="style3">(YYYY-MM-DD)</span><br></td>[/code] Is my best option to loop through the the above string value? TYIA
  10. The first thing that comes to mind is restarting the server. Apache won't pull the new info from php.ini until it's been restarted and rereads all the configurations.
  11. [!--quoteo(post=354322:date=Mar 12 2006, 05:22 PM:name=keeB)--][div class=\'quotetop\']QUOTE(keeB @ Mar 12 2006, 05:22 PM) [snapback]354322[/snapback][/div][div class=\'quotemain\'][!--quotec--] I always create a 'debug mode' for complex parts of my code to make sure the inner workings are all fine and dandy.. [= That way, whenever silly things like that go wrong, you just set a simple flag and everything is displayed nicely for you! [/quote] Debug mode? Hmm...Interesting Idea. Just curious... You would start you code assignin a bool or something and in the other pieces of code you have an 'if' that echos out the results? What's your method? lol
  12. [!--quoteo(post=354289:date=Mar 12 2006, 03:33 PM:name=jtravis)--][div class=\'quotetop\']QUOTE(jtravis @ Mar 12 2006, 03:33 PM) [snapback]354289[/snapback][/div][div class=\'quotemain\'][!--quotec--] Null value? WTF? why would a value of '3' be null with gettype()? This is the code that genrates that line. [code]echo "<br>Value of Type is $type. TypeID is $typeID which is a ".gettype($typeid)." value.<br>";[/code] [/quote] FYI. I found the problem there. Apparently, I got so wrapped up in everything else, I forgot to correct the problem with gathering the cardID. That part at least is working, and that was my biggest hurdle at the moment. Now on to other problems... :D
  13. [!--quoteo(post=354282:date=Mar 12 2006, 03:20 PM:name=jtravis)--][div class=\'quotetop\']QUOTE(jtravis @ Mar 12 2006, 03:20 PM) [snapback]354282[/snapback][/div][div class=\'quotemain\'][!--quotec--] select id from t_card where name='Name' and cost='1' and text='Text' and flavor_text='Text' and power='0' and toughness='0' insertDataT_Card =insert into t_card(name, cost, text, flavor_text, quantity, power, toughness) values('Name', '1', 'Text','Text', '1', '0', '0') queryTypeID= select id from t_type where type='Artifact' typeRowID= Resource id #9 tRow= tRow typeID= 3 Value of Type is Artifact. TypeID is 3 which is a NULL value. Cannot add or update a child row: a foreign key constraint fails (`test/tl_card_type`, CONSTRAINT `tl_card_type_ibfk_1` FOREIGN KEY (`t_card_id`) REFERENCES `t_card` (`id`)) [/quote] Null value? WTF? why would a value of '3' be null with gettype()? This is the code that genrates that line. [code]echo "<br>Value of Type is $type. TypeID is $typeID which is a ".gettype($typeid)." value.<br>";[/code]
  14. [!--quoteo(post=354274:date=Mar 12 2006, 03:01 PM:name=keeB)--][div class=\'quotetop\']QUOTE(keeB @ Mar 12 2006, 03:01 PM) [snapback]354274[/snapback][/div][div class=\'quotemain\'][!--quotec--] Can you also post some of the debugging information like.. print the query out? That might make it a bit easier to troubleshoot. [/quote] Sure..No problem. Echoing[code]switch ($insertID){         case 1:              echo "<br>insertDataT_Card =".$insertDataT_Card = "insert into t_card(name, text, flavor_text, quantity)".             " values('$cardName','$cardText','$flavorText', '$quantity')";             mysql_query($insertDataT_Card, $magicDB) or die(mysql_error());             break;             case 2:             echo "<br>insertDataT_Card =".$insertDataT_Card = "insert into t_card(name, cost, text, flavor_text, quantity)".             " values('$cardName', '$cardCost', '$cardText','$flavorText', '$quantity')";             mysql_query($insertDataT_Card, $magicDB) or die(mysql_error());             break;         case 3:             echo "<br>insertDataT_Card =".$insertDataT_Card = "insert into t_card(name, cost, text, flavor_text, quantity, power, toughness)".             " values('$cardName', '$cardCost', '$cardText','$flavorText', '$quantity', '$power', '$toughness')";             mysql_query($insertDataT_Card, $magicDB) or die(mysql_error());             break;     }[/code] [code]//Continue gathering data     $queryRarityID = "select id from t_rarity where rarity='$rarity'";     echo "<br>queryRarityID= ".$queryRarityID."<br>";     $rarityRowID = mysql_query($queryRarityID, $magicDB);     echo "rarityRowID= ".$rarityRowID."<br>";     while($rRow = mysql_fetch_assoc($rarityRowID))         {             echo "rRow= ".rRow."<br>";             $rarityID = $rRow[id];             echo "rarityID= $rarityID[id] <br>";         }     $querySetID = "select id from t_set where name='$set'";     $setID = mysql_query($queryRarityID, $magicDB);     $queryTypeID = "select id from t_type where type='$type'";     $typeRowID = mysql_query($queryTypeID, $magicDB);     while($tRow = mysql_fetch_assoc($typeRowID))         {             $rarityID = $tRow[id];         }         //insert the id's into the relational tables     //TL_CARD_TYPE TABLE     echo "<br>Value of Type is $type. TypeID is $typeID which is a ".gettype($typeid)." value.<br>";     $insertDataTL_Card_Type = "insert into tl_card_type(t_card_id, t_type_id) values('$cardID', '$typeID')";     mysql_query($insertDataTL_Card_Type, $magicDB) or die(mysql_error()); [/code] [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--] select id from t_card where name='Name' and cost='1' and text='Text' and flavor_text='Text' and power='0' and toughness='0' insertDataT_Card =insert into t_card(name, cost, text, flavor_text, quantity, power, toughness) values('Name', '1', 'Text','Text', '1', '0', '0') queryTypeID= select id from t_type where type='Artifact' typeRowID= Resource id #9 tRow= tRow typeID= 3 Value of Type is Artifact. TypeID is 3 which is a NULL value. Cannot add or update a child row: a foreign key constraint fails (`test/tl_card_type`, CONSTRAINT `tl_card_type_ibfk_1` FOREIGN KEY (`t_card_id`) REFERENCES `t_card` (`id`))[/quote]
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.