Trying ASP with PHP

Discussion in 'Co-op Advertising Network' started by ColumbusOnline, Jun 8, 2005.

  1. #1
    Since I can't find any good working ASP version now, I am trying the PHP / ASP version found at: http://forums.digitalpoint.com/showthread.php?t=12796 that dkalweit wrote and I am getting the following error:

    Warning: fopen(ad_network_ads_213.txt): failed to open stream: Permission denied in D:\Inetpub\DublinOhioRealEstate\ad_network213.php on line 38

    Warning: flock(): supplied argument is not a valid stream resource in D:\Inetpub\DublinOhioRealEstate\ad_network213.php on line 39

    Notice: Undefined offset: 1 in D:\Inetpub\DublinOhioRealEstate\ad_network213.php on line 63

    Notice: Undefined offset: 1 in D:\Inetpub\DublinOhioRealEstate\ad_network213.php on line 63

    Notice: Undefined offset: 1 in D:\Inetpub\DublinOhioRealEstate\ad_network213.php on line 63

    Notice: Undefined offset: 1 in D:\Inetpub\DublinOhioRealEstate\ad_network213.php on line 63

    Notice: Undefined offset: 1 in D:\Inetpub\DublinOhioRealEstate\ad_network213.php on line 63
    .
    .
    .
    .
    My Ad_Network_Ads_213.txt file has write permissions...

    Maybe I don't have PHP installed correctly, but I have tried installing that several times and it doesn't seem to help, anyone got a simple php file I can use to verifiy if php is working correctly?... any ideas?

    my url is: www.dublinohiorealestate.net
     
    ColumbusOnline, Jun 8, 2005 IP
  2. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #2
    
    <?php
    phpinfo();
    ?>
    
    PHP:
    Put that is a file and name it phpinfo.php. Upload and run it. If php is there, it'll play. :)
     
    noppid, Jun 8, 2005 IP
  3. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #3
    P.S. PHP seems to be working. I just loaded your page. I dunno what's exactly up, but it's throwing a file permission error for sure...

    Warning: fopen(ad_network_ads_213.txt): failed to open stream: Permission denied
     
    noppid, Jun 8, 2005 IP
  4. ColumbusOnline

    ColumbusOnline Guest

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    well I think i fixed part of it, but now have new problems. I only gave write permissions in IIS before, so I went and gave write permissions on the file itself. However, I am now getting a new error:

    (not letting me post error until I have 10 total posts but you can view it at www.dublinohiorealestate.net)
     
    ColumbusOnline, Jun 8, 2005 IP
  5. sji2671

    sji2671 Self Made Mind

    Messages:
    1,991
    Likes Received:
    146
    Best Answers:
    0
    Trophy Points:
    170
    #5
    fopen - has your host enabled this as its often disabled by default.
     
    sji2671, Jun 8, 2005 IP
  6. ColumbusOnline

    ColumbusOnline Guest

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    hmm says I have 10 posts but still not working, maybe my 11th will get me over...
     
    ColumbusOnline, Jun 8, 2005 IP
  7. ColumbusOnline

    ColumbusOnline Guest

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I guess it cant count, anyway I took the url out:


    Notice: Undefined offset: 3 in D:\Inetpub\DublinOhioRealEstate\ad_network213.php on line 40

    Notice: Undefined offset: 4 in D:\Inetpub\DublinOhioRealEstate\ad_network213.php on line 40

    Warning: file_get_contents(http://ads.digitalpoint.com/network.php?c=dublinohiorealestate.net&type=link): failed to open stream: Bad file descriptor in D:\Inetpub\DublinOhioRealEstate\ad_network213.php on line 41

    Notice: Undefined offset: 1 in D:\Inetpub\DublinOhioRealEstate\ad_network213.php on line 63

    Notice: Undefined offset: 1 in D:\Inetpub\DublinOhioRealEstate\ad_network213.php on line 63

    Notice: Undefined offset: 1 in D:\Inetpub\DublinOhioRealEstate\ad_network213.php on line 63

    Notice: Undefined offset: 1 in D:\Inetpub\DublinOhioRealEstate\ad_network213.php on line 63

    Notice: Undefined offset: 1 in D:\Inetpub\DublinOhioRealEstate\ad_network213.php on line 67

    Notice: Undefined index: SERVER_ADDR in D:\Inetpub\DublinOhioRealEstate\ad_network213.php on line 73

    Notice: Undefined offset: 1 in D:\Inetpub\DublinOhioRealEstate\ad_network213.php on line 67

    Notice: Undefined index: SERVER_ADDR in D:\Inetpub\DublinOhioRealEstate\ad_network213.php on line 73

    Notice: Undefined offset: 1 in D:\Inetpub\DublinOhioRealEstate\ad_network213.php on line 67

    Notice: Undefined index: SERVER_ADDR in D:\Inetpub\DublinOhioRealEstate\ad_network213.php on line 73

    Notice: Undefined offset: 1 in D:\Inetpub\DublinOhioRealEstate\ad_network213.php on line 67

    Notice: Undefined index: SERVER_ADDR in D:\Inetpub\DublinOhioRealEstate\ad_network213.php on line 73

    Notice: Undefined offset: 1 in D:\Inetpub\DublinOhioRealEstate\ad_network213.php on line 67

    Notice: Undefined index: SERVER_ADDR in D:\Inetpub\DublinOhioRealEstate\ad_network213.php on line 73

    Notice: Undefined offset: 6 in D:\Inetpub\DublinOhioRealEstate\ad_network213.php on line 82
    | | | |
     
    ColumbusOnline, Jun 8, 2005 IP
  8. noppid

    noppid gunnin' for the quota

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

    sji2671 Self Made Mind

    Messages:
    1,991
    Likes Received:
    146
    Best Answers:
    0
    Trophy Points:
    170
    #9
    Email your host a support ticket and ask allow_url_fopen to be set to on.
     
    sji2671, Jun 8, 2005 IP
  10. ColumbusOnline

    ColumbusOnline Guest

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Thanks for all of your help guys. I used that code from http://forums.digitalpoint.com/showpost.php?p=154397&postcount=10 and it fixed it some more, but now I have:

    Notice: Undefined offset: 3 in D:\Inetpub\DublinOhioRealEstate\ad_network213.php on line 40

    Notice: Undefined offset: 4 in D:\Inetpub\DublinOhioRealEstate\ad_network213.php on line 40

    Fatal error: Call to undefined function: curl_init() in D:\Inetpub\DublinOhioRealEstate\ad_network213.php on line 44

    which looks like it is trying to call the curl_init() but it is not there. Where is that supposed to be?

    As for the fopen, I am using a dedicated server so I would have to open that up myself. Any idea how I would go about doing that? Also I did a google search on it and it seems that having that open can be a security risk. Is that still a problem?

    Thanks again for all your help
     
    ColumbusOnline, Jun 8, 2005 IP
  11. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #11
    You either need to enable remote fopen wrappers or install the php curl extension.

    I can't help with either though, sorry. :)
     
    noppid, Jun 8, 2005 IP
  12. ColumbusOnline

    ColumbusOnline Guest

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    lol, I can't win. I tried getting CURL installed but I was unsuccessful. So I decided to play around with fopen, found a php.ini template and put that on the root but now I get an error:

    Security Alert! The PHP CGI cannot be accessed directly.
    This PHP CGI binary was compiled with force-cgi-redirect enabled. This means that a page will only be served up if the REDIRECT_STATUS CGI variable is set, e.g. via an Apache Action directive.

    For more information as to why this behaviour exists, see the manual page for CGI security.

    For more information about changing this behaviour or re-enabling this webserver, consult the installation file that came with this distribution, or visit the manual page.
     
    ColumbusOnline, Jun 8, 2005 IP
  13. ColumbusOnline

    ColumbusOnline Guest

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Well I had no luck with getting the php/asp version working so I decided to go back and hunt around for an ASP solution. I came across a post http://forums.digitalpoint.com/showthread.php?t=11174&page=2&pp=10 that Stupot had a download of the ad_network.asp so I gave that a try and it seems to be working now. I actually went back and saw that all of my old pages that still had the asp code were working now also. So I dont know what changed to allow it to work now, but I am a happy camper again as long as it stays that way. I have over 50,000 pages indexed by google with the index page being 3-4, and that is a lot of weight I was missing out on.
     
    ColumbusOnline, Jun 10, 2005 IP
  14. ColumbusOnline

    ColumbusOnline Guest

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Well maybe I spoke too soon. After updating about 15 of my websites and getting them successfully validated, it seems now it is lagging again. I don't get it, why does it work fine one minute, and then the next it slows the website down to a 20 second + load time. Also, The websites on my server at home are working fine, but the ones on my dedicated server are the ones that are lagging.
     
    ColumbusOnline, Jun 10, 2005 IP