1753900 Members
8274 Online
108810 Solutions
New Discussion юеВ

PHP Problem...

 
Shashi Kiran_1
Contributor

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?

Regards,
Shashi.




2 REPLIES 2
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...

Hi,
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 :
info.php:
phpinfo();
?php>
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...
hth
Benoit
Une application mal pans├йe aboutit ├а une usine ├а gaze (GHG)