Forum: PHP 20 Days Ago |
| Replies: 4 Views: 218 Are you using ob_start() before any PHP code?
eg:
<?php
ob_start();
include_once('session.php');
include_once('config.php');
// .. etc...
?> |
Forum: PHP Sep 25th, 2009 |
| Replies: 6 Views: 409 It may be that you're seeing cached pages? Try doing a full refresh, I believe its Ctr+Shift+R with Firefox. See if you get the same problem.
Using Wireshark, or creating the HTTP requests manually... |
Forum: PHP Sep 25th, 2009 |
| Replies: 6 Views: 409 What browser are you testing in? Try another browser to make sure it isn't specific to that browser.
How often does it happen? Every 10 refreshes? 100?
If you have firefox, and firebug, try... |
Forum: PHP Sep 25th, 2009 |
| Replies: 4 Views: 332 You can get the file modification time in PHP:
http://www.php.net/filemtime
$mtime = filemtime('/path/to/file');
To get the files in the directory, you can use glob()... |
Forum: JavaScript / DHTML / AJAX Sep 25th, 2009 |
| Replies: 12 Views: 821 Something that might interest you is that before you could do XMLHttpRequest, the basis of AJAX, you could create Iframes programmatically with client side scripting.
Back then it was called... |
Forum: JavaScript / DHTML / AJAX Sep 25th, 2009 |
| Replies: 12 Views: 821 The Form has to be submitted by the browser, instead of programmatically via JavaScript, in order to send the file contents.
The Iframe does not belong to the same document. So the browser can... |
Forum: PHP Sep 22nd, 2009 |
| Replies: 5 Views: 416 Did you already ask your hosting support about the issue. It looks like they have not set up the PHP configuration (PHP.ini file) properly.
The setup they have, has them send email through an... |
Forum: PHP Sep 19th, 2009 |
| Replies: 5 Views: 416 How are you sending mail? Please post the relevant PHP code.
You're SMTP host is not accepting any connections.
ie: mail.aaaaaaaa.com
When you switched providers, you should also have a new... |
Forum: PHP Sep 19th, 2009 |
| Replies: 16 Views: 737 If you're on a shared system it is not a good idea to have world writable directories or files.
Best is to use the least privileges that does the job. |
Forum: PHP Sep 18th, 2009 |
| Replies: 9 Views: 847 Some good info here: http://www.mysqlperformanceblog.com/2008/01/11/mysql-blob-compression-performance-benefits/ |
Forum: PHP Sep 18th, 2009 |
| Replies: 9 Views: 847 Which bz library? Do you mean zlib? Is this in mysql or PHP?
You can just decompress the result in the SQL query:
SELECT uncompress(test) as test FROM `table` WHERE `compressed` =... |
Forum: JavaScript / DHTML / AJAX Sep 18th, 2009 |
| Replies: 12 Views: 821 BTW: in the parent, you'll have defined the function: uploadDone()
eg:
function uploadDone(status) {
if (status) alert('upload complete');
else alert('upload error');
} |
Forum: JavaScript / DHTML / AJAX Sep 18th, 2009 |
| Replies: 12 Views: 821 Yes, unfortunatley you can't use XMLHttpRequest to upload a file fro the users computer.
The reason is that JavaScript does not have access to the file contents. It only has access to the file... |
Forum: PHP Sep 18th, 2009 |
| Replies: 9 Views: 847 I tried this and it worked:
SELECT * FROM `table` WHERE `compressed` = compress('test')
The only thing I can assume is the column containing the compressed data has to be a blob or varbinary... |
Forum: PHP Sep 17th, 2009 |
| Replies: 16 Views: 737 You cannot see the files when you do `ls` as ubuntu? What if you do it as root?
sudo ls /var/www/toy/ |
Forum: PHP Sep 17th, 2009 |
| Replies: 16 Views: 737 You can see here that PHP cannot write to that folder.
The files in the folder are owned by ubuntu and group ubuntu.
-rw-r--r-- means user can read and write, group can read, world... |
Forum: PHP Sep 16th, 2009 |
| Replies: 16 Views: 737 Did you try and see if PHP can write to /var/www/toy/?
The permissions on the file can be viewed with the "ls" command.
eg:
ls -l /var/www/toy/
You probably want to chown the... |
Forum: PHP Sep 15th, 2009 |
| Replies: 16 Views: 737 A simple check is to have PHP write a file to where ever you want to check.
eg:
$result = file_put_contents('/var/www/toy/test.txt', 'hi');
var_dump($result); |
Forum: PHP Sep 11th, 2009 |
| Replies: 16 Views: 737 Does PHP have write privileges to: /var/www/toy/
Does your root account on mysql have no password? Just wondering... |
Forum: PHP Aug 29th, 2009 |
| Replies: 4 Views: 880 Each has it's differences.
I don't think there is a HTML_ROOT, just a DOCUMENT_ROOT index in $_SERVER.
The SEVER_NAME is user defined. Your web server first checks the server name registered... |
Forum: PHP Aug 25th, 2009 |
| Replies: 2 Views: 234 Do you really need IDs? Usually if you are going to group some elements together for some reason, use the "class" attribute instead of IDs. |
Forum: PHP Jul 1st, 2009 |
| Replies: 8 Views: 476 The problem is that you cannot send any HTTP headers after you have ouput content.
All the output from PHP is sent directly to the the server, which then sends it to the client via HTTP.
In... |
Forum: PHP Jul 1st, 2009 |
| Replies: 8 Views: 476 Try hardcoding a URL in its place, to make sure you aren't making a mistake.
Turn on error reporting and display all errors.
error_reporting(E_ALL);
ini_set('display_errors', 1); |
Forum: PHP Jun 24th, 2009 |
| Replies: 4 Views: 1,095 Note that:
while ($xml_album->item($i)->getAttribute('ID') != $albid)
{
$i += 1;
}
can will trigger an error if $albid doesn't have a corresponding value in the XML doc.
a better... |
Forum: PHP Jun 24th, 2009 |
| Replies: 4 Views: 1,095 So it doesn't matter which language represents the XML document as DOM, it will have the same structure and methods defined by the DOM Specs (http://www.w3.org/DOM/).
Use var_dump() and... |
Forum: PHP Jun 16th, 2009 |
| Replies: 5 Views: 533 Yes, is is possible with wordpress. You can create custom pages with the funcitonality you want, through an extension.
Josh, I wouldn't write wordpress off because it got hacked in shared... |
Forum: PHP Jun 16th, 2009 |
| Replies: 8 Views: 1,929 If you're sending complex data types in a query, eg: Arrays or Objects it is good to use JSON.
http://www.json.org/js.html
For example, if you use the default JavaScript JSON functions from... |
Forum: PHP Jun 1st, 2009 |
| Replies: 2 Views: 1,686 You can also use
unset($array); |
Forum: PHP Apr 21st, 2009 |
| Replies: 22 Views: 2,022 Here is an example of a raw email. (actual address/ip/hosts are replaced with xxxxx)
Delivered-To: xxxxx@xxxx.com
Received: by xxxxxxxx with SMTP id xxxxx;
Fri, 27 Mar 2009... |
Forum: PHP Apr 21st, 2009 |
| Replies: 22 Views: 2,022 The email addresses derived from the MIME headers are in the format:
Full Name <email@example.com>
It may be that you received an email address such as:
<email@example.com>
When you print... |
Forum: PHP Apr 20th, 2009 |
| Replies: 22 Views: 2,022 Actually, try:
$MailParser = new MimeMailParser();
$text = file_get_contents('php://stdin');
$MailParser->setText($text);
// retrieve useful info
$to = $MailParser->getHeader('to');
$from... |
Forum: PHP Apr 20th, 2009 |
| Replies: 22 Views: 2,022 Could you post the raw email.
As I mentioned, I only tested the 'MimeMailParser' class on 2 or 3 emails. It may not be parsing correctly.
Give the raw email I can try debugging. |
Forum: PHP Apr 2nd, 2009 |
| Replies: 8 Views: 749 I think it would be more readable to use an XML parser, such as the SimpleXML parser build into PHP5.
And to use a modular approach. After a each page is parsed, to send the results to each... |
Forum: PHP Apr 1st, 2009 |
| Replies: 8 Views: 749 It doesn't seem to be working when I tested it on:
http://xss-login.appjet.net/
This page has an XSS vulenerability that I put i there to demonstrate a browser vulnerability.
I just had a... |
Forum: PHP Mar 31st, 2009 |
| Replies: 8 Views: 749 ;ls -la is a linux shell command. The first part, ; is a command delimiter.
So if that were passed to the linux shell, it would first delimit any previous command, and then call the command ls... |
Forum: PHP Mar 31st, 2009 |
| Replies: 22 Views: 2,022 Did you try one of these suggestions? |
Forum: PHP Mar 28th, 2009 |
| Replies: 22 Views: 2,022 Looks like STDIN does not support fseek.
You'll have to use:
$text = file_get_contents('php://stdin');
$MailParser->setText($text);
or
$text = stream_get_contents(STDIN); |
Forum: PHP Mar 27th, 2009 |
| Replies: 22 Views: 2,022 IF you don't see a reference to the extension in phpinfo() then it is not installed.
The error also indicates that it isn't installed.
You actually need shell access to install PHP... |
Forum: PHP Mar 27th, 2009 |
| Replies: 22 Views: 2,022 If you have a specific library of choice, I can help you out with it.
Here I've written a PHP5 class for parsing mime mail messages using the PHP MailParse Extension.
<?php
/**
* Fast... |
Forum: PHP Mar 27th, 2009 |
| Replies: 22 Views: 2,022 You have to choose one of those libraries, depending on what your PHP build supports and which you understand better.
If you are able to install extensions for PHP or have the "MailParse"... |