How to PHP5-Apache2 Server API change to GastCGI

Discussion in 'Linux, BSD and Other OS's' started by scars230, Jan 25, 2010.

  1. scars230

    scars230 Geek Trainee

    Likes Received:
    0
    Trophy Points:
    0
    Hey,
    My Current settings is Server API Apache 2.0 Handler.

    Theres this php file that i want to run in cron at interval of 10 minutes.
    My crontab has the following entry :-
    But the last cron line is not working due to (waht i feel) server api being set to apache 2.0 handler.

    Please advice
     
  2. Anti-Trend

    Anti-Trend Nonconformist Geek Staff Member

    Likes Received:
    118
    Trophy Points:
    63
    Have you tried executing it with curl instead of the php shell? Perhaps run it as the user who owns apache instead of root, or does it need root privileges for some reason?
     
  3. scars230

    scars230 Geek Trainee

    Likes Received:
    0
    Trophy Points:
    0
    Hi,
    Ummm. . . the file is encrypted with IonCube Loader (Which is running perfectly) so i cannt see whats inside he file.
    I dont know how to run it with curl.
    I believe it has to be run as root. (no such info about which user should run it in the documentaion).
    I quote the Cron page of the software www.swiftpanel.com
    You could also see the softwares demo . . . its there at their site.
     
  4. Anti-Trend

    Anti-Trend Nonconformist Geek Staff Member

    Likes Received:
    118
    Trophy Points:
    63
    What happens if you run it from CLI as root? Any error messages?
     
  5. scars230

    scars230 Geek Trainee

    Likes Received:
    0
    Trophy Points:
    0
    ummmm it just runs
    no output or message
    php -q /var/www/extra/cron/cron.php
    just runs.
     
  6. elizas

    elizas Geek Trainee

    Likes Received:
    0
    Trophy Points:
    0
    PHP .inc file issues
    To keep the configuration parameters many of us create include files and keep it inside the document root. Major concern regarding include files is the exposure of the source code through the user's browser.
    Includes files uses a .inc file extension. Apache has no idea about the include files.The DefaultType of Apache is text/plain. So in this scenario anybody can access the include file via URL and see the source code in the browser.
    Fixes:
    This can be easily avoided by reorganizing the application. Include files can be moved outside of the document root. The best practice is to consider that all the files and folders present inside the document root are public.By storing as much information out side the document root, you limit this exposure.
    There are other ways too but do not rely on them. These include following:
    - Instructing Apache to process .inc files as PHP
    AddType application/x-httpd-php .inc
    - Using a .php file extension for includes
    - Instructing Apache to deny requests for .inc resources
    <Files ~ "\.inc$">
    Order allow,deny
    Deny from all
    </Files>

    thanks,
    Eliza
     
  7. scars230

    scars230 Geek Trainee

    Likes Received:
    0
    Trophy Points:
    0
    Ummm . . . I do understand a lot of what you just typed.
    But as far as i understand it there is no .inc file in the same folder as cron or the folder above it.
     

Share This Page