Actualmente tengo un sistema trabajando con php 4.0.3 y Mysql 4.1 y esta funcionando bastante bien; pero tengo que migrarlo a php 5 y mysql 5. Ya hice la mayor parte y todo bien solo me tope con este problema espero me ayuden a resolverlo.
El sistema se conecta a un DBMS SYBASE donde realiza unos Stored Procedures
este es el codigo:
Código PHP:
$Valido=false;
$SqlHost="Host";
$SqlUsuario="Usuario";
$SqlClave="arawa123456";
$SqlDb="DataBase";
$s = mssql_connect($SqlHost, $SqlUsuario, $SqlClave)
or die("Couldn't connect to SQL Server");
$d = mssql_select_db($SqlDb, $s)
or die("Couldn't open database $myDB");
$query = mssql_init("sp_validar", $s);
$oLogin ="";
$oNombre="";
$oOficina=0;
$oCargo=0;
$Mensaje=1;
$oDescripcion="";
// Bind the parameters
mssql_bind($query,"@i_login",$usuario,SQLVARCHAR,FALSE,FALSE,14);
mssql_bind($query,"@i_password",$clave,SQLVARCHAR,FALSE,FALSE,30);
mssql_bind($query,"@o_nombre",&$oNombre,SQLVARCHAR,TRUE,FALSE,64);
mssql_bind($query,"@o_oficina",&$oOficina,SQLINT4,TRUE,FALSE);
mssql_bind($query,"@o_cargo",&$oCargo,SQLINT4,TRUE,FALSE);
mssql_bind($query,"@o_desc_cargo",&$oDescripcion,SQLVARCHAR,TRUE,FALSE,64);
mssql_bind($query,"RETVAL",&$Mensaje,SQLINT2);
// Bind the return value
mssql_execute($query);
1. La conexion: No se conecta solo así, ahora tengo que agregarle el numero de puerto al HOST (Si hago esto en la version anterior no sirve)
Código PHP:
$SqlHost="Host:4100"; // si NO le coloco el puerto NO me conecta y en la version anterior si le coloco el puerto no me conecta
WARNING: mssql_bind(): Unable to set parameter in /opt/....../funciones.php
Este error solo me lo da en los dos primeros parámetros y en los otros no, y cuando llega a ejecutar me tira el siguiente error:
WARNING: mssql_exec(): stored_procedure execution failed in /opt/..../funciones.php
Ya revise los parametros y si llevan valor.
Bueno espero que algun gurú de la programacion PHP me pueda ayudar porque la verdad no se me ocurre nada (Ya revise el php.ini y tienen lo mismo, ya baje a una versionde php de 4.1.5 y tampoco funciona)
SALUDOS y de antemano gracias
![lloron](http://static.forosdelweb.com/fdwtheme/images/smilies/chillando.png)
![lloron](http://static.forosdelweb.com/fdwtheme/images/smilies/chillando.png)
![lloron](http://static.forosdelweb.com/fdwtheme/images/smilies/chillando.png)
![lloron](http://static.forosdelweb.com/fdwtheme/images/smilies/chillando.png)
![lloron](http://static.forosdelweb.com/fdwtheme/images/smilies/chillando.png)
![lloron](http://static.forosdelweb.com/fdwtheme/images/smilies/chillando.png)
![lloron](http://static.forosdelweb.com/fdwtheme/images/smilies/chillando.png)
![lloron](http://static.forosdelweb.com/fdwtheme/images/smilies/chillando.png)
![lloron](http://static.forosdelweb.com/fdwtheme/images/smilies/chillando.png)
![lloron](http://static.forosdelweb.com/fdwtheme/images/smilies/chillando.png)
![lloron](http://static.forosdelweb.com/fdwtheme/images/smilies/chillando.png)
![lloron](http://static.forosdelweb.com/fdwtheme/images/smilies/chillando.png)
![lloron](http://static.forosdelweb.com/fdwtheme/images/smilies/chillando.png)