Re: [PHP] Working with dates in PHP
Hi, Friday, October 11, 2002, 3:53:55 PM, you wrote: JP I am at my wits end at the moment. I am pulling a datetimestamp out of a JP database and attempting to get the year month and day out of it. However JP I am stumped as how to do it. JP The format is -MM-DD HH:MM:SS and its coming out of a mySQL JP database. Is there anyway I can get the information I need out of here? JP I have tried $nday = date(d, $row[2]) and so on but all i get out of JP that is Year = 1970, Month = 01, Day = 01. JP Heres the code Im using now with getdate() JP while($row = mysql_fetch_row($fres)) JP { JP print($row[2]); JP $odate = getdate($row[2]); JP print($odate['mday'].br /); JP $oday = date(d, $odate); JP print($odate['mon'].br /); JP $omonth = date(m, $odate); JP print($odate['year'].br /); JP $oyear = date(Y, $odate); JP print($oyear.br /); JP } JP Any help would be appreciated. JP James Try this $ts = strtotime($row[2]);//get a unix timestamp $day = date(d,$ts); -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Fatal error: Cannot use [] for reading
I am using quotes around the key, just a dumb mistake in the example... Leif K-Brooks wrote: Any idea what that error means? I'm trying to do something like: $array[] = array(a = a value); -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Fatal error: Cannot use [] for reading
That piece of code works. Maybe you could be so kind as to post the exact piece of code which doesn't work? If it's not too much to ask, of course. Bogdan Leif K-Brooks wrote: Any idea what that error means? I'm trying to do something like: $array[] = array(a = a value); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Fatal error: Cannot use [] for reading
$actions[] = array(display = Discard); Bogdan Stancescu wrote: That piece of code works. Maybe you could be so kind as to post the exact piece of code which doesn't work? If it's not too much to ask, of course. Bogdan Leif K-Brooks wrote: Any idea what that error means? I'm trying to do something like: $array[] = array(a = a value); -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Fatal error: Cannot use [] for reading
It works both with and without quotes around the key. Which is normal - you will be amazed at how forgiving PHP is - try this: ? echo(test); ? Bogdan Leif K-Brooks wrote: I am using quotes around the key, just a dumb mistake in the example... Leif K-Brooks wrote: Any idea what that error means? I'm trying to do something like: $array[] = array(a = a value); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Fatal error: Cannot use [] for reading
Yup, that works as well. You could try a debugging echo after that line and see if it gets executed. You probably have a problem somewhere else. Bogdan Leif K-Brooks wrote: $actions[] = array(display = Discard); Bogdan Stancescu wrote: That piece of code works. Maybe you could be so kind as to post the exact piece of code which doesn't work? If it's not too much to ask, of course. Bogdan Leif K-Brooks wrote: Any idea what that error means? I'm trying to do something like: $array[] = array(a = a value); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: site path
If you really need to get picky, then I shall... well, point out the obvious: echo a href='$theURL/'Go to some folder/a; And since we got into this, there are some servers where you don't have control over http config, so you shouldn't want to link to directories at all - you'd want to specify the exact file to link to, as in echo a href='$theURL/index.php'Go to some folder/a; Bogdan Edwin wrote: Well, I agree about what you said IMHO, the second comes more natural to write, is easier to understand at a glance, is less prone to errors and, well, it's shorter! but remember the topic is about whether the trailing slash would create a problem or not. I think you're aware that there are some servers are not configured to understand that http://www.domain.com/somefolder is equal to http://www.domain.com/somefolder/ . So, NOT having the trailing slash might even create some problems. So, it's a matter of opinion (and use) whether adding a trailing slash would create a problem or not. So imagine how this code will work: echo a href='$theURL'Go to some folder/a; - E On Friday, October 11, 2002 2:28 PM Bogdan Stancescu wrote: Ok, then I honestly don't understand why anyone would rather write this echo a href=' . $myURL . home'Go home/a; instead of this echo a href='$myURL/home'Go home/a; IMHO, the second comes more natural to write, is easier to understand at a glance, is less prone to errors and, well, it's shorter! Bogdan Edwin wrote: Not exactly. Single quotes are fine. I missed the fact that the single quotes here echo(A HREF='$my_URLhome'Go home/A); will be included in the source--sorry about that. Well, then, to rewrite the code earlier, echo 'a href=' . $my_URL . 'homeGo home/a'; this way: echo a href=' . $myURL . home'Go home/a; that would still not give you the trailing slash problem. In other words, it's just a matter of how you write the code... ;) - E On Friday, October 11, 2002 1:06 AM Bogdan Stancescu wrote: I'm not sure exactly what you're trying to point out - does XHTML require double quotes? Bogdan Edwin wrote: Just a thought... If you're going to write an XHTML compatible code, you wouldn't really have this problem -- echo(A HREF='$my_URLhome'Go home/A); since you'll probably write something like this: echo 'a href=' . $my_URL . 'homeGo home/a'; Of course, I didn't mean that you can't do that with HTML... [snip] -- 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] Working with dates in PHP
I am at my wits end at the moment. I am pulling a datetimestamp out of a database and attempting to get the year month and day out of it. Do it in your sql query. Check out chapter 6 of the MySQL manual for ways to manipulate dates. Eg. $query = select DATE_FORMAT(DTStamp, '%e %b %y') AS DispDate WHERE some=condition; Will get you a date as day month year. There's heaps of options and you should probably read up on them. CYA, Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Fatal error: Cannot use [] for reading
Any idea what that error means? I'm trying to do something like: $array[] = array(a = a value); -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Forms issues..
I am having difficulty managing forms. for example I have a table builder class which builds me a table of a query with all the bells and whistles to make it editable etc. so it creates it's own form to build itself on, then I have a dateselector class which builds a nice little graphic date selector, this also uses it's own form as it is not always in a table - it can be anywhere - as far as I know you can't have a form in a form so I am cheating a bit at the moment and only creating the dateselector after the table on a div then moving it into place.. This is working for me, but being a relative newbie I am sure there is a better way to handling forms. Any ideas, comments appreciated. Thanks _ Simon Taylor AfriTol (Pty) Ltd. ? [EMAIL PROTECTED] Å+27 12 361 3303 ext 257 Å+27 72 471 1833 Æ+27 12 365 3810 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MSSQL_RESULT Problem
i have some trouble with mssql_result cause it will return me a result limitted at 255 char max. in my php.ini i set this value : mssql.textsize=65536 mssql.textlimit=65536 and in SQLSERVER my field type is VARCHAR(2048) can you help me please ??? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Download problems..
I am having problems downloading files using PHP. The download part works correctly but when I try to browse other links (using IE only, Netscape works fine) they get stuck. I am using frames. It all works fine when I reload the page from where I download files. Is there any way to split up content using PHP? One part gets downloaded while another part is displayed in the resulting frame. I have read an RFC and it should work but none of the browsers do as I want them to so I am doing something wrong. Does anyone have an example? Archie --- Archibald Zimonyi [EMAIL PROTECTED] There is no logic like no logic -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Compiling PHP against net-snmp 5.0.6
Hi everyone I'm having terrible trouble compiling PHP with net-snmp: /bin/sh /usr/local/src/php-4.2.3/libtool --silent --mode=compile gcc -I. -I/usr/local/src/php-4.2.3/ext/snmp -I/usr/local/src/php-4.2.3/main -I/usr/local/src/php-4.2.3 -I/usr/local/apache/include -I/usr/local/src/php-4.2.3/Zend -I/usr/local/include -I/usr/local/mysql/include/mysql -I/usr/local/pdflib/include -I/usr/local/snmp/include -I/usr/local/src/php-4.2.3/ext/xml/expat -DLINUX=22 -DMOD_SSL=208111 -DUSE_HSREGEX -DEAPI -DUSE_EXPAT -I/usr/local/src/php-4.2.3/TSRM -g -O2 -prefer-pic -c snmp.c snmp.c:62: asn1.h: No such file or directory snmp.c:63: snmp_api.h: No such file or directory snmp.c:64: snmp_client.h: No such file or directory snmp.c:65: snmp_impl.h: No such file or directory snmp.c:66: snmp.h: No such file or directory snmp.c:67: parse.h: No such file or directory snmp.c:68: mib.h: No such file or directory snmp.c:69: version.h: No such file or directory These missing .h files are in a subdirectory called 'include/net-snmp/library' on net-snmp 5.0.6, but on ucd-snmp 4.2.6, 'include/ucd-snmp/library'. I'm no great coder, so when I tried hacking the .c file to point to the location of the new headers, I came up against unresolved symbols whilst compiling. Has anybody successfuly compiled php with net-snmp? Can anybody help me track down the problem and hopefully come up with a patch? Best wishes, Peter. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Updating session variables values during session
Hi, PHP 4.1.X I'm trying, during the session time, to change the value of 2 session variables: My first attempt was simply like this: $sess_client = $theClient; $sess_ref_clientFact = $theRefClient; ...but following pages still get old values from the session variables. Then I tried this: session_unregister(sess_client); session_unregister(sess_ref_clientFact); $sess_client = $ClientName; $sess_ref_clientFact = $ClientRef; session_register(sess_client); session_register(sess_ref_clientFact); Same, following pages get old values from these 2 session variables... I would appreciate if I could get some help ? Thanks. --- Stéphane Pinel [EMAIL PROTECTED] iChat : [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Updating session variables values during session
Hiya, Try using $_SESSION['variablename'] To refer to session variables. Cheers Simon -Original Message- From: Stéphane Pinel [mailto:[EMAIL PROTECTED]] Sent: 11 October 2002 11:16 To: [EMAIL PROTECTED] Subject: [PHP] Updating session variables values during session Hi, PHP 4.1.X I'm trying, during the session time, to change the value of 2 session variables: My first attempt was simply like this: $sess_client = $theClient; $sess_ref_clientFact = $theRefClient; ...but following pages still get old values from the session variables. Then I tried this: session_unregister(sess_client); session_unregister(sess_ref_clientFact); $sess_client = $ClientName; $sess_ref_clientFact = $ClientRef; session_register(sess_client); session_register(sess_ref_clientFact); Same, following pages get old values from these 2 session variables... I would appreciate if I could get some help ? Thanks. --- Stéphane Pinel [EMAIL PROTECTED] iChat : [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] Updating session variables values during session
Same problem... Thanks. --- Stéphane Pinel [EMAIL PROTECTED] iChat : [EMAIL PROTECTED] Le 11/10/02 11:26, « Simon Taylor » [EMAIL PROTECTED] a écrit : Hiya, Try using $_SESSION['variablename'] To refer to session variables. Cheers Simon -Original Message- From: Stéphane Pinel [mailto:[EMAIL PROTECTED]] Sent: 11 October 2002 11:16 To: [EMAIL PROTECTED] Subject: [PHP] Updating session variables values during session Hi, PHP 4.1.X I'm trying, during the session time, to change the value of 2 session variables: My first attempt was simply like this: $sess_client = $theClient; $sess_ref_clientFact = $theRefClient; ...but following pages still get old values from the session variables. Then I tried this: session_unregister(sess_client); session_unregister(sess_ref_clientFact); $sess_client = $ClientName; $sess_ref_clientFact = $ClientRef; session_register(sess_client); session_register(sess_ref_clientFact); Same, following pages get old values from these 2 session variables... I would appreciate if I could get some help ? Thanks. --- Stéphane Pinel [EMAIL PROTECTED] iChat : [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Updating session variables values during session
Have you tried it like this? $_SESSION['sess_client'] = $ClientName; $_SESSION['sess_ref_clientFact'] = $ClientRef; If it still gives you the old vars I would look at where the $ClientName and $ClientRef are coming from. -Original Message- From: Stéphane Pinel [mailto:[EMAIL PROTECTED]] Sent: 11 October 2002 11:32 To: [EMAIL PROTECTED] Subject: Re: [PHP] Updating session variables values during session Same problem... Thanks. --- Stéphane Pinel [EMAIL PROTECTED] iChat : [EMAIL PROTECTED] Le 11/10/02 11:26, « Simon Taylor » [EMAIL PROTECTED] a écrit : Hiya, Try using $_SESSION['variablename'] To refer to session variables. Cheers Simon -Original Message- From: Stéphane Pinel [mailto:[EMAIL PROTECTED]] Sent: 11 October 2002 11:16 To: [EMAIL PROTECTED] Subject: [PHP] Updating session variables values during session Hi, PHP 4.1.X I'm trying, during the session time, to change the value of 2 session variables: My first attempt was simply like this: $sess_client = $theClient; $sess_ref_clientFact = $theRefClient; ...but following pages still get old values from the session variables. Then I tried this: session_unregister(sess_client); session_unregister(sess_ref_clientFact); $sess_client = $ClientName; $sess_ref_clientFact = $ClientRef; session_register(sess_client); session_register(sess_ref_clientFact); Same, following pages get old values from these 2 session variables... I would appreciate if I could get some help ? Thanks. --- Stéphane Pinel [EMAIL PROTECTED] iChat : [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
[PHP] mysql stored procedures
when is this being implemented ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: site path
Hmm, I was expecting that. ;) Looking back, when you said that this code ? echo(A HREF='$my_URLhome'Go home/A); ? would obviously create a trailing slash problem, I should have just said that it's true IF you code it that way. I should have just said that there's an ALTERNATIVE way of coding that wouldn't create that problem--that way, this thread wouldn't even be this long. As I have already mentioned, I agree that this is shorter echo(A HREF='$my_URL/home'Go home/A); but I'd still write this way echo 'a href='. $my_URL .'/homeGo home/a'; since, at least for me, this is easier to read. Besides, for consistency, at my workplace we use double quotes for the (html) values. - E On Friday, October 11, 2002 4:10 PM Bogdan Stancescu wrote: If you really need to get picky, then I shall... well, point out the obvious: echo a href='$theURL/'Go to some folder/a; And since we got into this, there are some servers where you don't have control over http config, so you shouldn't want to link to directories at all - you'd want to specify the exact file to link to, as in echo a href='$theURL/index.php'Go to some folder/a; Bogdan Edwin wrote: Well, I agree about what you said IMHO, the second comes more natural to write, is easier to understand at a glance, is less prone to errors and, well, it's shorter! but remember the topic is about whether the trailing slash would create a problem or not. I think you're aware that there are some servers are not configured to understand that http://www.domain.com/somefolder is equal to http://www.domain.com/somefolder/ . So, NOT having the trailing slash might even create some problems. So, it's a matter of opinion (and use) whether adding a trailing slash would create a problem or not. So imagine how this code will work: echo a href='$theURL'Go to some folder/a; - E On Friday, October 11, 2002 2:28 PM Bogdan Stancescu wrote: Ok, then I honestly don't understand why anyone would rather write this echo a href=' . $myURL . home'Go home/a; instead of this echo a href='$myURL/home'Go home/a; IMHO, the second comes more natural to write, is easier to understand at a glance, is less prone to errors and, well, it's shorter! Bogdan Edwin wrote: Not exactly. Single quotes are fine. I missed the fact that the single quotes here echo(A HREF='$my_URLhome'Go home/A); will be included in the source--sorry about that. Well, then, to rewrite the code earlier, echo 'a href=' . $my_URL . 'homeGo home/a'; this way: echo a href=' . $myURL . home'Go home/a; that would still not give you the trailing slash problem. In other words, it's just a matter of how you write the code... ;) - E On Friday, October 11, 2002 1:06 AM Bogdan Stancescu wrote: I'm not sure exactly what you're trying to point out - does XHTML require double quotes? Bogdan Edwin wrote: Just a thought... If you're going to write an XHTML compatible code, you wouldn't really have this problem -- echo(A HREF='$my_URLhome'Go home/A); since you'll probably write something like this: echo 'a href=' . $my_URL . 'homeGo home/a'; Of course, I didn't mean that you can't do that with HTML... [snip] -- 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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Win nt logon user how to ?
Hey everyone, id like to know how to get the logon user in my NT domain, i know that this can be done in ASP: Request.Servervariables(LOGON_USER), and gets the logged user of the client machine, i need to do that with PHP, ... im affraid this is not possible because, runing phpinfo() ... this variable is not on enviroment list. is it possible what i want to do ?? Thanks every1 !! Regards Daniel. -Mensaje original- De: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Enviado el: viernes, 11 de octubre de 2002 8:49 Para: Cole Tuininga CC: [EMAIL PROTECTED] Asunto: Re: [PHP] Raw HTTP data See your php.ini file: ; Always populate the $HTTP_RAW_POST_DATA variable. ;always_populate_raw_post_data = On On 11 Oct 2002, Cole Tuininga wrote: Quick question - is there an equivalent to QUERY_STRING for POSTs? I need the deata to essentially be in the same format as for GETs. If the answer is build it myself from $_POST, so be it. I was hoping there was a more elegant solution though. 8) -Cole Tuininga [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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] slow form / server problem
If you suspect your SQL server is slow, try the submit without inserting/selecting, just throw the data away, and maybe print out some static data. Omar Campos wrote: Hi. I run php in win2k server, IIS and MS SQL Server 2k. I've created some data bases and tables. On the beginning, sending a php form (through the intranet) was quick. Now, it spends 32 seconds (sometimes less) to send a form. I've tried on a empty data base but it's still slow. I dont have a clue about what could it be? Maybe the HDD of the server, maybe the SQL Server Could you help me. Thank you so much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Updating session variables (resolced: shame on me)
Hehe - no prob - you can also set it to always start in php.ini if it suits your needs. Cheers Simon -Original Message- From: Stéphane Pinel [mailto:[EMAIL PROTECTED]] Sent: 11 October 2002 12:10 To: [EMAIL PROTECTED] Subject: Re: [PHP] Updating session variables (resolced: shame on me) 1) I wake up too early this morning 2) I've lost my glasses 3) I forgot... Session_start() ...shame on me... Thanks to all. Regards. --- Stéphane Pinel [EMAIL PROTECTED] iChat : [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
[PHP] [Slightly OT] Using Mozilla? Here!
Just created a Mozilla keyword for the php manual, after being too lazy for too long, so here it is, in case anyone else finds it useful: http://www.php.net/search.php?show=quickrefpattern=%s The keyword is obviously php (at least in my case). Since I already spammed you with this, here are a couple of others I use: Dictionary http://dictionary.com/search?q=%s Google Feeling Lucky http://www.google.com/search?btnI=1q=%s And, in case you don't know about bookmarklets, here's a link: http://www.squarefree.com/bookmarklets/ Hope this helps somebody... Bogdan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 11 Oct 2002 10:27:24 -0000 Issue 1637
php-general Digest 11 Oct 2002 10:27:24 - Issue 1637 Topics (messages 119588 through 119624): Re: MS SQL server TEXT column 119588 by: John W. Holmes Re: Calling PHP (cgi) from a perl script and passsing parameters 119589 by: Sascha Cunz 119592 by: Jim Carey 119593 by: Jim Carey Re: Refresh my Memory 119590 by: Omar Campos Redhat 8.0 / php-cvs - /usr/lib/httpd/build/instdso.sh: No such file or directory 119591 by: Robert Mena Re: MySQL back up 119594 by: Ken Re: PDF to PHP (code) 119595 by: Ken Re: displaying fixed number of records 119596 by: DoL Best way to put layout, code on pages? 119597 by: Leif K-Brooks 119598 by: Jule Slootbeek Re: site path 119599 by: Bogdan Stancescu 119603 by: . Edwin 119611 by: Bogdan Stancescu Re: Animation in PHP 119600 by: Noodle Snacks Working with dates in PHP 119601 by: James Purser 119604 by: Tom Rogers 119612 by: David Freeman Re: Capitalizing names ... needs the final touch... 119602 by: -[ Rene Brehmer ]- Fatal error: Cannot use [] for reading 119605 by: Leif K-Brooks 119606 by: Leif K-Brooks 119607 by: Bogdan Stancescu 119608 by: Leif K-Brooks 119609 by: Bogdan Stancescu 119610 by: Bogdan Stancescu Forms issues.. 119613 by: Simon Taylor MSSQL_RESULT Problem 119614 by: Francky Download problems.. 119615 by: Archibald Zimonyi Compiling PHP against net-snmp 5.0.6 119616 by: Peter Hicks Updating session variables values during session 119617 by: Stéphane Pinel 119618 by: Simon Taylor 119619 by: Stéphane Pinel 119620 by: Simon Taylor 119622 by: Stéphane Pinel Re: Updating session variables (resolced: shame on me) 119621 by: Stéphane Pinel 119623 by: Simon Taylor [Slightly OT] Using Mozilla? Here! 119624 by: Bogdan Stancescu 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] -- ---BeginMessage--- Make sure you're using POST as your form method and not GET. ---John Holmes... -Original Message- From: Vail, Warren [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 10, 2002 5:04 PM To: php Subject: [PHP] MS SQL server TEXT column Encountered the following problem with the Microsoft SQL Server interface. I am not sure where the problem exists, but I am looking for a workaround. I inserted a row into a table that contained a text column, and inserted over 5kb string into the text field. On retrieving the row the server returned the column values truncated to 4096 bytes exactly. Tried to code SET TEXTSIZE nnn into my query string, the query refused to return anything at all. Then I tried coding SET TEXTSIZE as a separate query on the same connection, just prior to my data query, both appeared to be successful, but still only got 4096 bytes of data. select DATALENGTH(availabilitySample) from mftsmainframeavailability where availabilityID = 1 using the MSSQL 7 Query analyzer returns; --- 5242 (1 row(s) affected) This shows that my text was stored, I just can't seem to get the server (or the interface) to give me back more than 4096 bytes. any clues would be greatly appreciated. thanks in advance, Warren Vail Tools, Metrics Quality Processes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ---End Message--- ---BeginMessage--- What you're referring is CLI, not CGI Version of PHP. Anyway, i assume, you're using a PHP version 4.2 or higher. Have a look at the $_SERVER['argc'] and $_SERVER['argv']. Sascha Am Donnerstag, 10. Oktober 2002 23:57 schrieb Jim Carey: Hi, have been having problems passing parameters to a PHP script from a Perl script . I call the PHP script using (as an example): $a=`/home/ozbcoz/http/testphp.php fred=testing`; print $a; then I have a PHP script showing: #!/usr/local/php/bin/php -q ? print count=$argcbr; print 0=$argv[0]br; print 1=$argv[1]br; print 2=$argv[2]br; phpinfo(); ? the outout comes out as: count=0 0= 1= 2= plus the phpinfo bumpf - which shows argc as 0 and an empty array for argv sny clues anyone ? Jim Carey www.OZbcoz.com discount domain registration ---End Message--- ---BeginMessage--- yes - am using 4.2.1 output from phpinfo() shows: _SERVER[argv] Array ( ) _SERVER[argc] 0 which agrees with the $argc and $argv output. details on the build include: Build Date Jul 18 2002 08:29:02 Configure Command './configure' '--prefix=/usr/local/php' '--with-config-file-path=/usr/local/bin/'
Re: [PHP] Object-relational mapping and PHP
Hello, Have you tried http://www.phpclasses.org/ ? -E On Friday, October 11, 2002 11:31 PM Subject: [PHP] Object-relational mapping and PHP Juhan Kundla wrote: [snip] I would rather not reinvent the wheel here, so it would be nice, if anybody could share her/his experience or suggest some PHP-code for this. I have searched web and found nothing very useful so far. [/snip] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Raw HTTP data
Quick question - is there an equivalent to QUERY_STRING for POSTs? I need the deata to essentially be in the same format as for GETs. If the answer is build it myself from $_POST, so be it. I was hoping there was a more elegant solution though. 8) -Cole Tuininga [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Raw HTTP data
See your php.ini file: ; Always populate the $HTTP_RAW_POST_DATA variable. ;always_populate_raw_post_data = On On 11 Oct 2002, Cole Tuininga wrote: Quick question - is there an equivalent to QUERY_STRING for POSTs? I need the deata to essentially be in the same format as for GETs. If the answer is build it myself from $_POST, so be it. I was hoping there was a more elegant solution though. 8) -Cole Tuininga [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] Updating session variables (resolced: shame on me)
1) I wake up too early this morning 2) I've lost my glasses 3) I forgot... Session_start() ...shame on me... Thanks to all. Regards. --- Stéphane Pinel [EMAIL PROTECTED] iChat : [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Accessing serial ports from PHP
Hello: I would like to read and write to serial ports from PHP, is possible? if so, how? Regards. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: private and public in class objects
can anyone answer this ? Electroteque [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... hi i was wondering when this was or is going to be implemented into class objects ? i have the syntax for it ie setting a private function _function() and private var $_var, it doesnt seem to be working in PHP 4.2.2 ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Accessing serial ports from PHP
If you're using UNIX, you can try reading and writing to/from /dev/ttyS* or /dev/ttyS/* On Fri, 2002-10-11 at 06:34, José León Serna wrote: Hello: I would like to read and write to serial ports from PHP, is possible? if so, how? Regards. -- 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] Function to remember costs.
I am having difficulty passing details to a form. I need to somehow pass a variable cost to a form. The cost is made up of items in a cart (details taken from a Mysql DB) and a shipping cost. I then have a function written to display the credit card form (which needs to be passed to a secure server below the final cost (ie cost plus shipping). I have tried without success most of this morning to pass the final cost plus shipping to the form hidden field (which is on the same html page!) Here is the section of code I am having problems with. I will supply the rest of the functions to anyone who thinks they can help but it's a lot of code. ? } function display_shipping($shipping) { // display table row with shipping cost and total price including shipping global $total_price; ? table border = 0 width = 760 cellspacing = 0 trtd align = leftShipping/td td align = right ?=number_format($shipping, 2); ?/td/tr trth bgcolor=#146190 align = leftTOTAL INCLUDING SHIPPING/th th bgcolor=#146190 align = right ?=number_format($shipping+$total_price, 2); ?/th /tr /tablebr ? } function display_card_form($name) { //display form asking for credit card details ? table border = 0 width = 760 cellspacing = 0 form action ='https://spos.luottokunta.fi/pm/servlet/Payment' method='post' input type='hidden' name='version' value='1.2' input type='hidden' name='merchant_rn' value='8058950' input type='hidden' name='order_rn' value='10001' input type='hidden' name='amount' value='' input type='hidden' name='amount_exp' value='-2' input type='hidden' name='currency' value='978' input type='hidden' name='order_description' value='Viola test product' input type='hidden' name='success_url' value='http://www.violasystems.com' input type='hidden' name='failure_url' value='http://www.violasystems.com/bazaar' input type='hidden' name='cancel_url' value='http://www.violasystems.com/privacy.php' input type='hidden' name='trans_method' value='0' input type='hidden' name='mac' value='F529BC531D' trth colspan = 2 bgcolor=#ccCredit Card Details/th/tr tr tdType/td tdselect name = card_typeoptionVISAoptionMasterCard/select/td /tr tr tdNumber/td tdinput type = text name = card_number value = maxlength = 16 size = 40/td /tr tr tdAMEX code (if required)/td tdinput type = text name = amex_code value = maxlength = 4 size = 4/td /tr tr tdExpiry Date/td tdMonth select name = card_monthoption01option02option03option04option05option06 option07option08option09option10option11option12/select Year select name = card_yearoption00option01option02option03option04option05o ption06option07option08option09option10/select/td /tr tr tdName on Card/td tdinput type = text name = card_name value = ?=$name; ? maxlength = 40 size = 40/td /tr tr td colspan = 2 align = center bIf you press purchase your credit card details will be transmitted via a secure server, your details processed and then you will be redirected to our site./b ? display_form_button(purchase, Purchase These Items); ? /td /tr /table ? As you can see the PHP code is just a part of one larger page of functions. What I am trying to do is pass the ?=number_format($shipping+$total_price, 2); ? to the amount hidden field in the form. Any ideas? This is not all my code which is why I am having problems. Steve Jackson Web Developer Viola Systems Ltd. http://www.violasystems.com http://www.violasystems.com/ [EMAIL PROTECTED] Mobile +358 50 343 5159
[PHP] Object-relational mapping and PHP
Hey, gang! I am planning to write a small web application using PHP. The application has several business classes, which store their persistent data in relational database. I don't like the idea of embedding the SQL and other data access related code into my classes, so i am looking for a abstraction layer, which takes care of the dirty work and my classes have only simple methods like save, retrieve and delete. I would rather not reinvent the wheel here, so it would be nice, if anybody could share her/his experience or suggest some PHP-code for this. I have searched web and found nothing very useful so far. TIA, Juhan -- Vastus: Sest inimene loeb suunaga ülevalt alla. Küsimus: Miks ülalpool vastamine on halb? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Function to remember costs.[Scanned]
Steve, I've only had a quick glance at this but from the code you've posted you don't seem to be associating a variable with the hidden field you're referring to in the display_form function. You need to store the amount in a variable and then refer to the variable in the value attribute of the hidden field. Michael Egan -Original Message- From: Steve Jackson [mailto:[EMAIL PROTECTED]] Sent: 11 October 2002 11:47 To: PHP General Subject: [PHP] Function to remember costs.[Scanned] I am having difficulty passing details to a form. I need to somehow pass a variable cost to a form. The cost is made up of items in a cart (details taken from a Mysql DB) and a shipping cost. I then have a function written to display the credit card form (which needs to be passed to a secure server below the final cost (ie cost plus shipping). I have tried without success most of this morning to pass the final cost plus shipping to the form hidden field (which is on the same html page!) Here is the section of code I am having problems with. I will supply the rest of the functions to anyone who thinks they can help but it's a lot of code. ? } function display_shipping($shipping) { // display table row with shipping cost and total price including shipping global $total_price; ? table border = 0 width = 760 cellspacing = 0 trtd align = leftShipping/td td align = right ?=number_format($shipping, 2); ?/td/tr trth bgcolor=#146190 align = leftTOTAL INCLUDING SHIPPING/th th bgcolor=#146190 align = right ?=number_format($shipping+$total_price, 2); ?/th /tr /tablebr ? } function display_card_form($name) { //display form asking for credit card details ? table border = 0 width = 760 cellspacing = 0 form action ='https://spos.luottokunta.fi/pm/servlet/Payment' method='post' input type='hidden' name='version' value='1.2' input type='hidden' name='merchant_rn' value='8058950' input type='hidden' name='order_rn' value='10001' input type='hidden' name='amount' value='' input type='hidden' name='amount_exp' value='-2' input type='hidden' name='currency' value='978' input type='hidden' name='order_description' value='Viola test product' input type='hidden' name='success_url' value='http://www.violasystems.com' input type='hidden' name='failure_url' value='http://www.violasystems.com/bazaar' input type='hidden' name='cancel_url' value='http://www.violasystems.com/privacy.php' input type='hidden' name='trans_method' value='0' input type='hidden' name='mac' value='F529BC531D' trth colspan = 2 bgcolor=#ccCredit Card Details/th/tr tr tdType/td tdselect name = card_typeoptionVISAoptionMasterCard/select/td /tr tr tdNumber/td tdinput type = text name = card_number value = maxlength = 16 size = 40/td /tr tr tdAMEX code (if required)/td tdinput type = text name = amex_code value = maxlength = 4 size = 4/td /tr tr tdExpiry Date/td tdMonth select name = card_monthoption01option02option03option04option05option06 option07option08option09option10option11option12/select Year select name = card_yearoption00option01option02option03option04option05o ption06option07option08option09option10/select/td /tr tr tdName on Card/td tdinput type = text name = card_name value = ?=$name; ? maxlength = 40 size = 40/td /tr tr td colspan = 2 align = center bIf you press purchase your credit card details will be transmitted via a secure server, your details processed and then you will be redirected to our site./b ? display_form_button(purchase, Purchase These Items); ? /td /tr /table ? As you can see the PHP code is just a part of one larger page of functions. What I am trying to do is pass the ?=number_format($shipping+$total_price, 2); ? to the amount hidden field in the form. Any ideas? This is not all my code which is why I am having problems. Steve Jackson Web Developer Viola Systems Ltd. http://www.violasystems.com http://www.violasystems.com/ [EMAIL PROTECTED] Mobile +358 50 343 5159 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MSSQL_RESULT Problem
Hi! This is actually a limitation of the sql libraries used by PHP (I assume you're using Windows). Try using a cast to a text field: Select Cast(Field As Text) As Field This should (and I say should because I can't test it right now :) take care of the problem, although it might make your db a bit slower. On Thu, 2002-10-10 at 10:19, Francky wrote: i have some trouble with mssql_result cause it will return me a result limitted at 255 char max. in my php.ini i set this value : mssql.textsize=65536 mssql.textlimit=65536 and in SQLSERVER my field type is VARCHAR(2048) can you help me please ??? -- 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] Temp dir
Sorry if is a newbie question... but how I discover where is the php temp dir? Thanks!! Evandro Sestrem -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Win nt logon user how to ?
It's there... $_ENV['LOGON_USER'] You may have to turn on some NT setting in IIS for that directory...if you're using IIS. ---John Holmes... -Original Message- From: Daniel Masson [mailto:[EMAIL PROTECTED]] Sent: Friday, October 11, 2002 9:55 AM To: [EMAIL PROTECTED] Subject: [PHP] Win nt logon user how to ? Hey everyone, id like to know how to get the logon user in my NT domain, i know that this can be done in ASP: Request.Servervariables(LOGON_USER), and gets the logged user of the client machine, i need to do that with PHP, ... im affraid this is not possible because, runing phpinfo() ... this variable is not on enviroment list. is it possible what i want to do ?? Thanks every1 !! Regards Daniel. -Mensaje original- De: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Enviado el: viernes, 11 de octubre de 2002 8:49 Para: Cole Tuininga CC: [EMAIL PROTECTED] Asunto: Re: [PHP] Raw HTTP data See your php.ini file: ; Always populate the $HTTP_RAW_POST_DATA variable. ;always_populate_raw_post_data = On On 11 Oct 2002, Cole Tuininga wrote: Quick question - is there an equivalent to QUERY_STRING for POSTs? I need the deata to essentially be in the same format as for GETs. If the answer is build it myself from $_POST, so be it. I was hoping there was a more elegant solution though. 8) -Cole Tuininga [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 -- 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] Re: private and public in class objects
Whenever Zend Engine 2.0 is used. Try doing some reading on the PHP site. ---John Holmes... -Original Message- From: electroteque [mailto:[EMAIL PROTECTED]] Sent: Friday, October 11, 2002 9:49 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: private and public in class objects can anyone answer this ? Electroteque [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... hi i was wondering when this was or is going to be implemented into class objects ? i have the syntax for it ie setting a private function _function() and private var $_var, it doesnt seem to be working in PHP 4.2.2 ? -- 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] Re: Temp dir
Discover in my code.. Ex: I want create a file in the php temp dir. $tempdir = getPHPTempDir(); fopen($tempdir . test.txt, w+); Evandro Sestrem [EMAIL PROTECTED] escreveu na mensagem [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Sorry if is a newbie question... but how I discover where is the php temp dir? Thanks!! Evandro Sestrem -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] how to configure with ldap?
Hello, I'm trying to configure php with ldap support. Looking at ./configure --help, I noticed that when I configure it, I need to put this in: ./configure --with-ldap=[dir] My question is, where is ldap? I'm running Redhat 7.3 with Apache 2. My ultimate goal is, I'm running Squirrelmail, and I want to connect to an Exchange global address list. Any help would be greatly appreciated. Thank you. -Jody Cleveland Winnefox Library System Computer Support Specialist [EMAIL PROTECTED] I thought I had an appetite for destruction, when all I really wanted was a club sandwich. - Homer - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Best way to put layout, code on pages?
?php include(include.php); //This contains the database connection code and whatever other global code, as well as the layout functions. doheader(); //This function contains the top of the layout. //Do whatever the page does dofooter(); //This function contains the bottom of the layout ? There are still problems with this, though. No way to use global code at the bottom of the page, for one thing. I've also considered something like: What do you mean you can't use global code at the bottom of the page?? Maybe output buffering could solve your problem. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] =.jpg from another URL with PHP=
The following script picks up single .jpg image of a doppler weather map from another URL: ... ? $theURL=http://image.weather.com/web/radar/us_har_closeradar_medium_usen.jp g; if(!($fp=fopen($theURL, r))) { print(Could not open the URL.); exit; } $contents=fread($fp,100); print($contents); fclose($fp); ? .. However, when I try to insert the HTML tages into the script like: .. HTML HEAD BODY This is a map. ? $theURL=http://image.weather.com/web/radar/us_har_closeradar_medium_usen.jp g; if(!($fp=fopen($theURL, r))) { print(Could not open the URL.); exit; } $contents=fread($fp,100); print($contents); fclose($fp); ? /BODY /HTML .. I get the following: ÿØÿàJFIFÿþ 1034364214ÿÛC 2!=,.$2I@LKGFEPZsbPUmVEFd^emw{,N`-O}-s~|ÿÛC;!!;|SFS ||ÿÀ)¸ÿÄ ÿÄH!1AQaq#2'¡BR±ÁÑ3áð$brñ45CSs' DTt,cf²ÂÒÿÄÿÄ*!1AQaq2B'¡ÑðáÿÚ ?óz_YªMåm ·Lë?öWÂ-O¨x¹xâ'Ý~~?ö|ñ½s þyè¢Ñ7þ?©ø¶®xbÒÛ°ó,Ï}`Òç!W-ü$g®NÕ³jIº'×ZTÔѶ«SðD Qö-yÕ+Q_§L{M2Iý©Ô3¡q£! etc. etc... I would like to insert additional text copy with this map - is this possible. Thanking all in advance. Tony Ritter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to configure with ldap?
You need an LDAP package like OpenLDAP: http://www.openldap.org/ On Fri, 2002-10-11 at 10:37, Jody Cleveland wrote: Hello, I'm trying to configure php with ldap support. Looking at ./configure --help, I noticed that when I configure it, I need to put this in: ./configure --with-ldap=[dir] My question is, where is ldap? I'm running Redhat 7.3 with Apache 2. My ultimate goal is, I'm running Squirrelmail, and I want to connect to an Exchange global address list. Any help would be greatly appreciated. Thank you. -Jody Cleveland Winnefox Library System Computer Support Specialist [EMAIL PROTECTED] I thought I had an appetite for destruction, when all I really wanted was a club sandwich. - Homer - -- 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] =.jpg from another URL with PHP=
Save your first bit of code in a file (e.g.: image.php) Your HTML file should look like this: html head.../head body . img src=image.php . /body /html Regards, Daniel Kushner _ Need hosting? http://thehostingcompany.us -Original Message- From: Anthony Ritter [mailto:[EMAIL PROTECTED]] Sent: Friday, October 11, 2002 11:53 AM To: [EMAIL PROTECTED] Subject: [PHP] =.jpg from another URL with PHP= The following script picks up single .jpg image of a doppler weather map from another URL: ... ? $theURL=http://image.weather.com/web/radar/us_har_closeradar_medium_usen.jp g; if(!($fp=fopen($theURL, r))) { print(Could not open the URL.); exit; } $contents=fread($fp,100); print($contents); fclose($fp); ? .. However, when I try to insert the HTML tages into the script like: .. HTML HEAD BODY This is a map. ? $theURL=http://image.weather.com/web/radar/us_har_closeradar_medium_usen.jp g; if(!($fp=fopen($theURL, r))) { print(Could not open the URL.); exit; } $contents=fread($fp,100); print($contents); fclose($fp); ? /BODY /HTML .. I get the following: ״אJFIF 1034364214C 2!=,.$2I@LKG@FEPZsbPUmVEFd^emw{,N`-O}-s~|C;!!;|SFS ||ְ)¸ִ ִH !1AQaq#2'¡BR±ֱׁ3בנ$brס45CSs' DTt,cf²ֲִִׂ*!1AQaq2B'¡ׁנב ?ףz_Y×Mוm ·Lכ?צWֲ-O¨x¹xג'~~?צ|ס½s yט¢ׁ7ֳ¾?©ר¶®xbׂ°ף,ֿ}`ׂח!W-$g®Nױ³jI÷'׳ZTװׁ¶«SנD Qצ-yױ+Q_§L{M2I©װ3¡q£! etc. etc... I would like to insert additional text copy with this map - is this possible. Thanking all in advance. Tony Ritter -- 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] Re: =.jpg from another URL with PHP=
First of all you have to open this file as a binary e.g. fopen(myfile.jpg,rb); then you shound send the apropriate html headers to display the image e.g. header(Contet-type: image/jpeg); Anthony Ritter [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... The following script picks up single .jpg image of a doppler weather map from another URL: ... ? $theURL=http://image.weather.com/web/radar/us_har_closeradar_medium_usen.jp g; if(!($fp=fopen($theURL, r))) { print(Could not open the URL.); exit; } $contents=fread($fp,100); print($contents); fclose($fp); ? .. However, when I try to insert the HTML tages into the script like: .. HTML HEAD BODY This is a map. ? $theURL=http://image.weather.com/web/radar/us_har_closeradar_medium_usen.jp g; if(!($fp=fopen($theURL, r))) { print(Could not open the URL.); exit; } $contents=fread($fp,100); print($contents); fclose($fp); ? /BODY /HTML .. I get the following: ÿØÿàJFIFÿþ 1034364214ÿÛC 2!=,.$2I@LKG@FEPZsbPUmVEFd^emw{,N`-O}-s~|ÿÛC;!!;|SFS ||ÿÀ)¸ÿÄ ÿÄH!1AQaq#2'¡BR±ÁÑ3áð$brñ45CSs' DTt,cf²ÂÒÿÄÿÄ*!1AQaq2B'¡ÑðáÿÚ ?óz_YªMåm ·Lë?öWÂ-O¨x¹xâ'Ý~~?ö|ñ½s þyè¢Ñ7þ?©ø¶®xbÒÛ°ó,Ï}`Òç!W-ü$g®NÕ³jIº'×ZTÔѶ«SðD Qö-yÕ+Q_§L{M2Iý©Ô3¡q£! etc. etc... I would like to insert additional text copy with this map - is this possible. Thanking all in advance. Tony Ritter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql stored procedures
On Fri, 11 Oct 2002, electroteque wrote: -when is this being implemented ? Perhaps in version 4.1 of the MySQL server. Have a look near the bottom of this page... MySQL 4.1, the following development release http://www.mysql.com/products/mysql-4.0/index.html - - - --- -PHP General Mailing List (http://www.php.net/) -To unsubscribe, visit: http://www.php.net/unsub.php - ** John Huggins VANet [EMAIL PROTECTED] http://www.va.net/ ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] =.jpg from another URL with PHP=
Make another file that has your code in it and sends an image/jpeg header. Then insert the image like any other image: img src='yourfile.php' Hope you're not violating any copyrights... ---John Holmes... -Original Message- From: Anthony Ritter [mailto:[EMAIL PROTECTED]] Sent: Friday, October 11, 2002 11:53 AM To: [EMAIL PROTECTED] Subject: [PHP] =.jpg from another URL with PHP= The following script picks up single .jpg image of a doppler weather map from another URL: ... ? $theURL=http://image.weather.com/web/radar/us_har_closeradar_medium_use n. jp g; if(!($fp=fopen($theURL, r))) { print(Could not open the URL.); exit; } $contents=fread($fp,100); print($contents); fclose($fp); ? .. However, when I try to insert the HTML tages into the script like: .. HTML HEAD BODY This is a map. ? $theURL=http://image.weather.com/web/radar/us_har_closeradar_medium_use n. jp g; if(!($fp=fopen($theURL, r))) { print(Could not open the URL.); exit; } $contents=fread($fp,100); print($contents); fclose($fp); ? /BODY /HTML .. I get the following: ÿØÿàJFIFÿþ 1034364214ÿÛC 2!=,.$2I@LKG@FEPZsbPUmVEFd^emw{,N`-O}- s~|ÿÛC;!!;|SFS ||ÿÀ)¸ÿÄ ÿÄH !1AQaq#2'¡BR±ÁÑ3áð$brñ45CSs' DTt,cf²ÂÒÿÄÿÄ*!1AQaq2B'¡ÑðáÿÚ ?óz_YªMåm ·Lë?öWÂ-O¨x¹xâ'Ý~~?ö|ñ½s þyè¢Ñ7þ?©ø¶®xbÒÛ°ó,Ï}`Òç!W-ü$g®NÕ³jIº'×ZTÔѶ«SðD Qö-yÕ+Q_§L{M2Iý©Ô3¡q£! etc. etc... I would like to insert additional text copy with this map - is this possible. Thanking all in advance. Tony Ritter -- 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] Updating session variables values during session
Le 11/10/02 11:39, « Simon Taylor » [EMAIL PROTECTED] a écrit : Have you tried it like this? $_SESSION['sess_client'] = $ClientName; $_SESSION['sess_ref_clientFact'] = $ClientRef; Yes...but it doesn't work. If it still gives you the old vars I would look at where the $ClientName and $ClientRef are coming from. At first view, $ClientName and $ClientRef come from a link in the previous page: togglecl.php?ClientName=AClientRef=B Then $ClientName is different than session variable $sess_client . That's why I'm trying to put the $ClientName value to $sess_client session variable. Again, Thanks. --- Stéphane Pinel [EMAIL PROTECTED] iChat : [EMAIL PROTECTED] -Original Message- From: Stéphane Pinel [mailto:[EMAIL PROTECTED]] Sent: 11 October 2002 11:32 To: [EMAIL PROTECTED] Subject: Re: [PHP] Updating session variables values during session Same problem... Thanks. --- Stéphane Pinel [EMAIL PROTECTED] iChat : [EMAIL PROTECTED] Le 11/10/02 11:26, « Simon Taylor » [EMAIL PROTECTED] a écrit : Hiya, Try using $_SESSION['variablename'] To refer to session variables. Cheers Simon -Original Message- From: Stéphane Pinel [mailto:[EMAIL PROTECTED]] Sent: 11 October 2002 11:16 To: [EMAIL PROTECTED] Subject: [PHP] Updating session variables values during session Hi, PHP 4.1.X I'm trying, during the session time, to change the value of 2 session variables: My first attempt was simply like this: $sess_client = $theClient; $sess_ref_clientFact = $theRefClient; ...but following pages still get old values from the session variables. Then I tried this: session_unregister(sess_client); session_unregister(sess_ref_clientFact); $sess_client = $ClientName; $sess_ref_clientFact = $ClientRef; session_register(sess_client); session_register(sess_ref_clientFact); Same, following pages get old values from these 2 session variables... I would appreciate if I could get some help ? Thanks. --- Stéphane Pinel [EMAIL PROTECTED] iChat : [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] how to configure with ldap?
Hi Marco, Do I need to configure openldap to point to my Exchange server? If so, how? Jody -Original Message- From: Marco Tabini [mailto:[EMAIL PROTECTED]] Sent: Friday, October 11, 2002 9:38 AM To: Jody Cleveland Cc: Php-General (E-mail) Subject: Re: [PHP] how to configure with ldap? You need an LDAP package like OpenLDAP: http://www.openldap.org/ On Fri, 2002-10-11 at 10:37, Jody Cleveland wrote: Hello, I'm trying to configure php with ldap support. Looking at ./configure --help, I noticed that when I configure it, I need to put this in: ./configure --with-ldap=[dir] My question is, where is ldap? I'm running Redhat 7.3 with Apache 2. My ultimate goal is, I'm running Squirrelmail, and I want to connect to an Exchange global address list. Any help would be greatly appreciated. Thank you. -Jody Cleveland Winnefox Library System Computer Support Specialist [EMAIL PROTECTED] I thought I had an appetite for destruction, when all I really wanted was a club sandwich. - Homer - -- 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] mysql stored procedures
Hi, when is this being implemented ? Go and ask on the MySQL list. Version 5 was the last I heard. Cheers Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mysql stored procedures
it has 4.1 down here i'm upgrading to 4.04 Pro beta to check it out -Original Message- From: Jon Haworth [mailto:[EMAIL PROTECTED]] Sent: Saturday, October 12, 2002 1:09 AM To: 'electroteque'; [EMAIL PROTECTED] Subject: RE: [PHP] mysql stored procedures Hi, when is this being implemented ? Go and ask on the MySQL list. Version 5 was the last I heard. Cheers Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP in crontab job
Hello, I am having a problem at my ISP relating to execution of PHP commands from the crontab command. My ISP told me to have a look at the following URL, but despite following these instructions, the crontab job is not being executed. http://www.htmlcenter.com/tutorials/tutorials.cfm/155/PHP/ The crontab command line works from the shell prompt and I am able to execute the php command from the command line as well as the lynx command - no problems with that. Any ideas on how to get the crontab to execute the PHP commands? Regards, Sharat _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Win nt logon user how to ?
Thanks, im just wondering ... There are some ASP scripts in this same server and they get the variable perfetcly, the directories have the same config, i dont know whats wrong with this, maybe beacuse the gateway is CGI ??? Cordialmente Daniel Massón = Ingeniero de desarollo [EMAIL PROTECTED] www.imagine.com.co Tels: (57)(1) 2182064 - 6163218 Bogotá - Colombia - Soluciones web para internet e intranet - Asesoría y Soporte Técnico - Licenciamiento de Software -Mensaje original- De: John W. Holmes [mailto:[EMAIL PROTECTED]] Enviado el: viernes, 11 de octubre de 2002 9:29 Para: [EMAIL PROTECTED]; [EMAIL PROTECTED] Asunto: RE: [PHP] Win nt logon user how to ? It's there... $_ENV['LOGON_USER'] You may have to turn on some NT setting in IIS for that directory...if you're using IIS. ---John Holmes... -Original Message- From: Daniel Masson [mailto:[EMAIL PROTECTED]] Sent: Friday, October 11, 2002 9:55 AM To: [EMAIL PROTECTED] Subject: [PHP] Win nt logon user how to ? Hey everyone, id like to know how to get the logon user in my NT domain, i know that this can be done in ASP: Request.Servervariables(LOGON_USER), and gets the logged user of the client machine, i need to do that with PHP, ... im affraid this is not possible because, runing phpinfo() ... this variable is not on enviroment list. is it possible what i want to do ?? Thanks every1 !! Regards Daniel. -Mensaje original- De: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Enviado el: viernes, 11 de octubre de 2002 8:49 Para: Cole Tuininga CC: [EMAIL PROTECTED] Asunto: Re: [PHP] Raw HTTP data See your php.ini file: ; Always populate the $HTTP_RAW_POST_DATA variable. ;always_populate_raw_post_data = On On 11 Oct 2002, Cole Tuininga wrote: Quick question - is there an equivalent to QUERY_STRING for POSTs? I need the deata to essentially be in the same format as for GETs. If the answer is build it myself from $_POST, so be it. I was hoping there was a more elegant solution though. 8) -Cole Tuininga [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 -- 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] PHP in crontab job
On Fri, 11 Oct 2002, Sharat Hegde wrote: -Hello, - -I am having a problem at my ISP relating to execution of PHP commands from -the crontab command. My ISP told me to have a look at the following URL, but -despite following these instructions, the crontab job is not being executed. -http://www.htmlcenter.com/tutorials/tutorials.cfm/155/PHP/ - -The crontab command line works from the shell prompt and I am able to -execute the php command from the command line as well as the lynx command - -no problems with that. - -Any ideas on how to get the crontab to execute the PHP commands? Ensure you have specified the php program in the first line, I am sure you did this but here is how I do it. #!/usr/local/bin/php -q Make sure it is a fully specified pathname to the php executable. Crontab all too often does not have knowledge of your path environment so may get lost if you just say php. Make sure you really do have a php executable. This is what will compile if you do not specify any configuration directives during the ./configure process. Tell us how you do. - -Regards, -Sharat - - -_ -Join the worlds largest e-mail service with MSN Hotmail. -http://www.hotmail.com - - --- -PHP General Mailing List (http://www.php.net/) -To unsubscribe, visit: http://www.php.net/unsub.php - ** John Huggins VANet [EMAIL PROTECTED] http://www.va.net/ ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP in crontab job
try using full path in your cron job, like * * * * * /usr/local/bin/php /path/to/your/cron.php Sharat Hegde wrote: Hello, I am having a problem at my ISP relating to execution of PHP commands from the crontab command. My ISP told me to have a look at the following URL, but despite following these instructions, the crontab job is not being executed. http://www.htmlcenter.com/tutorials/tutorials.cfm/155/PHP/ The crontab command line works from the shell prompt and I am able to execute the php command from the command line as well as the lynx command - no problems with that. Any ideas on how to get the crontab to execute the PHP commands? Regards, Sharat _ Join the world?s largest e-mail service with MSN Hotmail. http://www.hotmail.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Multiple Form Submit Buttons
I have been digging through the documentation for a while, but I can't find the answer to this ... If I have a form with multiple submit buttons, how can I tell in PHP which button was clicked? -- JR -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Multiple Form Submit Buttons
Hi, Jonathan Rosenberg wrote: I have been digging through the documentation for a while, but I can't find the answer to this ... If I have a form with multiple submit buttons, how can I tell in PHP which button was clicked? just give them different names e.g. submit1, submit2 ... and then do what you want with an if clause and $_POST[submit1] on the action page. hope it helps Johannes -- JR -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Multiple Form Submit Buttons
[snip] I have been digging through the documentation for a while, but I can't find the answer to this ... If I have a form with multiple submit buttons, how can I tell in PHP which button was clicked? [/snip] Use a switch/case statement; switch($action) { case Save: // query to insert saved elements only $qsave = UPDATE tblArticle ; $qsave .= SET title = '$title', ; $qsave .= teaser = '$teaser', ; $qsave .= body = '$body' ; $qsave .= WHERE ID = '$aid' ; if(!($dbsave = mysql_query($qsave, $dbconnect))){ print(MySQL reports: . mysql_error() . br\n); exit(); } break; case Submit Article: //query to submit article $qsubmit = UPDATE tblArticle ; $qsubmit .= SET title = '$title', ; $qsubmit .= teaser = '$teaser', ; $qsubmit .= body = '$body', ; $qsubmit .= type = '$type' ; $qsubmit .= WHERE ID = '$aid' ; if(!($dbsubmit = mysql_query($qsubmit, $dbconnect))){ print(MySQL reports: . mysql_error() . br\n); exit(); } Each of the buttons is named action and based on the value the script processes accordingly. HTH! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] running slow on Win2k
More details on this... As I pay more attention to when it is sluggish or not, I notice that it seems to run fine on a typical page, with or without mySQL connections. But... the slowdown comes whenever I'm into my frame-based Admin, where 2-3 frames are typically loading at the same time. The same Admin structure written in another language is quick, but the PHP version seems slow. I hope this can spark some new suggestions... Thanks in advance... Peter At 11:19 AM 10/7/2002 -0400, you wrote: Hi everyone, I notice that my PHP runs really slow on Win2k Server w/ IIS 5, and even slower when accessing a mySQL database. It's a PIII-800 with 256MB RAM. It is otherwise a great machine, and fast. Any suggestions? Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php - - - - - - - - - - - - - - - - - - - - - Fourth Realm Solutions [EMAIL PROTECTED] http://www.fourthrealm.com Tel: 519-739-1652 - - - - - - - - - - - - - - - - - - - - - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Win nt logon user how to ?
Yeah, maybe. The version I've seen it work on all had PHP installed as a module in IIS. ---John Holmes... -Original Message- From: Daniel Masson [mailto:[EMAIL PROTECTED]] Sent: Friday, October 11, 2002 11:23 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] Win nt logon user how to ? Thanks, im just wondering ... There are some ASP scripts in this same server and they get the variable perfetcly, the directories have the same config, i dont know whats wrong with this, maybe beacuse the gateway is CGI ??? Cordialmente Daniel Massón = Ingeniero de desarollo [EMAIL PROTECTED] www.imagine.com.co Tels: (57)(1) 2182064 - 6163218 Bogotá - Colombia - Soluciones web para internet e intranet - Asesoría y Soporte Técnico - Licenciamiento de Software -Mensaje original- De: John W. Holmes [mailto:[EMAIL PROTECTED]] Enviado el: viernes, 11 de octubre de 2002 9:29 Para: [EMAIL PROTECTED]; [EMAIL PROTECTED] Asunto: RE: [PHP] Win nt logon user how to ? It's there... $_ENV['LOGON_USER'] You may have to turn on some NT setting in IIS for that directory...if you're using IIS. ---John Holmes... -Original Message- From: Daniel Masson [mailto:[EMAIL PROTECTED]] Sent: Friday, October 11, 2002 9:55 AM To: [EMAIL PROTECTED] Subject: [PHP] Win nt logon user how to ? Hey everyone, id like to know how to get the logon user in my NT domain, i know that this can be done in ASP: Request.Servervariables(LOGON_USER), and gets the logged user of the client machine, i need to do that with PHP, ... im affraid this is not possible because, runing phpinfo() ... this variable is not on enviroment list. is it possible what i want to do ?? Thanks every1 !! Regards Daniel. -Mensaje original- De: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Enviado el: viernes, 11 de octubre de 2002 8:49 Para: Cole Tuininga CC: [EMAIL PROTECTED] Asunto: Re: [PHP] Raw HTTP data See your php.ini file: ; Always populate the $HTTP_RAW_POST_DATA variable. ;always_populate_raw_post_data = On On 11 Oct 2002, Cole Tuininga wrote: Quick question - is there an equivalent to QUERY_STRING for POSTs? I need the deata to essentially be in the same format as for GETs. If the answer is build it myself from $_POST, so be it. I was hoping there was a more elegant solution though. 8) -Cole Tuininga [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 -- 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] Urgent help with Sessions and Cookies
I have a very, very little site for a client, I have to set a username and password to admin some data they publish, the problem is that in my server the cookies and sessions work excellent, but when I publish the same code in my client's server it doesn't work, the cookie is deleted immediately, and sessions dissapear too, I have other sections in the same server using cookies and session and work fine, but in this specific directory it doesn't work. Any idea??? Jadiel Flores - http://www.abargon.com [EMAIL PROTECTED] (52-55) 52-29-80-34 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Dreaded expecting `T_VARIABLE' or... Error -- long post
Hi Apologies if this question has been answered before and I can't find it. I have searched and although finding similar issues, I haven't been able to fix. I have a file that creates a search for and then is supposed to post to itself to retriev results. When I add the first function (the search form) everything seems OK. The page renders, the select menus are populated from my mySQL db. When I add the second function (the results). I start getting an error that refers to a line number in my initial function that was previously OK. I gather the error has something to do with syntax, but I can't find it. I'll show some examples and then detail the error. My intial code that creates the search form and works is: PHP: // Handles session initialization include(open_session.php); if(!isset($mainfile)) { include(mainfile.php); } // Global configuration data include(config.php); // Generates page header include (header.php); function sform() { include(config.php); $box_title = Search Form; $box_stuff = table width=\100%\trtd align=\left\; $box_stuff .= span class=\finePrint\Search hints can go here/span/td/tr/table; $box_stuff .= centerform action=\./search_users.php\ method=\post\ tabletrtd colspan=3 align=\left\h4Search for:/h4/td/tr trtd align=\left\font size=\-1\Company/font/tdtd align=\left\font size=\-1\Category/font/tdtd align=\left\font size=\-1\City/font/td/tr trtd align=\left\ valign=\top\input name=\company\/tdtd align=\left\ valign=\top\ select name=\cat\ size=\7\ multiple\n; $cat_result = mysql_query(select cat, catkey, cattext, count(cat) AS num_type FROM . $table_prefix.users LEFT JOIN . $table_prefix.users_cat ON cat=catkey GROUP BY cattext ORDER BY cattext); $categories = mysql_fetch_array($cat_result); if ($categories) { while ($c2 = mysql_fetch_array($cat_result)) { $num_type = $c2[num_type]; $box_stuff .= option name=\cat\ value=\$c2[catkey]\$c2[cattext] ( $num_type)/option; } } $box_stuff .= /select /td td align=\left\ valign=\top\ select name=\city\ size=\7\ multiple\n; $city_result = mysql_query(select city, count(city) AS num_type FROM . $table_prefix.users GROUP BY city ORDER BY city); $cities = mysql_fetch_array($city_result); if ($cities) { while ($c3 = mysql_fetch_array($city_result)) { $num_type3 = $c3[num_type]; $box_stuff .= option name=\city\ value=\$c3[city]\$c3[city] ($num _type3)/option; } } $box_stuff .= /select/td/tr\n; $box_stuff .= trtd align=\left\ colspan=3 align=\center\input type=\submit\ value=\Search\ Note: searching for all can produce a large page!/td/tr /tableinput type=\hidden\ name=\op\ value=\search\ / /form/center; thememainbox($box_title, $box_stuff); include(footer.php); } switch($op) { case search: search(); break; default: sform(); break; } Now, when I add anything for the function search() , even a simple message printed to the page such as: PHP: function search() { include('config.php'); global ; $box_title = Search Results; $box_stuff .= Results here; thememainbox($box_title, $box_stuff); include(footer.php); } I get the error: Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /Library/WebServer/Documents/phpwebsite/search_users.php on line 45 BTW... line 45 is part of the initial funtion that was working before: PHP: $cat_result = mysql_query(select cat, catkey, cattext, count(cat) AS num_type FROM . $table_prefix.users LEFT JOIN . $table_prefix.users_cat ON cat=catkey GROUP BY cattext ORDER BY cattext); $categories = mysql_fetch_array($cat_result); if ($categories) { while ($c2 = mysql_fetch_array($cat_result)) { $num_type = $c2[num_type]; $box_stuff .= option name=\cat\ value=\$c2[catkey]\$c2[cattext] ( $num_type)/option; } //THIS IS LINE 45 } I feel that if I can get past this, I can likely get my actual search to work. If you're curious, the following code is what I actually have in mind for the search function. I just can't get far enough along to even test it. I would surely appreciate any advice that anyone can extend.: PHP: function search() { include(config.php); global $company, $cat, $city, $catkey, $cattext, Order; $box_title = Search Results; if ($cat0) { $classreq=AND catkey=$cat; } if (!$Order) { $Order=company; } $query = SELECT company, city, cat, catkey, cattext
[PHP] Job offerings - Where?
Hello everybody, I started a web development firm with a friend of mine, and although we've had success in our endeavour, we're having a hard time trying to find qualified developers in our country. We specialize in developing custom web-based solutions using PHP and MySQL, ranging from Intranets for schools to e-commerce sites and portals. We're located in Mexico City, Mexico. As you may expect, we may not be able to match rates from people living in well developed countries. Now, on to the request. We're looking to outsource some of our work, so we need a PHP/MySQL developer. Additional positions/freelance opportunities may be available in the foreseeable future. Advanced HTML/DHTML and JavaScript knowledge is desired, though not required. Spanish language knowledge is also a plus. I'm the kind of developer that loves to do his stuff, and often forgets to eat or sleep when exploring new technologies, or developing interesting stuff. These kind of developers are what we're looking for (we don't ask you not to sleep, just to love what you do ). If you're interested please e-mail me your resumé along with your expectancies. Finally, if you think this is not the place for this kind of post, would you point me in the right direction? Be aware that we currently aren't able to use a specialized job site because of the posting rates. Best regards, Ivan Vega R. [EMAIL PROTECTED] CEO iSolutions de Mexico http://i-sol.biz/ PS: We expect to offer great grow opportunities. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Dreaded expecting `T_VARIABLE' or... Error -- long post
If you're going to use an array in a string, you have to surround it with braces. echo value is {$c2[something]} okay?; Or, exit out of the string: echo value is . $c2['something'] . okay?; If you use it outside of the string, you need the single/double quotes around the key so you don't get an undefined constant warning. That looks like your problem. ---John Holmes... -Original Message- From: Verdon Vaillancourt [mailto:[EMAIL PROTECTED]] Sent: Friday, October 11, 2002 12:34 PM To: PHP-General Subject: [PHP] Dreaded expecting `T_VARIABLE' or... Error -- long post Hi Apologies if this question has been answered before and I can't find it. I have searched and although finding similar issues, I haven't been able to fix. I have a file that creates a search for and then is supposed to post to itself to retriev results. When I add the first function (the search form) everything seems OK. The page renders, the select menus are populated from my mySQL db. When I add the second function (the results). I start getting an error that refers to a line number in my initial function that was previously OK. I gather the error has something to do with syntax, but I can't find it. I'll show some examples and then detail the error. My intial code that creates the search form and works is: PHP: // Handles session initialization include(open_session.php); if(!isset($mainfile)) { include(mainfile.php); } // Global configuration data include(config.php); // Generates page header include (header.php); function sform() { include(config.php); $box_title = Search Form; $box_stuff = table width=\100%\trtd align=\left\; $box_stuff .= span class=\finePrint\Search hints can go here/span/td/tr/table; $box_stuff .= centerform action=\./search_users.php\ method=\post\ tabletrtd colspan=3 align=\left\h4Search for:/h4/td/tr trtd align=\left\font size=\-1\Company/font/tdtd align=\left\font size=\-1\Category/font/tdtd align=\left\font size=\-1\City/font/td/tr trtd align=\left\ valign=\top\input name=\company\/tdtd align=\left\ valign=\top\ select name=\cat\ size=\7\ multiple\n; $cat_result = mysql_query(select cat, catkey, cattext, count(cat) AS num_type FROM . $table_prefix.users LEFT JOIN . $table_prefix.users_cat ON cat=catkey GROUP BY cattext ORDER BY cattext); $categories = mysql_fetch_array($cat_result); if ($categories) { while ($c2 = mysql_fetch_array($cat_result)) { $num_type = $c2[num_type]; $box_stuff .= option name=\cat\ value=\$c2[catkey]\$c2[cattex t] ( $num_type)/option; } } $box_stuff .= /select /td td align=\left\ valign=\top\ select name=\city\ size=\7\ multiple\n; $city_result = mysql_query(select city, count(city) AS num_type FROM . $table_prefix.users GROUP BY city ORDER BY city); $cities = mysql_fetch_array($city_result); if ($cities) { while ($c3 = mysql_fetch_array($city_result)) { $num_type3 = $c3[num_type]; $box_stuff .= option name=\city\ value=\$c3[city]\$c3[city] ( $n um _type3)/option; } } $box_stuff .= /select/td/tr\n; $box_stuff .= trtd align=\left\ colspan=3 align=\center\input type=\submit\ value=\Search\ Note: searching for all can produce a large page!/td/tr /tableinput type=\hidden\ name=\op\ value=\search\ / /form/center; thememainbox($box_title, $box_stuff); include(footer.php); } switch($op) { case search: search(); break; default: sform(); break; } Now, when I add anything for the function search() , even a simple message printed to the page such as: PHP: function search() { include('config.php'); global ; $box_title = Search Results; $box_stuff .= Results here; thememainbox($box_title, $box_stuff); include(footer.php); } I get the error: Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /Library/WebServer/Documents/phpwebsite/search_users.php on line 45 BTW... line 45 is part of the initial funtion that was working before: PHP: $cat_result = mysql_query(select cat, catkey, cattext, count(cat) AS num_type FROM . $table_prefix.users LEFT JOIN . $table_prefix.users_cat ON cat=catkey GROUP BY cattext ORDER BY cattext); $categories = mysql_fetch_array($cat_result); if ($categories) { while ($c2 = mysql_fetch_array($cat_result)) { $num_type = $c2[num_type]; $box_stuff .= option
[PHP] Re: Multiple Form Submit Buttons
Suppose that form's buttons are input type= submit name=submit value=Edit input type= submit name=submit value=Delete input type= submit name=submit value=New ? switch ($submit){ case Edit: ...; break; case Delete: ...; break; case New: ...; break; default: ...; } ? That's all Jonathan Rosenberg [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have been digging through the documentation for a while, but I can't find the answer to this ... If I have a form with multiple submit buttons, how can I tell in PHP which button was clicked? -- JR -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Dreaded expecting `T_VARIABLE' or... Error -- long post
the line global ; should be global $some_variable; or delete it Verdon Vaillancourt wrote: Hi Apologies if this question has been answered before and I can't find it. I have searched and although finding similar issues, I haven't been able to fix. I have a file that creates a search for and then is supposed to post to itself to retriev results. When I add the first function (the search form) everything seems OK. The page renders, the select menus are populated from my mySQL db. When I add the second function (the results). I start getting an error that refers to a line number in my initial function that was previously OK. I gather the error has something to do with syntax, but I can't find it. I'll show some examples and then detail the error. My intial code that creates the search form and works is: PHP: // Handles session initialization include(open_session.php); if(!isset($mainfile)) { include(mainfile.php); } // Global configuration data include(config.php); // Generates page header include (header.php); function sform() { include(config.php); $box_title = Search Form; $box_stuff = table width=\100%\trtd align=\left\; $box_stuff .= span class=\finePrint\Search hints can go here/span/td/tr/table; $box_stuff .= centerform action=\./search_users.php\ method=\post\ tabletrtd colspan=3 align=\left\h4Search for:/h4/td/tr trtd align=\left\font size=\-1\Company/font/tdtd align=\left\font size=\-1\Category/font/tdtd align=\left\font size=\-1\City/font/td/tr trtd align=\left\ valign=\top\input name=\company\/tdtd align=\left\ valign=\top\ select name=\cat\ size=\7\ multiple\n; $cat_result = mysql_query(select cat, catkey, cattext, count(cat) AS num_type FROM . $table_prefix.users LEFT JOIN . $table_prefix.users_cat ON cat=catkey GROUP BY cattext ORDER BY cattext); $categories = mysql_fetch_array($cat_result); if ($categories) { while ($c2 = mysql_fetch_array($cat_result)) { $num_type = $c2[num_type]; $box_stuff .= option name=\cat\ value=\$c2[catkey]\$c2[cattext] ( $num_type)/option; } } $box_stuff .= /select /td td align=\left\ valign=\top\ select name=\city\ size=\7\ multiple\n; $city_result = mysql_query(select city, count(city) AS num_type FROM . $table_prefix.users GROUP BY city ORDER BY city); $cities = mysql_fetch_array($city_result); if ($cities) { while ($c3 = mysql_fetch_array($city_result)) { $num_type3 = $c3[num_type]; $box_stuff .= option name=\city\ value=\$c3[city]\$c3[city] ($num _type3)/option; } } $box_stuff .= /select/td/tr\n; $box_stuff .= trtd align=\left\ colspan=3 align=\center\input type=\submit\ value=\Search\ Note: searching for all can produce a large page!/td/tr /tableinput type=\hidden\ name=\op\ value=\search\ / /form/center; thememainbox($box_title, $box_stuff); include(footer.php); } switch($op) { case search: search(); break; default: sform(); break; } Now, when I add anything for the function search() , even a simple message printed to the page such as: PHP: function search() { include('config.php'); global ; $box_title = Search Results; $box_stuff .= Results here; thememainbox($box_title, $box_stuff); include(footer.php); } I get the error: Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /Library/WebServer/Documents/phpwebsite/search_users.php on line 45 BTW... line 45 is part of the initial funtion that was working before: PHP: $cat_result = mysql_query(select cat, catkey, cattext, count(cat) AS num_type FROM . $table_prefix.users LEFT JOIN . $table_prefix.users_cat ON cat=catkey GROUP BY cattext ORDER BY cattext); $categories = mysql_fetch_array($cat_result); if ($categories) { while ($c2 = mysql_fetch_array($cat_result)) { $num_type = $c2[num_type]; $box_stuff .= option name=\cat\ value=\$c2[catkey]\$c2[cattext] ( $num_type)/option; } //THIS IS LINE 45 } I feel that if I can get past this, I can likely get my actual search to work. If you're curious, the following code is what I actually have in mind for the search function. I just can't get far enough along to even test it. I would surely appreciate any advice that anyone can extend.: PHP: function search() { include(config.php); global $company, $cat, $city, $catkey, $cattext, Order; $box_title = Search Results; if ($cat0) { $classreq=AND catkey=$cat; } if
[PHP] Uploading in stages
Hi, I am trying to upload a big file on dialup to my server but it keeps timing out. Is there a way I can split it and then piece it together online like winzip but with tar? Randum Ian [EMAIL PROTECTED] DJ / Reviewer / Webmaster, DancePortal (UK) Limited DancePortal.co.uk - Global dance music media
[PHP] Trouble wirh in a string
Hello, I have a small problem a string I have for example : $myvar= hello my friend; When I display the content of $myvar with echo I see hell and not the rest. I suppose the problem come from the how solve the problem ? Bye -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] fgetcsv or other
Hi, I need to read from a csv file (with quotes). I use the example from the manual, and it does spit it out how I want it, but I need to access one of the fields and pass that data to something else. So it's like this, I need my csv file to be displayed in a table, but the last column will contain an image generate using data from the first column. Does anyone have any examples? I've been searching the net, but haven't really found much. Thanks! Bryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Trouble wirh in a string
Try $myvar = 'hell#60;o my friend'; or $myvar = htmlentities(hello my friend); -Brian -Original Message- From: Christian Ista [mailto:[EMAIL PROTECTED]] Sent: Friday, October 11, 2002 12:56 PM To: [EMAIL PROTECTED] Subject: [PHP] Trouble wirh in a string Hello, I have a small problem a string I have for example : $myvar= hello my friend; When I display the content of $myvar with echo I see hell and not the rest. I suppose the problem come from the how solve the problem ? Bye -- 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] Trouble wirh in a string
I have a small problem a string I have for example : $myvar= hello my friend; When I display the content of $myvar with echo I see hell and not the rest. I suppose the problem come from the how solve the problem ? You're putting that string in HTML and it's being evaluated by the browser. It sees the as the beginning of a tag, so it's looking for a tag to follow. Tags that the browser doesn't recognize are just not shown. Try to put foo in your HTML and it won't show up (may depend on browser). What you want to do is use an HTML entity for the , and other characters. would be lt;, is gt;. You can also use the htmlentities() or htmlspecialchars() function in PHP to do the conversion for you automatically. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Interesting results with date()
Hey all, I am having some interesting, but confusing results when I use date(). What is confusing me is that when I use date with only the first argument, I get some interesting results with the timezone. i.e. ?php echo date(r T); ? You would expect to see something like this: Fri, 11 Oct 2002 13:24:53 -0500 Eastern Standard Time But instead everything is off by an hour while still keeping the current timezone: Fri, 11 Oct 2002 13:24:53 -0400 Eastern Standard Time (notice the -0400 instead of -0500) Is there something I can do to fix this problem, a setting in the php.ini file perhaps. The machine that is running the server is set to the proper timezone (-0500 EST). I am running W2K, IIS5 with PHP 4.2.3. Thanks, _ / Joshua Minnie\ ++---+ | Advantage Computer Services, LLC | | Senior Project Manager | | [EMAIL PROTECTED]| || | Tel : 269.276.9690 | | Fax : 269.342.8750 | ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP in crontab job
Hello John, Thanks for the help. I was able to solve this. Thanks Marek for your help too in giving the same solution. The problem was with the crontab command not having the full path to php. Silly that a command line on the shell script should work but crontab is unable to find the same path. Thanks again, Sharat From: John S. Huggins [EMAIL PROTECTED] To: Sharat Hegde [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: [PHP] PHP in crontab job Date: Fri, 11 Oct 2002 15:35:41 + (UTC) On Fri, 11 Oct 2002, Sharat Hegde wrote: -Hello, - -I am having a problem at my ISP relating to execution of PHP commands from -the crontab command. My ISP told me to have a look at the following URL, but -despite following these instructions, the crontab job is not being executed. -http://www.htmlcenter.com/tutorials/tutorials.cfm/155/PHP/ - -The crontab command line works from the shell prompt and I am able to -execute the php command from the command line as well as the lynx command - -no problems with that. - -Any ideas on how to get the crontab to execute the PHP commands? Ensure you have specified the php program in the first line, I am sure you did this but here is how I do it. #!/usr/local/bin/php -q Make sure it is a fully specified pathname to the php executable. Crontab all too often does not have knowledge of your path environment so may get lost if you just say php. Make sure you really do have a php executable. This is what will compile if you do not specify any configuration directives during the ./configure process. Tell us how you do. - -Regards, -Sharat - - -_ -Join the worlds largest e-mail service with MSN Hotmail. -http://www.hotmail.com - - --- -PHP General Mailing List (http://www.php.net/) -To unsubscribe, visit: http://www.php.net/unsub.php - ** John Huggins VANet [EMAIL PROTECTED] http://www.va.net/ ** _ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP in crontab job
The problem is crontab doesn't heve enviroment, there is no $PATH, $USER ... Sharat Hegde wrote: Hello John, Thanks for the help. I was able to solve this. Thanks Marek for your help too in giving the same solution. The problem was with the crontab command not having the full path to php. Silly that a command line on the shell script should work but crontab is unable to find the same path. Thanks again, Sharat From: John S. Huggins [EMAIL PROTECTED] To: Sharat Hegde [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: [PHP] PHP in crontab job Date: Fri, 11 Oct 2002 15:35:41 + (UTC) On Fri, 11 Oct 2002, Sharat Hegde wrote: -Hello, - -I am having a problem at my ISP relating to execution of PHP commands from -the crontab command. My ISP told me to have a look at the following URL, but -despite following these instructions, the crontab job is not being executed. -http://www.htmlcenter.com/tutorials/tutorials.cfm/155/PHP/ - -The crontab command line works from the shell prompt and I am able to -execute the php command from the command line as well as the lynx command - -no problems with that. - -Any ideas on how to get the crontab to execute the PHP commands? Ensure you have specified the php program in the first line, I am sure you did this but here is how I do it. #!/usr/local/bin/php -q Make sure it is a fully specified pathname to the php executable. Crontab all too often does not have knowledge of your path environment so may get lost if you just say php. Make sure you really do have a php executable. This is what will compile if you do not specify any configuration directives during the ./configure process. Tell us how you do. - -Regards, -Sharat - - -_ -Join the world?s largest e-mail service with MSN Hotmail. -http://www.hotmail.com - - --- -PHP General Mailing List (http://www.php.net/) -To unsubscribe, visit: http://www.php.net/unsub.php - ** John Huggins VANet [EMAIL PROTECTED] http://www.va.net/ ** _ Join the world?s largest e-mail service with MSN Hotmail. http://www.hotmail.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] how to configure with ldap?
Hello, Well, I installed openldap, and it tests out good. Now, I want to configure php to work with it. My question now is, where exactly is ldap located? I tried a few paths: ./configure --with-mysql --with-apxs2=/www/bin/apxs --with-ldap=/usr/local/etc/openldap ./configure --with-mysql --with-apxs2=/www/bin/apxs --with-ldap=/usr/local/libexec And, I get this error: checking for LDAP support... yes configure: error: Cannot find ldap.h So, I searched for ldap.h and used that path: ./configure --with-mysql --with-apxs2=/www/bin/apxs --with-ldap=/usr/include Same thing, cannot find. Any ideas? Thanks! Jody -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] sometimes I get session write failure
I've searched this mailing list and couldn't find anybody with a similar problem. I am seeing periodic session write failures on my server. I get the classic PHP Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/home/t-shirtking.com/session_data) in Unknown on line 0 Of course I checked the permissions. Everything is fine there. Garbage collection runs well. The directory doesn't get real big. The thing I couldn't find on this mailing list is that sessions work. I can't duplicate the message. So I only sometimes get the error. I added the session write close command in an include file that gets appended to every page. Why in the world would I only sometimes get this error? Thanks, Josh Bauguss [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] sometimes I get session write failure
You just have one server, right? Is there any kind of load-balancing going on that uses several servers? ---John Holmes... -Original Message- From: Josh Bauguss [mailto:[EMAIL PROTECTED]] Sent: Friday, October 11, 2002 2:04 PM To: [EMAIL PROTECTED] Subject: [PHP] sometimes I get session write failure I've searched this mailing list and couldn't find anybody with a similar problem. I am seeing periodic session write failures on my server. I get the classic PHP Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/home/t-shirtking.com/session_data) in Unknown on line 0 Of course I checked the permissions. Everything is fine there. Garbage collection runs well. The directory doesn't get real big. The thing I couldn't find on this mailing list is that sessions work. I can't duplicate the message. So I only sometimes get the error. I added the session write close command in an include file that gets appended to every page. Why in the world would I only sometimes get this error? Thanks, Josh Bauguss [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
[PHP] Converting audio files and display/play in browser
Anyone got any ideas as to how I can solve the following in PHP? I want to be able to select a file, and convert it from sox format to MP3 or WAV, and then play it in the requestors browser? Can this be achieved in an easy way? The problem I have is to be able to call up lame/sox or similar tools on the linux web server, and once the newly converted file is available, throw it at the requesting browser as a file download? Regards, Thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Converting audio files and display/play in browser
Why don't you call your converter then pipe out to a file... the then send headers for that type of file and readfile to the browser.. Timothy Hitchens (HITCHO) [EMAIL PROTECTED] HITCHO has Spoken! -Original Message- From: Thomas Nilsen [mailto:[EMAIL PROTECTED]] Sent: Saturday, 12 October 2002 4:22 AM To: [EMAIL PROTECTED] Subject: [PHP] Converting audio files and display/play in browser Anyone got any ideas as to how I can solve the following in PHP? I want to be able to select a file, and convert it from sox format to MP3 or WAV, and then play it in the requestors browser? Can this be achieved in an easy way? The problem I have is to be able to call up lame/sox or similar tools on the linux web server, and once the newly converted file is available, throw it at the requesting browser as a file download? Regards, Thomas -- 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] Converting audio files and display/play in browser
Anyone got any ideas as to how I can solve the following in PHP? I want to be able to select a file, and convert it from sox format to MP3 or WAV, and then play it in the requestors browser? Can this be achieved in an easy way? The problem I have is to be able to call up lame/sox or similar tools on the linux web server, and once the newly converted file is available, throw it at the requesting browser as a file download? Use exec or backticks to execute your program that does the conversion and writes the new file, then send the mp3,wav, etc headers and send the data from the newly created file. Depending on how long the conversion takes, you may want to redirect the user to the file after a certain amount of time and let the browser handle it. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Login Info not being remembered
After putting up the latest version of PHP (4.2.3 I think) I've had nothin but problems with my scripts. One of those problems is the script not remembering my login information. Has anyone else experienced this, or know anything about this problem? Thanks, -Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Login Info not being remembered
I'm sure it's all related to the register_global and error_reporting settings in php.ini... Enjoy. ---John Holmes... -Original Message- From: Justoman [mailto:[EMAIL PROTECTED]] Sent: Friday, October 11, 2002 3:17 PM To: [EMAIL PROTECTED] Subject: [PHP] Login Info not being remembered After putting up the latest version of PHP (4.2.3 I think) I've had nothin but problems with my scripts. One of those problems is the script not remembering my login information. Has anyone else experienced this, or know anything about this problem? Thanks, -Justin -- 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] Converting audio files and display/play in browser
It's the part sending the header back to the browser with the correct info I'm not sure about. I can handle the conversion of the audio file, but I'm not sure how to get the browser to read the converted file once it's ready. Timothy J Hitchens [EMAIL PROTECTED] wrote in message 005301c27159$483dc170$0500a8c0@BAMBINO">news:005301c27159$483dc170$0500a8c0@BAMBINO... Why don't you call your converter then pipe out to a file... the then send headers for that type of file and readfile to the browser.. Timothy Hitchens (HITCHO) [EMAIL PROTECTED] HITCHO has Spoken! -Original Message- From: Thomas Nilsen [mailto:[EMAIL PROTECTED]] Sent: Saturday, 12 October 2002 4:22 AM To: [EMAIL PROTECTED] Subject: [PHP] Converting audio files and display/play in browser Anyone got any ideas as to how I can solve the following in PHP? I want to be able to select a file, and convert it from sox format to MP3 or WAV, and then play it in the requestors browser? Can this be achieved in an easy way? The problem I have is to be able to call up lame/sox or similar tools on the linux web server, and once the newly converted file is available, throw it at the requesting browser as a file download? Regards, Thomas -- 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] Converting audio files and display/play in browser
Easy... ?php header('Content-Type: audio/mpeg'); readfile('xxx.mp3'); ? What this does it sends a header then the file is read from disk to standard out. Please note you may need to get your include/paths correct... Timothy Hitchens (HITCHO) [EMAIL PROTECTED] HITCHO has Spoken! -Original Message- From: Thomas Nilsen [mailto:[EMAIL PROTECTED]] Sent: Saturday, 12 October 2002 6:05 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Converting audio files and display/play in browser It's the part sending the header back to the browser with the correct info I'm not sure about. I can handle the conversion of the audio file, but I'm not sure how to get the browser to read the converted file once it's ready. Timothy J Hitchens [EMAIL PROTECTED] wrote in message 005301c27159$483dc170$0500a8c0@BAMBINO">news:005301c27159$483dc170$0500a8c0@BAMBINO... Why don't you call your converter then pipe out to a file... the then send headers for that type of file and readfile to the browser.. Timothy Hitchens (HITCHO) [EMAIL PROTECTED] HITCHO has Spoken! -Original Message- From: Thomas Nilsen [mailto:[EMAIL PROTECTED]] Sent: Saturday, 12 October 2002 4:22 AM To: [EMAIL PROTECTED] Subject: [PHP] Converting audio files and display/play in browser Anyone got any ideas as to how I can solve the following in PHP? I want to be able to select a file, and convert it from sox format to MP3 or WAV, and then play it in the requestors browser? Can this be achieved in an easy way? The problem I have is to be able to call up lame/sox or similar tools on the linux web server, and once the newly converted file is available, throw it at the requesting browser as a file download? Regards, Thomas -- 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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Converting audio files and display/play in browser
Excellent! Works like a charm. Thanks for your speedy help Timothy. Regards, Thomas Timothy J Hitchens [EMAIL PROTECTED] wrote in message 005f01c27162$0804c820$0500a8c0@BAMBINO">news:005f01c27162$0804c820$0500a8c0@BAMBINO... Easy... ?php header('Content-Type: audio/mpeg'); readfile('xxx.mp3'); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] upgrade problems
This week we upgraded our solaris 8 server using apache 1.3.27 from php 4.1.2 to 4.2.3, and it seemed to install fine. The strange thing is that most all php web pages appear, but the code does not work. For example, our support section heavily uses php, and nothing at all was changed on it, yet clicking any link takes you right back to the main page instead of the appropriate support page. Also, a customer that has a php page calling a mysql database suddently quit working. These all worked fine before the upgrade, and like I say, none of the web pages have been changed at all. I didn't find anything in the archives. Has anybody else experienced this? I assumed 4.1.2 to 4.2.3 should be a seamless upgrade for all web pages, but apparently not. I can't find anything helpful in the log files either. Suggestions? Aaron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Converting audio files and display/play in browser
You are welcome... anytime.. Also you can add an attachment dispos... if you want and it will get them to save to disk instead.. Timothy Hitchens (HITCHO) [EMAIL PROTECTED] HITCHO has Spoken! -Original Message- From: Thomas Nilsen [mailto:[EMAIL PROTECTED]] Sent: Saturday, 12 October 2002 6:31 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Converting audio files and display/play in browser Excellent! Works like a charm. Thanks for your speedy help Timothy. Regards, Thomas Timothy J Hitchens [EMAIL PROTECTED] wrote in message 005f01c27162$0804c820$0500a8c0@BAMBINO">news:005f01c27162$0804c820$0500a8c0@BAMBINO... Easy... ?php header('Content-Type: audio/mpeg'); readfile('xxx.mp3'); ? -- 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] upgrade problems
This should be a FAQ! I would say it would point to register globals being turned off in php.ini for the newer versions of php. check this pages for more information: http://www.php.net/manual/en/security.registerglobals.php -Brad abw wrote: This week we upgraded our solaris 8 server using apache 1.3.27 from php 4.1.2 to 4.2.3, and it seemed to install fine. The strange thing is that most all php web pages appear, but the code does not work. For example, our support section heavily uses php, and nothing at all was changed on it, yet clicking any link takes you right back to the main page instead of the appropriate support page. Also, a customer that has a php page calling a mysql database suddently quit working. These all worked fine before the upgrade, and like I say, none of the web pages have been changed at all. I didn't find anything in the archives. Has anybody else experienced this? I assumed 4.1.2 to 4.2.3 should be a seamless upgrade for all web pages, but apparently not. I can't find anything helpful in the log files either. Suggestions? Aaron -- 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