Quote:
Originally posted by daveo
* I don't know. To get an answer, read the changelog, which is mostly provided with the rpm
* I'm a little confused so let's get back to the beginning. PhpMyAdmin works, you can read database info right?
* The index.php doesn't show the info it should provide right?
Ans: Yes. When I click on my php, it supposed to show the 3 steps but it returns to default without showing. Sample of the codes below.
--
Conclusion should be then:
* php works ok on apache
* database is running and working properly, and phpadmin is able to read table info.
* The php file with the code:
<?php
echo "Works";
?>
Does also work right?
Ans: Yes. It works as mentioned above.
If that's the case, it might be an error in the php file. Then show me the error_log ..and the code from the php file which isn't working.
|
Okay, here is the 2 files related to my problem.
First File is called config.php
---------------
$dbUserName = "mysql";
$dbPassword = "mysql";
$dbConnect =0;
//the next two setting items for upload tour picture
$PicturePath = "/tours/UploadPicture/";
$PicturePhysicalPath="/var/www/html/tours/UploadPicture/";
$HostIP="192.168.1.118";
function gotoURL($url)
{
echo "<script language='javascript'>" ;
echo "location.href='" . $url . "'";
echo "</script>";
}
function popupMsg($msg)
{
echo "<script language='javascript'>" ;
echo "alert('" . $msg . "')";
echo "</script>";
}
function gotoBack()
{
echo "<script language='javascript'>" ;
echo "history.back()";
echo "</script>";
}
function gotoFrameURL($index,$url)
{
echo "<script language='javascript'>" ;
echo "window.frames(" . $index . ").location.href='" . $url . "'";
echo "</script>";
}
?>
-----------------------------------
Second File is called 3step-popup.php
-------------------
<?php
require "config.php";
$dbConnect = mysql_pconnect(null,$dbUserName ,$dbPassword);
if($flag=="1"){
if($MainRegion!='SelectOne'){
if($RegionID!='SelectOne'){
?>
<script>
window.opener.top.main.location="freeeasy_category.php?state=<? echo urlencode($RegionID); ?>&mes=1";
window.close();
</script>
<? }else{ $RegionID=$MainRegion;
?>
<script>
window.opener.top.main.location="freeeasy_category.php?state=<? echo urlencode($RegionID); ?>&mes=2";
window.close();
</script>
<? }
}else{
?><SCRIPT LANGUAGE="JavaScript">
window.alert("Please select country or region in step one.");
</script>
<? }
}
?>
<html>
<head>
<title>All about Travels</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<SCRIPT LANGUAGE="JavaScript">
function toSubmit()
{
if(window.document.menu1.MainRegion.value!='SelectOne'){
window.document.menu1.flag.value="1";
return true;
}else{
window.alert("Please select country or region in step one.");
window.document.menu1.flag.value="3";
return false;
}
}
function relate(form) {
if (!supported) {
load(form, "topics");
return;
}
var options = form.list.options;
for (var i = options.length - 1; i > 0; i--) {
options[i] = null;
}
var curAr = ar[form.topics.selectedIndex];
for (var j = 0; j < curAr.length; j++) {
options[j] = new Option(curAr[j].text, curAr[j].url);
}
options[0].selected = true;
}
function load(form, name) {
var url = form[name].options[form[name].selectedIndex].value;
if (url != "") location.href = url;
return false;
}
// -->
function MM_openBrWindow(theURL,winName,features) {
window.open(theURL,winName,features);
}
//-->
function GotoURL()
{
document.hh.RegionGroup.value=document.menu1.MainRegion.options[document.menu1.MainRegion.selectedIndex].value;
document.hh.submit();
}
</SCRIPT>
<link rel="stylesheet" href="css/main.css">
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<form name="hh" action="<?echo $PHP_SELF?>" method="post">
<input type="hidden" name="RegionGroup" value="undefined">
</form>
<form name="menu1" action="3step_popupFreeeasy.php">
<input type=hidden name=flag value=0>
<table border="0" cellspacing="0" cellpadding="1" width="500">
<tr>
<font color='red'><b>Free & Easy Search</b></font>
</tr>
<tr>
<td class="contentSmall" bgcolor="#e4e4e4"> Follow the 3 simple steps on
below and it will bring you to the respective Free & Easy by countries
of your choice!</td>
</tr>
<tr>
<td class="contentSmall"> <br>
<table border="0" cellspacing="2" cellpadding="2">
<tr valign="bottom" align="left">
<td><img src="images/content/step1a.gif" width="103" height="22" border="0"></td>
<td><img src="images/content/step2a.gif" width="93" height="22"></td>
<td><img src="images/content/step3go.gif" width="44" height="22"></td>
</tr>
<tr>
<td bgcolor="#CCCCFF">
<select name="MainRegion" onchange= "GotoURL()">
<option value ='SelectOne'>Select One</option>
<?
//if($flag!='1') { echo "<option>Select One</option>"; }
$ret = mysql_query("select Distinct GroupName from Tours.Region where ServiceType = '2' Order By GroupName asc",$dbConnect);
$FirstGroup="";
while ($rs = mysql_fetch_array($ret))
{
if($FirstGroup=="")
$FirstGroup=$rs["GroupName"];
echo "<option value='" . $rs["GroupName"] . "' " . ($RegionGroup==$rs["GroupName"]?"Selected":"") . ">" . $rs["GroupName"] . "</option>";
}
mysql_free_result($ret);
?>
</select>
</td>
<td bgcolor="#FFCCFF">
<select name="RegionID" >
<option value ='SelectOne' >Select One</option>
<?
//if($flag!='1'){ echo "<option value=''>Select One</option>"; }
if($RegionGroup != "") {
//$RegionGroup=$FirstGroup;
$ret = mysql_query("select Region from Tours.Region where GroupName='" . $RegionGroup . "' and Region<>'$RegionGroup' and ServiceType = '2' Order By Region asc",$dbConnect);
while ($rs = mysql_fetch_array($ret))
{
echo "<option value='" . $rs["Region"] . "'>" . $rs["Region"] . "</option>";
}
mysql_free_result($ret);
}
?>
</select>
</td>
<td bgcolor="#FFFFFF">
<input type=hidden name=type value=4>
<input type="submit" name="child" value="GO" onClick="toSubmit()">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>
----------------------------
There is nothing in the error log.
I have tested these codes in other hosting service, it works with php & mysql. The above code for 3step-popup.php is supposed to be able to select different regions [countries] with pull down menu of the countries to be selected from the first menu accessing the database. But when selecting it, it didn't remain on screen as it should be after clicking it.
Btw, I have re-installed according to your article in your website but encounter error when accessing it as https as it says the certificate is INVALID or CORRUPTED. Error Code: -8182.
What does that means?
Regards
Edward Han