Forum: PHP 23 Days Ago |
| Replies: 4 Views: 228 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: 410 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: 410 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: 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: 749 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: 878 Some good info here: http://www.mysqlperformanceblog.com/2008/01/11/mysql-blob-compression-performance-benefits/ |
Forum: PHP Sep 18th, 2009 |
| Replies: 9 Views: 878 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: PHP Sep 18th, 2009 |
| Replies: 9 Views: 878 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: 749 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: 749 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: 749 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: 749 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: 749 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: 899 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: 235 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: 478 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: 478 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,113 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,113 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: 538 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,973 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,718 You can also use
unset($array); |
Forum: PHP Apr 21st, 2009 |
| Replies: 22 Views: 2,030 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,030 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,030 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,030 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: 753 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: 753 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: 753 ;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,030 Did you try one of these suggestions? |
Forum: PHP Mar 28th, 2009 |
| Replies: 22 Views: 2,030 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,030 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,030 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,030 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"... |
Forum: PHP Mar 26th, 2009 |
| Replies: 22 Views: 2,030 I is actually the email body that is showing up. The body is composed of multipart-mime formatting.
It is used to separate different mime (formats) in the messages, eg: plaintext, html, and file... |
Forum: PHP Mar 24th, 2009 |
| Replies: 15 Views: 1,197 Try piping to an empty PHP script.
See if that gives a different error message, or works, etc.
Also put an exit(0);
At the end of your PHP script just in case the MTA is waiting for a... |
Forum: PHP Mar 19th, 2009 |
| Replies: 15 Views: 1,197 Ask your hosting what the path to the PHP interpreter is. It probably isn't at /usr/bin/php
Like I mentioned before, it is better to use:
| /usr/bin/php... |
Forum: PHP Mar 18th, 2009 |
| Replies: 15 Views: 1,197 I just noticed that you don't have php tags around your code.
Unlike most other scripting languages, the PHP interpreter requires the <?php tags to consider the code to be PHP.
If you haven't... |