php

Any good self-hosted php webmail suggestions?

Can anyone suggest a good self-hosted php webmail solution? I share a server on a commercial collocation site and every now and then I add a domain here and there, mostly for email hosting (family, friends), even though it runs php. (my blog is hosted there for example). Right now im running Open Webmail, last released in 28-Feb-2005! ...

PHP unserialize keeps throwing same error over 100 times part 2

So I have a large 2d array that i serialize, but when I attempt to unserialize the array it just throws the same error to the point of nearly crashing firefox. The error is: Warning: unserialize() [function.unserialize]: Node no longer exists in /var/www/dev/wc_paul/inc/analyzerTester.php on line 24 I would include the entire serializ...

PHP: How to return information to a waiting script and continue processing

Suppose there are two scripts Requester.php and Provider.php, and Requester requires processing from Provider and makes an http request to it (Provider.php?data="data"). In this situation, Provider quickly finds the answer, but to maintain the system must perform various updates throughout the database. Is there a way to immediately retu...

Timed events with php/MySQL

I need a way to modify a value in a table after a certain amount of time has passed. My current method is as follow: insert end time for wait period in table when a user loads a page requesting the value to be changed, check to see if current >= end time if it is, change the value and remove the end time field, if it isn't, do nothing...

Oracle Global Temporary Table / PHP interaction question

I've never used the Global Temporary Tables however I have some questions how they will work in a php environment. How is data shared: Assuming persistent connections to oracle through php using oci8. Is the data tied to a database id? is it done based on the Apache httpd demons? Or is each individual request unique? When is the data...

Can I use RegEx and VI (or something similar) to autofill some text for me?

NOTE: I am not set on using VI, it is just the first thing that came to mind that might be able to do what I need. Feel free to suggest any other program. I have a form with nearly 100 fields that I would like to auto-fill with PHP. I know how to do the autofill, but I would like to avoid manually adding the needed text to 100 fields. ...

Php Check If a Static Class is Declared

How can i check to see if a static class has been declared? ex Given the class class bob { function yippie() { echo "skippie"; } } later in code how do i check: if(is_a_valid_static_object(bob)) { bob::yippie(); } so i don't get: Fatal error: Class 'bob' not found in file.php on line 3 ...

Automatic newlines and formatting for blogging software

I'm writing by own blogging engine in PHP with a MYSQL backend database. MY question is: How would you go about making user comments and blog posts include newlines wherever they are appropriate? For example, if a user hits the return key in the message/comments box how would this translate into a new line that would show in the browser...

php String Concatenation, Performance

In languages like Java and C#, strings are immutable and it can be computationally expensive to build a string one character at a time. In said languages, there are library classes to reduce this cost such as C# System.Text.StringBuilder and Java java.lang.StringBuilder. Does php (4 or 5; I'm interested in both) share this limitation? ...

Mysql results in PHP - arrays or objects?

Been using PHP/MySQL for a little while now, and I'm wondering if there are any specific advantages (performance or otherwise) to using mysql_fetch_object() vs mysql_fetch_assoc() / mysql_fetch_array(). ...

Sort Object in PHP

What is an elegant way to sort objects in PHP? I would love to accomplish something similar to this. $sortedObjectArary = sort($unsortedObjectArray, $Object->weight); Basically specify the array I want to sort as well as the field I want to sort on. I looked into multidimensional array sorting and there might be something useful there...

Connection Interrupted. The connection to the server was reset while the page was loading. The network link was interrupted while negotiating a connection.

I am calling a PHP-Script belonging to a MySQL/PHP web application using FF3. I run XAMPP on localhost. All I get is this: Connection Interrupted The connection to the server was reset while the page was loading. The network link was interrupted while negotiating a connection. Please try again. Any advice? ...

Asynchronous PHP calls?

Is there a way to PHP make asynchronous http calls? I don't care about the response, I just want to do something like file_get_contents(), but not wait on the request to finish before executing the rest of my code. This would be super useful for setting off "events" of a sort in my application, or triggering long processes. Any ideas? ...

compression library for c and php

To save network traffic I'd like to compress my data. The only trick is that I the client is a c application and the server is php. I'm looking for an open source compression library that's available for both c and php. I guess I could write an external c application to decompress my data, but I'm trying to avoid spawning extra processe...

"SELECT * FROM users WHERE id IN ( )" == FAIL

I have a function that I use called sqlf(), it emulates prepared statements. For instance I can do things like: $sql = sqlf("SELECT * FROM Users WHERE name= :1 AND email= :2",'Big "John"','[email protected]') ; For various reasons, I cannot use prepared statements, but I would like to emulate them. The problem that I run into is with ...

glob() - sort by date

I'm trying to display an array of files in order of date (last modified). I have done this buy looping through the array and sorting it into another array, but is there an easier (more efficient) way to do this? ...

Create Word Document using PHP in Linux

Whats the available solutions for PHP to create word document in linux environment? ...

Install PHP on XP / IIS 5.1?

I am trying to install PHP onto my development box (XP SP3 / IIS 5.1) I've got PHP 5.2.6 stable downloaded (the MSI installer package) and I am getting an error "Cannot find httpd.conf". After that the install seems to breeze by quickly (more quickly than I would have expected) and when I try to execute a simple PHP script from my loca...

PHP code to convert a MySQL query to CSV

What is the most efficient way to convert a MySQL query to CSV in PHP please? It would be best to avoid temp files as this reduces portability (dir paths and setting file-system permissions required). The CSV should also include one top line of field names. Cheers. ...

Any quirks I should be aware of in Drupal's XML-RPC and BlogAPI implementations?

I'm beginning work on a project that will access a Drupal site to create (and eventually edit) nodes on the site, via the XML-RPC facility and BlogAPI module shipped with Drupal. This includes file uploading, as the project is to allow people to upload pictures en mass to a Drupal site with minimal ado. What I'd like to know is if there...