Entradas

Codeigniter Sending Email Message: strpos(): Empty needle

Imagen
When sending an email you get this error, regarding Email.php library: A PHP Error was encountered Severity: Warning Message: strpos(): Empty needle Filename: libraries/Email.php Line Number: 937 This is due you need to define the config['charset'] in the email.php file in the config directory of the app. $config['charset']          = null; //original $config['charset']          = 'UTF-8';   //or whatever is good for your app. ***** Este error de strpos(): Empty needle en la librería Email.php significa que no se ha definido una variable llamada charset en el email.php del directorio config de su app.

VirtualBox not working after Mojave update. Kext error.

Imagen
VirtualBox not working after Mojave update. Kext error. If you updated to the most recent macOS Mojave and your VirtualBox is not working anymore just go to https://www.virtualbox.org/wiki/Downloads and download the most recent version. The problem is solved. ****** Si actualizaste al nuevo macOS Mojave y tu máquina de VirtualBox dejó de funcionar, la solución es simple, descarga la más reciente versión.

PHPWord in hosting with no terminal no composer / PHPWord en servidor sin terminal sin composer

If you need to use PHPWord in a hosting environment in which you can't install via composer, you must install it locally on your development machine, then just copy the directory to your hosting provider (normally copy the vendor directory to your root application directory). The only change I needed to do is to have a writable directory where to store the created files. In my case I created "./public/docs" then in the method save: $objWriter->save('./public/docs/my_wordfile.docx'); ********** Si necesita usar PHPWord en un servidor de hosting en el cual no puede instalar usando el composer, lo que debe hacer es instalar en su máquina local, luego solo basta con copiar el directorio a su proveedor de hosting (normalmente copie el directorio vendor al directorio root de su aplicación). El único cambio que necesité hacer is tener un directorio escribible donde dejar los archivos creados. En mi caso yo creé "./public/docs" entonces en el método ...

PHP Fecha actual / PHP current date

Para que PHP devuelva la fecha actual es muy simple: $data["fechahoy"]=Date('Y-m-d'); Esto se hace en el controlador y cuando se llama a la vista en esta se recibe la variable y se le asigna al input type date como $fechahoy ***************************************** Tell to PHP returns current date is very simple: $data["todaydate"]=Date('Y-m-d'); This must be done in the controller then in the view receive the var to assign to the input type date as $todaydate

Solución Apague y Reinicie / Shutdown and restart solution

Imagen
This is a very common solution and normally expressed as a joke to recognize the "Support Engineer" 's main activity: when someone needs to fix something in the computer and calls for support and the supporter says: "please restart your computer." This is not a nonsense solution, in fact if there are some smart question from the supporter and finally decides to tell the user please restart is because of this. Example of questions for a program that is not working on the computer: 1. Have you applied a recent update on the app? R/No 2. Someone else applied an update on your computer? R/No 3. When was the last time your app was working fine? R/A few minutes ago 4. Ok, if your computer is the same in configuration and it fails a few moments ago, it must be something about the operating system exahusted, I think you must restart your computer. R/I already did it, I restarted the computer. 5. Oh, ok, so you are now opening the program and it's still fail...

PHP first day and last day of current month / día inicial y final del mes actual

To get the first day and last day of current month in PHP: Para obtener el primero y último día del mes actual en PHP:       $dfechaini=date("Y-m-d", mktime(0, 0, 0, date("m"), 1));       $dfechafin=date("Y-m-t", mktime(0, 0, 0, date("m"), 1)); The trick is the first parameter in date "Y-m-d" first day "Y-m-t" last day plus mktime El truco es el primer parámetro en date "Y-m-d" primer día "Y-m-t" último día más mktime

Hibernate Mac OS Sierra / Hibernar el Mac OS Sierra

Imagen
If you need to put your Mac laptop to hibernate when closing the lid, just follow the following instructions: Open a terminal window and write the following commands: Si necesita poner a hibernar su laptop Mac cuando cierre la tapa, solo siga las siguientes instrucciones: Abra una ventana de terminal y escriba los siguientes comandos: $sudo pmset -b sleep 60 $ sudo pmset -b standby 120 $ sudo pmset -b standbydelay 120 $ sudo pmset -b hibernatemode 25 This worked for me on my MacBook Pro with Mac OS Sierra. Esto me funcionó en mi MacBook Pro que tiene Mac OS Sierra.