Results 1 to 4 of 4

Thread: PHP support in all_pre.sh script

  1. #1
    Join Date
    Jul 2011
    Posts
    30

    PHP support in all_pre.sh script

    It seems PHP is not supported in all_pre.sh script,
    I've used the code below in all_pre.sh but it doesn't work at all
    Code:
    #!/usr/local/bin/php
    exit(1);
    But using the Bash script works fine.
    Code:
    #!/bin/sh
    exit 1;
    I have used PHP in a few other scripts and it works fine, Is there any problem with using PHP in all_pre.sh?

    Any help would be much appreciated.

  2. #2
    Join Date
    Oct 2004
    Location
    London, UK
    Posts
    6,641
    Why dont you use different syntax?

    create a file .php with your script
    create all_pre.sh with this:

    Code:
    #!/bin/sh
    /usr/local/bin/php yourscript
    exit 0;
    Regards
    SeLLeRoNe - Andrea Iannucci
    DevOps Engineer - System Administrator
    If you need my support write me an E-Mail to Support@CrazyNetwork.it

  3. #3
    Join Date
    Aug 2008
    Posts
    4,697
    Why do you need php support what is wrong with sh?

  4. #4
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    11,023
    Hello,

    I guess you should read this http://www.php.net/manual/en/feature...line.usage.php

    As I've got this working:

    /usr/local/directadmin/scripts/custom/all_pre.sh

    PHP Code:
    #!/usr/local/bin/php
    <?php
    var_dump
    ($argv);
    exit (
    1);
    ?>
    With regards, Alex.

    Professional Server Management for web hosting companies and individuals
    Hourly Support, Disaster Recovery, Server Hardening, Monthly Subscription
    Directadmin installation and optimization

    Click here if you need a Linux Admin

Similar Threads

  1. Replies: 2
    Last Post: 12-27-2012, 12:46 PM
  2. php 5.3.3 support
    By DoYouSpeakWak in forum Installation / System Requirements
    Replies: 12
    Last Post: 02-28-2011, 02:27 PM
  3. XPM Support required,JIS-mapped Japanese Font Support required
    By apage in forum General Technical Discussion & Troubleshooting
    Replies: 3
    Last Post: 10-22-2009, 05:02 PM
  4. Execute mySql script from within php script
    By mesmo in forum MySQL / PHP
    Replies: 1
    Last Post: 10-19-2007, 07:16 PM
  5. Replies: 12
    Last Post: 10-28-2004, 01:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •