Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Page 1 of 2 12 LastLast
Results 1 to 15 of 21

This is a discussion on Trouble trying to call a php cli program from a php web page in the Design and Development forum
I am having trouble with a web page I am creating. I am trying to call a php program that I normally use from the ...

  1. #1
    Ron
    Ron is offline
    Loyal Client
    Join Date
    Aug 2002
    Posts
    7,304

    Trouble trying to call a php cli program from a php web page

    I am having trouble with a web page I am creating.

    I am trying to call a php program that I normally use from the command line when I shell in.

    The cli program works fine.
    It is also called from a shell script that is initiated by cron 4 times a day.
    I know it works, at least from a basic perspective.

    The problem shows up the same way when I try to exec(), shell_exec(), passthru() or system().

    What happens is that the web page appears to be executed about 40 times before the webserver kills it for too many db connections.

    When I run the calling web page with the system() call removed, it executes and exits normally.

    So I tried a very simple php program to call. All it contains is
    PHP Code:
    <?php
    echo "Hi there";
    ?>
    The result is the same; the calling webpage is executed multiple times...
    Depending on which function I use to call the script, I can see multiple occurrences of echo's from the calling webpage.
    An example call from the webpage is

    exec("php test.php");

    I can see many instances of test.php being executed (or trying to be executed) on the server -- I get no output no matter how I try to capture it in the web page's php.

    What am I doing wrong here? I could understand it if the called script failed , with pathnames and/or server variables; but how is it the calling webpage/program executes multiple times?

    I must be violating something...
    I don't want to run this on the server anymore for fear of causing problems for other users.

    Any help?
    Thanks.
    Good luck

  2. #2
    Ron
    Ron is offline
    Loyal Client
    Join Date
    Aug 2002
    Posts
    7,304
    Anybody?
    Good luck

  3. #3
    Ron
    Ron is offline
    Loyal Client
    Join Date
    Aug 2002
    Posts
    7,304
    This place used to be so much better...
    Good luck

  4. #4
    JPC Dream Team JPC-Tracie's Avatar
    Join Date
    Oct 2007
    Posts
    390
    Sorry, Ron. I'm technically not a techie, technically. So you've stumped me! But I'll see who's got a minute to take a look and get you in the right direction.
    ~Tracie

    Director of Client Operations
    JaguarPC.com

  5. #5
    JPC Dream Team
    Join Date
    Apr 2008
    Posts
    708
    Ron I am not sure why are you facing this issue, please open a support ticket with details and we can test/check with your logins and compare the results with other access levels to see what we can find, It will need to be investigated.
    Rizwan - Technical Support Manager
    JaguarPC

    Helpful Links
    Knowledge Base | Network Status | Current Specials

  6. #6
    the Windlord Gwaihir's Avatar
    Join Date
    Jun 2002
    Posts
    2,562
    Quote Originally Posted by Ron View Post
    Anybody?
    Think that's the server messing up, not you. Time for a ticket..

  7. #7
    Ron
    Ron is offline
    Loyal Client
    Join Date
    Aug 2002
    Posts
    7,304
    Does this not happen in all cases? I didn't assume it was an account-specific issue.

    I don't want you guys to investigate this if it's an account issue since PHP and MySQL and everything is going to change on my server on Friday

    I can wait until next week to re-try this. I've been shelling in to do these things and just decided to try to make it accessible through a browser. So the work-around is to continue as normally.
    Good luck

  8. #8
    JPC Staff JPC-Jim's Avatar
    Join Date
    Oct 2006
    Location
    *clap clap clap* deep in the Heart of Texas
    Posts
    318
    I would let the techs get a look into it, it sounds like something going on with the server itslelf, a misconfiguration of some type.
    Jim S.
    JaguarPC.com

  9. #9
    Ron
    Ron is offline
    Loyal Client
    Join Date
    Aug 2002
    Posts
    7,304
    Okie dokie. I hope it doesn't bring down the server; in my testing the calling page made a db connect and exceeding my account's MySQL max_connections is what ultimately controlled the number of processes spawned.

    I'll point the ticket to this thread.
    Good luck

  10. #10
    Ron
    Ron is offline
    Loyal Client
    Join Date
    Aug 2002
    Posts
    7,304
    Done. Ticket # 13279450
    Good luck

  11. #11
    Customer Service Rep
    Join Date
    Mar 2008
    Posts
    148
    Quote Originally Posted by Ron View Post
    Done. Ticket # 13279450
    A tech is checking into this for you right now and will followup in the ticket for you shortly. Thanks.
    -Larry-
    Customer Service Representative
    JaguarPC.com

  12. #12
    Registered User
    Join Date
    May 2008
    Posts
    204
    We are looking into this matter so please keep an eye on your INBOX as we will be in touch very shortly after an initial investigation into this matter.We will contact you as soon as any investigation updates will be available.

    Please follow up this issue in your support ticket # 13279450

  13. #13
    Ron
    Ron is offline
    Loyal Client
    Join Date
    Aug 2002
    Posts
    7,304
    OK, Martin. Checking my INBOX. Lessee.... Enlargement of this body part, reduction of that body part, stop smoking, start smoking smokeless cigarettes, buy insurance, attend webinars, I've inherited many U.S. DOLLARS, someone wants to buy something, will I accept a credit card.

    Nope, nothing yet!
    Good luck

  14. #14
    Ron
    Ron is offline
    Loyal Client
    Join Date
    Aug 2002
    Posts
    7,304
    Spoke too soon! I've been escalated!
    Good luck

  15. #15
    Ron
    Ron is offline
    Loyal Client
    Join Date
    Aug 2002
    Posts
    7,304
    okay, I'm not sitting by my inbox any more. I don't see anyone logged onto my server looking at it yet and it's not a top priority for me, so I'll be around to check into my inbox occasionally.
    Good luck

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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