Hi,
I'm trying to redirect output of a simple Perl script to a web browser using PHP.
The Perl script sometimes take 2-3 hours to execute and show output to the screen.
By this time, I guess Apache Server simply timesout and displays an error message discribed above.
Here is the sample code snipet.
# The tmpOutput.txt contains outpu...
<?php
function rmdirr($dirname){
// Sanity check
$dirname = "TEST/";
if (!file_exists($dirname)) {
return false;
}
// Simple delete for a file
if (is_file($dirname)) {
return unlink($dirname);
}
// Loop through the folder
$dir = dir($dirname);
while (false !== $entry = $dir->read()) {
// Skip pointers
if ($entry == "...
Hi all,
I am having a php file and a mysql database. i need to load the data from my mysql database to the iphone. can anyone help me in this. What is the best way to do that.
Thanks in advance.
Shibin Moideen A. K
...
I'm new to memcached.
Is this code vulnerable to the expired cache race condition?
How would you improve it?
$memcache = new Memcache;
$memcache->connect('127.0.0.1');
$arts = ($memcache===FALSE) ? FALSE : $memcache->get($qparams);
if($arts===FALSE) {
$arts=fetchdb($q, $qparams);
$memcache->add($qparams, $arts, MEMCACHE_COMPRESSED, 60...
Hai
First of all Thanks...
I have a downloaded Zend framework C:\wamp\zend I changed include path to php.ini to
C:\wamp\zend, I seen this in my php info. I think the include path is correct. Still I have lot of doubt, where I start my work in zend framework? Which are the steps??
Thanks
...
Hi there
In my web-application I have some forms and based to those forms, users will generate some excel and chart files(.xls and .png). Each use has to generate at least 2 excel files and 5 png files.
The problem is that when is about to generate those files it takes 2 seconds for a excels file and 1 second for a chart. I'm using t...
So here is the string that im scraping a page to read (using file get contents)
<th>Kills (K)</th><td><strong>4,751</strong></td><td><strong>0</strong></td>
How can i navigate to the above section of the page contents, and then isolate the 4,751 inside the above html and load it into $kills ?
Difficulty: the number will change and ha...
I'd like to use PHP to crawl a document we have that has about 6 or 7 thousand href links in it. What we need is what is on the other side of the link which means that PHP would have to follow each link and grab the contents of the link. Can this be done?
Thanks
...
Hi ,
we're trying to implement new coding style guidelines for our team, the php codesniffer is printing an warning on switch case statements when no "break" is found like:
switch ($foo) {
case 1:
return 1;
case 2:
return 2;
default:
return 3;
}
is there any good reason to use :
switch ($fo...
Hi,
can someone explain or give some examples how to use the @Category Tag the right way ? PHPDocumentator is not parsing the Tag.
How does an correct File-DocBlock and Class-DocBlock looks like ?
...
For example:
$result = func(14);
The $result should be:
array(1,1,1,0)
How to implement this func?
...
Hi,
I am using jaxl library for bot development on my debian server with openfire.
Now i want to apply pubsub functionality to it.
My scenario is : user subscribes to an event & when an event occurs message is sent to all the subscribers.
I am confused how to implement pubsub through im.
Please help
Thanks
...
I need to display different HTML if the browser is IE6/IE7. I know conditional comments work fine if we're just talking about styling information but in this particular case it's the actual markup.
I will have an unordered list of images which will be png-24. They will have rounded corners (hence the need for the transparency provided b...
hai
I read that to create a project, execute the zf Windows windows command (zf.bat):
C:\>zf.bat create project newproject
I saw zf.bat in my C:\wamp\www\Zend\bin, I want to create a new project in c:\wamp\www
When I tried to run c:\wamp\www\zf.bat, I got an error message:
"zf.bat is not internal or external command, operable progr...
I have developed a PHP webservice. I would like to log all incoming connections of the WS clients, which are consuming this web service. How can I obtain the client's IP address? The value of $_SERVER['HTTP_CLIENT_IP']
seems to be always empty.
...
Hi, i've got a php script that runs on the command line. To improve it's performance, i would like to completely suppress it's output.
How can I do that?
Thanks!
...
I have page listing few records from db.
After upgrading to PHP 5.3 site printing long records list is not displayed - Explorer says "Connection was reset"
I've changed SQL query in code to limit records and then page was shown correctly
So it seems to be some kind of timeout set.
I've tried find some settings in PHP.ini , HTTPD.conf ...
Hay Guys, I have quick question.
I have a few floats:
-4.50
+6.25
-8.00
-1.75
How can I change all these to negative floats so they become:
-4.50
-6.25
-8.00
-1.75
Also i need a way to do the reverse
If the float is a negative, make it a positive.
Thanks
...
GOOGLE MAPS API V3 is what i'm trying to use.
I have all the coordinates in mysql. I just, for example, need to take 5 listings and put them on a map but I'd like to be able to find the center point based on the multiple coordinates I'd like to display, and the zoom level as well. Yeah know?
I'm having the time of my life with somethin...
I am implementing OAuth for delegated access to our API for OnePage (http://myOnePage.com). We are using SimpleDB for our database.
Does anyone know of a PHP OAuthStore implementation for SimpleDB? Or any other language for that matter, would be useful.
If I don't find anything, I shall be coding it myself and will contribute it back t...