JOSE ANGEL CANTU MARTINEZ
@joseangelcantumartinez
Apodaca, México

@joseangelcantumartinez
Apodaca, México
JOSE ANGEL CANTU MARTINEZ@joseangelcantumartinez
En el curso de PHP no he recibido ninguna respuesta a mis preguntas? Ya abandonaron el curso? Sigue el Maestro Prof. Jairo Ushiña con Ustedes? Tengo una semana estancado por un fallo que no descarto sea por error de sintaxis, pues me ha sucedido mucho aunque los he resuelto. Ahora no puedo detectar el error. Es en el curso de PHP video 5.5 Uso de namespaces, antes de iniciar si funcionaba todo muy pero al iniciar con la refactorización y llegar a namespaces, todo funciona menos la conexión. Me pueden apoyar con eso y darle un poco de atención a las preguntas en ese curso? Agradezco de antemano su valioso apoyo. Se siente muy bien ir llegando casi al final pero unos videos antes se te cae todo es desesperante, comprendo la vida de los programadores. Saludos
JOSE ANGEL CANTU MARTINEZ@joseangelcantumartinez
Buen día: Ahora sí que no encuentro la falla, esto pasa después de haber de haber corregido todos los errores que provocó el namespace, en el Home todo funciona correctamente pero al hacer el login me envía estos mensajes que ya revise pero tengo la capacidad de detectar este error antes de esto si entraba sin problema, "Quite el password: Stack trace: #0 D:\Archivos\EDT\php8\App\Controllers\LoginController.php(16): Core\Auth::tryLogin('jacantu@hotmail...', '') #1 D:\Archivos\EDT\php8\Core\Router.php(30): App\Controllers\LoginController->login() #2 D:\Archivos\EDT\php8\index.php(13): Core\Router->handle('login') #3 {main} thrown in D:\Archivos\EDT\php8\Core\Auth.php on line 9
Agradezco mucho su apoyo. Saludos
JOSE ANGEL CANTU MARTINEZ@joseangelcantumartinez
Hola , Buen día: Que puedo hacer para evitar esto: Hago todo desde el inicio en el capítulo 3 video 3.5 minuto 04:30:
Agradezco el apoyo.
1 <span style="color: #c792ea;font-style: italic;">return</span> <span style="color: #bec5d4;">$query</span><span style="color: #7fdbca;">-></span><span style="color: #82aaff;font-style: italic;">fetchAll</span>(<span style="color: #c5e478;">PDO</span><span style="color: #7fdbca;">::</span><span style="color: #82aaff;">FETCH_CLASS</span>, <span style="color: #d9f5dd;">'</span><span style="color: #ecc48d;">Task</span><span style="color: #d9f5dd;">'</span>); 2 3 4 5 archivo task.php: 6 7 8 <span style="color: #637777;font-style: italic;">// public function __construct(</span> 9 <span style="color: #637777;font-style: italic;">// public $title = '',</span> 10 <span style="color: #637777;font-style: italic;">// public $completed = false</span> 11 <span style="color: #637777;font-style: italic;">// ) {}</span> 12 <span style="color: #637777;font-style: italic;"> 13</span> 14 <span style="color: #637777;font-style: italic;">Archivo index.pkp</span> 15 <span style="color: #637777;font-style: italic;"> 16</span> 17 <span style="color: #bec5d4;">$tasks</span> <span style="color: #c792ea;">=</span> <span style="color: #82aaff;font-style: italic;">getALLTasks</span>($<span style="color: #bec5d4;">pdo</span>); 18 19 <span style="color: #637777;font-style: italic;">//dd($tasks);</span> 20 <span style="color: #637777;font-style: italic;">//$tasks[0]->setColor(ColorsEnum::GREEN->value);</span> 21 22 <span style="color: #bec5d4;">$competedTasks</span> <span style="color: #c792ea;">=</span> <span style="color: #c5e478;">array_filter</span>($<span style="color: #bec5d4;">tasks</span>,<span style="color: #82aaff;"> </span><span style="color: #c792ea;">function</span><span style="color: #82aaff;"> </span><span style="color: #d9f5dd;">(</span>$<span style="color: #bec5d4;">task</span><span style="color: #d9f5dd;">)</span><span style="color: #82aaff;"> </span>{ 23 <span style="color: #82aaff;"> </span><span style="color: #c792ea;font-style: italic;">return</span><span style="color: #82aaff;"> </span>$<span style="color: #bec5d4;">task</span><span style="color: #7fdbca;">-></span><span style="color: #bec5d4;">completed</span>;

JOSE ANGEL CANTU MARTINEZ@joseangelcantumartinez
No he podido configurar el dd o die_dump. Hay otro comando para hacer esas pruebas? <b style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium;"> <b style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium;"> Warning<span style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium;">: Undefined property: Task::$foo in <b style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium;">D:\Archivos\EDT\php8\Controllers\index.php<span style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium;"> on line <b style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium;">3<br style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium;"><span style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium;">NULL<br style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium;"><b style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium;">Deprecated<span style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium;">: exit(): Passing null to parameter #1 ($status) of type string|int is deprecated in <b style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium;">D:\Archivos\EDT\php8\functions.php<span style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium;"> on line <b style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium;">5
JOSE ANGEL CANTU MARTINEZ@joseangelcantumartinez
Hola.Espero que hayan disfrutado estas fiestas decembrinas. Feliz Navidad y año 2026. Tengo un problema con el dd($task) me esta enviando este error: <b style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium;">Fatal error<span style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium;">: Uncaught Error: Call to undefined function dd() in D:\Archivos\EDT\php8\index.php:15 Stack trace: #0 {main} thrown in <b style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium;">D:\Archivos\EDT\php8\index.php<span style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium;"> on line <b style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium;">15 Cómo lo puedo solucionar?, desde que lo utilizamos por primera vez me enviaba que estaba deprecado.<b style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium;">
JOSE ANGEL CANTU MARTINEZ@joseangelcantumartinez
Tengo el mismo problema con los errores, no desaparecen al poner el 'error_handling' => false, Ya le busqué, modifique varias líneas en el .ini, que aparecen así: display_errors = On, hay varias líneas también que contienen E_ALL y es difícil saber cual cambiar, pero todos los cambios que realicé ninguno funcionó: Segurié buscando. ; display_errors ; Default Value: On ; Development Value: On ; Production Value: Off
; display_startup_errors ; Default Value: On ; Development Value: On ; Production Value: Off
; error_reporting ; Default Value: E_ALL ; Development Value: E_ALL ; Production Value: E_ALL & ~E_DEPRECATED
; log_errors ; Default Value: Off ; Development Value: On ; Production Value: On
JOSE ANGEL CANTU MARTINEZ@joseangelcantumartinez
Solucionado: could not find driver Cómo? , no tenía el archivo php.ini. Pero en la carpeta de php existen otros 2 archivos yo elegí el php.ini.development, lo copié en la misma carpeta php. Se guadó como una copia. le cambié el nombre a php.ini, lo edité con el block de notas, busqué ;extension=pdo_odbc, le quite el ; que tiene al principio, lo guardé y listo funcionó
JOSE ANGEL CANTU MARTINEZ@joseangelcantumartinez
Hola a todos: Yo lo que ya no sé donde quedaron las últimas líneas del archivo task.php: Por lo pronto las tengo comentadas y no he querido hacer la prueba para no errarle. Agradezco mcho el apoyo.
$task = new Task("Ir al supermercado", true); $task->save();
$exam = new Exam("Examen de PHP", "PHP 8"); $exam->save('exam-1.txt');