Jump to content

[SOLVED] Problem in PHP


~n[EO]n~

Recommended Posts

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

 

 

Link to comment
Share on other sites

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 ;)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.