LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-14-2003, 05:48 AM   #46
edhan
Member
 
Registered: Sep 2003
Location: Singapore
Distribution: Redhat 8.0
Posts: 93

Original Poster
Rep: Reputation: 15

Quote:
Originally posted by daveo
Does the database run at all?
Please print the output of: ps aux |grep mysql

This is shown.

[root@www root]# ps aux |grep mysql
mysql 751 0.0 2.0 30896 10792 ? S 17:43 0:00 /usr/sbin/mysqld
root 1017 0.0 0.1 3204 612 pts/0 S 17:47 0:00 grep mysql
[root@www root]#


Any idea how to get it works with php?

Edward Han
 
Old 09-14-2003, 05:52 AM   #47
daveo
Member
 
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196

Rep: Reputation: 30
Quote:
Originally posted by edhan
This is shown.

[root@www root]# ps aux |grep mysql
mysql 751 0.0 2.0 30896 10792 ? S 17:43 0:00 /usr/sbin/mysqld
root 1017 0.0 0.1 3204 612 pts/0 S 17:47 0:00 grep mysql
[root@www root]#


Any idea how to get it works with php?

Edward Han
It seems like you didn't start it with: mysqld_safe &
Do you? ..
Is there a way I can connect to this machine, so I can see the error my self ? Can you also give me the output from: netstat -l

You should see something like this:

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:mysql *:* LISTEN


Also:


unix 2 [ ACC ] STREAM LISTENING 1708 /var/run/mysqld/mysqld.sock


Last edited by daveo; 09-14-2003 at 06:04 AM.
 
Old 09-14-2003, 07:59 AM   #48
edhan
Member
 
Registered: Sep 2003
Location: Singapore
Distribution: Redhat 8.0
Posts: 93

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by daveo
It seems like you didn't start it with: mysqld_safe &
Do you? ..
Is there a way I can connect to this machine, so I can see the error my self ? Can you also give me the output from: netstat -l

You should see something like this:

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:mysql *:* LISTEN


Also:


unix 2 [ ACC ] STREAM LISTENING 1708 /var/run/mysqld/mysqld.sock
Hi Dave

Finally I can connect by symbolic link the /tmp/mysql.sock to /var/lib/mysql/mysql.sock.

Now I am facing a new problem, though I can connect but none of the data is showing. I tried with phpMyAdmin, it shows this:

The $cfg['PmaAbsoluteUri'] directive MUST be set in your configuration file!

*
Error
The additional Features for working with linked Tables have been deactivated. To find out why click here.

When I click to check out, it says:

PMA Database ... not OK[ Documentation ]
General relation features Disabled

Is that the reason why I cannot see the data though I can get connected?

Regards
Edward Han
 
Old 09-14-2003, 08:08 AM   #49
daveo
Member
 
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196

Rep: Reputation: 30
Quote:
Originally posted by edhan
Hi Dave

Finally I can connect by symbolic link the /tmp/mysql.sock to /var/lib/mysql/mysql.sock.

Now I am facing a new problem, though I can connect but none of the data is showing. I tried with phpMyAdmin, it shows this:

The $cfg['PmaAbsoluteUri'] directive MUST be set in your configuration file!

*
Error
The additional Features for working with linked Tables have been deactivated. To find out why click here.

When I click to check out, it says:

PMA Database ... not OK[ Documentation ]
General relation features Disabled

Is that the reason why I cannot see the data though I can get connected?

Regards
Edward Han
No it's not the reason, I got the same message, but it works great. It has something to do witj joining tables, etc etc.
Does it shows a menu on the left side and are you able to select a database? If I can remember properly you'll also need to add a username and passwd into config.inc.php which is located in the phpadmin dir. This is the authentication for php to connect to the database ...

Also make sure that the php.ini is configured properly, you don't need to make changes to php.ini, for using phpmyadmin.

I'need to leave now, but as soon as I'm back, I'll answer as soon as I can....

Hope this helps,
 
Old 09-14-2003, 08:48 AM   #50
edhan
Member
 
Registered: Sep 2003
Location: Singapore
Distribution: Redhat 8.0
Posts: 93

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by daveo
No it's not the reason, I got the same message, but it works great. It has something to do witj joining tables, etc etc.
Does it shows a menu on the left side and are you able to select a database? If I can remember properly you'll also need to add a username and passwd into config.inc.php which is located in the phpadmin dir. This is the authentication for php to connect to the database ...

Also make sure that the php.ini is configured properly, you don't need to make changes to php.ini, for using phpmyadmin.

I'need to leave now, but as soon as I'm back, I'll answer as soon as I can....

Hope this helps,
Yes. I have added the same username and password for the setting below:
$cfg['Servers'][$i]['controluser']
$cfg['Servers'][$i]['controlpass']
$cfg['Servers'][$i]['user']
$cfg['Servers'][$i]['password']
Is it okay to have same username and paassword?

Yes, the left panel allows me to select different database. i still have the error:#
Error
The additional Features for working with linked Tables have been deactivated.

And still unable to view from my index.php when accessing the database table.

Regards
Edward Han
 
Old 09-14-2003, 04:10 PM   #51
daveo
Member
 
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196

Rep: Reputation: 30
Quote:
Originally posted by edhan
Yes. I have added the same username and password for the setting below:
$cfg['Servers'][$i]['controluser']
$cfg['Servers'][$i]['controlpass']
$cfg['Servers'][$i]['user']
$cfg['Servers'][$i]['password']
Is it okay to have same username and paassword?

Yes, the left panel allows me to select different database. i still have the error:#
Error
The additional Features for working with linked Tables have been deactivated.

And still unable to view from my index.php when accessing the database table.

Regards
Edward Han
So the user you have configured in config.inc.php is an existing user in the database right?

Now when you select the mysql database with phpmyadmin are you able to view the data in it ?
 
Old 09-14-2003, 07:27 PM   #52
edhan
Member
 
Registered: Sep 2003
Location: Singapore
Distribution: Redhat 8.0
Posts: 93

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by daveo
So the user you have configured in config.inc.php is an existing user in the database right?

Now when you select the mysql database with phpmyadmin are you able to view the data in it ?
Yes. I am able to view my existing data with the phpMyAdmin for the mysql database. But not able to view from the browser when executing the php.

Checking the access.log, I can see the GET & POST but the posting is not shown on screen. Everytime when issue the POST, it is not shown on screen. Any idea how to resolve?

Regards
Edward Han

Last edited by edhan; 09-14-2003 at 10:12 PM.
 
Old 09-15-2003, 02:24 AM   #53
daveo
Member
 
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196

Rep: Reputation: 30
Quote:
Originally posted by edhan
Yes. I am able to view my existing data with the phpMyAdmin for the mysql database. But not able to view from the browser when executing the php.

Checking the access.log, I can see the GET & POST but the posting is not shown on screen. Everytime when issue the POST, it is not shown on screen. Any idea how to resolve?

Regards
Edward Han
Hmm it might be something to do with "Global variables" which are disabled by default since version 4.1.0. So if your php file is using global variable's it doesn't work. To test this, switch global variables on in the php.ini. NOTE that for security reasons you'll need to write code which works with register globals off. Below some examples with new special variables:

* $_GET - contains form variables sent through GET
* $_POST - contains form variables sent through POST
* $_COOKIE - contains HTTP cookie variables
* $_SERVER - contains server variables (e.g., REMOTE_ADDR)
* $_ENV - contains the environment variables
* $_REQUEST - a merge of the GET variables, POST variables and Cookie variables. In other words - all the information that is coming from the user, and that from a security point of view, cannot be trusted.
* $_SESSION - contains HTTP variables registered by the session module

Hope this helps,

Last edited by daveo; 09-15-2003 at 02:25 AM.
 
Old 09-15-2003, 05:11 AM   #54
edhan
Member
 
Registered: Sep 2003
Location: Singapore
Distribution: Redhat 8.0
Posts: 93

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by daveo
Hmm it might be something to do with "Global variables" which are disabled by default since version 4.1.0. So if your php file is using global variable's it doesn't work. To test this, switch global variables on in the php.ini. NOTE that for security reasons you'll need to write code which works with register globals off. Below some examples with new special variables:

* $_GET - contains form variables sent through GET
* $_POST - contains form variables sent through POST
* $_COOKIE - contains HTTP cookie variables
* $_SERVER - contains server variables (e.g., REMOTE_ADDR)
* $_ENV - contains the environment variables
* $_REQUEST - a merge of the GET variables, POST variables and Cookie variables. In other words - all the information that is coming from the user, and that from a security point of view, cannot be trusted.
* $_SESSION - contains HTTP variables registered by the session module

Hope this helps,
I have turned ON the global switch and it does not work either.

After ugrading the rpm for mysql [shared,devel,client and server], it seems that it has removed the my.cnf and now loading up automatically by daemon. Why is this so?

Regards
Edward Han
 
Old 09-15-2003, 05:29 AM   #55
daveo
Member
 
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196

Rep: Reputation: 30
Quote:
Originally posted by edhan
I have turned ON the global switch and it does not work either.

After ugrading the rpm for mysql [shared,devel,client and server], it seems that it has removed the my.cnf and now loading up automatically by daemon. Why is this so?

Regards
Edward Han
* 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?
--
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?
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.

Last edited by daveo; 09-15-2003 at 05:30 AM.
 
Old 09-15-2003, 08:53 PM   #56
edhan
Member
 
Registered: Sep 2003
Location: Singapore
Distribution: Redhat 8.0
Posts: 93

Original Poster
Rep: Reputation: 15
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 &amp 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 &amp 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
 
Old 09-16-2003, 02:31 AM   #57
daveo
Member
 
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196

Rep: Reputation: 30
Quote:
Originally posted by edhan
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 &amp 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 &amp 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
* If that's the message you get when trying to access a https link on your web, it might be that you have filled in the CA name. This must be empty since you're not able to sign the certificate(at least not for now)
So make new certificates without entering the CA name ..

About the php code:

Try this in your php file (on top)

error_reporting(E_ALL);

If seen many while in your code, but it does not end somewhere with endwhile ? I also didn't see something like this:

mysql_selectdb("thedatabasetoselect") or die ("Unable to connect to database!");

WHich will cause us an error, if we are unable to select the database. Make sure, just for the test time, that global variables are enabled, stop, start apache when the modifications are done.

You should write more error exits, otherwise you'll never be able to trace the problem. What are the databases(names) you use? and what rows do they have?
 
Old 09-16-2003, 03:10 AM   #58
boby_george
LQ Newbie
 
Registered: Sep 2003
Distribution: all distributions
Posts: 7

Rep: Reputation: 0
Hi

Try this ...
Configure some Apache options so that the PHP script interpreter will run when a Web client accesses your .php files. Run the following command:

# cp /usr/local/php-4.1.1/php.ini-dist /usr/local/lib/php.ini

Edit your httpd.conf file (Located in /www/conf) and make sure the PHP 4 mime type is there and uncommented. You need a line that looks like this, if not present add it.

AddType application/x-httpd-php .php

then restart the server.
hope it works. All the best.

Boby
 
Old 09-16-2003, 09:32 AM   #59
edhan
Member
 
Registered: Sep 2003
Location: Singapore
Distribution: Redhat 8.0
Posts: 93

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by boby_george
Hi

Try this ...
Configure some Apache options so that the PHP script interpreter will run when a Web client accesses your .php files. Run the following command:

# cp /usr/local/php-4.1.1/php.ini-dist /usr/local/lib/php.ini

Edit your httpd.conf file (Located in /www/conf) and make sure the PHP 4 mime type is there and uncommented. You need a line that looks like this, if not present add it.

AddType application/x-httpd-php .php

then restart the server.
hope it works. All the best.

Boby
Hi Boby

Thanks but already done that.

Hi Dave

I am thinking that maybe it is becoz I am testing it as localhost, might be the reason why it is not working as it might be looking for the domain name instead of local IP or localhost.

Maybe I will bring it down to my co-location to test. Btw, is there any way to test under broadband with dynamic IP ?

Btw, how to change login to mysql user instead of root ? What I mean is instead of root@localhost , I want to login as : mysql@localhost instead. How can I put this to run automatically?

Thanks!

Regards
Edward Han

Last edited by edhan; 09-16-2003 at 09:41 AM.
 
Old 09-16-2003, 11:24 AM   #60
daveo
Member
 
Registered: Sep 2003
Location: Holland
Distribution: Gentoo 1.4, Slackware
Posts: 196

Rep: Reputation: 30
Quote:
Originally posted by edhan
Hi Boby

Thanks but already done that.

Hi Dave

I am thinking that maybe it is becoz I am testing it as localhost, might be the reason why it is not working as it might be looking for the domain name instead of local IP or localhost.

Maybe I will bring it down to my co-location to test. Btw, is there any way to test under broadband with dynamic IP ?

Btw, how to change login to mysql user instead of root ? What I mean is instead of root@localhost , I want to login as : mysql@localhost instead. How can I put this to run automatically?

Thanks!

Regards
Edward Han
I'm not sure what you trying to mention, but do you mean to run phpmyadmin as mysql@localhost?

Or do you mean from a terminal login? If that's the case just do:
# mysql -u mysql -p and typ the passwd from the mysql user
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Parse Error, but why? Mistro116@yahoo.com Programming 2 11-13-2005 03:38 PM
in gcc compiler error: parse error before string constsnt cynthia_thomas Linux - Networking 1 10-20-2005 02:29 AM
parse error with bc fisayo Programming 7 08-04-2005 10:23 AM
Parse Error verbatim Programming 3 04-22-2005 10:16 AM
Parse Error in G++ ashwinipahuja Programming 1 04-29-2004 02:47 AM


All times are GMT -5. The time now is 08:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration