webent
Members-
Posts
255 -
Joined
-
Last visited
Never
Everything posted by webent
-
Without seeing your code it is hard to say, but if you can pass the variable to Javascript via a function as you're opening it up...
-
I use it as is, and it works fine, just thought that a Join would be better... If you wouldn't mind too awful much then, could you please tell them to fix it so that we can use dynamic table names in Joins...
-
Thanks, the best tutorial I've read all evening on Crons...
-
Ok, doesn't work if I remove the second MAILTO either
-
Ok, tried to do that, with it like that in the example and it wouldn't take it, I got this error... "/home/mydomain/cronjobs/crons.txt":4: premature EOF errors in crontab file, can't install.
-
Hi, I found this bit of a tutorial to create my cron jobs for a couple tasks that I need ran in the middle of the night... So, I created two different .txt files, put them in the same directory and gave them the magical command to begin... Problem is, when I decided that I couldn't wait until tomorrow morning to test out whether or not the cron jobs would work correctly, I went in and typed, "crontab -l myfile.txt", thinking I could edit the time in which it would run, hehehe, guess what, that didn't work, it only showed one file... So, I started to immediately suspect that you aren't supposed to have multiple crontabs in the same directory, that in fact, they can all be entered on one .txt file and then given the magical "crontab /home/user/myfile.txt" command to begin... So, if I'm on track and correct thus far, could someone tell me how to correctly enter in more than one cron task on one crontab, because the tutorial made it very clear that {Enter} is a very big deal... I Googled and Googled but nowhere did I see anything related to more than one cron task in a crontab... Do I just hit {Enter} at the end of the last character of the cron task and immediately start the next cron task? Like this? MAILTO=support@mydomain.com 0 1 * * * /home/mydomain/public_html/directory/module_control.php?do_it MAILTO=support@mydomain.com 30 1 * * * /home/mydomain/public_html/directory/compliance-check.php?do_it Oh yeah, one more thing, will the cron pick up that I have variables on the link, so that the task in the .php will start, it'll see $_GET['do_it']?... the reason being is that I run them manually also and I use that variable to begin the task...
-
Ok, this all worked actually, its just that I had an images directory already in the secondary domain,... So, Thorpe pointed out, by removing or renaming the images directory and then leaving off the trailing slash at the end of the line, it created an images directory for me with the SymLink in it... Example: cd /home/seconddomain/public_html/shoppingcart ln -s /home/maindomain/public_html/shoppingcart/images images
-
I sent the data to your personal message...
-
Yes, actually you make it sound very simple, thank you... I really do appreciate it... and I did just what you said... but it's not working... I'll explain what I did... cd /home/seconddomain/public_html/shoppingcart ln -s /home/maindomain/public_html/shoppingcart/images images/ It took without any errors... Then I went to "http://maindomain.com/shoppingcart/images/image001.jpg" and the image shows as it should, so then I go to the secondary domain, "http://seconddomain.com/shoppingcart/images/image001.jpg" and it doesn't show up... Did I do something wrong again?
-
I use this... That way you can define as many extensions as you like... $pattern="(\.csv$)|(\.CSV$)|(\.xls$)|(\.XLS$)"; $files = array(); if($handle = opendir($dirname)) { while(false !== ($file = readdir($handle))) { if(eregi($pattern, $file)) ################################### ################################### } closedir($handle); }
-
Hi, I had someone helping me on this little project, but I haven't back from them in a few days, so I was wondering if someone could help me pick back up where it was left off... Let me start by explaining what I want to accomplish,... I have a server, that has a master domain and several other domains... all of these other domains need to get their images from the master domain and they are being called via ssl... So I was told that I could use .htaccess and SymLinks to accomplish this quite easily... but I've Googled by behind off and haven't found anything near what I'm trying... So, here's what I was told to do... And here was my response... Can someone please help me from this point? Thank you in advance for any assistance you may be able to provide.
-
Try... session_start(); $_SESSION['accountDetailsID']='$accountDetailsID'; $_SESSION['email']='$email'; header("location:viewprofile.php");
-
My time ran out for me to edit my last post, but I had a very small syntaxical error... On the first line of the first query, the table should be "$local_database.featured_products" and the "WHERE" clause removed... here is the corrected query in total... $result = mysql_query("SELECT SKU FROM $local_database.featured_products", $b_link); while ($row = mysql_fetch_assoc($result)) { $SKU = $row['SKU']; $sub_result = mysql_query("SELECT PRODUCT_IMAGE, MSRP, PRODUCT_NAME FROM domain_supplier.$single_product_line ORDER BY RAND() WHERE SKU = '$row[sKU]'", $a_link); while ($sub_row = mysql_fetch_assoc($sub_result)) { $PRODUCT_IMAGE = $sub_row['PRODUCT_IMAGE']; $MSRP = $sub_row['MSRP']; $PRODUCT_NAME = $sub_row['PRODUCT_NAME']; } }
-
Yes, it is possible... You'll need to build a bit of a function for it... I believe there are several examples like what you want on the php site, www.php.net/date
-
Maybe something like... SELECT SUM(VISITS) FROM TABLE GROUP BY IP;
-
Can someone please help me with the syntax of how to join 2 different databases with 2 different tables? Also, the table name of second query is dynamic and thus, a variable. The common shared field name of both tables is the SKU. Here's my code for the two queries,... $result = mysql_query("SELECT SKU FROM domain_supplier.featured_products WHERE featured_products_id = '1'", $b_link); while ($row = mysql_fetch_assoc($result)) { $SKU = $row['SKU']; $sub_result = mysql_query("SELECT PRODUCT_IMAGE, MSRP, PRODUCT_NAME FROM domain_supplier.$single_product_line ORDER BY RAND() WHERE SKU = '$row[sKU]'", $a_link); while ($sub_row = mysql_fetch_assoc($sub_result)) { $PRODUCT_IMAGE = $sub_row['PRODUCT_IMAGE']; $MSRP = $sub_row['MSRP']; $PRODUCT_NAME = $sub_row['PRODUCT_NAME']; } }
-
Tried a completely different route and it doesn't do anything at all... function retrieveImage($image) { $old_destination = "/home/mainaccount/public_html/supplier/images/$image"; $new_destination = "images/$image"; //copy($old_destination, $new_destination); exec("cp -R $old_destination $new_destination"); return; }
-
I just changed chown of the image folder and all of it's files to the same owner of the domain that is calling the copy(), still "Permission denied" This just does not make since...
-
Actually what I think happened when I first tried to change the permissions like DarkWater instructed me to, I didn't wait long enough... I think it took a while to change permissions for 30,000 images... copy() still does not work, still gives "Permission denied", even changed both directories and all images to 777
-
I just tried that, but it didn't change the permissions of the images within the directory, did it from root via ssh... Do you think that it is because my root privileges are in a vps and not a true dedicated, that my abilities to do such functions are limited? Edit: Did it again, using the full path instead of just being in the next up directory and naming the directory... It worked! Buh Yah! Now let's just see if the Copy() works...
-
Gotcha, good info, thank you... When I chmod that directory though, shouldn't it of changed the attributes for all the images within as well?
-
644 , that would be my problem then wouldn't it... having some issues with chmod sticking though... I went and re-checked the permissions on the directory that I told you was 777, it was back to 755 ... perhaps I have to ssh in as root and do it, for it to stick, perhaps a Cpanel security issue or something that won't allow non-root users to change permissions... On that subject, I'll have to find the unix command for chmod all the contents in a directory ... I assumed that when you chmod a directory, all contents changed to that value... Unless that goes back to what I originally was saying about how the chmod isn't taking...
-
Hi all, I am trying to copy images from one directory on one domain to another directory on another domain, but I get permission denied... I have both directory's permissions set to 777, so I assume it's a chown thing, would that be correct? Here's my code... if (isset($_GET['CATEGORY'])) { $result = mysql_query("SELECT SKU, PRODUCT_IMAGE, MSRP, PRODUCT_NAME FROM $_GET[PRODUCT_LINE] WHERE CATEGORY = '$_GET[CATEGORY]' LIMIT 10"); while ($row = mysql_fetch_assoc($result)) { $image = retrieveImage($row[PRODUCT_IMAGE]); echo '<img src="' . $image . '" />'; echo '<br>' . $row[PRODUCT_NAME] . ' - $' . $row[MSRP] . '<br>'; } exit; } function retrieveImage($image) { $image = "/home/mainaccount/public_html/supplier/images/$image"; $new_destination = "images/$image"; copy($image, $new_destination); return; }
-
It's only really called when I log into my control center anyway... so if it gets called once a day, I don't suppose it would make much of a difference, there's only 30,000 combined count... I was just wondering if there was a cleaner way... I have a bad habit of using sloppy code... Thanks fenway
-
Ok, thank you... That part's done... $apparel = mysql_query("SELECT COUNT(*) FROM apparel"); $apparel_count = mysql_result($apparel, 0, 0); $arts_crafts = mysql_query("SELECT COUNT(*) FROM arts_crafts"); $arts_crafts_count = mysql_result($arts_crafts, 0, 0); $at_home = mysql_query("SELECT COUNT(*) FROM at_home"); $at_home_count = mysql_result($at_home, 0, 0); $automotive = mysql_query("SELECT COUNT(*) FROM automotive"); $automotive_count = mysql_result($automotive, 0, 0); $b2b_services = mysql_query("SELECT COUNT(*) FROM b2b_services"); $b2b_services_count = mysql_result($b2b_services, 0, 0); $collectibles = mysql_query("SELECT COUNT(*) FROM collectibles"); $collectibles_count = mysql_result($collectibles, 0, 0); $electronics = mysql_query("SELECT COUNT(*) FROM electronics"); $electronics_count = mysql_result($electronics, 0, 0); $gift_items = mysql_query("SELECT COUNT(*) FROM gift_items"); $gift_items_count = mysql_result($gift_items, 0, 0); $jewelry = mysql_query("SELECT COUNT(*) FROM jewelry"); $jewelry_count = mysql_result($jewelry, 0, 0); $professional = mysql_query("SELECT COUNT(*) FROM professional"); $professional_count = mysql_result($professional, 0, 0); $sport_outdoor = mysql_query("SELECT COUNT(*) FROM sport_outdoor"); $sport_outdoor_count = mysql_result($sport_outdoor, 0, 0);