LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-27-2011, 11:55 PM   #46
micxz
Senior Member
 
Registered: Oct 2002
Location: CA
Distribution: openSuSE, Cent OS, Slackware
Posts: 1,131

Rep: Reputation: 75

"permission denied" or anything at all?
 
Old 04-28-2011, 12:55 AM   #47
athrin
Member
 
Registered: Mar 2011
Posts: 135

Original Poster
Rep: Reputation: 1
errr... how to check http log again?
 
0 members found this post helpful.
Old 04-28-2011, 09:38 AM   #48
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720
/var/log/httpd/access_log and /var/log/httpd/error_log
 
Old 04-28-2011, 03:12 PM   #49
boumphreyfr
LQ Newbie
 
Registered: Apr 2011
Distribution: lubuntu
Posts: 14

Rep: Reputation: 0
If you want the output of a script to open in a browser, try some thing like the following:

Code:
echo "Hello World" > somefile;firefox somefile
"Hello world" of couse can be replaced by any standard input, and firefox would have to be installed

Last edited by boumphreyfr; 04-28-2011 at 03:14 PM. Reason: adding to postadd
 
Old 04-28-2011, 03:16 PM   #50
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720
Quote:
Originally Posted by boumphreyfr View Post
If you want the output of a script to open in a browser, try some thing like the following:

Code:
echo "Hello World" > somefile;firefox somefile
"Hello world" of couse can be replaced by any standard input, and firefox would have to be installed
The OP is running a server, not opening a local file with a browser.
 
Old 04-28-2011, 09:29 PM   #51
athrin
Member
 
Registered: Mar 2011
Posts: 135

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by MTK358 View Post
/var/log/httpd/access_log and /var/log/httpd/error_log
ok. then?? what should i do next with this?too many thing that error. donno which one should i look

Last edited by athrin; 04-28-2011 at 09:36 PM.
 
0 members found this post helpful.
Old 04-28-2011, 09:53 PM   #52
athrin
Member
 
Registered: Mar 2011
Posts: 135

Original Poster
Rep: Reputation: 1
it said
Quote:
[Fri Apr 29 09:40:40 2011] [error] [client [some ip addrs]] File does not exist: /var/www/html/favicon.ico
/var/www/cgi-bin/testing.sh: line 4: /var/www/cgi-bin/dmidecode: No such file or directory
cat: /var/www/cgi-bin/dmidecode: No such file or directory
well of course it cant read. the dmidecode doesnt run. =_=

Last edited by athrin; 04-28-2011 at 10:18 PM.
 
Old 04-29-2011, 09:06 AM   #53
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720
What's "/var/www/cgi-bin/dmidecode"?
 
Old 04-29-2011, 12:42 PM   #54
athrin
Member
 
Registered: Mar 2011
Posts: 135

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by MTK358 View Post
What's "/var/www/cgi-bin/dmidecode"?
eh wait not dmidecode=serial i name serial file into dmidecode.
Code:
dmidecode | grep Number > /var/www/cgi-bin/serial
 
Old 04-29-2011, 10:04 PM   #55
micxz
Senior Member
 
Registered: Oct 2002
Location: CA
Distribution: openSuSE, Cent OS, Slackware
Posts: 1,131

Rep: Reputation: 75
Why not just use cron as suggested above way at the beginning of this thread dmidecode only produces machine specific info as how often do you change your bios table?

Last edited by micxz; 04-29-2011 at 10:26 PM.
 
Old 04-30-2011, 08:57 AM   #56
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720
@athrin

Show me your sudoers file and all the places where you launch dmidecode or launch a script that runs dmidecode.
 
Old 05-02-2011, 09:14 PM   #57
athrin
Member
 
Registered: Mar 2011
Posts: 135

Original Poster
Rep: Reputation: 1
i already post it at previous page. please look at page 3.
 
Old 05-02-2011, 09:29 PM   #58
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720
Quote:
Originally Posted by athrin View Post
i already post it at previous page. please look at page 3.
I use 50 posts per page. It would be better to post the number instead.
 
Old 05-02-2011, 11:28 PM   #59
athrin
Member
 
Registered: Mar 2011
Posts: 135

Original Poster
Rep: Reputation: 1
here.
inside visudo
Quote:
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#

# Host alias specification

# User alias specification

# Cmnd alias specification

# Defaults specification

# User privilege specification
root ALL=(ALL) ALL

# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL

# Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL

# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now

apache ALL = NOPASSWD: /usr/sbin/dmidecode
inside my bash
Code:
#!/bin/bash

echo "Content-type: text/html"
echo ""
echo "<html><head><title>Server Detail</title></head>"
echo "<body>"

NAME2=$1
echo -e "<p>NAME         :$NAME1</p>"

sudo dmidecode | grep Number > /var/www/cgi-bin/dmidecode

Serial=`cat /var/www/cgi-bin/dmidecode | head -n1 | cut -d: -f2`
echo "<p>Serial"'          '":$Serial</p>"
echo "</body></html>"
inside my php
Code:
<html><head><title>Enter Details
</title></head><body>


<form name="detailfrm" method="post" action="">
<table>
<tr>
    <td>Enter Name</td>
    <td>:</td>
    <td><input type="text" name="Name"></td>
</tr>
<tr>
    <td><input type="submit" value="Submit" name="detailbtn"></td>
</tr>
</table>
</form>
</body></html>

<?php

if(isset($_POST["detailbtn"]))
{
$name1=$_POST["Name"];
$name2="....";
putenv("Name1=$name1");
system("/var/www/cgi-bin/testing.sh $name2");
}
?>
is this enough?
 
Old 05-03-2011, 09:43 AM   #60
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720
Does "my bash" mean "/var/www/cgi-bin/testing.sh", and what is "/var/www/cgi-bin/dmidecode"? Also, what is the "my php" file?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to execute bash script from web page mustkill Linux - Server 16 05-20-2010 12:01 PM
how i can run bash script on my web? mikejosh Programming 2 04-09-2010 10:59 AM
How do I execute a bash script from a link on a web page? Is there any way to do this digilifellc Linux - Desktop 5 03-10-2010 12:24 PM
How toExecute bash scripts from web interface milescook Linux - Software 3 05-28-2006 09:44 AM
Execute bash commands from web page solomage Linux - Software 1 10-07-2004 11:54 AM


All times are GMT -5. The time now is 11:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration