[PHP] Re: Sybase and PHP

2005-06-27 Thread Jamie Alessio
> Does anyone know how to build PHP with sybase support without having a > sybase server running on the local machine > Joe, You can access Sybase with PHP by using the FreeTDS libraries. You don't need to install anything from Sybase on the webserver you mention. Get FreeTDS from http://www.fr

[PHP] Re: Some help on using regex

2005-03-29 Thread Jamie Alessio
Im having a problem matcing some code using preg_match_all. The regex statement needs to be very flexiable. The code im using is: (\n| |.)+ [snip] -==- Output from socket -==- http://climateprediction.net/ climateprediction.net Bob Why are you trying to parse this data with a regex?

[PHP] Re: can't pull products from DB with REGEXP?

2005-03-14 Thread Jamie Alessio
I have table with products. In column categories are listed numbers of categories a product belongs, like: 1. 21, 2. 35, 8, 72, 1, 4, 3. 23, 11, 48, 4. 65, 5. 11, 6. 23, 7. ... (somebody else created the table this way and I have to keep it for the moment) Now, I have to list all products that be

[PHP] Re: Classes code completion and Zend Studio

2005-03-14 Thread Jamie Alessio
I have a function to load the classes and return the object. function LoadClass($ClassName) { require_once("Class.$ClassName.inc"); return new $ClassName(); } Its working fine. But Zend Studio's Code completion is not working for this type of object, Any hints? Zareef, In Zend Studio 4.0 (not sure

[PHP] Re: Multiple file delete

2005-03-11 Thread Jamie Alessio
I have a page that displays the contents of a folder. Right now, each file has a little 'delete' button next to it that users can click on, however with many files it gets cumbersome. I need to be able to have them click on checkboxes and then hit one delete button which will then get rid of

[PHP] Re: PHP hangs when exec'ing SSH

2005-03-10 Thread Jamie Alessio
e saying that SSH can hang due to not knowing if there's further output coming from the program. I'm hoping that this isn't their answer to my problem, because I can demonstrate that it all works when PHP runs in CLI mode. --Ross Jamie Alessio wrote: I'm attempting t

[PHP] Re: PHP hangs when exec'ing SSH

2005-03-10 Thread Jamie Alessio
I'm attempting to execute some things on remote servers using ssh, using a strictly limited account created for this express purpose. I set up passwordless key authentication from the user the web server runs as to the limited account on the remote server. I wrote some PHP code which calls: sys

[PHP] Re: Best way to validate a date

2005-03-10 Thread Jamie Alessio
I'm looking to validate a date submitted through a form and I cannot decide which would be the best way to do it. The form of the date needs to be: -MM-DD. At the moment I'm torn between using a regex, something like: 20[\d][\d]-[0-1][\d]-[0-3][\d] or using the checkdate() function. Does anyon

[PHP] Re: help with adding

2005-02-26 Thread Jamie Alessio
I have messed with this for a couple of days and cant get it right. Maybe I need sleep :-) The code below is echoing the qty correctly (10, 5, 25) for ($i = 1; $i <= $sendnum; $i++) { $qty = $_POST['qty'.$i]; echo $qty . ''; } The question is, how would I take add each of th

[PHP] Re: FTP info in a variable

2005-02-25 Thread Jamie Alessio
I have to write a little program that pulls information from a database, formats it into csv format for importing into excel and ftps it to another server. I have everything worked out except for the ftping. I have read through http://us4.php.net/manual/en/ref.ftp.php and I know I can get the

[PHP] Re: HOWTO read PHP source code into a textarea

2005-02-25 Thread Jamie Alessio
I have a file 'nav.php', whose source code I want to load into the textarea on page 'aaa.php', so the source can be edited and changed. Is there a resource that I can read to help me do this? Tim, How about putting this in aaa.php? {$str}"; ?> and on form post something like this: You'll need er

[PHP] Re: traversing multi-dimensional arrays

2005-02-17 Thread Jamie Alessio
What is the best way to do this? I have two arrays: $cars=array("ford","chevy"); $models=array("ford"=>array("ranger","escape"),"chevy"=>array("malibu","tahoe")); Why do you even need the $cars array? Wouldn't this work? foreach($models as $car => $model_array) { foreach($model_array as $key =>

[PHP] Re: Crawlers (was parsing large files - PHP or Perl)

2005-02-17 Thread Jamie Alessio
Is there anyone on this list who has written fast and decent crawlers in PHP who would be willing to share their experiences? My first inclination would be to use an existing crawler to grab the pages and store all the files locally (even if only temporarily). Then, you can use PHP to do whatev

[PHP] Re: Handling email bouncebacks

2005-02-16 Thread Jamie Alessio
I am looking for a way to manage email bouncebacks on my Linux server for one of my client's email marketing system. What I would like to do is have a way of capturing the email address from the header of each bounce and insert it into a MySQL table. At that point I can do the requisite scrubbi

[PHP] Re: php login

2005-02-16 Thread Jamie Alessio
I need to create solution for user authentication/recognition in my web page. I think it would be a good idea to use mysql database for storing the user info because the user info is later used to determine what parts of site the recognized user is allowed to update. William, Take a look at the

[PHP] Re: paring large files - PHP or Perl

2005-02-16 Thread Jamie Alessio
I'm a great believer in using the right program for the right job. I need some advice from people who use both PHP and Perl. I've long been a fan of PHP and we use it for all our development work. However, I seem to keep coming up with a bit of a problem when using PHP and I just wanted to see if

Re: [PHP] Multiple POP accounts on Webmail Front

2005-01-07 Thread Jamie Alessio
IIRC, It does not do IMAP, it does not handle secure connections, it does not ... Squirrelmail does support IMAP. I'm using it to access a courier IMAP server with no problems. From http://www.squirrelmail.org/about.php "It includes built-in pure PHP support for the IMAP and SMTP protocols" I

Re: [PHP] On large application organization [long and possibly boring]

2005-01-07 Thread Jamie Alessio
>> This doesn't prove the case either way. >> Nice catch on that one but actually there might be another problem with my example. According to example 16-8 on http://us2.php.net/include/ "Because include() and require() are special language constructs, you must enclose them within a statement

Re: [PHP] bizzare duplicate mail() call

2005-01-07 Thread Jamie Alessio
The first place I would look is in your web server logs to establish if the pages are actually requested multiple times at the time the duplicate emails are sent. - Jamie Hello all - this problem is so wierd that I don't even know where to start. Hopefully you all can give me a couple leads. I

Re: [PHP] On large application organization [long and possibly boring]

2005-01-06 Thread Jamie Alessio
Correct me if I am wrong, but includes (and/or requires) will get all of the code in all of the cases regardless if the case is being processed. You're wrong. The include() and require() statements are only evaluated when they are reached in your application code, so there is a big difference betw

Re: [PHP] SSL

2005-01-05 Thread Jamie Alessio
> Thinking of going from http to https on the server. > Would there be any differences in my php-code from now? > Switching from http to https shouldn't require any big changes to your PHP code. The PHP code itself doesn't care that it is being accessed via a https url - your webserver takes care

Re: [PHP] Re: Calculate No Of Days

2005-01-04 Thread Jamie Alessio
>> Is there any function avialable in PHP to calculate >> the no of days by passing 2 dates >> If you happen to be pulling both dates from MySQL you could use the MySQL date functions: http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html http://dev.mysql.com/doc/mysql/en/Date_calculation

[PHP] Trapping Fatal Errors

2001-06-26 Thread Jamie Alessio
Has anyone come up with a way to trap and log fatal PHP errors? I understand how to implement and use a custom error handler for all other error conditions, but there doesn't appear to be any way to log fatal errors (such as a parse error or errors resulting from declaring the same function name m

Re: [PHP] Capturing Emails

2001-02-12 Thread Jamie Alessio
> What is the best way to capture an email sent to a server so > that I can copy it and send it to a number of emails selected from a db. > Here's one way to do it: - You'll need to compile PHP as a cgi executable (http://php.net/manual/en/install.commandline.php). - If you are using sendmail you

Re: [PHP] Could PHP connect to Perl Program

2001-02-02 Thread Jamie Alessio
> I would like to use a Perl Program to call PHP to do sth. Could I do that? > Also, could I use PHP program to call a Perl Program? > You could just run the command using the system() function. http://www.php.net/manual/en/function.system.php - Jamie -- PHP General Mailing List (http://w