Jump to content

optikalefx

Members
  • Posts

    363
  • Joined

  • Last visited

    Never

Posts posted by optikalefx

  1. so i had a site that had a forum that was installed in /vbulletin.  So all the links around the internet point there.

     

    Is there a way in only .htaccess that i can route request for /vbulletin/(.+) to /$1 ?

    Basically the new forum is installed on the root, not a directory. Since the vbulletin suite is really an entire cms + blog + website a separate directory wasn't needed.

     

    Right now i have

    RewriteRule ^vbulletin/$ forum.php

    RewriteRule vbulletin/(.+) vbulletin/index.php

     

    and then i have a php file substring the URL and strip out the /vbulletin and redirect the user... yea.

  2. Hi, I'm usually pretty skilled at mysql, but this stupid simple problem i must be overlooking.

     

    I have a store with a bunch of orders in it.  I want to get a result of the most recent purchases, but don't get duplicates.

     

    So if the purchases are

    p1, p2, p2, p2, p2, p3, p4

     

    im trying to get

    p1, p2, p3, p4 as my result

     

    This

    SELECT
    products_name
    FROM 
            orders_products
    ORDER BY 
            orders_products_id desc
    

     

    gives me all results

     

    but this

    SELECT
    distinct products_name
    FROM 
            orders_products
    ORDER BY 
            orders_products_id desc
    

     

    gives me totally different results. it gives me like p4, p6, p9p, p15.

    group by gives me the same.

     

    any ideas? i hope i explained that correctly.

  3. I need to remove /vbulletin from www.site.com/vbulletin/whatever

    so that it rewrites to www.site.com/whatever

     

    I can't figure out how to rewrite a part to be root, so i've made the folder vbulletin and will have index.php do the routing

    RewriteRule vbulletin/(.*) vbulletin/index.php

     

    But im using vbSEO so i can't just do the above.

    VBSEO has this

    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteCond %{REQUEST_FILENAME} !/(admincp|modcp|clientscript|cpstyles|images)/

    RewriteRule ^(.+)$ vbseo.php [L,QSA]

     

    So I figured i could add vbulletin to that cond list. But doing this

    RewriteCond %{REQUEST_FILENAME} !vbulletin

    doesn't work.

     

    Any ideas? Or am i not explaining this well at all.

     

    Thanks!

     

     

  4. so i checked out the server mail logs.

     

    mail.err has this

    Nov 15 17:05:16 vm7202 sm-mta[29995]: oAB4PFem003103: SYSERR(root): Cannot exec /usr/sbin/sensible-mda: No such file or directory

     

    mail.warn has this

    Nov 15 17:05:16 vm7202 sm-mta[29995]: oAB4PFem003103: SYSERR(root): Cannot exec /usr/sbin/sensible-mda: No such file or directory

     

    mail.info has this (contact@qbelow.com) is a customer that isn't getting the email

    Nov 15 17:05:42 vm7202 sendmail[29997]: oAFN5gCE029997: Authentication-Warning: vm7202.store.cmivfx.com: www-data owned process doing -bs
    Nov 15 17:05:42 vm7202 sendmail[29997]: oAFN5gCE029997: from=<technicalSupport@cmivfx.com>, size=459, class=0, nrcpts=1, msgid=<1289862342.4ce1bcc65efcb@store.cmivfx.com>, proto=SMTP, relay=www-data@localhost
    Nov 15 17:05:42 vm7202 sm-mta[29998]: oAFN5gRH029998: from=<technicalSupport@cmivfx.com>, size=734, class=0, nrcpts=1, msgid=<1289862342.4ce1bcc65efcb@store.cmivfx.com>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
    Nov 15 17:05:42 vm7202 sendmail[29997]: oAFN5gCE029997: to=<contact@qbelow.com>, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30459, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (oAFN5gRH029998 Message accepted for delivery)
    Nov 15 17:05:43 vm7202 sm-mta[30000]: STARTTLS=client, relay=qbelow.com., version=TLSv1/SSLv3, verify=FAIL, cipher=AES256-SHA, bits=256/256
    Nov 15 17:05:43 vm7202 sm-mta[30000]: oAFN5gRH029998: to=<contact@qbelow.com>, delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=120734, relay=qbelow.com. [174.120.222.66], dsn=5.0.0, stat=Service unavailable
    Nov 15 17:05:43 vm7202 sm-mta[30000]: oAFN5gRH029998: oAFN5hRH030000: DSN: Service unavailable
    Nov 15 17:05:44 vm7202 sm-mta[30000]: oAFN5hRH030000: to=<technicalSupport@cmivfx.com>, delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=30000, relay=aspmx.l.google.com. [74.125.95.27], dsn=2.0.0, stat=Sent (OK 1289862413 p36si1263156ibg.30)
    

     

    mail.log has this

    Nov 15 17:15:16 vm7202 sm-mta[30167]: oAB4PFem003103: Warning: program /usr/sbin/sensible-mda unsafe: No such file or directory
    Nov 15 17:15:16 vm7202 sm-mta[30167]: oAB4PFem003103: SYSERR(root): Cannot exec /usr/sbin/sensible-mda: No such file or directory
    Nov 15 17:15:16 vm7202 sm-mta[30113]: oAB4PFem003103: to=root, delay=4+18:49:56, xdelay=00:00:00, mailer=local, pri=62040000, dsn=4.0.0, stat=Operating system error
    

     

    So obviously a lot is going wrong.  Anyone know how to understand this?

  5. Hey guys,

     

    I always get a "1" return form php mail, but with the large number of users, 10% aren't getting the email, so they are all constantly emailing me asking me help with their contact info.

     

    The email address that im sending from is noreply@mydomain.com its the actual domain of the site. I'm using swfit mailer, but i've done this with just normal mail.

     

    When asked about spam, some customers said it went there, but most didn't, they just never got it.

     

    How can i reliably send email to my customers?

     

    Thanks!

  6. I'm looking for a solution, i thought this was it.

    Im making a website that sells training videos. Each video has a producer that gets a certain percentage of the payment.

    Both paypal addresses are known and the percentages are known.

     

    How can I make this happen? Adaptive payments parallel payments pull up a screen that shows who is getting paid. That can't happen it needs to be under the radar.

     

    Is this possible with paypal?

     

    Thanks!

  7. first, thats the wrong way to do it. example. 5 is stored in the database. I tell my friend mike to go enter 5. He didn't pay but he gets to see 5.

    You need a user login system, and then send the data with POST from an html form.

     

    But to answer you question: (assuming you have the mysql database and table and fields setup)

     

    // connect and insert

    mysql_connect($server,$user,$pass) or die("could not connect"); 
    mysql_select_db($database) or die("could not select db);
    mysql_query("INSERT INTO aTable SET id = 'your string'");
    

     

    // will echo true or false if the given id exists

    mysql_connect($server,$user,$pass) or die("could not connect"); 
    mysql_select_db($database) or die("could not select db);
    $res = mysql_query("SELECT COUNT(*) as count FROM aTable WHERE id = '{$_GET['id']}'");
    echo (bool) mysql_num_rows($res);
    

     

     

    *note this is not well formed code, and its not tested, its just to give you they syntax.

  8. I need to get * from 2 different tables left joined by a common ID.

    The problem is that when i do that, since 2 (in this case 3) tables have the same field, when i use mysql_fetch_array the result is wrong

    Im trying to get UserID from the database. (note, im trying to get UserID equal to 94 which is the userid)

     

    This is the result of mysql_fetch_array()

    array(75) {
      [0]=>
      string(2) "94"
      ["UserID"]=>
      NULL
      [1]=>
    

     

    And here is the result if i do mysql_fetch_assoc

    array(35) {
      ["UserID"]=>
      NULL
      ["Username"]=>
      string(9) "Billabong"
    

     

    So as you can see, for some reason UserID is NULL but the index 0 holds my ID. Why is this happening?

    I tried aliasing tables etc. The only solution i found so far is to name all the columns im expecting from the 2nd table, which is not the correct solution. There must be a way to tell it to ignore the field i joined on on the joined table. Or select * ignore UserID or something like that

     

    here is the query. NOTE - it runs fine in the console, perfect. Its just these PHP functions. bug maybe?

    SELECT
    users.*,
    subscriptions.*,
    GROUP_CONCAT(userpermissions.TutorialID) as tutorials
    FROM 
    users
    JOIN subscriptions ON (users.UserID = subscriptions.UserID)
    JOIN userpermissions ON (subscriptions.UserID = userpermissions.UserID)
    WHERE users.UserID = '24995'
    

  9. using mamp, I don't think its going through an smtp server, i never set one up.

    Its important for me to note, that the mail never gets received on my mac, but on the server it does. Which shouldn't happen. So im thinkings there something wrong with both my machine and the server.

     

    Yeesh. Maybe port 25 is blocked, ill check.

  10. I have a paypal shopping cart form.  Right now the form submits to paypals normal site and works fine.  But the problem is the user can use firebug and change the price before sending to paypal.

     

    So i want the form to submit to my php script, where ill whatever is in the session, not what was posted, create an NVP string from that post, then POST that to paypal.

     

    I thought i could do this with cURL, but cURL always responds, it never actually takes the user to paypal with post.  Is there a way to mimic what a form submit does completely in PHP?

  11. I don't really care how long it takes for the email to send.  I do care that the php script takes 60 seconds to return meaning, the server is busy for 60 sec, meaning the user will think something is wrong and leave the page while email is trying to send.  Plus you can't load the main website while the server is processing.

     

    Something has to be wrong because i've never had this happen before.

  12. my server is using sendmail, but it takes about 60 seconds to send.  And by send, i don't mean to recieve the message.  I just have a simple mail call, and when i hit that page it takes about 60 sec to return a result to me.

     

    I look for a while on what might be causing, but i can't seem to find anything that i can test out.

    Anyone ever have this know whats going on?

  13. its echoing because

     

    the value of $playerdata['$level_type'] is less than the value of $res['level_req']

    Most likely those values aren't what you are expecting them to be.  Check those guys separately.

     

     

×
×
  • 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.