Hi all,
Im trying to send an email to multiple addresses, so I wrote function that pulls the emails from the database, and separates each one with a comma, but the mailing part keeps failing. However a similar function as getmails() is working on another page, so I am really lost as to what I am doing wrong. Here is my code, any help wi...
I wanted to create search engine for my webpage, but during indexing on server it crashes with errors :
Warning: opendir(/admin/lucene/) [function.opendir]: failed to open dir: Too many open files in /admin/includes/Zend/Search/Lucene/Storage/Directory/Filesystem.php on line 159
Warning: readdir(): supplied argument is not a valid...
I am trying to connect to SQL Server 2008 (not express) with PHP 5.2.9-2 on Windows XP sp2. I can connect to the remote SQL Server fine from SQL Server Management Studio from the same machine.
My first attempt was this:
$conn = new PDO("mssql:host={$host};dbname={$db}", $user, $pass);
Which gives this error:
PHP Fatal error:
Unc...
I'm writing a simple web application using CakePHP version 1.2 (the latest) and am having an issue with displaying the flash message from the Session helper. In my layout, there exists the following code:
<?php echo $this->renderElement('flash'); ?>
Which renders the following element:
<?php if($session->check('Message.flash')): ?>
...
Using php's DOMDocument->LoadHTMLFile('test.html'); keeps on returning an error to me, reporting for an error in the content at line 36. Deleting character after character, it turns out it's an apparently empty space that was the culprit.
Copying/pasting that sentence in another editor (Editra), showed a strange RS character.
What is i...
I received the following error:
[27-Apr-2009 10:26:06] PHP Fatal error: Cannot redeclare alphanumeric() (previously declared in /home/iddoc/public_html/lib/common.php:6) in /home/iddoc/public_html/lib/common.php on line 8
Notice this:
/home/iddoc/public_html/lib/common.php:6) in
/home/iddoc/public_html/lib/common.php on line 8
He...
I'm in charge of maintaining a learning management system and this is an issue that I've been dealing with on and off over the past few months.
A single student (among thousands) is claiming that his essay submissions are being "eaten" by the website. After form submission he says his essay has been replaced by the following text:
...
I've got an app written in PHP, and there are a number of configurable variables. We're implementing a feature where the user can create sets of configurations and easily switch between them. How should I store my configs? as XML? in a .ini file? in multiple .ini files? in a db?
What's going to provide the most flexibility if we add fie...
Hello Everyone,
I have a problem with reading an rss feed in my site.
When i add an feed to my site I cache it in the database by serializing it and when I do a refresh I unserialize it again from the database if it is within a certain time limit. Else I read again the feed from the remote site.
I think the problem has to do with th...
Please, I am solving this problem.. I need to login into Facebook or Twitter or any other website from my PHP script running on my server. I am normaly doing that with CURL, saving cookies to some predefined file.
But now I need something new.. I need to stay logged in with my browser, even when the script ends the login process.
Is that...
There is a PHP application right now on a Linux box running under Apache with MySQL. Since we are a windows shop, management wants to get rid of the Linux box and move everything over to windows. Is there a performance difference between the two platforms? Or, is there any significant difference at all, in terms of performance or managem...
I'm trying add some data to an existing XML file using PHP's SimpleXML. The problem is it adds all the data in a single line:
<name>blah</name><class>blah</class><area>blah</area> ...
And so on. All in a single line. How to introduce line breaks?
How do I make it like this?
<name>blah</name>
<class>blah</class>
<area>blah</area>
I...
I'm getting the following error when trying to use a modular layout in my Zend Framework application:
Undefined index: authentication in C:\PHP\includes\Zend\Controller\Dispatcher\Standard.php on line 385
The following code runs before this error:
if (!$this->_acl->isAllowed($role, $resource, $privilege)) {
$request->setModuleName('...
Hello everybody !
Is it possible to add behaviors (eg. actAs Timestampable) in a doctrine migration to avoid defining the created_at and updated_at columns ?
Thank's in advance !
...
I'm running LAMP server on Ubuntu 9.04(Desktop edition). I'm very new to Ubuntu, so I did most of this via the Synaptic Packet Manager. I then removed php5-common and just installed php5 via: apt-get install php5
My error reporting is set to: error_reporting = E_ALL & ~E_NOTICE
I installed Xdebug and inserted the following in my php.i...
I'm building a class with a number of input validations, and I've decided to place them inside a __set method (I'm not sure if this is proper form as I have limited OOP experience). This seems to work fine, throwing the proper errors when invalid values are passed from outside the class. However, if a variable is modified inside the clas...
I was wondering if there's a simple way to cancel an AJAX request?
Beyond just calling an 'abort' on the XMLHTTPRequest on the client side, is there a way to easily stop the server process? The server is using Apache.
Thanks
...
Hi can anyone past some code how to do a restful web service get and post method. This would be server side so I would be able to invoke the two services from a client.
Thanks!
...
Hi
In PHP, I know there is no official way to delete items once they have been put into an array. But there must be a "best-method" solution to my problem. I believe this may lie in the array_filter function.
Essentially, I have a shopping cart object that stores items in a hashtable. Imagine you can only ever buy one of any item at a ...