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.

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

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

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

Is there a way to tell curl not to use the cache

I am trying to find out file size of an url: $url1 = 'www.google.com'; $curl1 = curl_init(); curl_setopt($curl1, CURLOPT_URL, $url1); curl_setopt($curl1, CURLOPT_RETURNTRANSFER, TRUE); curl_exec($curl1); $file_size = curl_getinfo($curl1, CURLINFO_SIZ

Password Change PHP

I am working on a simple script that allows users to create an account. There is nothing special about it, at it asks for is a username, and password. The only problem I'm having is creating a script that allows the user to change their password. Her

Import a CSV file directly into the MySQL database

Possible Duplicate: Import CSV to mysql Right I need some help with this: I am trying to import a .csv file into a mysql database using php, rather than doing it manually through phpmyadmin. This is the code I have at the moment: if($_REQUEST['func']

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

Excerpt from Regex after last point

im trying to extract every file extension of an uploaded file. For example: example.doc -> .doc another.example.jpeg -> .jpeg even.anaother.example.pdf -> .pdf i know this could be resolved by using regex, but regex are a closed book to me. So i

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