NO output on web browser
Moderator: General Moderators
NO output on web browser
Hi, Im using Fedora 11, php 5.2.12, im trying to execute a Linux command by using php but the output doesnt echo on the web browser. Why? Is there anything i miss out? However i can run the same code in Windows
This is the sample code
<? php
$result = system ('whoami');
echo $result;
?>
i tried to replace system() with exec(), shell_exec(), passthru(), and also back tick (`) but still cant see the echo output. Need help!!
Thanks
This is the sample code
<? php
$result = system ('whoami');
echo $result;
?>
i tried to replace system() with exec(), shell_exec(), passthru(), and also back tick (`) but still cant see the echo output. Need help!!
Thanks
Re: NO output on web browser
Try
Also check your Apache error log files.
Code: Select all
echo `whoami 2>&1`;There are 10 types of people in this world, those who understand binary and those who don't
Re: NO output on web browser
I made my thing become worst!!! I edit the user and group to root (testing purpose) and then after I change it back to the default user and group (apache),
my httpd now cant even detect .php file. It cant even echo "hello world". What had happened!!!??
i try to debug my code in eclipse and it give me "syntax error unexpected 'version'" on some files in visualisation folder.
ps: the visualisation folder was created when doing the GUI of the page by using flex in WINDOWS. I move the entire project from windows to Linux for now.
Any idea how can i solve this? I had tried to reinstall httpd and php in my machine, then add some line such as AddType application/x-httpd-php .php and
AddType application/x-httpd-php-source .phps into the httpd.conf but still cant get the result. It just come out a blank page when i run index.php
my httpd now cant even detect .php file. It cant even echo "hello world". What had happened!!!??
i try to debug my code in eclipse and it give me "syntax error unexpected 'version'" on some files in visualisation folder.
ps: the visualisation folder was created when doing the GUI of the page by using flex in WINDOWS. I move the entire project from windows to Linux for now.
Any idea how can i solve this? I had tried to reinstall httpd and php in my machine, then add some line such as AddType application/x-httpd-php .php and
AddType application/x-httpd-php-source .phps into the httpd.conf but still cant get the result. It just come out a blank page when i run index.php
Re: NO output on web browser
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Re: NO output on web browser
Yes finally i solved the thing
May be is because of the php-gtk extension. I removed it from the php.ini then everything is back to action hehe.
so now i can echo `whoami` but another question is can I execute linux application?? for example can i call Iagno from php??
like this?
<?php
system ('iagno');
?>
I try this but cannot work.
so now i can echo `whoami` but another question is can I execute linux application?? for example can i call Iagno from php??
like this?
<?php
system ('iagno');
?>
I try this but cannot work.
Re: NO output on web browser
I think lagno isn't a console software, so I doubt you can simply "run" it from PHP. What are you trying to achieve in general?
There are 10 types of people in this world, those who understand binary and those who don't
Re: NO output on web browser
I'm trying to execute an external program from php.
I had install gnome-ppp into my Linux and now trying to make a php site which can call this application.
How can i do that?
I had install gnome-ppp into my Linux and now trying to make a php site which can call this application.
How can i do that?
Re: NO output on web browser
Again, gnome-ppp is a desktop GUI application, it's not a console application. You can not call such applications from Apache PHP...
Also, I suppose you are trying to invoke the application at the client - if it's so, you should know that doing it with PHP is absolutely impossible.
Also, I suppose you are trying to invoke the application at the client - if it's so, you should know that doing it with PHP is absolutely impossible.
There are 10 types of people in this world, those who understand binary and those who don't
Re: NO output on web browser
Thanks for the reply. then i should find another way to run this..
Thanks again
Thanks again
-
29DesMcKadedra
- Forum Newbie
- Posts: 1
- Joined: Mon Feb 21, 2011 1:00 am
Re: NO output on web browser
Have you made you browser okay now? I’m sorry I have just recently registered. Anyway I have a friend that is expert in configuring the problem of a browser especially in linux. If you still need his help I can tell him to help you, so just in form me.
Try our free seo with seo services
Try our free seo with seo services