Warning: require (__ DIR __ / cherry-framework / setup.php

Can't install wordpress the error after entering domain. the hosting PHP version is 5 Warning: require(DIR/cherry-framework/setup.php) [function.require]: failed to open stream: No such file or directory in /home/content/a/s/c/asclaw/html/wp-content/

split application on two servers

I have a PHP shop-application (session-based) on myserver1.com. I want to outsource one module which is very performance-hungry into another server myserver2.com. I thought I could redirect the user by clicking on a button to the module on myserver2.

Connect to Android with the PHP web service

I want to make login with JSON. This is my login web service and my login activity in android studio. When i attempt to login it always response 1. It means it always success. Although the username and password is wrong. Can you tell me why is this h

Regex separate the ports with commas

Problem I have a working port validity checker, however I need to separate the ports by a comma (no spaces). For instance instead of just '80' being valid, now '80,443,8080' would be valid. Regex (^(?:6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-

from the php string to the mysql date

What I'm trying to do is insert credit card info from a form to my mysql database. First of all, the input format for the expire date will be MM / YY(with or without spaces) on the form and i'm trying to concat the "20" string to the year but I

How to pass the value in PDO prepare

$stmt = $dbh->prepare('INSERT INTO articles (author, subject, text, date, special) VALUES (:author, :subject, :text, :date, :special)'); How should it look like when i need to add "special" value to database but "date is automatic and i

PHP :: mySqli does not insert a new row with a variable

This line is working perfectly : $mysqli->query("INSERT INTO `myDatabase`.`myTable`(Date,Time,SID) VALUES (1,2,3)"); But this not : session_start(); $sessionID=session_id(); $mysqli->query("INSERT INTO `myDatabase`.`myTable`(Date,Time

Calculation of a month apart

I am trying to find the date from the database which should be exactly 30 days from now. I want to retrieve the date from the database which is DateTime format. change this to timestamp with strtotime(). feed this to date() and retrieve the mand i an

Converting Query to Codeigniter Format

I have a query SELECT l.id,l.name,l.city,l.email,l.phone,l.status,l.source,l.leadCreatedTime,l.organizationId FROM ( SELECT id FROM leads where removed='0' ORDER BY id LIMIT 40000 ) o JOIN leads l ON l.id = o.id ORDER BY l.id I want to convert this q

Using variables in the PDO update statement

Thanks to all of you who provided input. And yes i am very new to pdo and php programing so some basic errors that you guys might spot easily in my code aren't that apparent to me yet. I think my explanation wasn't that clear so I'm gonna try again.

PHP - How to recover the contents of the HTML tag

How to retrieve the contents of the HTML tag. $foo = '<p> aaaaaa </p> <p> bbbbbb bb bbbbbbb </p> <p> cccccccc ccc</p>'; I need to get "aaaaaa" thank you very muchUse a DOMParser echo trim($dom->getElementsB

How to access the Symfony2 session from anywhere?

I did my own URLGenerator (Symfony\Component\Routing\Generator\UrlGenerator) extending the original URLGenerator. I want to access the Symfony2 session from there, but I can't. use Symfony\Component\Routing\Generator\UrlGenerator as BaseUrlGenerator;

Google Map using PHP and Javascript

The question is, can I assign a data from the database using PHP ? the longitude and latitude are saved in the database.. thanks :) I'm just a newbie here.. function initialize() { var mapProp = { center: new google.maps.LatLng(51.508742,-0.120850),

Magento test with PHPUnit: Problems with Memcache sessions

We are using the EcomDev package to test our Magento store, and one of the default tests is kicking up a fuss: Running phpunit returns: 5) EcomDev_PHPUnitTest_Test_Helper_Customer::testCustomerSession with data set "jane_doe" (2) Exception: Warn

Pass PHP variables to Livecode

Problem: I have a number of variables stored in $_SESSION in PHP and I am wondering if it is possible at all to transfer these to Livecode scripts (.lc)? Current solution: I use $_GET to move information but I would like to know a way where you can c

Remove the sub-quote in the chain

I am making plugin for forum that delete over-quoting, so that there are only one level quotes: <quote> <quote>subquote</quote> quote111 </quote> text <quote>quote222</quote> text <quote>subquote</quote> sho

Restrictions on the speed of downloading files?

I am contemplating setting up a file host (mostly for the exercise) but how do you ensure that free users are only capable of 40-50 kb/s speed while premium users can go at faster speeds? I guess you place all the files on 2 separate servers and simp

Symfony2 and Vim recommendations

I already work with Symfony2 and of course with vim but in different projects. I would like to know which plugins, tips, recommendations do you use in Vim for working with Symfony2? This also goes to Twig template, themes, debugging, etc.I don't real

$ _REQUEST superarray not initialized in $ GLOBALS array

PROBLEM So, I have this function to retrieve and proceed data from $_REQUEST, $_POST, $_GET or $_COOKIE arrays. I know which array to use only from function call. Simplified ex: function gg( $name, $type="_REQUEST" ) { return isset( $GLOBALS[$ty

Apache Rewrites the Query String to CodeIgniter as a URL

Here is a sample URL with query string. The keyword is anything that User Search in my website or redirect from other websites, search engines etc. http://example.com/search.php?q=keyword and the equivalent CodeIgniter URL http://example.com/search/n

PHP SoapServer: How to disable the addition of "Response"

I am creating a SOAP server (in Symfony using ckWebservicePlugin) which needs to comply with the following structure of request and response (I was given this as an already agreed specification). Request: <?xml version="1.0" encoding="UT

easy way to complete a doctrine template 2 with form data?

Imagine a User model like this: class User { /** * ...some mapping info... */ private $username; /** * ...some mapping info... */ private $password; public function setUsername($username) { $this->username = $username; } public function setPassword($