Foros del Web » Programación para mayores de 30 ;) » Bases de Datos General » Mysql »

problemas con conexion php y mysql online

Estas en el tema de problemas con conexion php y mysql online en el foro de Mysql en Foros del Web. Que tal, Sorry pero sigo sin saber en donde esta mi error. ya tengo mi archivo php y sql, y en mi computadora funciona perfectamente ...
  #1 (permalink)  
Antiguo 08/07/2012, 20:39
 
Fecha de Ingreso: julio-2012
Mensajes: 30
Antigüedad: 11 años, 9 meses
Puntos: 0
problemas con conexion php y mysql online

Que tal,

Sorry pero sigo sin saber en donde esta mi error.

ya tengo mi archivo php y sql, y en mi computadora funciona perfectamente pero al tratar de hacerlo online desde mi web me sale un error que es el siguiente:

Warning: require_once(../Connections/crdeleca_boleta.php) [function.require-once]: failed to open stream: No such file or directory in /home/www/mexicancitrus.com/tabla_boleta.php on line 1

Fatal error: require_once() [function.require]: Failed opening required '../Connections/crdeleca_boleta.php' (include_path='.:/usr/local/php5/lib/php') in /home/www/mexicancitrus.com/tabla_boleta.php on line 1

-------------------------------------------------------------------------------------------------------
Anexo mi archivo php (source code)


<?php require_once('../Connections/crdeleca_boleta.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

mysql_select_db($database_crdeleca_boleta, $crdeleca_boleta);
$query_Recordset1 = "SELECT * FROM boletas";
$Recordset1 = mysql_query($query_Recordset1, $crdeleca_boleta) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>

<body>
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>id</td>
<td><?php echo $row_Recordset1['id']; ?></td>
</tr>
<tr>
<td>nombre</td>
<td><?php echo $row_Recordset1['nombre']; ?></td>
</tr>
</table>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>
--------------------------------------------------------------------------------------------------------

<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_crdeleca_boleta = "localhost";
$database_crdeleca_boleta = "crdeleca_boleta";
$username_crdeleca_boleta = "root";
$password_crdeleca_boleta = "";
$crdeleca_boleta = mysql_pconnect($hostname_crdeleca_boleta, $username_crdeleca_boleta, $password_crdeleca_boleta) or trigger_error(mysql_error(),E_USER_ERROR);
?>


------------------------------------------------------------------------------------------------------
mis archivos se llaman :
tabla_boleta.php
en mysql la base de datos es: crdeleca_boleta
y la tabla se llama: boletas

Muchas gracias por su ayuda.
  #2 (permalink)  
Antiguo 09/07/2012, 01:01
Colaborador
 
Fecha de Ingreso: marzo-2008
Ubicación: Sabadell
Mensajes: 4.897
Antigüedad: 16 años, 1 mes
Puntos: 574
Respuesta: problemas con conexion php y mysql online

Yo no veo ningun error de mysql, solo te dice que no encuentra el fichero "../Connections/crdeleca_boleta.php" que intentas incluir en la primera linea de /home/www/mexicancitrus.com/tabla_boleta.php.

Dudo que un ISP comercial te permita crear un directorio "Connections" al mismo nivel de "mexicancitrus.com" que supongo que es tu dominio....

Si tabla_boleta.php esta en /home/www/mexicancitrus.com

Luego crdeleca_boleta.php en ../Connections estaria o deberia estar en

/home/www/Connections
__________________
Quim
--------------------------------------------------
Ayudar a ayudar es una buena práctica!!! Y da buenos resultados.

Etiquetas: conexion, php, select, sql, tabla
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 02:50.