Help with php installation

Discussion in 'Co-op Advertising Network' started by Stacy, Apr 23, 2005.

  1. #1
    I am trying to install ads on two sites that are almost identical. On the first site , everything worked out fine. On the second, the ads are not showing. Can someone take a look and give me an idea? I've done the install on a few other sites without a problem as well :confused:

    http://www.mattresses-direct.co.uk (i can't post a link - arrggg)

    Thanks for the help!

    Stacy
     
    Stacy, Apr 23, 2005 IP
  2. fryman

    fryman Kiss my rep

    Messages:
    9,604
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    370
    #2
    Are you getting any error message? Do you have both sites on the same server?
     
    fryman, Apr 23, 2005 IP
  3. Stacy

    Stacy Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    they are on the same server and i don't get an error
     
    Stacy, Apr 23, 2005 IP
  4. fryman

    fryman Kiss my rep

    Messages:
    9,604
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    370
    #4
    Why does your coop code say echo 'abcd';??
     
    fryman, Apr 23, 2005 IP
  5. Stacy

    Stacy Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    because i wanted to see if the echo would work - i don't have debugging tools for this. and the echo does not show. that should show on the screen, right? so now i'm wondering if php is not being rendered on that site.
     
    Stacy, Apr 24, 2005 IP
  6. fryman

    fryman Kiss my rep

    Messages:
    9,604
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    370
    #6
    That must be happening. If you have cpanel you can enable php in a few seconds with a handler.
     
    fryman, Apr 24, 2005 IP
  7. Stacy

    Stacy Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I am actually doing this for someone and asked him to check to be sure that it is enabled, I will ask again - he assured me it is, but then at the very least I would htink I would see my echo 'abcd'. Thanks for the help!
     
    Stacy, Apr 24, 2005 IP
  8. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #8
    noppid, Apr 24, 2005 IP
  9. Stacy

    Stacy Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Thank you. I saw that last night and had a good chuckle over your "talking to yourself" because I have done that! Can you tell me how you fixed that? I'm not sure that that is my problem since I have another site on the same server working, but worth a try.
     
    Stacy, Apr 24, 2005 IP
  10. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #10

    Yeah, I'm shooting from the hip here. With the echo not working, you may have another issue.

    I pointed it out because in my case, there was no error being thrown, just no ads showing. I just happened to try another page that had different error handling setting and it spit out that the remote file calls were the issue.

    Anywho, it's super easy to fix if anyone must.

    I replaced...

    
    $new_ad = file_get_contents ('http://ads.digitalpoint.com/network.php?c=' . $_SERVER['SERVER_NAME'] . '&type=link');
    
    PHP:
    with...

    
    				// curl hack...
    
    $curl_handle = curl_init();
    
    // Where should we get the data?
    curl_setopt ($curl_handle, CURLOPT_URL, 'http://ads.digitalpoint.com/network.php?c=' . $_SERVER['SERVER_NAME'] . '&type=link');
    
    // This says not to dump it directly to the output stream, but instead
    // have it return as a string.
    curl_setopt ($curl_handle, CURLOPT_RETURNTRANSFER, 1);
    
    // the following is optional, but you should consider setting it
    // anyway. It prevents your page from hanging if the remote site is
    // down.
    curl_setopt ($curl_handle, CURLOPT_CONNECTTIMEOUT, 1);
    
    // Now, YOU make the call.
    $new_ad = curl_exec($curl_handle);
    
    // And tell it to shut down (when your done. You can always make more
    // calls if you want.)
    curl_close($curl_handle);
    
    			
    				// end curl hack
    
    PHP:
    That is a cut and paste from the suggestions article. Nothing special, but it works if the remote file issue happens to be your problem.

    If not, well maybe it will help someone else.
     
    noppid, Apr 24, 2005 IP
  11. Stacy

    Stacy Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Thanks will give it a try!!
     
    Stacy, Apr 24, 2005 IP
  12. Stacy

    Stacy Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    When I look in Plesk, ssi support is checked as well as php support and a number of others. Is that correct? If it is, then can someone give me another idea - the fopen didn't seem to be a problem either.
     
    Stacy, Apr 25, 2005 IP
  13. Stacy

    Stacy Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Anybody have any other ideas? I'm really stuck here.
     
    Stacy, Apr 26, 2005 IP
  14. Stacy

    Stacy Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Got it - thanks anyway
     
    Stacy, Apr 26, 2005 IP
  15. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #15

    Well please do tell how. :)
     
    noppid, Apr 26, 2005 IP