Unable to install laravel

I am trying to install laravel in windows. In composer.phar, opening it in msdos, i input the following command as suggested by documentation: composer global require "laravel/installer=~1.1" but i am getting the following error: Could not open

Search PHP / MySQL / PDO from the database

Trying to make a little Search feature for a user, so he can type in a date on a webpage made with HTML/PHP, and see which people in the db have registered as member on or after (a date). My user inputs the date in format 2015-10-01. This gets sent t

The Symfony2 2-Parameter Index Lines

I want have this urls: example.com example.com/category example.com/category/name My routes: default_page: path: /{name} defaults: { _controller: CatalogWebBundle:Default:index } default_page: path: / defaults: { _controller: CatalogWebBundle:Default

array / looping through numbers to get_post_meta

I have post meta in WordPress that stores slide_image1 - 9, and slide_text1-9 and slide_embed1-9. I want to be able to loop through all the possibilities, and store the meta values (if there are any) and then check if they are empty to decide if a sl

Construct class variables

I am trying to make my class variables in the 'global scope' of my web application so they can be used within other classes easily and throughout the web application when you call them. Here is my Articles Class for my web application. class Articles

can not include the regeneration session identifier

i have just learning session fixation attack from this atricle http://shiflett.org/articles/session-fixation but for defence of this attack i do not understand what is the usage of session_regenerate_id()? when attacker include session id in url and

PHP table declaration problem

$info = array( "First_Names" => "John", "Last_Names" => "Smith", "Gender" => "Male", ); array_push($info["First_Names"], "$fname"); print_r ($info); I started learnin

How to detect the shape in an image with php?

I have to detect 'star' like shape in a image with php.Also the star is not fixed and may be at other position next time.I cannot use any external software or library.I have tried all methods like edge detection and grayscaling but all in vain.this i

How to match the backslash to the beginning of the line in PHP

After seeing some errors showing up in our apache logs, I've been trying to figure out 'why'. The errors related to a preg_match command where I was trying to find strings that started with a backslash character: preg_match('/^\\/',$str) It was repor

The CodeIgniter redirect loop in the post-controller hook

Here is my Controller: <?php class Check_Login { var $CI; var $class; var $allowed_klasses = array('user', 'testing', 'home', 'lesson_assets', 's3_handler', 'ajax', 'api', 'pages', 'invite', 'mail', 'partner', 'renew', 'store', 'news', 'breathe','pop

Codeigniter Force download files

By going through the codeigniter documentation, I am using following code to force download files from my server. function download($file_id){ $file = $this->uploadmodel->getById($file_id); //getting all the file details //for $file_id (all details

How to divide text by tags using PHP?

I like to split a huge text by <li></li> tags after a specified amount of characters. For Ex. "biger text1 123 text biger 678 biger text" to become "<li>biger text1 123 text</li><li>biger 678 biger</li>&l

Facebook Graph API permanently overriding privacy settings

I'm having problems setting the privacy for posts created by my App on behalf of the user. The problem is that all the posts are getting their privacy value set as ALL_FRIENDS by the Graph API, even though I'm explicitly setting the privacy value to

Fatal PDO PDO error

I have the following query: $sql = "UPDATE db.users SET $str WHERE users.{$this->row} = {$this->value} LIMIT 1"; Which echo's out: UPDATE db.users SET username=testUser, gid=3 WHERE users.username = mmiller LIMIT 1 However when I do: $coun

save XMLHttpRequest.responseText in a variable

I'm writing a small script in JS to save the data using a php website like this: function getPopulation(id) { var xhr_object = null; if(window.XMLHttpRequest) // Firefox xhr_object = new XMLHttpRequest(); else if(window.ActiveXObject) // Internet Exp

Fatal error: call to an undefined method PDO :: close ()

I have got that error and the line was this: public function __destruct() { $this->db->close(); } I use PDO, is this the problem, does the PDO driver not recognize this function? If yes, what is its equivalent in PDO?A PDO connection is closed by de

PHP PDO Update Statement Problem Statement

Hi everyone I've been trying my hand at PDO recently, and am currently trying to write a basic database class for a project i'm working on. However i have ran into problems trying to write a function for carrying out an update query using prepared st

The PHP query inserts 2 rows into the table

OK, here is the deal. I have 3 queries putting data in different tables. 2 of them are in included files. I've tried to put them into the main code, the result was the same. The first two queries inserts one row with the data and a blank row. The thi

SQL SUM of distinct lines and hellip; I am stuck!

Been trying to put together an SQL query that sorts data into financial years (which I've sorted) and then SUMs it according to each distinct value in the claim_id column table structure is: claim(id, claim_id, date, amount) SQL so far is: SELECT CAS

PHP - Htmlentities () is it enough to create xml-safe values?

I'm building an XML file from scratch and need to know if htmlentities() converts every character that could potentially break an XML file (and possibly UTF-8 data)? The values will be from a twitter/flickr feed, so I need to be sure!htmlentities() i

Make clickable links with regex

Is there a regex out there that can find a string that contains a word that starts with either http:// or www and wrap it with <a>$1</a>? Been googling but I can't seem to find a ultimate one. Another question, Could you somehow make it ignore