~n[EO]n~ Posted October 1, 2007 Share Posted October 1, 2007 hi all, I just updated my PHP, Apache and MY SQL to this version Apache version : Apache/2.2.4 (Win32) PHP version : 5.2.4 MySQL version : 5.0.45-community-nt and previous I had php 5.0.3 apache 1.3.33 MySQL version : 4.1.8-nt-log - extension : mysqli Now the problem is all my sites which are in localhost are not working, all the pages displays the PHP code itself. No error is given only i see some images and all the PHP codes coming _table_name=CMS_TABLE; $sSqlQuery=" where cms_id=?" ; $row = $tbl->find($sSqlQuery,array($id)); $count=$tbl->_row_count; if($count>0) { $desc=$row->cms_desc; } $desc1=""; $id1=2; $tbl1=new Model; $tbl1->_table_name=CMS_TABLE; $sSqlQuery1=" where cms_id=?" ; $row1 = $tbl1->find($sSqlQuery1,array($id1)); $count1=$tbl1->_row_count; if($count1>0) { $desc1=$row1->cms_desc; } $sSqlQuery2="select * from ".MOVIES_TABLE." WHERE movies_home=1"; $res2 = $tbl1->find_query_all($sSqlQuery2); $count2=count($res2); ?> Anyone knows why this is happening ??? Thanks in advance... Quote Link to comment https://forums.phpfreaks.com/topic/71327-solved-problem-in-php/ Share on other sites More sharing options...
xylex Posted October 1, 2007 Share Posted October 1, 2007 You need to specify a handler (preferably PHP) for files with a .php extension in your httpd.conf file. Make sure you restart apache after you do that. Quote Link to comment https://forums.phpfreaks.com/topic/71327-solved-problem-in-php/#findComment-358879 Share on other sites More sharing options...
~n[EO]n~ Posted October 1, 2007 Author Share Posted October 1, 2007 I don't think so, cause I had removed the older version of WAMP and installed the latest version. First time also i hadn't done anything in the httpd.conf file i think WAMP does that automatically. I maybe wrong but i am searching for that "handler" in httpd.conf Quote Link to comment https://forums.phpfreaks.com/topic/71327-solved-problem-in-php/#findComment-358881 Share on other sites More sharing options...
trq Posted October 1, 2007 Share Posted October 1, 2007 Anyone knows why this is happening Your apache server has not been properly configured to run php. Are you using the full <?php tags? Quote Link to comment https://forums.phpfreaks.com/topic/71327-solved-problem-in-php/#findComment-358905 Share on other sites More sharing options...
~n[EO]n~ Posted October 1, 2007 Author Share Posted October 1, 2007 Your apache server has not been properly configured to run php. Are you using the full <?php tags? Thanks Thorpe, I hadn't used <?php in my code, when i used it it works fine but still in some part the code comes.. ??? confused my structure is like this <?php // here i have used the query to fetch data ?> HTML stuff is here and again <?php echo "rs['image']; /* this part shows the code itself does not shows the image, do we have to use <?php everywhere we open the php tag or <? will work in other part, while using <? echo only, it shows error, something like brace is not closed but using <?php it shows the code itself*/ // but it was working perfectly in previous version.... ?> Any idea... Quote Link to comment https://forums.phpfreaks.com/topic/71327-solved-problem-in-php/#findComment-358919 Share on other sites More sharing options...
Orio Posted October 1, 2007 Share Posted October 1, 2007 If you want to use <? too, simply set the short_open_tag directive in your ini file to true. Btw, you haven't closed the quote in the echo, is that causing the error? Orio. Quote Link to comment https://forums.phpfreaks.com/topic/71327-solved-problem-in-php/#findComment-358922 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.