Skip to content

Tag: php

Mysqli not installed?

I get the following error: Fatal error: Class ‘mysqli’ not found in my php script I have php5.3.3-7 installed and I get this when I run apt-cache show php5-mysql There is nothing about mysql at all in php info. How do I find the extention and do I have to istall it? There are many references to my…

How can I detect a malformed UTF-8 string in PHP?

The iconv function sometimes gives me an error: Is there a way to detect that there are illegal characters in a UTF-8 string before sending data to inconv()? Answer First, note that it is not possible to detect whether text belongs to a specific undesired encoding. You can only check whether a string is valid…

Remove first 2 from Array

I have this simple array and I’d like to know how I can stop the first 2 segments from showing. Any help would be great, Thanks! Answer Stop from showing or removing? for removing: Hope this helps!

Purpose of Secondary Key

What is the purpose of the Secondary key? Say I have a table that logs down all the check-ins (similar to Foursquare), with columns id, user_id, location_id, post, time, and there can be millions of rows, many people have stated to use secondary keys to speed up the process. Why does this work? And should bot…

RESTful API methods; HEAD & OPTIONS

I’m writing a RESTful API module for an application in PHP, and I’m a bit mixed on the verbs HEAD and OPTIONS. OPTIONS  Used to retrieve the available HTTP verbs for a given resource? HEAD Used to determine whether a given resource is available? If someone could clarify* these verbs, that would be…

Alternative to SSL – “Manual” Encryption? [closed]

Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed last year. Improve this question I would like to encrypt data that travels back and forth between the se…

Hosting PHP website that uses unix command “convert” on IIS

I thought I had checked so that everything would work when hosting this website on IIS but I missed a tiny detail. Apparantly an image upload form on the website requires a unix command or program called “convert” (usr/bin/convert) to resize, set quality and generate a thumbnail for the images. I …