Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Showing results for 
Search instead for 
Did you mean: 

PHP Problem...

Shashi Kiran_1

PHP Problem...

when I brows the php file (Apache web server) (http://weseia:8080/WES/index.php)I get this error

set_startallopen (true); $root = $tree->open_tree ("WES", ""); $cnt=0; $query = "select distinct cat_id,cat_desc from hp_categories order by cat_id"; $result = mysql_query ($query) or die ("select Query failed"); while($line = mysql_fetch_array($result)){ $cnt++; $folder = $tree->add_folder ($root, $line[1],""); $link_query = "select distinct link_url,link_desc,shared_folder from hp_links where cat_id=%d order by link_desc"; $link_query = sprintf($link_query,$line[0]); $link_result = mysql_query ($link_query) or die ("select Query failed"); while($link_line = mysql_fetch_array($link_result)){ $tree->add_document ($folder, $link_line[1], $link_line[0],""); }//end of inner while loop }//end of outer most while loop $tree->close_tree ( ); } ?>

how can i get rid of this?


Jarle Bjorgeengen
Trusted Contributor

Re: PHP Problem...

Looks like it is displaying the code , rather than parsing and executing it.

I think you need to tell apache that .php files are supposed to be executed.

Do you have mod.php installed ? Maybe you need php-mysql as well ?

Rgds Jarle
benoit Bruckert
Honored Contributor

Re: PHP Problem...

You could check in php.ini (usr/local/lib) :
short_open_tag = On
Try this script to see if php is configured & loaded with apache :
place it in your apache tree, call it from your browser.
You can also check that php handler is properly defined in httpd.conf.
ANd last but not least, check if php is included in httpd or loaded...
Une application mal pansée aboutit à une usine à gaze (GHG)