SunQuest
           PHP Coding
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Coding

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old July 1st, 2002, 11:00 PM
Aperion Aperion is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Santa Barbara
Posts: 5 Aperion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
execution of a program in php

I haVe a program written in C++ and is compiled, the program works, we've tested it out side of the web. My problem/question is, how can I execute the program via php? the program in quesiton takes a file called input.dat as input and outputs into a .ps file then converted to a gif.

the reason for all this file joking is because of the tools we are using. any ways, I can't get get php to execute the program. I've tried the exec() system() and passthru()commands in php but they don't execute it. I've checked this by touching all the files in the directory, then a minute later checking all the files that have been changed, none were except the one written by the php. Any help would be much appricated...

Reply With Quote
  #2  
Old July 1st, 2002, 11:51 PM
Matt Matt is offline
Moderator
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 10 m 20 sec
Reputation Power: 6
RE: execution of a program in php

Sounds to me like Safe Mode is on. With safe mode on, when you use all those functions you mentioned, you can only execute a program that resides in the safe_mode_exec_dir. Turning safe mode on and off and the safe_mode_exec_dir can be set in the php.ini file....

Reply With Quote
  #3  
Old July 2nd, 2002, 12:10 AM
Aperion Aperion is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Santa Barbara
Posts: 5 Aperion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: execution of a program in php

Thanks for the suggestion Matt, I checked my php.ini file for the safe mode and it was turned off. an intersting thing, I did a system("ls"); and it listed the files in the directory to the webpage. any other suggestions?

Reply With Quote
  #4  
Old July 2nd, 2002, 12:15 AM
EvilivE EvilivE is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Milwaukee, WI USA
Posts: 291 EvilivE User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via Yahoo to EvilivE
RE: execution of a program in php

hmmm ... does anything get reported to your log files? If so what?

Reply With Quote
  #5  
Old July 2nd, 2002, 12:18 AM
Aperion Aperion is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Santa Barbara
Posts: 5 Aperion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: execution of a program in php

I'm a little bit new to php and linux, where might I find those log files at?

oh yeah, and what should I look for?

Reply With Quote
  #6  
Old July 2nd, 2002, 12:27 AM
Aperion Aperion is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Santa Barbara
Posts: 5 Aperion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: execution of a program in php

ok, I think that helped me track it down, I found the error_log file and inside it it showed a bunch of permision denied where ever I wanted to change the files. I'm trying to get that to work and hopefully thats the problem, thanks EvilivE

Reply With Quote
  #7  
Old July 2nd, 2002, 12:30 AM
EvilivE EvilivE is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Milwaukee, WI USA
Posts: 291 EvilivE User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via Yahoo to EvilivE
RE: execution of a program in php

I am not on a *nix box but I would think it would be something like:

/usr/var/web_server/logs/error.log

Just a guess, but definately somewhere in the path where the web_server was installed.

Reply With Quote
  #8  
Old July 2nd, 2002, 06:37 PM
Aperion Aperion is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Santa Barbara
Posts: 5 Aperion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: execution of a program in php

yeah, I found it and located teh problem, thanks. Problem was that the files weren't write enabled for others. Thanks again for the help EvilivE.

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Coding > execution of a program in php


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway