Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

php/mysql works in win2k but not Solaris server 1

Status
Not open for further replies.

leegold2

Technical User
Oct 10, 2004
116
I have code that apparently works on windows 2000 pc with php4.3.6 mysql 4.1.3 but when I put it up on a Solaris server with php5 mysql 4.1.6 it does n o t work. Is there any reason anyone can think of why this snip would do that?

else {
if ( $Type_Submit == 'radio_and') {
$radio_keyword = preg_replace('/\s+|^/', ' +', $keyword);
}
elseif ( $Type_Submit == 'radio_phrase'){
$radio_keyword = '"'.$keyword.'"';
}
$query =
"SELECT page.* FROM `page` LEFT JOIN `keywords` USING (`page_id`) WHERE MATCH (`keywords`.`keyword_txt`)
AGAINST ('$radio_keyword' IN BOOLEAN MODE)
UNION
SELECT page.* FROM `page` WHERE MATCH (`title`, `descrip`) AGAINST ('$radio_keyword' IN BOOLEAN MODE)
UNION
SELECT page.* FROM `page` LEFT JOIN `url_Pages` USING (`page_id`) WHERE MATCH (`url_Pages`.`page_url`)
AGAINST ('$radio_keyword' IN BOOLEAN MODE)";
$result = mysql_query($query);
}
 
Where are your variables being set? If they are coming from a form or the URL they this could be a problem with register_globals being set to "on" on the Windows 2K pc and being set set to "off" on the Solaris server.

If your variables are coming from a POSTED form use the superglobal $_POST to retrieve the values. For instance assuming that your variable $radio_keyword comes from a form, use $_POST['radio_keyword'] to get the value. The same holds true if the variable comes from the URL, except you would use the superglobal $_GET.

See and read up on variable from outside of PHP.

Ken
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top