Re: [PHP] Unlink file older then 7 days

2007-07-16 Thread Suhas Pharkute

http://us.php.net/manual/en/function.fileatime.php

$filename = 'somefile.txt';
if (file_exists($filename)  fileatime($filename)  (time()-(7*24*60*60)) )
{
   unlink($filename);
}

Read docs!

Suhas


On 7/16/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


How would I use fileatime to check if the file is older then 7 days?





 I have a directory with .txt and .txt.asc files.

 What I want to do is..

 Check the age of all files ending in .txt.asc

 and if the file *.txt.asc is older then 7 days

 delete thatfile.txt.asc and also thatfile.txt


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Integer Overflow Error

2007-06-21 Thread Suhas Pharkute

Hi,

I tried to search on this mailing list and I saw the bug was reported and
fixed. I am using PHP 4.4.7 and GD 2

The error that I am getting is at statement

$img_t = imagecreatetruecolor(100,100);*

Fatal error*: Possible integer overflow in memory allocation (4 * -91750400
+ 0) in *actions.php* on line *1328*

Can one some give me other clues?

Thanks in advance,

Suhas


Re: [PHP] Integer Overflow Error

2007-06-21 Thread Suhas Pharkute

Ok, I am sorry, but not sure what do you mean here? Is there any error?

If so it will not even run the code

Suhas

On 6/21/07, Jochem Maas [EMAIL PROTECTED] wrote:


Suhas Pharkute wrote:
 Hi,

 I tried to search on this mailing list and I saw the bug was reported
and
 fixed. I am using PHP 4.4.7 and GD 2

you make it sound like there is only one bug.


 The error that I am getting is at statement

 $img_t = imagecreatetruecolor(100,100);*
 ^--- is that in your source code?
or was it a copy/paste error?


 Fatal error*: Possible integer overflow in memory allocation (4 *
-91750400
 + 0) in *actions.php* on line *1328*

 Can one some give me other clues?

 Thanks in advance,

 Suhas






--
Suhas Pharkute, PhD
CEO - Syna Intelligence, LLP
V. 208 830 8915 (C)
E. [EMAIL PROTECTED],.com
W. http://synaintel.com


[PHP] PHP4 and SQLite

2007-05-07 Thread Suhas Pharkute

HI,

Can someone please point me to a tutorial for PHP4.x.x and SQLite
installation on Windows with Apache web server?

I searched in Google and PHP mailing list but nothing useful. It seems like
I am missing php_pdo.dll for 4.1.1 version.

Can someone please help?

Thanks in advance,
Suhas


Re: [PHP] PHP4 and SQLite

2007-05-07 Thread Suhas Pharkute

Yep, PDO was one more question that I had and could not find dll for it.

Upgrade is an option but there are some custom dlls that we developed for
4.1.1 and do not want to spend time in checking it for higher version. But
if it is not possible then I guess we will do that

Thx
SUhas


On 5/7/07, Richard Lynch [EMAIL PROTECTED] wrote:


On Mon, May 7, 2007 5:29 pm, Suhas Pharkute wrote:
 Can someone please point me to a tutorial for PHP4.x.x and SQLite
 installation on Windows with Apache web server?

 I searched in Google and PHP mailing list but nothing useful. It seems
 like
 I am missing php_pdo.dll for 4.1.1 version.

First, make sure PDO was available for 4.1.1 at:
http://php.net/pdo

Even if it *was* it may not have made it into the Windows version...

Upgrade?

The instructions mostly consist of find the php_pdo.dll in your zip
file and put it in the right place where http://php.net/phpinfo says
is your extension_dir

--
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?




Re: [PHP] Run script every 30 seconds

2006-10-30 Thread Dr. Suhas Pharkute

You can still use Cronjob with 1 min setting and in use 2 processes

1. Run script immediately
2. Sleep for 30 sec and then run the script

you can use exec/shell_exec functions with output redirected to soem file so
that It will run in background.

That way you have one process running at 0 sec and one running at 30 sec
every minute

Suhas

On 10/30/06, Ahmad Al-Twaijiry [EMAIL PROTECTED] wrote:


Thank you all

but the problem is that I don't have root access to the server to
create daemon :)

so if I just run the script in background with 30 seconds sleep and
someone reboot the server  (or the script dies for any reason ) I will
lose my process :)

any other ideas ?


is it possible to link the script to my php interface (the one that
the users is using it) and if the php interface page will run the
script (IN background) if it didn't run for the last 30 seconds ? I
see  this is very hard and almost impossible , what do you think ?

PS: also I need to make sure no more than 1 process of the script is
running :)


On 10/30/06, Dave Hamber [EMAIL PROTECTED] wrote:
 Sorry, slight adjustment, make that $t=time()-31; in the first line so
 that the script runs immediately.


   You could run the script as a daemon. man daemon.
  
   The sloppy way of running the script every 30 seconds would be to use
 sleep(30), but that would cause the script to run at 30 seconds +
 execution time.
  
   If you make a loop like this you could get around that:
  
   $t=time()+31;
   while(true){
   if(time()$t+30){
   $t=time();
   YourMainScriptFunction();
   }
   else usleep(1000); //adjust to how often you want to check
   }

 On 30/10/2006 17:29 Ahmad Al-Twaijiry wrote:
  Hi everyone,
 
  I have a script that I want it to run every 30 seconds, the problem is
  that cronjob can run every 1 minute only, do you have any solution ?
 



--

Ahmad
http://www.v-tadawul.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] FTP - Can't build data connection

2003-07-26 Thread Suhas Pharkute
Hi

I am writing a FTP application. When I upload a file I am getting following error,

Warning: ftp_put(): Can't build data connection: Connection refused.

There is no error for connection/login to ftp site.

can any one help?

Thanks,
Suhas


_

Encrypt your PHP code for FREE at

http://encphp.sspsoft.com

_


[PHP] Need Help: Please click on Test Link

2003-07-16 Thread Suhas Pharkute
Hi

I need your help.

Can you please visit a site

http://sspsoft.com/test/ip2ll.php (in case if you cannot get it, please
click on http://ns1.webhostdns.us and then click on the website link.)

which should identify your Country, State, City. Please click on one of the
buttons to provide feedback.

I am trying to get hits from different parts of the world to make sure that
it works.

Planning to develop a webservice from this.

Thanks in advance,

Suhas

_

Encrypt your PHP code for FREE at

http://encphp.sspsoft.com

_


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Grabbing info from other Sites

2003-07-13 Thread Suhas Pharkute
Why don't you use MSN services to get quotes. MSN does care for login. I am
using this to get quotes after 15 minutes on my Cell Phone.

I am using culr functions to get it.

Suhas
_

Encrypt your PHP code for FREE at

http://encphp.sspsoft.com

_

- Original Message - 
From: Ow Mun Heng [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, July 13, 2003 7:43 PM
Subject: [PHP] Grabbing info from other Sites


Hi,

I have this need/want to grab information from sites for my own
usage and wondering how to do it.

Here's an example.

1. Log into finance.yahoo.com (assuming I need to log on)
2. Type the list of shares I want
3. Let Yahoo process it
4. Use PHP or some other scripting language to pull the data and put it into
my database.

Is this possible at all?



Cheers,
Mun Heng, Ow
H/M Engineering
Western Digital M'sia
DID : 03-7870 5168


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Sunday, July 13, 2003 10:58 PM
To: [EMAIL PROTECTED]
Subject: php-general Digest 13 Jul 2003 14:58:27 - Issue 2173



php-general Digest 13 Jul 2003 14:58:27 - Issue 2173

Topics (messages 154985 through 155003):

Re: touch file on shared web server?
154985 by: Paul O'Neil
154991 by: Jason Wong

Re: Code and Good Design Methods
154986 by: zbranigan
154987 by: zbranigan
154988 by: Dan J. Rychlik
154994 by: Ray Hunter
154995 by: Robert Cummings

Re: OK, So I am new to these List. Win2000 help!
154989 by: John Nichel
155002 by: John Nichel

Re: Newbie Directory question
154990 by: olinux

Re: Mailing list server with PHP frontend
154992 by: Juan Nin
154993 by: Manuel Lemos
154996 by: Paul Chvostek

How does PHP interact when using Java?
154997 by: Jan Bro

Weird Date problem driving me crazy...
154998 by: Boaz Yahav

php script billing receipt
154999 by: Duncan

Re: Need PHP on Win2000 Pro
155000 by: Burhan Khalid
155001 by: John A. Thomason

Re: dump $_POST into variables
155003 by: Marek Kilimajer

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Sending a PDF page

2003-07-03 Thread Suhas Pharkute



try to send it as attachment
Suhas
_

Encrypt your PHP code for FREE at

http://encphp.sspsoft.com

_

  - Original Message - 
  From: 
  Todd 
  Cary 
  To: [EMAIL PROTECTED] 
  Sent: Thursday, July 03, 2003 1:18 
  PM
  Subject: [PHP] Sending a PDF page
  [Sent this the first time to the wrong list]In this 
  code:if ($prtpdf) { include 
  "letter_new.php"; exit; }I create a 
  PDF page, however I would like to continue within the script (not have the 
  exit). If I do that, the PDF page is corrupted by the script 
  code.What is the best solution for this?Todd
  -- 


Re: [PHP] PDF on the fly ?

2003-07-03 Thread Suhas Pharkute
You have code to execute after filewriting,the output of that code will go
as a pdf file continuation.
try exit after writing filecontents.

Suhas
_

Encrypt your PHP code for FREE at

http://encphp.sspsoft.com

_

- Original Message - 
From: [-^-!-%- [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, July 03, 2003 2:19 PM
Subject: [PHP] PDF on the fly ?



 Hello!

 I'm trying to create a PDF file for downloading, but Acrobat cannot read
 the generated file. I get a file corrupted or cannot be found, whenever
 I try to open the file.


 My script is as follow:


 header(Cache-control: private);
 header(Content-type: application/octet-stream);
 header(Content-type: application/pdf);
 header(Content-Disposition: attachment; filename=file.pdf);

 //sql code to retrieve data as $data

 echo $data

 //...more code

 //

 As expected, the server create the pdf file and force the browser to open
 the save file dialog box to save the file. Acrobat,however cannot read the
 generated file (both online or offline). Any suggestions?

 Am I missing something?

 Please help.

 -john

  =P e p i e  D e s i g n s
  www.pepiedesigns.com
  Providing Solutions That Increase Productivity

  Web Developement. Database. Hosting. Multimedia.



 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Free Service to Secure PHP Code

2003-07-02 Thread Suhas Pharkute
Hello PHP Developers,

Now a free service is available to secure PHP code.
This service is located at http://encphp.sspsoft.com

Now you can encrypt your PHP files with online encryptor and get one of
loader module to run these files.

This program is still under development, your suggestions/comments/questions
will be valuable input.

If in any case of a non-working incidence, please email at
[EMAIL PROTECTED]

No limits! No restrictions! Use it, its FREE!!

_

Encrypt your PHP code for FREE at
http://encphp.sspsoft.com

_


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Free Service to Secure PHP Code

2003-07-02 Thread Suhas Pharkute
If your DNS is not resolveing http://encphp.sspsoft.com

Please click here FIRST : http://ns1.webhostdns.us

and then click here. http://encphp.sspsoft.com

For some reason my webhost/DNS is not working properly. I hope they will
solve this problem soon.

Sorry for the inconvenience

Suhas
_

Encrypt your PHP code for FREE at

http://encphp.sspsoft.com

_

- Original Message - 
From: Adam Voigt [EMAIL PROTECTED]
To: Suhas Pharkute [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, July 02, 2003 10:30 AM
Subject: Re: [PHP] Free Service to Secure PHP Code


 You sure thats a valid URL?
 Is it new? Because my DNS doesn't resolve it.



 On Wed, 2003-07-02 at 12:14, Suhas Pharkute wrote:
  Hello PHP Developers,
 
  Now a free service is available to secure PHP code.
  This service is located at http://encphp.sspsoft.com
 
  Now you can encrypt your PHP files with online encryptor and get one of
  loader module to run these files.
 
  This program is still under development, your
suggestions/comments/questions
  will be valuable input.
 
  If in any case of a non-working incidence, please email at
  [EMAIL PROTECTED]
 
  No limits! No restrictions! Use it, its FREE!!
 
  _
 
  Encrypt your PHP code for FREE at
  http://encphp.sspsoft.com
 
  _
 -- 
 Adam Voigt ([EMAIL PROTECTED])
 Linux/Unix Network Administrator
 The Cryptocomm Group



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] .inc.php

2003-07-01 Thread Suhas Pharkute
it not because of extension .php
it is because of start and end tags 
you can have a file .abc with php tags and it will work

I have it working on my server

Suhas
- Original Message - 
From: Kyle Babich [EMAIL PROTECTED]
To: PHP-General [EMAIL PROTECTED]
Sent: Tuesday, July 01, 2003 3:38 PM
Subject: [PHP] .inc.php


 When .inc.php files are included they are also executed whenever the
 script is executed right?
 --
 Kyle
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] online file management

2003-07-01 Thread Suhas Pharkute
Hello,

I have developed a package which is exactly same what you explained here. It
is PHP-MySQL (Windows/Linux)combination. I have another older version which
was PHP-MSAccess (Windows). If you want I can give you logins for test
purposes.

This system is currently in use. I have to creat identical system for you on
another server. Please let me know if you are interested in this.

Let me know
Suhas
_

Suhas S Pharkute.
P O Box 8551,
Pocatello ID 83209.
1.208.221.3896
http://myweb.cableone.net/psuhas
_
- Original Message - 
From: Paul Chvostek [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 01, 2003 8:03 PM
Subject: [PHP] online file management



 Hiya.

 I'm looking for a tool that will allow online file management, with a UI
 something like that of a traditional FTP client.

 The ideal candidate would authenticate based on a MySQL table and would
 be able to handle multiple users with unique base directories.  I'd
 rather not use an PHP-based FTP client, but I'm open to that if nothing
 else is available.

 Before I write one myself, is there a package that has already been
 built that any one can recommend (or recommend against)?

 Thanks.  :-)

 -- 
   Paul Chvostek [EMAIL PROTECTED]
   it.canadahttp://www.it.ca/
   Free PHP web hosting!http://www.it.ca/web/


 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP Code inside Zend_API

2003-06-21 Thread Suhas Pharkute
I have a custom extension for windows (dll which can be used in PHP).

I want to run some php code inside this dll module. I searched for Zend_API
Docs, but I could not find any way to run php code inside this API.

Any Ideas how to do this,

Please help!

Thanks
Suhas


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Using DL to add DLL Files

2003-06-18 Thread Suhas Pharkute
Hello,

I am trying to include a dll module in the file. In php.ini safe_mode is off

I am getting following warning/error


Warning: MyMod: Unable to initialize module Module compiled with debug=0, 
thread-safety=1 module API=20020429 PHP compiled with debug=0, thread-safety=1 module 
API=20010901 These options need to match in c:\apache\htdocs\dlltest.php on line 2


Can any one explain how to solve this? 

Thanks
Suhas

[PHP] String containing PHP Code

2003-06-16 Thread Suhas Pharkute
Hello,

I have a php script which generates a string which has php code in it. I need to 
run that code.

For example:

?php

$str =  ?php echo 'Hello World!'; ?;
?


Is there any way that we can do it? I know I can do it by writing it to file but then 
it is no more secured.

Please let me know,

Thanks
Suhas
_

Suhas S Pharkute.
P O Box 8551,
Pocatello ID 83209.
1.208.221.3896
http://myweb.cableone.net/psuhas
_

[PHP] Securing Source Code

2003-06-14 Thread Suhas Pharkute
Hello,

I am developing a network application. But I need to distribute it to
different divisions.

I am looking for Ideas for Securing Source Code from User.

Please Help!

Suhas


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Can anyone help me

2003-03-27 Thread Suhas Pharkute
Can anyone give me a basic tutorial for 

Secure Site Programming (OpenSSL)

Also How to create certificate on server

Suhas

__
Suhas S Pharkute.
P O Box 8551,
Pocatello, ID 83209.
1.208.221.3896
http://myweb.cableone.net/psuhas/
__


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] need a reliable PHP host

2003-03-27 Thread Suhas Pharkute
Also checkout
http://bidforhost.com
Suhas


__
Suhas S Pharkute.
P O Box 8551,
Pocatello, ID 83209.
1.208.221.3896
http://myweb.cableone.net/psuhas/
__

-Original Message-
From: Jason Sheets [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 27, 2003 5:51 PM
To: Doug Parker
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] need a reliable PHP host


I recommend pair (http://www.pair.net) they have excellent staff, 
excellent accounts, an excellent backbone and they have been profitable 
since their second month in business they will let you host more than 
one domain on your account (with a setup fee).  They also host a lot of 
open source mirrors, etc.

Another choice  I recommend is fidelityhosting 
(http://www.fidelityhosting.com) they will allow you to host multiple 
domains on one account, saving the account holder money if they have 
more than one account.

Doug Parker wrote:

 Hi everyone - I need suggestions for a reliable PHP/mySQL host that
 has cURL support WITH https capability.  The site is e-commerce, but 
 is mainly a statistics site that relies on frequent mysql requests, 
 rather than numerous transactions.  The only transaction is the site 
 subscription fee.  I could also use suggestions for a reliable Credit 
 Card processor.  If anyone has experience with this and can point me 
 in the right direction, I would REALLY appreciate it.  I'm having alot

 of trouble with shoddy hosting and a terrible cc processor right now, 
 I really need to know which direction to take.

 Thanks - Doug




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php