php5

Windows 7: PHP 5 Configured with Apache 2.2 when run from Console but not as Service

I'm on Windows 7 and I have installed Apache 2.2, PHP 5 (latest stable build) and MySQL. I have configured PHP 5 with Apache 2.2 as a module (i.e. LoadModule and AddType statements added in httpd.conf). Everything seems to work when I start Apache from the console (command prompt) but PHP would not work when the Apache service is start...

cannot store values into memcache

Hi, I am running apache+php+memcache on suse 10.1. I can connect Ok to memcached on port 11211, but I cannot do getVersion, add, get, etc. Error message [Thu Jan 21 14:38:15 2010] [error] [client ] PHP Notice: Memcache::add() [<a href='function.Memcache-add'>function.Memcache-add</a>]: Server localhost (tcp 11211) failed with: Failed ...

Bug / Feature Tracking including Customer Donations

Hi Is there a nice online web 2.0 bug tracking software that allows users to: Create a Bug / Feature Vote on the above Admins assign a cost to implement Users have the ability to donate to get the bug / feature implemented Once the money has been raised then the job can be done. Cheers Ian ...

How to install a deprecated ports on FreeBSD

I'm looking for a way to install php 5.2.8 using ports on freebsd 7.0. I just don't know how to choose php 5.2.8, make under /usr/ports/lang/php5 begins by fetching php-5.2.10.tar.bz2. thx in advance guys ...

how to get the number of weeks of current year using Zend_Date class

how can we get number of weeks of current year, for example if it's 2009 there are 53 weeks and 2010 has 52 ...

How to strip all spaces out of a string in php?

How can i strip / remove all spaces of a string in PHP? Say i have a string like $string = "this is my string"; the output should be like "thisismystring" How can i do that? ...

How to get innermost directory name

I am trying to output a class based on the name of innermost directory name, but can't get it right. Any help would be very much appreciated. It's a php_file_tree, please see section numbered #39 below: function php_file_tree_dir($directory, $return_link, $extensions = array(), $first_call = TRUE) { // Get and sort directories/fil...

SOAP url in browser

When you enter soap servers url in browser, normally it produces blank page. But if memory serves me I saw somewhere something like Hello, this is our soap service. For documentation please follow this link. To get an account, please follow this link. Blahblah. How can I do that? (Using PHP SoapServer, if that matters). I di...

MySQL absentee report script

Hi, I'm currently trying to write a query that will return all users that have not logged time for a given date in our timesheet system. We currently have 2 tables, timesheets and users. I am trying to make a query that will return a list of users that do not have an entry in the timesheets table for a date range. There is only one reco...

Variable CURL Response Time

All, I have a PHP CURL request to an HTTPS site which takes a JSON and request and returns a JSON response. Usually it should not take more than 1 second. But, I have seen that the CURL response time is variable. Sometimes, it takes 4 seconds to respond and sometimes 1.2 seconds. Why is this so and How can I make it faster and process t...

Contollers and Views - MVC in Zend Framework

I am using MVC in PHP based Zend Framework. This is more of a design question. I have a controller that has a couple of actions. These actions are accessed via AJAX from the controller's view. The controller's actions, perform Business logic by accessing data from functions inside a model, and construct or echo HTML. This HTML is spit ba...

Lucene - Zend_Search_Lucene - how to build an index for "tagged"content

Hello all, I have following problem, I need to build lucene index for articles which are tagged. Here is simplified data structure and lucene proposal: article_id -> unindexed article_title -> UnStored article_content -> UnStored article_tags -> ????? (here is the problem) So article can have multiple tags. Lets say we have an artic...

How to get the PHP Version?

Is there a way to check the version of PHP that executed a particular script from within that script? So for example, the following snippet $version = way_to_get_version(); print $version; would print 5.3.0 on one machine, and 5.3.1 on another machine. ...

Displaying Images from SQL Database

Alright, this is sort of a tough one. I've recently been working on a static content handler project, and this is hitting me hard. I cannot get the images to show up in the browser the same way I could before. The image is correct, and it's impossible because my code pretty much stayed the same. ob_start(); function ImageExistsSql($im...

PHP code safeguard technique for Remote call, scenario based

hi, I am thinking about safeguardimg my php code in a different way for my project, but it may be childish method. Please let me know alternative or pros and cons of this method. Both client and server has LAMP. Client system holds client sensitive data, which will not be shared to the server. Client will have Auth key to access serve...

Removing a function at runtime in PHP

I know this question seems hacky and weird, but is there a way to remove a function at runtime in PHP? I have a recursive function declared in a "if" block and want that function to be "valid" only in that "if" block. I don't want this function to be callled outside this block. I found out runkit_function_remove but runkit isn't enable...

Haxe PHP vs PHP - what language is better for creating Plugins for WordPress?

I want to create a WP plugin with use of WP DB tables and costume ones, Ajax requests Rss feeds reading and writing and media storing and Google maps. Such a crazy plugin it will be... So Haxe PHP or normal PHP - what language is better for creating Plugins for WordPress? BTW books blog articles and docs are appreciated as proofs for ...

Can MYSQL support databases with sizes around 4 GB? Will I have any performance issues?

I am planning to have a database of size more than 12 million records all of them in a single table and no other joins etc, used for search, filtered based on field names of the table, approximately 4 GB size in MYSQL backend and php frontend. Question is can MYSQL support databases with sizes around 4 GB, Will I have any performance is...

PHP: Facebook stream.publish and outdated template bundles?

Ok So I haven't tried messing with the facebook PHP API for months.. it's gross. Since template bundles are apparently now defunct, how can I publish a story into my users news feed for their friends? I've also already requested permissions. Edit: The issue seems to arise from requested permissions not being set for the user when They ar...

PHP with Zend Framework can't start a SQLite database?

Trying to get a simple PHP/Zend Framework setup to create a SQLite databse and manipulate it. <?php require_once("Zend/Db.php"); // Zend framework $db = Zend_Db::factory('Pdo_Sqlite', array("dbname" => "./test.sqlite3")); $sql = "CREATE TABLE IF NOT EXISTS ".$db->quoteIdentifier("configs")." (".$db->quoteIdentifier("name")." TEXT NOT ...