PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 4th, 2004, 10:34 PM
adidasrta adidasrta is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 1 adidasrta User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
looking to create a web-based control panel

hi i am looking to create a webbased control panel.

What i want to do is have a central location where a person can login.

With that authentication, they can have a choice of start/stop a service on a remote machine.

the remote machine can be either windows or linux.

i am trying to find a way for that service to react with a mouse click. Am i looking at the wrong direction trying to program
with php?

any help would be great

Reply With Quote
  #2  
Old August 5th, 2004, 02:52 AM
kode_monkey kode_monkey is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 367 kode_monkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 21 sec
Reputation Power: 6
I don't see any reason not to do this but you probably won't be able to do the whole thing in php. More likely you can write the control panel in php but it'll have to talk to a c/c++ (or similar) app that actually deals with the service, especially if it is one on another machine to the webserver.

-KM-

Reply With Quote
  #3  
Old August 5th, 2004, 05:37 AM
Itsacon's Avatar
Itsacon Itsacon is offline
Command Line Warrior
Click here for more information
 
Join Date: Aug 2004
Location: Sector ZZ9 Plural Z Alpha
Posts: 995 Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)  Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 6 Days 13 h 57 m 35 sec
Reputation Power: 5
Send a message via ICQ to Itsacon
Yeah, looks like this is one of the few cases where old-fashioned C++ CGI may actually be of more use than PHP...

Reply With Quote
  #4  
Old August 5th, 2004, 06:38 AM
kode_monkey kode_monkey is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 367 kode_monkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 21 sec
Reputation Power: 6
I don't know about that, I'd still write the bulk of it in php and have it talk to the other machine via a socket connection allowing it to issue instructions to the c/c++ app which can then act accordingly.

-KM-

Reply With Quote
  #5  
Old August 5th, 2004, 06:55 AM
Itsacon's Avatar
Itsacon Itsacon is offline
Command Line Warrior
Click here for more information
 
Join Date: Aug 2004
Location: Sector ZZ9 Plural Z Alpha
Posts: 995 Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)  Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 6 Days 13 h 57 m 35 sec
Reputation Power: 5
Send a message via ICQ to Itsacon
Yeah, but that's because you're a PHP programmer :-D.
In situations like this, actual C++ CGI is faster and more secure.
It's also the method most web-based admin tools for webservers use, as far as I know.

Reply With Quote
  #6  
Old August 5th, 2004, 07:14 AM
kode_monkey kode_monkey is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 367 kode_monkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 21 sec
Reputation Power: 6
Actually I have a similar amount of c/c++ experience as i do php experience. My main reason for this is speed of development since I doubt the speed of execution difference will be great enough to make a difference in 99% of cases. Also I contest that it will be more secure since php is buffer overflow free but c/c++ apps are not. What were you basing that one on out of interest?

-KM-

Reply With Quote
  #7  
Old August 5th, 2004, 07:22 AM
Itsacon's Avatar
Itsacon Itsacon is offline
Command Line Warrior
Click here for more information
 
Join Date: Aug 2004
Location: Sector ZZ9 Plural Z Alpha
Posts: 995 Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)  Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 6 Days 13 h 57 m 35 sec
Reputation Power: 5
Send a message via ICQ to Itsacon
Agree with you on the development speed, that's definately the big advantage of PHP over others.
Performance is not noticable on newer servers, but used to be an issue. Interpreted languages are slower, that's a fact, only with modern equipment we don't notice it anymore, so it's no longer a reason to stick to C++.

As for security, I meant the fact that PHP will execute till it encounters an error, while C++ doesn't even compile with errors (runtime errors do not exist in compiler languages).
This means you don't have the risk of a half-executing program screwing up your system when it doesn't change all it is supposed to change.
I encountered this once when an edit program did delete the old entry, but failed to create the new one due to an error.

As for buffer overflows, this is an encreased risk, that's true, but also more controllable, a good programmer checks for these.

Reply With Quote
  #8  
Old August 5th, 2004, 07:56 AM
kode_monkey kode_monkey is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 367 kode_monkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 21 sec
Reputation Power: 6
'runtime errors do not exist in compiler languages'

I'm not quite sure what you mean by this but runtime errors do exist in compiled languages and have just as much chance of screwing up a system. Go try to divide something by zero for example. It'll compile but it won't run.

-KM-

Reply With Quote
  #9  
Old August 5th, 2004, 08:43 AM
Itsacon's Avatar
Itsacon Itsacon is offline
Command Line Warrior
Click here for more information
 
Join Date: Aug 2004
Location: Sector ZZ9 Plural Z Alpha
Posts: 995 Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)  Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 6 Days 13 h 57 m 35 sec
Reputation Power: 5
Send a message via ICQ to Itsacon
You're right, i used the wrong term. What I meant is that in PHP, most errors, except parser errors, are not given until the code in question is executed. In C, all code is checked during compilation, even code that's in a loop that never gets executed (like in an if(1 == 2) for example).

Reply With Quote
  #10  
Old August 5th, 2004, 08:55 AM
kode_monkey kode_monkey is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 367 kode_monkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 21 sec
Reputation Power: 6
The compiler can only check the syntax and semantics of the code (which the php parser will do for you as well and issue warnings/errors when you try to run it for the first time). No compiler can check the logic of your program for you.

-KM-

Reply With Quote
  #11  
Old August 5th, 2004, 09:45 AM
Itsacon's Avatar
Itsacon Itsacon is offline
Command Line Warrior
Click here for more information
 
Join Date: Aug 2004
Location: Sector ZZ9 Plural Z Alpha
Posts: 995 Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)  Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2Folding Points: 805281 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 6 Days 13 h 57 m 35 sec
Reputation Power: 5
Send a message via ICQ to Itsacon
Quote:
Originally Posted by kode_monkey
No compiler can check the logic of your program for you.

-KM-


If it could, we'd be out of a job

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > looking to create a web-based control panel


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 6 hosted by Hostway
Stay green...Green IT