How to convert this code from SHTML to PHP

Discussion in 'PHP' started by fahad_h, Jul 4, 2007.

  1. #1
    <!--#exec cmd="cgi-bin/entropybanner.cgi"-->
    Code (markup):
    I am using a banner management softeware, and it says I should save my page as .shtml, but it's in PHP, will changing the code to PHP make it work ?

    If it doesn't work, please recommend a good banner management software.


    any help is appreciated.


    Thanks
     
    fahad_h, Jul 4, 2007 IP
  2. fbnewtz

    fbnewtz Peon

    Messages:
    160
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Just use OpenAds. Forget all the CGI stuff.

    Fred
     
    fbnewtz, Jul 4, 2007 IP
  3. ecentricNick

    ecentricNick Peon

    Messages:
    351
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #3
    The equivalent php would be something like...

    <?php
    exec("cgi-bin/entropybanner.cgi");
    ?>

    or...
    <?php
    system("cgi-bin/entropybanner.cgi");
    ?>

    or even...
    <?php
    include("cgi-bin/entropybanner.cgi");
    ?>

    but read up on the functions at php.net as they all have extra parameters i've not gone in to.
     
    ecentricNick, Jul 4, 2007 IP
  4. fahad_h

    fahad_h Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    This is exactly what I was looking for, hopefully I will be able to install it.


    Thank a lot guys.
     
    fahad_h, Jul 4, 2007 IP
  5. fbnewtz

    fbnewtz Peon

    Messages:
    160
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Let me know if you need any help. I have installed in several times.

    Fred
     
    fbnewtz, Jul 4, 2007 IP
  6. fahad_h

    fahad_h Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thanks a lot, I've uploaded the files to my website, and now I need to increase the memory before the installation wizard start.

    Currently I am at

    http://www.openads.org/support/faq.html
    http://httpd.apache.org/docs/1.3/howto/htaccess.html

    trying to figure out how to increase, so far I am not able to understand anything :(

    Is there an easy way to increase the memory using the cpanel?

    any help is appreciated, I will be going through the documents, I will post as soon as I figure it out.

    Really appreciated.
     
    fahad_h, Jul 5, 2007 IP
  7. fahad_h

    fahad_h Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    How to edit " php.ini "


    Thank you :)
     
    fahad_h, Jul 5, 2007 IP
  8. ecentricNick

    ecentricNick Peon

    Messages:
    351
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Assuming linux...

    cd /etc
    vi php.ini

    Make your changes and then save them

    You'll need to bounce the php service to pick the changes up.
     
    ecentricNick, Jul 5, 2007 IP
  9. fahad_h

    fahad_h Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Thanks a lot, but I really didn't understand anything :(

    Where is the php.ini ?

    here is my website
    www.afr-team.com
     
    fahad_h, Jul 5, 2007 IP
  10. ecentricNick

    ecentricNick Peon

    Messages:
    351
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #10
    If you are running via a hosting service, you very likely cannot access the php.ini. It will be hidden away to stop (a) nasty people hacking it, (b) silly webmasters screwing it up. If you want it changed, you'll probably have to talk to your hosting service - but they will probably say no!

    If you are running your own server you can get at it and edit it to your heart's content.
     
    ecentricNick, Jul 5, 2007 IP
  11. fahad_h

    fahad_h Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Thanks a lot, so I need the other way to increase the memory.


    anyhelp?


    thanks a lot
     
    fahad_h, Jul 5, 2007 IP
  12. ecentricNick

    ecentricNick Peon

    Messages:
    351
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Why do you need to increase the memory? My server runs 165 of my sites, and handles 3/4 million hits a day on pretty much a standard box with a gig of memory and fairly standard php setup. And we do some quite intensive stuff on there.


    What can you possibly be doing that's using so much memory?
     
    ecentricNick, Jul 5, 2007 IP
  13. fbnewtz

    fbnewtz Peon

    Messages:
    160
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #13
    I think it has to do with OpenAdsNew.

    Fahad: How are you accessing the files on your server? FTP or what?
     
    fbnewtz, Jul 5, 2007 IP
  14. KalvinB

    KalvinB Peon

    Messages:
    2,787
    Likes Received:
    78
    Best Answers:
    0
    Trophy Points:
    0
    #14
    You either need a better host or better ad software.
     
    KalvinB, Jul 5, 2007 IP
  15. fahad_h

    fahad_h Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #15
    I am using Core FTP Lite.

    Is there any other recommended ads software?


    Thanks a lot,
     
    fahad_h, Jul 5, 2007 IP
  16. fbnewtz

    fbnewtz Peon

    Messages:
    160
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #16
    The ad software is the best out there. you can try to download your .htaccess file or edit it through the FTP software. Just put the line in the .htaccess file that you see in your post above. Should be pretty easy really. I can provide the file for you if you like.

    Fred
     
    fbnewtz, Jul 5, 2007 IP
  17. fahad_h

    fahad_h Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #17
    I did, and the website was no longer working :confused:

    I put the line in the top, and changed its location to everywhere possible in the file.


    Thanks a lot,
     
    fahad_h, Jul 5, 2007 IP
  18. fahad_h

    fahad_h Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #18
    I have this line in the file
    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
    Code (markup):
    Could it be causing the problem when I put the memory code?


    Thanks a lot
     
    fahad_h, Jul 8, 2007 IP