Re: [PHP] xpath and SimpleXML

2004-10-07 Thread Matthew Sims
> So, using xpath, I have constructed the following function. The problem is > the quotes "" around the number. xpath is treating it as a string, I > believe. Would sprintf() work for this? Something like: $num = sprintf("%d", $xpathNum); I haven't tested this. -- --Matthew Sims --

Re: [PHP] code not working...help?

2004-10-07 Thread Andrew Kreps
On Thu, 7 Oct 2004 14:14:10 -0400, Matthew <[EMAIL PROTECTED]> wrote: > Hi guys im pretty new at this and cant seem to get this going I want the > code to query the database for the number of messages posted within the last > month this is the code i have but its not working... I might even hav

[PHP] sending mail

2004-10-07 Thread Josh Howe
Do I need to have sendmail configured on my linux box to send mail via PHP? Thanks!

Re: [PHP] code not working...help?

2004-10-07 Thread Matthew Sims
> Hi guys im pretty new at this and cant seem to get this going I want > the > code to query the database for the number of messages posted within the > last > month this is the code i have but its not working... I might even have > it > all wrong, can someone point me in the right direction? >

Re: [PHP] sending mail

2004-10-07 Thread Matthew Sims
> > > Do I need to have sendmail configured on my linux box to send mail via > PHP? > Thanks! Sendmail or any MTA will do. So yes, you need to have a working mail server. -- --Matthew Sims -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: htt

RE: [PHP] sending mail

2004-10-07 Thread Jay Blanchard
[snip] Do I need to have sendmail configured on my linux box to send mail via PHP? Thanks! [/snip] http://us2.php.net/mail 1st paragraph called, strangley enough, "Requirements" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] sending mail

2004-10-07 Thread Greg Donald
On Thu, 7 Oct 2004 17:42:09 -0400, Josh Howe <[EMAIL PROTECTED]> wrote: > Do I need to have sendmail configured on my linux box to send mail via PHP? > Thanks! That or a sendmail wrapper script. -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/ -- PHP Gener

RE: [PHP] sending mail

2004-10-07 Thread Josh Howe
I'm sorry, I don't know what and MTA is. Can I configure PHP to use any smtp server? -Original Message- From: Matthew Sims [mailto:[EMAIL PROTECTED] Sent: Thursday, October 07, 2004 5:58 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] sending mail > > > Do I need to have sendmail configur

RE: [PHP] sending mail

2004-10-07 Thread Matthew Sims
> > I'm sorry, I don't know what and MTA is. Can I configure PHP to use any > smtp > server? > MTA = Mail Transfer Agent http://us4.php.net/manual/en/ref.mail.php For unix/linux, PHP ignores the smtp settings in php.ini which means you'll need to setup sendmail for outside SMTP. -- --Matthew S

[PHP] Determining the length (in an audio sense) of an MP3

2004-10-07 Thread Paul Reinheimer
Hi, I am trying to determine the length (in terms of seconds) of an MP3 file. I have seen the ID3 pear project, but I didn't see anything there to tell me how long the song was. There is a fileinfo pecl project, but it doesn't mention MP3s and I couldn't find any good documentation for it (looking

RE: [PHP] code not working...help?

2004-10-07 Thread Graham Cossey
[snip] > > $lastmonth = date("YmdHis", mktime(date("H"), date("i"), date("s"), > date("m")-1, date("d"), date("Y"))); > $countResult = db_query("SELECT count(*) AS msgCount FROM messages WHERE > uid = '". $userID ."' AND fid = '". $fid ."' AND post_date <= '". > $lastmonth > ."'"); > $countRow =

RE: [PHP] Determining the length (in an audio sense) of an MP3

2004-10-07 Thread Vail, Warren
Haven't looked specifically at mp3 but with most sound formats the "sample rate" divided into the number of characters in the file should produce the time length (i.e. 22000 samples per second divided into a 44 byte data length results in 20 seconds of sound). Seems to me that with most format

[PHP] Is there any blog code available for php5?

2004-10-07 Thread Teng Wang
I tried some but all got failures. I prefer the blog with calendar and multi-users Thanks a lot! eruisi 10/07/2004 19:31:22 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.ph

Re: [PHP] session_save_path

2004-10-07 Thread Jordi Canals
You have to set the session_save_path("some_where") in all pages where you call to session_start(). And you should do it *before* calling session_start. On the manual: session_save_path() returns the path of the current directory used to save session data. If path is specified, the path to which

[PHP] Re: Determining the length (in an audio sense) of an MP3

2004-10-07 Thread atppp
this would be hard if you are working with VBR mp3 files, in which case you have to scan the whole file, or you may scan the first few frames to get a reasonable estimation. For CBR mp3 files, I think Warren's reply is correct. "Paul Reinheimer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL

Re: [PHP] Re: Determining the length (in an audio sense) of an MP3

2004-10-07 Thread Curt Zirzow
* Thus wrote atppp: > this would be hard if you are working with VBR mp3 files, in which case you > have to scan the whole file, or you may scan the first few frames to get a > reasonable estimation. Or you can read the TLEN from the id3v2 tag, if set correctly of course. Curt -- The above co

Re: [PHP] xpath and SimpleXML

2004-10-07 Thread Dave
Hi I can see your logic.. however the input for my xpath query is an object (I can do a sprintf on the input $var1, which I may need also). $result = $anything->xpath("//ROW[$var1 > $var2]"); I've tried to ereg_replace the quotation marks out of the object... but no go. So the question is how

[PHP] crypt() source

2004-10-07 Thread Matt
Hi i am new to php, and i am writing a small user authentication script. In the manual i read about using the crypt() function to generate a hash, and how you can validate the password using a salt. eg if (crypt($userinput, $hash) == $hash) The code works perfectly, however i am writing an appli

Re: [PHP] sending mail

2004-10-07 Thread Matthew Weier O'Phinney
* Greg Donald <[EMAIL PROTECTED]>: > On Thu, 7 Oct 2004 17:42:09 -0400, Josh Howe <[EMAIL PROTECTED]> wrote: > > Do I need to have sendmail configured on my linux box to send mail via PHP? > > Thanks! > > That or a sendmail wrapper script. Or use PEAR::Mail, which let's you use an SMTP server. --

[PHP] crypt() source

2004-10-07 Thread Matt
Hi i am new to php, and i am writing a small user authentication script. In the manual i read about using the crypt() function to generate a hash, and how you can validate the password using a salt. eg if (crypt($userinput, $hash) == $hash) The code works perfectly, however i am writing an appli

Re: [PHP] crypt() source

2004-10-07 Thread Brent Clements
This question was completely off-topic, but here is a site that has code for java that may help you http://locutus.kingwoodcable.com/jfd/crypt.html Also, repeat after me...GOOGLE is your FRIEND! -Brent - Original Message - From: "Matt" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent:

Re: [PHP] crypt() source

2004-10-07 Thread zareef ahmed
--- Matt <[EMAIL PROTECTED]> wrote: > Hi i am new to php, and i am writing a small user > authentication script. In > the manual i read about using the crypt() function > to generate a hash, and > how you can validate the password using a salt. eg > if (crypt($userinput, $hash) == $hash) > > T

[PHP] Re: performance: large includes vs small includes with lots of reads

2004-10-07 Thread Luis Bernardo
You may find this useful: http://www.hudzilla.org/php/18_1_0.php "Hans H. Anderson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm trying to tweak my server a bit and wonder if it is better to have a large > include file, say 20-40 kb with 15 user-defined functions, of which may

Re: [PHP] Determining the length (in an audio sense) of an MP3

2004-10-07 Thread John Nichel
Paul Reinheimer wrote: Hi, I am trying to determine the length (in terms of seconds) of an MP3 file. I have seen the ID3 pear project, but I didn't see anything there to tell me how long the song was. There is a fileinfo pecl project, but it doesn't mention MP3s and I couldn't find any good documen

Re: [PHP] Determining the length (in an audio sense) of an MP3

2004-10-07 Thread John Nichel
John Nichel wrote: I've used this before, and it will give you the length of the song... http://leknor.com/code/php/view/class.id3.php.txt I haven't used this one, but it claims to do mp3 as well as other file formats... http://getid3.sourceforge.net/ -- By-Tor.com It's all about the Rush http://

[PHP] PHP or Apache problem?

2004-10-07 Thread william van der wee
Hi all, I'am using SuSe 9.1 with Apache and PHP. In order to get access to MS SQL server I installed freeTDS ODBC driver. Everything ok, except I can't get it in a PHP webpage. I use in my PHP scripts odbc_connect. ISGL is working. When I look in apache error_log it say: /usr/sbin/httpd2-pre

Re: [PHP] Re: performance: large includes vs small includes with lots of reads

2004-10-07 Thread Curt Zirzow
* Thus wrote Luis Bernardo: > You may find this useful: http://www.hudzilla.org/php/18_1_0.php paragraphs 2 & 3 should be deleted. telling someone that optimal code is acceptable is like saying storing the year in a 2 char field is perfectly fine. Curt -- The above comments may offend you. flam

Re: [PHP] Is there any blog code available for php5?

2004-10-07 Thread John Coggeshall
www.s9y.org I am pretty sure it can support multi-user, although i don't know if there is an admin interface yet for that. John On Thu, 2004-10-07 at 19:32, Teng Wang wrote: > I tried some but all got failures. > I prefer the blog with calendar and multi-users > > Thanks a lot! > > >

Re: [PHP] performance: large includes vs small includes with lots of reads

2004-10-07 Thread Curt Zirzow
* Thus wrote Hans H. Anderson: > I'm trying to tweak my server a bit and wonder if it is better to have a large > include file, say 20-40 kb with 15 user-defined functions, of which maybe 3 or 4 This is all a 'depends' situation. Of those 15 functions how many of them are actually executed accross

Re: [PHP] code not working...help? Found problem =(

2004-10-07 Thread Matthew Kiehne
Thanks these all helped me get some things working again... except one problem now... i just realized that the dates in the database are saved as varchar (althought they are numbers) is there anyway to compare the $lastmonth value (which returns as a 14 digit number) to that? -- Advanced Forums, F

Re: [PHP] crypt() source

2004-10-07 Thread Curt Zirzow
heh.. I thought java had *everything*... * Thus wrote Brent Clements: > This question was completely off-topic, but here is a site that has code for > java that may help you > > http://locutus.kingwoodcable.com/jfd/crypt.html > > Also, repeat after me...GOOGLE is your FRIEND! > > -Brent > > --

Re: [PHP] PHP or Apache problem?

2004-10-07 Thread Curt Zirzow
* Thus wrote william van der wee: > Hi all, > > I'am using SuSe 9.1 with Apache and PHP. In order to > get access to MS SQL server I installed freeTDS ODBC > driver. Everything ok, except I can't get it in a PHP > webpage. I use in my PHP scripts odbc_connect. > ISGL is working. When I look in

[PHP] Re: code not working...help?

2004-10-07 Thread Matthew Kiehne
i just realized that the dates in the database are saved as varchar (althought they are numbers) is there anyway to compare the $lastmonth value (which returns as a 14 digit number) to that because the way i have it now with > post_date <= '$lastmonth' wont work because post_date is varchar and $

RE: [PHP] code not working...help?

2004-10-07 Thread Dennis Gearon
"Graham Cossey" <[EMAIL PROTECTED]> wrote: [snip] $lastmonth = date("YmdHis", mktime(date("H"), date("i"), date("s"), date("m")-1, date("d"), date("Y"))); $countResult = db_query("SELECT count(*) AS msgCount FROM messages WHERE uid = '". $userID ."' AND fid = '". $fid ."' AND post_date <= '". $l

Re: [PHP] Re: code not working...help?

2004-10-07 Thread Matthew Sims
> i just realized that the dates in the database are saved as > varchar (althought they are numbers) is there anyway to compare the > $lastmonth value (which returns as a 14 digit number) to that because > the > way i have it now with >> post_date <= '$lastmonth' > wont work because post_date is

[PHP] password in the mysql table 'auth'

2004-10-07 Thread 22
Concerning Auth How to set username and password in the mysql table 'auth'. Nothing has resulted from direct entry into the table. Vlad Alivanov

<    1   2