Note that there are some explanatory texts on larger screens.

plurals
  1. POBrowser unable to open php page?
    text
    copied!<p>First of all I am showing the PHP code ....</p> <pre><code>&lt;?php echo ("hello"); echo exec("sendip -v -p ipv6 -6s 2001::100 -p tcp -ts 21 -td 21 2001::200 2&gt; &amp;1"); echo ("hi"); ?&gt; </code></pre> <p>When I entered the command through linux command line it is working fine.The command is sending a tcp ipv6 packet on 2001::200 machine from 2001::100. </p> <pre><code>[root@udit-pc]# sendip -v -p ipv6 -6s 2001::100 -p tcp -ts 21 -td 21 2001::200 &gt; /dev/null &amp; /* (-v for verbose) */ </code></pre> <p>Output of above command ... </p> <pre><code> Added 34 options Initializing module ipv6 Initializing module tcp Finalizing module tcp Finalizing module ipv6 Final packet data: 60 00 00 00 `... /* here other packet contents gets printed */ 7D 62 00 00 }b.. 61 62 63 64 abcd Sent 64 bytes to 2001::200 Freeing module ipv6 Freeing module tcp </code></pre> <p>When I execute the php script through command line...</p> <pre><code>[root@udit-pc]# php test.php Freeing module tcp </code></pre> <p>hellohi gets printed and packet arrived at 2001::200.</p> <p>But problem arise when I try to run php script through browser...</p> <pre><code> http:://localhost/test.php </code></pre> <p>hellohi gets printed but packet does not arrive at other machine.</p> <pre><code> sh: sendip: command not found </code></pre> <p>Also in both case packet contents are not printed at terminal although using verbose option but when directly using command verbose option works fine.</p> <p>I tried with many things although I do not think they would help like......</p> <ol> <li><p>I added /usr/local/lib and usr/local/bin to PATH variable but no benefit.</p></li> <li><p>chmod +s /usr/local/bin/sendip .Sticky bit set but again no benefit.</p></li> <li><p>paste the /usr/local/bin/sendip itself in /var/www/html folder although I have changed the PATH variable but as i said i m just using hit n trial getting no clue.....</p></li> </ol> <p>There are some output snapshots which may further help ....</p> <pre><code>[root@cc html]# echo $PATH /usr/lib/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin: /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin: /usr/X11R6/bin:/root/bin:/usr/local/lib [root@cc html]# locate sendip ..... /usr/local/bin/sendip /usr/local/lib/sendip ..... [root@cc bin]# chmod +s sendip [root@cc bin]# ls -l sendip -rwsrwsrwx 1 apache apache 41071 Sep 26 19:41 sendip [root@cc bin]# cd /usr/local/lib/ [root@cc lib]# ls -ld sendip drwxrwxrwx 2 root root 4096 Sep 28 22:48 sendip [root@cc lib]# chmod +s sendip [root@cc lib]# ls -ld sendip drwsrwsrwx 2 root root 4096 Sep 28 22:48 sendip </code></pre> <p>When file contents are changed .......</p> <pre><code> &lt;?php echo exec("/usr/bin/sendip ........ 2 &gt; &amp;1"); ?&gt; </code></pre> <p>Then oputput is : </p> <pre><code> [root@cc html]# php test.php Freeing module tcp[root@cc html]# </code></pre> <p>On browser.... No error gets printed but packet still not arrived.</p> <p>I am stuck in between.Please suggest me what else should I rather try ??????/ </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload