RE: [PHP] About Speech
> -Original Message- > From: Ing. Raúl González Rodríguez [mailto:[EMAIL PROTECTED]] > > I need to know if it's possible generate a wav, mid or mp3 file > from php. You could write a custom interface to _generate_ the file (MIDI is _very_ different than the other two types; are you sure you understand exactly what you intend to do?), but where is the input coming from to begin with? The currently available tools to make audio files are already pretty sophisticated, and trying to replicate them in PHP would probably not be the best use of your time. Sending the files doesn't require any changes to anything. Just create an ANCHOR link to the file and it'll be sent on its merry way when the user clicks on the link. Mark C. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] case statement?
On Thu, 19 Dec 2002, Max Clark wrote: > Hi- > > I was wondering if php had a case function? > > Instead of building a large if/elseif/else block I would like to do a case > $page in (list). The documentation and search capabilities at http://www.php.net are your frientd. It would behhove you to at least read the basic language statemants. mark C. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mass Mailing
In almost all cases the number of mail messages/time unit sent is a function of bandwidth, not CPU; my Pentium II 250Mhz machine saturates a 768K SDSL line no problem at all. Mark C. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Sessions and AOL
> From: Gerard Samuel [mailto:[EMAIL PROTECTED] > > I was wondering, if for example, an AOL user browses your site that uses > php sessions, > do the session ids change when they hop ip addresses? No. Sessions are not (or should not be!) tied to IP numbers. > Im looking for a better way to counteract AOL's ip jumping. Why? It's not just AOL! Mark C. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Perl > PHP
The first line of the script had the magic incantation: #!/usr/local/bin/perl (or something very similar) which makes the leading 'perl' superfluous. PHP scripts can be made into "self executing" scripts in a similar fashion if the 1st line looks like: #!/path/to/the/php/command/line/executable This only applies to Unix and the executable bit must be set. Mark C. > -Original Message- > From: Jurre Thiel [mailto:[EMAIL PROTECTED]] > Sorry, i didn't think of that. I still think exec('perl > perl.pl'); does the > job, not exec('perl.pl'); >> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mysql_num_rows() error
And which database are you using?? (hint - mysql_select_db() might be a good idea ...) > -Original Message- > From: Phil Powell [mailto:[EMAIL PROTECTED]] > > Anyone know why this is happening? I have mySQL on Win2000 > Server with IIS > > and PHP: >> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] sending array
You know, if you actually looked at the link you've created you'd find your answer ... > -Original Message- > From: D.M. van Gladbach [mailto:[EMAIL PROTECTED]] > > There not much in there because I strip it for testing. > > test1.php > $org["index-A"]=1701; > $org["index-B"]=1209; > > print "test2\n"; > ?> > > test2.php > while (list ($key, $val) = each($org)) > { > print "key=".$key."val".$val."\n"; > } > ?> > >> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] GD jpg thumbnail - ugly discollored
make sure you use: ImageCreateTrueColor() to create the thumbnail image and ImageCopyResampled() when you copy the image. Mark C. > -Original Message- > From: Victor [mailto:[EMAIL PROTECTED]] > I have a script that takes uploaded images (jpeg only) and makes > proportionate thumbnails etc, and saves them in jpeg (.jpg) format again > (default compression of %75 I think) anyway, the thumbnails are UGLY. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Masive mail Advice
It is incredibly easy to write a short little php script that edits a template and submits it directly to qmail-inject; if you're using qmail already php mail()/sendmail is just a wrapper to qmail-inject. I use qmail-inject directly because it allows me to write my own VERP and process bounces against the database. A little Pentium 200 running Linux, MySQL, php4, and qmail with 100 queues can more than saturate a T1 line when used for mailing that way! 800 messages isn't close to being "massive" - that many can be sent in way less than a minute (depending on size, of course - a T1 isn't that big anymore ...). > -Original Message- > From: Maciek Ruckgaber Bielecki [mailto:[EMAIL PROTECTED]] > I'll start to write an application which will be used to send large > amounts of mail to users in a DB. All these mails to be sent shoul be > personalized. Since i understand, and please correct me if im wrong, the > mail() function is not a good option for this purpose. (the amount of mail > to be sent may vary from 50 to 800 messages). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Using MySQL user variables in PHP
> -Original Message- > From: Jason Wong [mailto:[EMAIL PROTECTED]] > > 2. $tempQuery1 = " > > SELECT @most_recent:=MAX(date) from presenters"; > > $tempQuery2 = " > > SELECT @recent_presenter:=presenter FROM presenters WHERE > > date=@most_recent; > > $presenterQuery = " > > SELECT date_format(p.date, '%d/%m/%y') AS > readable_date, p.theme, > > p.presenter, > > c.itemNo, c.composer, c.composition, c.note > > FROM presenters p, compositions c > > WHERE p.date = c.date AND p.presenter = @recent_presenter > > ORDER BY p.date DESC"; > > You're not doing anything with $tempQuery1 & $tempQuery2 this is complete > nonsense ;-) Not true - this is using MySQL's variable approach. The '@' represents a user variable per connection in MySQL. See http://www.mysql.com/doc/en/Variables.html for more information. mark C. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Masive mail Advice
> -Original Message- > From: Manuel Lemos [mailto:[EMAIL PROTECTED]] > That number of messages is small and with today's servers you can queue > that volume of personalized is less than a minute. Your problems will > start as you enter in the tens of thousands of recipients, not because > qmail won't handle it but because that many message in the queue will > prevent the incoming messages to arrive in time. ??? There are two separate processes here - the outgoing connections to the remote SMTP servers and the incoming connections to your own SMTP servers. Tuning qmail involves setting the number of outgoing queues so as not to overload your communications line. I _personally_ have sent more than 300,000 messages with no "resting" mechanism - doing that means you haven't tuned your qmail system for the load. Mark C. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Masive mail Advice
> -Original Message- > From: Manuel Lemos [mailto:[EMAIL PROTECTED]] > On 01/26/2003 08:22 PM, Mark Charette wrote: > >>-Original Message- > >>From: Manuel Lemos [mailto:[EMAIL PROTECTED]] > >>That number of messages is small and with today's servers you can queue > >>that volume of personalized is less than a minute. Your problems will > >>start as you enter in the tens of thousands of recipients, not because > >>qmail won't handle it but because that many message in the queue will > >>prevent the incoming messages to arrive in time. > > ??? > > > > There are two separate processes here - the outgoing connections to the > > remote SMTP servers and the incoming connections to your own > SMTP servers. > > Tuning qmail involves setting the number of outgoing queues so as not to > > overload your communications line. > > > > I _personally_ have sent more than 300,000 messages with no "resting" > > mechanism - doing that means you haven't tuned your qmail system for the > > load. > > The problem does not have to do with SMTP but with qmail local queue > handling. If you send messages to many users and the bounce address is > set to some address handled by the same server, you will be starting to > get bounces to the same machine and thus the same qmail server. The way > to solve this is to put the bounce address point to some address that is > handled by a different server or even to nowhere. Using a spare server > for the actual delivery reduces that problem too. It has everything to do with qmail local queue handling. I have had no problems when both the VERP address and sending machine are the same, providing I tune the qmail queues to a reasonable number. VERP is very useful to handle bounces, no separate machines are required, you just have to think about your bandwidth. The way to solve this is use your intelligence. A stop/start sceme as you originally proposed is a kludge at best to an easily managable problem. Mark C. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Associative vs normal arrays
All arrays in PHP are associative; we sometimes use integers to refer to them, but the order of the array internally is not necessarily the same as the integers; indeed, any array can have "holes" in them. So the question is moot. "There are no different indexed and associative array types in PHP, there is only one array type, which can both contain integer and string indices." - http://www.php.net/manual/en/language.types.array.php Mark C. > > Is there a way to determine if an array is associative or not? Maybe = > > something similar to the is_array() function ?? > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] URGENT HELP NEEDED - After Upgrade to MySQL 4.0.1.2
> -Original Message- > If it worked before then obviously the path is fine, > unless something has changed. Obviously something changed if it worked on 2 other servers. Check all your logs. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql query manipulation vs php results manipulation
On Wed, 19 Feb 2003, Larry Brown wrote: > How do you determine whether or not it is faster/more efficient to run a > complicated query or to run multiple simple queries and join / manipulate > the results with PHP? By empirical methods ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Switch Statement || Case with multiple values?
Check the manual: switch($foo) { case "fee": case "fie": ... break; case "fo": ... case "fum": ... break; } fee & fie are tied together, fie will also run the code presented by fum ... Even more flexible than comma delimited values ... > -Original Message- > From: CF High [mailto:[EMAIL PROTECTED] > Sent: Sunday, March 02, 2003 9:41 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Switch Statement || Case with multiple values? > > > Hey all. > > In Cold Fusion I was able to do the following: > > > > > Do Stuff > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Switch Statement || Case with multiple values?
Duh. make that "fo" will also run the code presented by "fum" ... > -Original Message- > From: Mark Charette [mailto:[EMAIL PROTECTED] > > switch($foo) > { > case "fee": > case "fie": > ... > break; > case "fo": > ... > case "fum": > ... > break; > } > > fee & fie are tied together, fie will also run the code presented > by fum ... > > Even more flexible than comma delimited values ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Red Hat 9, Apache 2, and PHP
Apache 2.x.x IS a production quality server, just not with PHP. Works great with Tomcat, mod_jk2, Struts, etc. - Original Message - From: "Shena Delian O'Brien" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, July 03, 2003 8:04 PM Subject: Re: [PHP] Re: Red Hat 9, Apache 2, and PHP > Does anyone know why Red Hat would switch to Apache 2.x.x when it is > well known that 2.x.x is NOT a production version? > > Brad Pauly wrote: > > Just thought I would share my experience with RH9. I have been running > > Apache 1.3.27 and PHP 4.3.2 on RH9 for a couple weeks (since 4.3.2 came > > out anyway, and 4.3.1 prior to that) on a test server. All are compiled > > from source. The only problem I have had was a bug with the version of > > mogrify that is bundled with RH9. That was fixed by 'upgrading' to an > > older version. Other than that it has been fine. > > > > Brad > > > > > > > > > > > -- > 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] I'm really getting annoyed with PHP
> From: Beauford.2005 [mailto:[EMAIL PROTECTED] > It's obvious though that PHP can not handle it. Since thousands of people and websites use the header() function without your problems ... It's obvious at this point you've got a bug and can't figure out how to fix it, even though you've been given more than enough clues. Not a PHP problem. Enough with the whiny Subject: already. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Help with Apache
> -Original Message- > From: Corey Edwards @ Dreamstar Computer Software > > I finally set up an Apache Web Server. I didn't realize you needed that to > run php until now. That's only true if you need to serve Web pages; php runs fine from the command line ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] $_SERVER[REMOTE_ADDR]
> -Original Message- > From: thomas [mailto:[EMAIL PROTECTED] > > $_SERVER["REMOTE_ADDR"] > > If the user have a proxy the real IP is: > $_SERVER["HTTP_X_FORWARDED_FOR"] Maybe. If it's set and is set correctly. Even then: How are 127.0.0.1 or 192.168.1.1 going to help you, supposing that those values or other address are returned? Mark C. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How do I replace browser history using Header()?
> -Original Message- > From: Neil Freeman [mailto:[EMAIL PROTECTED] > Is there any way that I can do a PHP Header() statement that does the > equivalent of JavaScript's > window.self.location.replace("http://www.mysite.com/mypage.php";)? No. JavaScript (if turned on) is your only choice. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] RTRIM() - Won't accept 2nd Param
>From the man page: Note: The second parameter was added in PHP 4.1.0 -Original Message- From: Monty [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 27, 2002 7:28 PM To: [EMAIL PROTECTED] Subject: [PHP] RTRIM() - Won't accept 2nd Param When I issue this command to remove any commas at end of string: $query = rtrim($query, ","); PHP give me an error saying "Wrong parameter count for rtrim()". How can this be? The online manual shows rtrim can accept two parameters. Shouldn't this work? I have PHP 4.0.6 installed on the server. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Save ability... Duplicate DB entries
Or, of course, a selection of fields as a unique key. The insert will fail if there is an exisiting record with that key; you can interrogate the error and report on the exisitence of a duplicate record. The select/lock method is used for update purposes ('select for update' et al.), not to keep duplicate records out of the DB. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] why do i get this error please tell me?
Ahem. Why not check out the MySQL docs for reserved words (they _are_ right there ...): http://www.mysql.com/doc/en/Reserved_words.html PHP Docs are for PHP. MySQL Docs are for MySQL. PHP != MySQL. -Original Message- From: victor [mailto:[EMAIL PROTECTED]] Sent: Saturday, August 31, 2002 1:35 PM To: 'Chris Knipe'; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] why do i get this error please tell me? Yep, figured it just now, thanks anyway, ahhh.. You'd thing they put reserved names right besides the damn mysql command in the manual. Alas it shall not be so. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] RE: [PHP-DB] RE: [PHP] why do i get this error please tell me?
Then check the MySQL manual using the URL I posted! PHP doesn't care about the hundred or so reserved MySQL words. MySQL does. Perhaps you're confusing the two. Please check what I said: PHP != MySQL The documentation for each is separate. PHP has "convenience" functions for talking to a MySQL database. It does not parse or check your SQL statements for correctness - it just passes them along and lets the MySQL library do its work. PHP does this for a great number of products: cURL, GD functions, various ODBC interfaces, etc. It's up to you to read the support docs for those products to use them fully. The docs for PHP don't need to be cluttered with deep and detailed explanations of every supported interface, not would I expect them to. -Original Message- From: victor [mailto:[EMAIL PROTECTED]] I meant besides the UPDATE or SELECT or any filed that those words might interfere with... - Victor > www.argilent.com -Original Message- From: Mark Charette [mailto:[EMAIL PROTECTED]] hem. Why not check out the MySQL docs for reserved words (they _are_ right there ...): http://www.mysql.com/doc/en/Reserved_words.html PHP Docs are for PHP. MySQL Docs are for MySQL. PHP != MySQL. -Original Message- From: victor [mailto:[EMAIL PROTECTED]] Sent: Saturday, August 31, 2002 1:35 PM To: 'Chris Knipe'; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] why do i get this error please tell me? Yep, figured it just now, thanks anyway, ahhh.. You'd thing they put reserved names right besides the damn mysql command in the manual. Alas it shall not be so. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] UPDATE Query
No, only one db at a time may be updated. The "where" clauses can contain multiple db. -Original Message- From: Sascha Braun [mailto:[EMAIL PROTECTED]] Sent: Saturday, August 31, 2002 7:04 PM To: PHP Mailingliste Subject: [PHP] UPDATE Query I want to know if its possible to update two databases with one query? Please look at this example: UPDATE news_db, newsreferenz_db SET news_db.head = 'DFB Pokalasfasf', news_db.text = 'alkfhaslk fl akshf lakshf lkahs lfk aslf yxvyxvyxvyxv', newsreferenz_db.kat_id = '3' WHERE news_db.id = '6' AND newsreferenz_db.news_id = '6' it doesn't work. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] REGISTER_SHUTDOWN_FUNCTION() BUG -- Please Fix.
Hey, Jason, since you really need this BUG fixed, and the PHP developers would welcome good, well-documented, and tested code ... Why not devote some of your precious time to helping them along? If _you_ write, document, and test the code, and then pass the code to the development team you'll stand a much better chance of getting it included in a future version - along with solving your current problem _and_ getting your name in the list of contributors. Mark C. -Original Message- From: John Holmes [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 17, 2002 8:12 AM To: 'Jason Caldwell'; [EMAIL PROTECTED] Subject: RE: [PHP] REGISTER_SHUTDOWN_FUNCTION() BUG -- Please Fix. I'm not sure if that's a "bug", it's more of a feature request. ---John Holmes... > -Original Message- > From: Jason Caldwell [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, September 17, 2002 3:24 AM > To: [EMAIL PROTECTED] > Subject: [PHP] REGISTER_SHUTDOWN_FUNCTION() BUG -- Please Fix. > > I'm posting this here to give this BUG attention. It's a pretty serious > one > for Win32 users, and it would be great if it could be fixed *very > quickly* -- I posted this in the Bug Reports on PHP.net on May 27th, 2002. > > Here's the link: http://bugs.php.net/bug.php?id=17461 > > I need to use this function to perform certain *required* tasks on a > Timeout -- however (and please read the Bug Report, before replying) the > Timeout functionality of this function DOES NOT work on Win32 builds. > > If your a C/C++ / PHP contributor and have a moment to look into this -- > it > would be great -- I would love to see this fixed in release 4.2.4 !!! > > Thanks > Jason > > > > -- > 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: Image resolution and php
Images don't have a resolution per se; display devices have a resolution. Images (the formats you're talking about, anyway) are measured in pixel width and height. The height and width in any units other than pixels of course necessitates conversion - for an easy example, a 300x300 image on a 1200x1200dpi printer will be exactly one quarter the size of the same image printed on a 300x300 dpi printer. -Original Message- From: Jome [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 18, 2002 8:11 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: Image resolution and php > I need to get resolution information (dpi) from any > image of jpg, gif or png formats. > > It would be sufficient to obtain pixel and inches > dimension of such images and calculate resolution by > simply dividing but I haven't found any function that > gets effective dimensions in inches. http://www.php.net/manual/en/function.getimagesize.php I'm sligthly confused about what you're looking for, but the above URL *could* be something. Jome -- 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] return the amount of records in a mysql databace
select count(*) as n from ... where ... -Original Message- From: Philip J. Newman [mailto:[EMAIL PROTECTED]] Can someone point me in the right direction to find out how i can return the amount of records in a mysql databace ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mail problem with more than 1k users
I've had no problems using qmail-inject and MySQL to send over 100K emails in a day. I doubt it's an MySQL problem unless you've done something drastically wrong; perhaps you're bandwidth limited? -Original Message- From: Research and Development [mailto:[EMAIL PROTECTED]] Hello. I wrote a PHP script that will pull records from a database (emails) and then mail something to the emails in the result set. Pretty simple and it worked. Now that the database has over 1 thousand records I began to experience performance problems. I figured that my problem was that Sendmail does not process emails that have more than x number of emails. So I re-designed the script to send emails in parts. 500 emails per header. But after the database reached more than 3,000 records the emailing did not work at all. Sendmail refused to send to any of the emails in the database result set. Any thoughts? -- 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] Encryption Question
Just how are you going to decrypt it? Password encryption is ordinarily one-way - you have no choice. You have to compare encrypted passwords. -Original Message- From: Tom Ray [mailto:[EMAIL PROTECTED]] SI want to compare a password to a encrypted password stored in my mySQL database using password('password'), what's the best way to compare the two? Encrypted the password sent by the user and compare or pull the password from the database based on username, decrypt it and then compare? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] getting ip address of the user.
This comes up so very often ... The answer is - you may be able to get _an_ IP number for a machine that accesssed your site. It is meaningless as a means of identification: Proxies use 1 IP for a number of users. -Original Message- From: Anil Garg [mailto:[EMAIL PROTECTED]] hi, Can i get the ip-address of the machines who accessed my website?? Plz give the pointer that on what lines shall i start for doing so. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Predefined variables not set?
In this context it makes no difference whether or not " or ' is used (" allows variable substitution within the quoted string, ' does not) since there's no substitution taking place. Insert a phpinfo() in the top of your code to see all the variables that _are_ being set. -Original Message- From: Oscar F [mailto:[EMAIL PROTECTED]] I'm pretty sure it's not $_SERVER["QUERY_STRING"], it's $_SERVER['QUERY_STRING'] (note the ' instead of "). HTH. Oscar F.- Miles wrote: > When trying to get $_SERVER["QUERY_STRING"] I am getting 'Undefined index QUERY_STRING' error > > If there is a query string, e.g. www.site.com/index.php?hello_world then it IS defined. So it seems that PHP is complaining about undefined variables, rather than just outputting nothing. > > How can I fix this? I've had no problems until i reinstalled php today... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How many is too many?
I'm storing somewhere over 100,000 separate articles on my site, using ht://dig to index them. They're organized as //MM/nn. No performance problems to speak of on a pretty popular non-commercial site (2-3 pageviews/sec, 24x7) whether they just browse through the directories or or use ht://dig to retrieve the text. -Original Message- From: Monty [mailto:monty3@;hotmail.com] Sent: Friday, October 25, 2002 12:40 AM To: [EMAIL PROTECTED] Subject: [PHP] How many is too many? This is a more general server question: I know that having a large number of files in one folder can slow down a web server, but, how many would it take for this to be a problem? Wondering if I should store all articles for a content site in one big 'articles' folder with each article having it's own folder within (/articles/article_id/), or if I should organize them by year then article name (/articles/2002/article_id). The site will only produce a few hundred articles a year. I'd like the keep the file structure shallow and simple if possible, but, if it could potentially slow the server down by putting so many folder in one I'll split them up more. Thanks! -- 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 and images
There are times, especially in highly dynamic situations, where backing up and restoring of images and metadata from a database or for security reasons, where storing the images within a database makes real sense. Separating the physical storage areas for the two types of data (metadata & images) and keeping the image data from being buffered into the database server's memory space can make storage within the database almost as efficient as file storage. Mark C. Mark C. -Original Message- From: Rick Emery [mailto:remery@;emeryloftus.com] In order to speed-up queries, it is suggested that you DO NOT store images in the database. Rather, store the images in files and store file names in the database. - Original Message - From: "John Meyer" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 29, 2002 9:32 PM Subject: [PHP] MySQL and images Assuming that I have to for some unknown reason, are there any articles on storing images in the database and retrieving them? -- 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: File Random Access
-Original Message- From: David Robley [mailto:robleyd@;paradise.net.nz] I'm going to stick my neck out here - as I understand it, this is not an omission in php, rather it is a restriction of the underlying OS/file system. To the best of my knowledge, neither the FAT based system of M$DOS or e2fs under *nix will allow random access _to the contents of a specific file_ without the need to read/rewrite the entire file. Is there in fact any file system that allows this? All of the file systems I have ever worked with over the last 25 years allow random read/writes (via calls similar to fseek() ); however, random writes involve fixed-length blocks if you want to re-write in place. PHPs fseek() will allow you to do random read/writes on fixed length blocks just like the underlying C call. Variable length blocks (say, those ending in random new lines) are by definition non-deterministic; therefore re-writes in place are impossible without OS help in inter-block jumps/relinks and the subsequent waste of file space. The Pick O/S from a long time back allowed something like this if I remember right (Pick Systems is now RainingData markets a high-end database) . Mark C. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: XSLT Sablotron output
There's nothing to "solve"; without the complete XML doc & the XSL stylesheet, there's no way to know if in fact everything is being parsed as expected. I don't know if it's CDATA, xsl:text, a strip-spaces directive, etc. And ... I'd expect anyone using XML & XSL to double check and re-reference all their books before posting a problem (Sablotron is pretty well tested; I don't think it's the problem ...) Then, after exhausting my brain and building the smallest possible set of code that reproduces my problem ... I'd submit it to a XML list. Of couse, the sample script to me looks perfectly valid, since HTML isn't required to have newlines and of course newlines within text blocks aren't preserved anyway ... Mark C. -Original Message- From: Daniele Baroncelli [mailto:ubimmc93@;libero.it] Sent: Sunday, November 03, 2002 2:48 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: XSLT Sablotron output No one replied yet, so I suppose no one was able to solve this. By the way, is there anyone that actually experienced the same situation? "Daniele Baroncelli" <[EMAIL PROTECTED]> wrote in message news:20021102212518.34728.qmail@;pb1.pair.com... > Hi guys, > > I have typed a simple script to test the Sablotron module recently > installed. > I found out that the HTML is output all in one line, without newlines, which > is very annoying. > Anyone can tell me if this is a bug of the module, or I have to specify > something somewhere? > > Here is the script on the server, where you can watch the result: > http://www.rockit.it/redazione/sixth/prova.php > > Below you can find my PHP, XML and XSL files. > > > Cheers > > Daniele > > > == > > PHP file > -- > > > > // Allocate a new XSLT processor > $xh = xslt_create(); > > // call the XSLT processor directly > xslt_process($xh, 'prova.xml', 'prova.xsl', 'prova.html'); > > // output the result > readfile('prova.html'); > > xslt_free($xh); > > ?> > > == > > XML file > --- > > > > John Doe > 94, Main Street, Nowheresville 16463, XY > 738 2838 > [EMAIL PROTECTED] > http://www.unknown_and_unsung.com/ > > > === > > XSL file > - > > > > xmlns:xsl="http://www.w3.org/1999/XSL/Transform";> > > > > > > > > Contact information for > > Mailing address: > > > Phone: > > > Email address: > > > Web site URL: > > > > > > > > > > == > > -- 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] Wildcard search
> -Original Message- > From: Mako Shark [mailto:phpman2000@;yahoo.com] > do I have to do a > readdir() and read the filename of every file until I find an > HTML or until all files have been read. This is what the shell expression supplied by Marco Tabini actually does; doing it in PHP (readdir(), etc.) eliminates the exec of the shell process and is faster (readdir() is a thin veneer on the readdir system call) and the problem of portability if you want to use this on both Unix and Windows. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Fractions
You gotta be kidding me, no? When did you learn decimals? I think I started by 3rd or 4th grade ... -Original Message- From: Stephen [mailto:[EMAIL PROTECTED]] Sent: Saturday, November 16, 2002 1:36 PM To: PHP List Subject: [PHP] Fractions I'm wanting to make a simple PHP script that converts Celsius to Farenheit, Farenheit to Celsius, Farenheit to Kelvin, and Celsius to Kelvin. I have the formula but it requires fractions. How can I use frations in PHP to multiply or divide? If you can't, how could I substitute doing so? 5/9 (F - 32) is the forumla to get Celsius to Farenheit if you need it. Thanks, Stephen Craton http://www.melchior.us "Life is a gift from God. Wasting it is like destroying a gift you got from the person you love most." -- http://www.melchior.us
RE: [PHP] Fractions
Well, seeing as you're in the 7th or 8th grade (at least according to your Website) - my sincere apologies ... Just use 5.0/9.0 in your formula. Mark C. -Original Message- From: Stephen [mailto:[EMAIL PROTECTED]] Sent: Saturday, November 16, 2002 1:36 PM To: PHP List Subject: [PHP] Fractions I'm wanting to make a simple PHP script that converts Celsius to Farenheit, Farenheit to Celsius, Farenheit to Kelvin, and Celsius to Kelvin. I have the formula but it requires fractions. How can I use frations in PHP to multiply or divide? If you can't, how could I substitute doing so? 5/9 (F - 32) is the forumla to get Celsius to Farenheit if you need it. Thanks, Stephen Craton http://www.melchior.us "Life is a gift from God. Wasting it is like destroying a gift you got from the person you love most." -- http://www.melchior.us
Re: [PHP] Unlink
On Wed, 20 Nov 2002, JohnMeyer wrote: > Does unlink work with wildcards e.g unlink("somefile*.*"); No. unlink() is a thin veneer on the system unlink() call. Wildcard expansion like you have it is done by a shell glob function. You would need to replicate what the shell does - use it as a regular expression in an opendir()/readdir()/delete file on regexp match/closedir() set of operations. Or, preferably, look up the glob() function in PHP and use the return values in an unlink() call. Much better than spawning a shell process ;^) -- "... but while you're marching in the rain, doesn't the *bell* on the sax fill with water?" - jerry "Yes, Jerry ... the bell would fill with water. (un)Fortunately, this does not affect the way a sax sounds." - Fred (postings on the Clarinet BBoard) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Ip address as 32bit int?
> From: Noodle Snacks [mailto:[EMAIL PROTECTED]] > the reason I ask is because it is alot more efficient space wise > in a db to > be storing a 32bit number rather that a char or varchar field. While it is more efficient space-wise (4 bytes vs. 12 bytes), the price of the additional disk storage needed for storing them is trivial (unless you have a billions). Make sure you consider the addtional costs of maintenance, too, when you store data in a "non-human" format. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] output_buffering
What exactly are you measuring and how? -Original Message- From: James Drabb [mailto:[EMAIL PROTECTED]] Sent: Sunday, June 23, 2002 9:09 AM To: php-general Subject: [PHP] output_buffering I was running some speed tests on a page that returns 1000 records from a db and spits them into a table. I have output_buffering Off in my php.ini file because of the statement below: ; Output buffering allows you to send header lines (including cookies) even ; after you send body content, at the price of slowing PHP's output layer a ; bit. You can enable output buffering during runtime by calling the output ; buffering functions. You can also enable output buffering for all files by ; setting this directive to On. If you wish to limit the size of the buffer ; to a certain size - you can use a maximum number of bytes instead of 'On', as ; a value for this directive (ex., output_buffering=4096). output_buffering = Off However the page takes 7 seconds to load with output_buffering = Off and 1 second with output_buffering = On! What is up with that? Have most of you found output buffering faster? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] is there a function like javascript's window.open in PHP
This is a common question, related to the lack of understanding of client/server architectures I believe. PHP is all server side - a browser is all client side. Servers can send data only to the browser, nothing else. The server can inquire and gather data from text files and databases, but it will format the data into a particular protocol (HTTP most often) and send it to the browser. The data may even include lines of text from a language that the browser understands, like JavaScript. Or it might be XML data and the corresponding XSLT instructions. But ... it can't affect the browser directly. Only the embedded instructions that the browser understands can actually affect anything on the browser. The browser looks at the stream of data provided by the server and decides on-the-fly what to do with it. If it sees JavaScript instructions, it may decide to interpret them and do some particular action. Or it may decide that it doesn't want to play with JavaScript today and just ignore them. It may see the XML/XSLT and decide to do something - but it doesn't have to. This, of couse, is the bane of Web programmers everywhere. What does the browser understand, and what does it do with the data. PHP allows us to write programs eaisy on the server to make some decisions on what to send a browser, but it cannot act directly on the browser. We must depend (somehow) on the browser interpreting what we tell it and then acting in a particular way. -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Sunday, June 23, 2002 12:17 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] is there a function like javascript's window.open in PHP On Sunday 23 June 2002 07:21, Burak Delice wrote: > hi, > > I wonder that is there a PHP function like window.open() into Javascript? No. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* One thought driven home is better than three left on base. */ -- 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] Javascript to PHP?
Or setting a cookie in JavaScript. It will be transmitted on the next page request. -Original Message- From: John Holmes [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 29, 2002 3:30 PM To: 'Jed Verity'; [EMAIL PROTECTED] Subject: RE: [PHP] Javascript to PHP? Not possible. You must refresh the page to send something back to PHP. Only workaround is using a hidden frame or layer and refreshing that... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Problem with SQL query
LIMIT was not included in the SQL92 SQL standards and very few vendors implement all of SQL99; the use of ANSI standards to promote "portable" programs has always been beset by this kind of problems. Mark Charette Former ANSI X3H3.1 member -Original Message- From: Alberto Serra [mailto:[EMAIL PROTECTED]] SELECT extract('year', time), extract('month', time) count(*) as monthly_views FROM visitors group by extract('year', time), extract('month', time) order by monthly_view desc limit 1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] HTTPS vs. HTTP ?
Or, even easier and "no tech", I get a low-paying job in some convenience store, and make copies of the credit card receipts. Game Over. Using a credit card anywhere involves trust. Period. End of story. -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED]] How about an even *easier* scenario: I find a web-site that is storing the credit-card numbers in their database, and rip them off. Game Over. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP]Erik Hegreberg (Moderator)
Of course not on an open list that's crossed to the newsgroups ... However, there's a "deny" list on ezmlm that the moderator can add addresses to. As a manager of a number of ezmlm mailing lists I've done that - which really infuriates the "spammers" - they still get the posts until they unsubscribe (or ask me to help them) but they can't post in the meantime. There are times, especially when someone's changed email addresses but has forwarding, or whose mail system doesn't believe that any email address should be longer than (some number of characters), when it is difficult or impossible for someone to unsubscribe. In that case the list owner gets involved. > Isn't every e-mail address > verified anywayz before it goes to the mailing list? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Too Advanced? Re: Cookies & Hidden Image
> From: Nicole [mailto:[EMAIL PROTECTED] > > Thanks. The cookie sets fine using the redirect. The problem is accessing > the cookie when the script is called via the image tag. If the script is > called directly, the cookie is accessible. Images have their own connection (which is why you can see a page before an image is downloaded, and why pages resize if width & height are not set on the image). Cookie values via images are not "passed to parent", though judicious use of javascript _may_ be able to retrieve the value - I've not seen it done, but it _might_ be possible, though I doubt it. It's not a "PHP" thing, it's an HTML protocol thing ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] null character - file related function
On Mon, 6 Oct 2003, Martin Straka wrote: > > Is somewhere documented that everything after NULL (0x00 %00) character > is ignored for example in functions include, fopen etc? Interestingly, no, it's not documented in the manual (at least I couldn't find any official documentation on NULL terminated strings as a definition when I searched through the official docs). However, strings in PHP follow the C convention of being NULL terminated. Mark C. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] null character - file related function
On 6 Oct 2003, Robert Cummings wrote: > > Strings in PHP are binary safe and thus do not rely on null temrination. You are, of course, right (just a brainfart on my part ...). There are a number of functions that depend on null termination of strings; handing a string with embedded nulls in it to those functions may result in "interesting" things happening Mark C. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] strpos() act funny when searching for "]]>"....
On Fri, 21 Nov 2003, Scott Fletcher wrote: > Well, I seem to have problem understanding the word, 'offset' to the > strpos() function because it is a bad choice of word strpos() and the word "offset" used with it is probably older than you ... :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Session Variables Not Being Set For Certain Browsers
> -Original Message- > From: Andy Higgins [mailto:[EMAIL PROTECTED] > Can anyone confirm whether > AOL (or any > other ISPs for that matter) change a user's IP address as seen by the web > server (for eample through a proxy) within the same session? It's been pointed out and confirmed many, many times here. An IP is not useful for authentication in the general case (you may have a specific case on an intranet, but major players like AOL put everything through load balancing proxies that change from request to request). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Ver 5.0 Questions ...
If you read through the archives you'll find it isn't so much that PHP is the problem per se, but many of the PHP modules. If you use the multi-threading model of Apache 2 (the raison d'etre for using Apache 2 for most people) then all the modules have to be thread-safe, and that's a non-trivial matter for many of the module authors and maintainers. If you use the pre-fork model of Apache 2 then you essentially have the "regular" version of Apache. > Don't expect it to be solved next few days.. There are some wierd > problems I > think... Kinda like you don't really know what could cause them or > something... > > -- > // DvDmanDT > MSN: dvdmandt¤hotmail.com > Mail: dvdmandt¤telia.com > "Thomas Svenson" <[EMAIL PROTECTED]> skrev i meddelandet > news:[EMAIL PROTECTED] > > Hi Chris, > > > > Chris TenHarmsel wrote: > > > Well, we're interested in stability. I figured since php4 had > > > been out for a while in "stable" form, it would be more stable > > > than php5. Is this the case, or is there a good feeling that > > > php5 will be considered "stable" in the next couple months? > > > > I've been playing around with PHP5 since before beta 2 and haven't > stumbled > > on any problems so far when coding using the new features > (mainly the new > > oop model). > > > > However, I tried running a few PHP applications but they simply did not > work > > properly in PHP5. It's not a big problem for me since I'm going to build > my > > new project from scratch and have decided that, even if it > isn't released > > yet, I'm going for PHP5 due to the new features in it. > > > > One thing that does disturb me a bit though is that very little is to be > > found about if the recommendation not to use Apache2 with PHP4 > still seems > > to apply for PHP5 as well. It's a bit confusing since Apache2 > been stable > > for a long time. I am expecting that the issues not recommending it for > PHP4 > > will be solved for PHP5. > > > > /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] what PHP really needs
> -Original Message- > From: Hamid Hossain [mailto:[EMAIL PROTECTED] > As a ColdFusion Certified Developer I can say: You are right! > > In CF you can fire a sql statment and store its result in a > variable which > is not going to be removed from the server's memory after > responding to the > user. That variable will be available for sometime declared by > you when you > created the query. Perhaps you weren't aware that every modern database does the same thing (or can if you turn it on): the results of query sets are cached at the db server and are available if the same query is used without involving a file read. If any update changes any of the underlying result sets then the corresponding cache entry is invalidated and the momeory released for another cache entry. Let the db server handle query/cache consistency ... why put yet another server in the way that will have to be triggered by the underlying db to clear ITS cache? Mark C, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] what PHP really needs
On Sat, 24 Jan 2004, Marlon Moyer wrote: > Like Hamid Said, if the ColdFusion server has the query already in memory. > It doesn't need to send traffic to another server to get the information > again. Most systems I've worked on have the db and the web server on > different areas of a firewall, so you're going through a lot of excess steps > if you're hitting the db every time for something that won't change. You missed the point. If you have to connect to a server anyway, whjat's the difference between going to a cached queryset on a CF server or going to a cached queryset on a db server? It's a wire transaction in any case. > Plus, you have a granular control on what is being cached. The sql server > will only cache what it has room for. So if enough queries are run against > it, the original query won't be cached anymore regardless. And this won;t happen on the CF server when you run out of memory to cache a transaction? Yeah, right. Does CF have to query the db server to stay in sync? Of course it does. Now there's multiple transactions to coordinate & synchronize. > But I think the original question was about a tree that took a long time to > create, and application variables would be a plus in this situation. That remains to be seen. Getting the data in an optimal way can be a non-trivial operation. -- "Half the people know what they're talking about, and the other half are writing code." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can we make .exe programs with php?
On Sat, 24 Jan 2004, pehepe php wrote: > Can we make .exe programs with php? for example we can do it with delphi, > vbasic.but can we do with php? No (and .exe is a convention that isn't universal, btw). PHP is an interpreted language, not a compiled one. -- "Half the people know what they're talking about, and the other half are writing code." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Threading & PHP
On Sat, 24 Jan 2004, Galen wrote: > Hi, > > This may be completely crazy, but let me tell you what I want to do: > thread PHP. Can you set processor affinity on your system? If so, you can "pseudo thread" by assigning processes to different CPUs; e.g., run your main Webserver on one processor and a slave Web server or helper processes assigned to the other processor. This is a very common way of dividing tasks on multi-processor systems where code-rewrites to make things thread-safe are not cost effective. -- "Half the people know what they're talking about, and the other half are writing code." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] what PHP really needs
f stock, etc. > > [Marlon Moyer] > This isn't a situation that you would use a cached query. You > would only use > it when something doesn't change that often, or you have control > of when it > changes. Hell, I have stuff like that - it's called generate an include file with a cron job. Trivial. All my web pages include it. The variables are all set by an outside process. Re CF server & Web server. It's "on the wire" (using sockets). You're going up & down the stacks just as if you're using a wire except for the last 2 levels (ip & above stacks are used). And only the smallest shops would consider having a web server and CF (or db) server on the same box. No scalability or easy recovery from failure. Heck, I run a tiny little ISP out of my basement, and have all major services segregated onto different machinery with 1000baseT private net between the different boxes (db & search services, DNS resolvers, web servers, mail server, and backup array). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Threading & PHP
On Sun, 25 Jan 2004, Galen wrote: > I'm not 100% sure what you're talking about, to be honest. I think I'm > in the second half of the people... :) > > As far as I can tell, Apache runs as many processes (httpd) as needed > on my local machine. As far as my server, I haven't seen this behavior, > but I admit I don't sit there watching top all the time unless > something is broken, and even then, I usually can't fix whatever is > broken. I don't have root or other special access to the server - it's > a shared machine, pretty lightly loaded most of the time. I do have SSH > access. Processor affinity isn't nearly as complex as threading; it means to set up a system whereby certain processes run on a particular processor set; e.g., all httpd processes run on CPU set 1, all image processing tasks run on CPU set 2. That way CPU set 1 can continue servicing httpd requests without being bogged down by the CPU intensive tasks running on CPU set 2. If pset is available as a command on your multiple CPU machine then you can probably set up processor affinity. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PostgreSQL vs InterBase
From: "Shaun Thomas" <[EMAIL PROTECTED]> > The point about Oracle is that it *lets* you do all of those > optimizations, and if you're good at it, it will outperform almost any > other database you throw at it. Trust me on this one. I'm sorry, I can't trust you very much on this. Having worked as a high-end Oracle tuner on a 1 terabyte database for 3 years and having recently been involved in a new DB2 app, I find DB2 to be as good if not better than Oracle in very many important ways. Not even including a cost that's about 1/4 of a highly discounted Oracle cost model for an identical HA envioronment. Mark C. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] how do i get a variable type? - not that simple
Personally I'd perform a query into MySQL and get what _it_ thinks the values should be ... before doing anything else. It allows generality in your error checking code. Look at mysql_list_fields() et al. mark C. - Original Message - From: "phpman" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, March 18, 2001 12:44 PM Subject: [PHP] how do i get a variable type? - not that simple > No guys. that doesn't work. Take this code for example... > > $a="3"; > echo(gettype($a)); > > this returns string > i need to find it as an integer or real or float for the sql. which by the > way is MySQL. > > thank you for responding, but I already know that gettype and all the other > is_* don't work for this. > > > > ""phpman"" <[EMAIL PROTECTED]> wrote in message > 99132e$ol8$[EMAIL PROTECTED]">news:99132e$ol8$[EMAIL PROTECTED]... > > hello all, > > > > let's say i have this: > > $a="varone=hello world|vartwo=2.44|varthree=100|"; > > > > now i do this: > > > > $b=explode('|',$a); > > $z=count($b); > > for ($x=0;$x<$z;$x++) { > > $tmp=explode('=',$b[$x]); > > > > > > and i want to find out if $tmp[1] is a string or an integer (that's > really > > all I need to determine so i can put > > together an SQL statement that puts single quotes around strings and none > > around integers). Obviously > > i won't know at design time all of the variables and their values. Thank > > you. > > > > -dave > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Searching for array keys
> > What's the best way of finding out if a specific array key is in an array? > > I have an associative array which *may* look like > > (car =>saab, house => mansion, countyW=> A) but can equally well look like > > > > (boat => daycruiser, house => flat, county => B). > > > > I want to find out if the key "car" is in the array and do something if it > try something like > > if (in_array("keyb",array_keys(array("key"=>"a","keyb"=>"b") { > ... > } Maybe I'm being dense here, but won't a simple "isset()" work (using the KISS principle)? $ary=array("aa"=>"yy","bb"=>"zz"); $key="aa"; if (isset($ary[$key])) print "$key set\n"; else print "$key not set\n"; $key="bb"; if (isset($ary[$key])) print "$key set\n"; else print "$key not set\n"; $key="cc"; if (isset($ary[$key])) print "$key set\n"; else print "$key not set\n" returns aa set bb set cc not set Mark C. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PC MAG article
Considering Websphere/EJB was mentioned ... Where's the BEA Weblogics review -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] mysql: UPDATE statment
Reading the MySQL manual on the UPDATE statement (my, what a concept - actually looking at a manual, especially when you have no clue ...) would show you that your statement is invalid and why. Something about using a "set column-name=data" rather than an invalid "values()" statement. Mark C. - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 10, 2001 9:40 PM Subject: [PHP] mysql: UPDATE statment > why isnt this working > > i need to get 5 values updated in a table called 'user_polls' > > how do I do this? > i have > > UPDATE user_polls WHERE id = '$id' VALUES($1, $2. and so on > > im getting a SQL error > > anyone? > > - Peter > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Mailling Lists
> -Original Message- > From: Bogdan Stancescu [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, December 26, 2001 11:16 PM > To: Ben Clumeck > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] Mailling Lists > > > I'm really unable to discuss the mailing-list topic because I > have nil expertise > in this field (apart from using them, that is). However, I'd > strongly advise you > to use something based on some kind of database system, because alternate > methods of storing data (i.e. plain text files) are crippled from > the start in > the speed department -- and if you hope the list to grow, this > will become a > major issue. Interestingly enough, the largest mailing list systems do not use databases to store their addresses. The likely limit will be bandwidth, not anything else. Look into qmail/ezmlm for a good combination, along with the tied & true majordomo list manager. I've been running some large mailing lists using the ezmlm/qmail combo - which easily saturates a T1 connection running just a 350 MHz PII. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: PEAR vs PHPLIB
> From: Manuel Lemos [mailto:[EMAIL PROTECTED]] > Unlike PEAR-DB and PHPlib, Metabase provides true database independence > to your applications. Actually - no. Querys/conformance to specs/sequences/stored procs and more are different from DB to DB. While the abstration layers help a little, they really don't help a lot. Mark C. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: [PHP-DEV] Re: strtok bug
> -Original Message- > From: Manuel Lemos [mailto:[EMAIL PROTECTED]] > Before somebody decides to repress my opinion again, Hah! That's got to be one of the funniest things I've ever read! Downloads do not imply usage, only curiosity. I've downloaded a large number of PHP class libraries from different places. The only one I've ever used is a CC validation one ... mark C. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: Only one value.
From: "Michael Kimsal" <[EMAIL PROTECTED]> > Philip J. Newman wrote: > > > Don't know is this is a Mysql problem or PHP, but I have a table with 100 records in it. One of the field names is $iName. > > > > When listing all the records I want only the 1st Uneak value to be displayed. > > > > For excample > > > > if values where, Bob, Jan, Mike, James, Bob, James, James, Mike ... > > > > I would like to call: Bob, Jan, Mike, James ... Any Idenas > > > > > I suspect you mean the mysql field name is 'iName', not '$iname' ($iName > being the PHP variable name). > > try > > select distinct(iName) from tablename > > and loop through those result sets. Almost right. DISTINCT is not a SQL function: select distinct iName from tablename would be the correct syntax. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Convert
> How to convert string in windows-1250 to asci, I need convert special > national characters > to standard english characters. Discard all characters with a value over 127 (high bit set). ASCII is only defined for 7 bit encoding. Mark Charette -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Better standards in PHP-coding
Hehehe. And I thought the OTBSW (One True Brace Style Wars) had passed into memory back some 10 or 15 years ago! Lo! They resurface yet again! 30 years in this business and still I hear them argue. Perhaps a cb style program for PHP so people can write any blasted style they feel like and then have another programmer transform it into _their_ OTB style. _My_ "coding standards" may not be _your_ coding standards, but mechanical transformations can pretty much make it all moot. Mark C. > -Original Message- > From: Frank [mailto:[EMAIL PROTECTED]] > > "The nice thing about standards is that there are so many to > choose between". > > Subject: Uses of block markers in coding > > GNU recommends a standard with block-markers aligned under each > other and a > number of people - including myself - find it senseless and > counter-progressive to keep up an older standard resting from old > days and > doing the programmer a disfavor. > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] phpLISTMAN
> From: Randum Ian [mailto:[EMAIL PROTECTED]] > > Control Panel > -Add User > -Delete User > -Validate Email > -Send Mail (HTML/Text) > -Archive Mail > > HTML Generator > -Subscription Box > -Unsubscribe Box > -Statistics Let's see. Double opt-in with cryptographic/time security, automatic bounce message processing, programmable and scalable message handling, automated relay centers for very large lists, both digest & regular versions, deny processing, multiple posting addresses, management functions available via email processining, moderation, etc. ... In other words, you might want to look through all the man pages and code for something like ezmlm and figure out if you want to duplicate all that work. Mailing lists are non-trivial pieces of code, and one little mistake can affect thousands of people (and your bandwidth). Mark C. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] phpLISTMAN
Just about all of them can have/do have simple HTML interfaces that can send data to them. I built one for ezmlm in about 20 minutes ... and then found a number of them already available. > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > > On Sun, 21 Apr 2002 20:52:17 +0100, you wrote: > > >Is that a nice way of saying that I am wasting my time in doing such a > >project? I just get frustrated at not having a Mailing List > Manager that I > >can use to manage large lists of users. > > > >Is it more bother than it is worth? > > Probably is. > > What would be useful is a set of PHP programmatical interfaces to > other list managers (eg, Mailman), let them do what they do well, and > have PHP talk to them to add/subscribe/etc. It's a real pity that > they don't have XML-RPC interface (that I know of). > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MySQL and RH 7.2
"find" is your friend ... Go to the install directory and type find mysqladmin -Original Message- From: Todd Cary [mailto:[EMAIL PROTECTED]] Sent: Saturday, May 11, 2002 2:44 PM To: [EMAIL PROTECTED] Subject: [PHP] MySQL and RH 7.2 I am completely new to MySQL and I just installed it on my RH 7.2 server and I cannot determine where the MySQL admin program is located so that I can set my password. Sorry for the basic question... Todd -- Todd Cary Ariste Software 2200 D Street Extension Petaluma, CA 94952 707-773-4523 [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] setcookie()
You've just pointed out that you're a clueless newbie, that's' all, and can't read a spec worth a whit. -Original Message- From: jtjohnston [mailto:[EMAIL PROTECTED]] Sent: Saturday, May 11, 2002 4:50 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] setcookie() Rasmus server-side / client-side, that's not the point. My point is PHP can, could and should be able to set a cookie after HTML is set. But of course, Jan has already closed the issue, as usual. http://bugs.php.net/bug.php?id=17158 > PHP is a server-side language and as such it deals with server-side > issues. If you want to write javascript that sets a client-side > Javascript cookie, go ahead. It has nothing to do with PHP and PHP will > certainly not get in your way. > > -Rasmus > > On Sat, 11 May 2002, jtjohnston wrote: > > > This is a bug "Feature/Change Request" I made to: > > http://bugs.php.net/bug.php?id=17158 > > > > setcookie() states "cookies must be sent before any other headers > > are sent (this is a restriction of cookies, not PHP). > > > > I argue this is a restriction of PHP, not cookies. > > > > Here is my proof: > > > > http://www.collegeSherbrooke.qc.ca/languesmodernes/cookie.htm > > > > I can do this any time in : > > > > > >setCookie("TestCookie","first time",expdate); > >var DisplayData = getCookie("TestCookie"); > >document.write(DisplayData); > >setCookie("TestCookie","second time",expdate); > >var DisplayData = getCookie("TestCookie"); > >document.write(DisplayData); > > > > > > I want to be able to setcookie() anytime I want, before and after I > > declare any HTML. > > This will never get changed, unless we ask for it. > > > > I would appreciate your vote of support at: > > > > http://bugs.php.net/bug.php?id=17158 > > > > before the bug people "close" this thread. > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > -- John Taylor-Johnston - ' ' ' Collège de Sherbrooke: ô¿ô http://www.collegesherbrooke.qc.ca/languesmodernes/ - Université de Sherbrooke: http://compcanlit.ca/ 819-569-2064 -- 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: Is This Possible? (Database - PHP)
Or read the man page on mysql_pconnect/mysql_connect ? -Original Message- From: Jochem [mailto:[EMAIL PROTECTED]] Sent: Monday, May 13, 2002 9:25 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: Is This Possible? (Database - PHP) Why don't you install Mysql on your local machine and do your testing ? Jochem "R" <[EMAIL PROTECTED]> schreef in bericht 000501c1fa4c$8fca8fc0$0a6da8c0@lgwezec83s94bn">news:000501c1fa4c$8fca8fc0$0a6da8c0@lgwezec83s94bn... > Hey there guys, > I have a slight problem which i could not solve via Java servlets and now > that I am migrating to PHP I was wondering if its possible... > > I am hosting with a company that has given me a database (MySql) I am using > the database for all my apps which are only being accessed via my > servlets... I want to change that and convert all my servlets to PHP. > Being new to PHP i am sure to make a lot of mistakes and instead of > uploading my PHP page, getting errors/ redoing it, uploading etc I was kinda > hoping i could connect to the remote database via my local machine? > I already have PHP installed on my machine. on the remote host the > details are > > Localhost > jimmy*** (Username) > gunsand* (Password) > umace_com (Database name) > > Is this possible? > Any help and comments appreciated. > Cheers, > -Ryan > > /* Whats the difference between the pope and your boss? The pope only wants > you to kiss his ring! */ > > -- 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] Sessions Without Cookies or SID Passing...
If it ain't foolproof then only a fool would use it ... IP addresses are just about the worst way to identify anyone. -Original Message- From: Martin Towell [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 14, 2002 8:17 PM To: 'Rasmus Lerdorf'; Matthew Walker Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Sessions Without Cookies or SID Passing... You're missing one method - using the user's IP address It's not a guaranteed fool-proof method, but if you don't want to use cookies or the URL, then this sorta works. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Speed comparison of PHP vs. PERL (not conclusive)
From: Jason Wong [mailto:[EMAIL PROTECTED]] >Try comparing reading 10K rows from a DB using Perl and PHP would be a more >useful benchmark. --- When's the last time you wrote a Web page that needed 10K rows displayed? Writing good _and relevant_ benchmarks is one of the more difficult things to do in CS. Personally, I look at the time it takes me to code and debug things since that's the most expensive part of the cost equation to my customers - hardware's cheap compared to me. I can get something of production quality up and running on PHP much faster than I can in Perl - probably due to 20 years of programming in C - so my customers are happy. Considering that 95% of the time the bottleneck is the bandwidth, not the application code, and the other 5% of the bottleneck is in the database application section, my customers don't demand any artificial language benchmarks. Mark C. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] IMAGING WITH PHP
Since you get width & height the ratio is trivial. mark C. > -Original Message- > From: Vins [mailto:[EMAIL PROTECTED]] > Sent: Saturday, April 13, 2002 3:02 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] IMAGING WITH PHP > > > There is nothing in there about image ratios > but let me double check again. > maybe it was my error and if so... forgive me I'm from South Africa > LOL > > > "Jason Wong" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED]... > > On Sunday 14 April 2002 02:08, Vins wrote: > > > How would I find out the image size ratio so that I could resize and > image > > > without the image pixelating ? > > > > Manual > Image functions > > > > -- > > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk > > Open Source Software Systems Integrators > > * Web Design & Hosting * Internet & Intranet Applications Development * > > > > /* > > QOTD: > > If you're looking for trouble, I can offer you a wide selection. > > */ > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] how to move one element of an array to the end of the array
Don't bother with doing it in PHP, do it in MySQL with a functional ordering: Select Make from your_db order by if(left(Make,7)='no make','',Make) -Original Message- From: Tom Beidler [mailto:[EMAIL PROTECTED]] Sent: Friday, October 19, 2001 11:53 AM To: php list Subject: [PHP] how to move one element of an array to the end of the array I'm running a query that pulls up automotive makes for a given year and orders them alphabetically. One of the options is "no make specified" which I would like to always move to the end of the mysql_fetch_array. So my while loop would pull up AMC Ford Volkswagon No make specified Instead of AMC Ford No make specified Volkswagon After looking over the php site it doesn't look like there is an easy way to do it. Should I take the array, remove the element and then add it to the end? The no make specified unique id in the make database is 1. I could order by id, use array_shift to pop off the first element, sort the array by asort, and then add it on the end using array_push. Is there a better way? Thanks, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: regular expresion
> In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] (Richard) wrote: > > > Hi, I want to validate that a variable only contains numbers. I > came up with > > this code > I came up with this code: is_numeric($var) mark C. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Safely Storing & Delivering PDFs
If you have access to the Apache server why not set up auth-mysql as the authentication method? It checks for authentication login/password pairs out of MySQL. mark C. > -Original Message- > From: Miles Thompson [mailto:[EMAIL PROTECTED]] > Sebastian, > > I believe I have to do what you do, but from your cryptic msg > I've not been > able to figure it out. > > We have a subscription site, and if a subscriber wants a PDF, the link > which requests it checks for a session cookie. If it's not set > the user is > directed to a logon script which checks username/password against a > database and sets the session cookie if everything is OK. It > automatically > redirects to the calling script, and because the session id is > now present > the PDF can be accessed. > > To my horror, I discovered on Friday that if I just type in the URL with > the name of the PDF it's delivered with no checking at all. I > have to move > them to a safe place, either outside the web tree or to a directory > protected by htaccess. This is where I'm stuck. > > If I use .htaccess, I don't want to maintain a separate .htaccess file in > addition to the subscriber table in the database. Can I set have my logon > script set an Apache variable that will give access to the protected > directory which store the PDf's? > > Or do they have to be passed? If so how? > > Would that mean that I'd need only one or a few username/password > pairs in > htaccess? > or > Is htaccess (or Apache's security) somehow satisfied by setting > the variables? > > Regards - Miles Thompson > > At 01:19 PM 10/19/2001 +0200, you wrote: > >Hi George > > > >I had the same problem a while ago. > >The only solution i found was to change the link to : > >www.blabla.com/pdffile/test.pdf > >test.pdf does not exist, but > >in /pdffile/ there is a .htaccess which redirects the 404 to the php > >script that reads/generates the pdfs. And for my purpose checks if user > >is > >authorized to get these files. > > > >sebastian > preserved.> > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP 4.1 out?
> -Original Message- > From: ~~~i LeoNid~~ [mailto:[EMAIL PROTECTED]] > It could be stated on the site, or (and) tar could be re-moved. As far as > I am concerned, as soon as something is placed on the web, you have no > control over reference to it.. And access you can regulate of c0urse:) Or you could remember that picking up unannounced software from _any_ site is generally a very bad idea ... you may get a lot more than you bargained for ... Mark C. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Anyone got PHP to work under RedHat 7.2
Yes, I have PHP running just fine under 7.2 (source compile). PHP doesn't care one whit about your browser; however, Netscape is picky (as it should be) about end tags. The most common problem when pages display under IE but not under Netscape is the lask of a or tag. Mark C. -Original Message- From: Hai Nguyen [mailto:[EMAIL PROTECTED]] I am having trouble with php to display from the Netscape. I installed both Apache and PHP using RPM. I modified httpd.conf file. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Something wrong with the file() command.
From: Jose [mailto:[EMAIL PROTECTED]] $temp[]=file($y); \\ To load the file into the array. --- file() returns an array! So, you ended up with an array ($temp) with element 0 an array (returned from file() ). Read the manual very carefully ... You probably meant to say $temp=file($y); // To load the file into the array. (watch those '//'s, too!) mark C. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] header("Location:blah...") - passing variables
I cheat and just include the original form on error ... Almost all my input values are set to PHP variables in the form. The 1st time through none are set, so the values are blank. After submitting the form, I check for validity. If there are errors I mark the errors, generate an error string, and include the form. That way all previously typed in data remains in the form without me having to tell the user to hit the "back" button, and there's no horribly long URL string resetting all those values. There's a bit more work than that (using htmlspecialchars et al.) but if you start creating forms with error checking & indication in mind it's really easy to do validation and redisplay if necessary. Mark C. > > Hi, > > > > I wonder if someone could tell me whether or not the following is > > possible? > > > > I have an HTML form which passes a username and password to a PHP script > > for validation. If either is not valid, I would like it to return to the > > previous page - carrying with it a variable plus the submitted form > > information... > > > > =-=-=-=-=-=-=-=-= > > if (strlen ($password1) <4 ) { > >$err = "Password must be more than 4 characters long"; > >header("Location:http://somelocation.php";); > >// ^-- at the location, the $err and form variables will be available > > > >exit; > > } > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Opening a new window.
I would use "target="_blank" in the anchor tag so it would work just fine _without_ javascript ... Mark C. -Original Message- From: Mehmet Kamil ERISEN [mailto:[EMAIL PROTECTED]] I would use javascript for that. --- Brandon Orther <[EMAIL PROTECTED]> wrote: > Does anyone know how I could have php open a new windows > with the url I > specify? > > Thanx, > Brandon> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Opening a new window.
Nope - just opens a new window. Of course, personally, I'd like to take those people who turn off the toolbars and back buttons and whatevers on _my_ windows and put them in a speeding car down some highway with no brakes, no steering, a locked down accelerator, and no door handles ... "hey, buddy, what's the problem? No controls? But the radio works just fine, and that's all I'm gonna give 'ya to play with ... we know best." mark C. > From: Mehmet Kamil ERISEN [mailto:[EMAIL PROTECTED]] > > that's a great point. Can you specify the target browser > properties using html? > Lise the Location bar, or the toolbar? > I was actually using little popups with jscript. If I can > get rid of JS that would be great. > --- Mark Charette <[EMAIL PROTECTED]> wrote: > > I would use "target="_blank" in the anchor tag so it > > would work just fine > > _without_ javascript ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] printf()?
> -Original Message- > From: Ray Gaylog [mailto:[EMAIL PROTECTED]] > I've been using PHP for just a little while, however I have > noticed somthing. > > In the doc's I've noticed you can do this: > printf("line1 \n line2 \n"); > > Now..this should (like C) print two seperate lines..however It > doesn't. To print this on seperate lines I must put a in there. > > Any ideas? Yes, and not facetiously - read the HTML specs. If you look at the PHP output, you'll see separate lines. If you read the HTML spec, you'll find out how HTML is supposed to handle whitespace, and you'll discover a whole lot more, too. Mark C. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP, Templates, XSLT
From: "Leonardo Dias" <[EMAIL PROTECTED]> > Anyways, has anyone experienced it with Sablotron? Yes. > How did you like it? Worked as advertised. Which is a bear sometimes - but that's due to XML limitations, not Sablotron's fault. > Was it any good? Yup. > Is it fast enough for big websites? Well, big websites don't necessarily have to be fast (I've got over 100,000 pages on one of my websites - but since I'm getting about 2 hits/second it doesn't have to be fast) - but in general, XSLT translation takes a noticeable hit. If your expaectations are in the hundreds of hits/second then you would want to cache the resulting page anyway. Mark [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Determining the length of a string
Hmmm ... If I didn't know something like that I'd probably do something stupid like go to http://www.php.net, type in "string" or "length" for a keyword in the Search box, look at what came back (including the function "strlen") and explore the other calls nearby, too. Mark C. - Original Message - From: "James Bartlett" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, July 07, 2001 2:02 PM Subject: [PHP] Determining the length of a string Hi, Say you read in the contents of a text file and wanted to know the length of the text you had read in what command would you use? Thanks James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Restoring a Dump File With PHP
How does this _not_ work (as long as you supply the path to mysql, the username, and the password mark C. - Original Message - From: "Chris Anderson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, July 07, 2001 3:25 PM Subject: [PHP] Restoring a Dump File With PHP I created a MySQL dump file (.sql) and I wanted to use it to restore my database. Unfortunately the manual (MySQL) only shows the command line method: mysql database < file.sql I tried this in PHP and it didn't work. Does anyone know how to load the .sql file into the database through PHP? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP map?
Start at ftp://sepftp.stanford.edu/pub/World_Map/ which is a copy of the CIA world data. http://hjem.get2net.dk/bnielsen/ciaworld.html gives some info for conversion of the cbd format to lat/long. Projections (a science unto itself) is best left to the interested reader. It ain't as simpla as it seems (unless you're going for Mercator - but Mercator isn't one of the better projections unless you're a sailor ...) Mark C. - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, July 07, 2001 6:08 PM Subject: Re: [PHP] PHP map? > on 7/7/01 3:36 PM, Chris Lambert - WhiteCrown Networks at > [EMAIL PROTECTED] wrote: > > > You'd pretty much have to do that pixel by pixel. What exactly do you want > > the final application to do...often times there are alternative solutions > > derived at by others knowing what you wish to accomplish. > > > Well I was hoping there'd be something that was a bunch of vectors. If you > got to my site you'll se what I'm up to It's basically a > > > http://www.futurebird.com/mapbuild3 > *** very rough > > > I'm making a site that will allow users to upload a map and add 'events' to > it. The events can include photographs and comments, possibly even sound > clips and such. > > You can choose to share your map and to link it to similar maps. You can > make user groups and share all of your events. You can view events from any > area as a time line. Or look at events from any time period as a map. You > can chain events and make a map that shows how the event chain moved through > space (or didn't.) > > It's "postmodern" because anyone can contribute and because events > can countian conflicting accounts and information. (Just like real history!) > I'm going to using it for my online diary because I want to see where I was > when I was thinking or seeing something (personal obssesion... sorry) But it > has lots of other uses... > > So I wanted to see if there was a vector map I could use as the "main" map > that all the other maps will be linked to. > > > Susan > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Getting any possible value inside an array
$newarray=array_flip($myarray) $newarray will have unique key values made up of the second element of $myarray. Mark C. - Original Message - From: "Aaron Bennett" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, July 08, 2001 12:51 AM Subject: [PHP] Getting any possible value inside an array > Hi everyone... > > Does someone have a quick and dirty way of returning _any_ possible value > contained within an array? > > For instance: > > $myarray[0] = "red"; > $myarray[1] = "red"; > $myarray[2] = "red"; > $myarray[3] = "blue"; > $myarray[4] = "green"; > $myarray[5] = "blue"; > $myarray[6] = "red"; > > and i'd output "red", "blue" and "green", but not have multiple instances of > each. > > Thanks in advance! > -- > Aaron Bennett > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Question about how to do this...
This is probably "not a good idea" if the data is mostly static. There's no real reason to use the power of a db engine for something this trivial, and static serving will be faster than a DB system. Mark C. - Original Message - From: "Ben Bleything" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "'PHP General List (E-mail)'" <[EMAIL PROTECTED]> Sent: Sunday, July 08, 2001 3:59 PM Subject: RE: [PHP] Question about how to do this... > Use a database. With mysql, you can store the text into a table with > primary key called 'page' or something like that, and a text field of > some sort. > > Then, do mysql_query("SELECT pagetext FROM website WHERE page=$page;"); > > => > > Dive into it. It's easier than it looks. > > Ben > > -Original Message- > From: Chris Cocuzzo [mailto:[EMAIL PROTECTED]] > Sent: Sunday, July 08, 2001 1:44 PM > To: PHP General List (E-mail) > Subject: [PHP] Question about how to do this... > > hey- > > so I want to have my site so that the urls are like /index.php?page=bio > > the way I made the index.php so far is just one gigantic switch > statement...is there a better way to do it? > > > chris > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Global Variables -- why not have them?
> I dislike the GLOBAL statement in that many of the bugs that get me > scratching my > head are to do with when I have forgotten to use it. Then you're probably using it way too often. Global scope variable are inherently dangerous and cause more problems than they're worth. I've been in this business well nigh 30 years now and have had more problems with globals than I can shake a stick at. Passing parameters ain't a bad thing, you know, even when what you're passing is a variable declared in global scope (like variables set via post or get). Global is inelegant by definition ... I worked in Fortran 77 for 10 of those years; we were really careful with common blocks and included them only where absolutely necessary. Passing array blocks was in almost all cases a "better thing" and was not any slower. Mark C. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] easy mysql question
On Sunday 08 July 2001 21:48, [EMAIL PROTECTED] wrote: > Since I first made the tables for my site I've had to modify them quite a > bit. I always keep a copy of the commands I used to make the tables in case > I need to move a site. Is there a way to ask mysql to list the create table > commands? mysqldump -d Mark C. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Download function for php
To download a file from the server needs no special magic - just a link to the file. Mark C. - Original Message - From: "Mark Lo" <[EMAIL PROTECTED]> To: "php general" <[EMAIL PROTECTED]> Sent: Monday, July 09, 2001 9:36 AM Subject: [PHP] Download function for php > Hi, > > Is there any php download function for php. I am asking is the one like > downloading the file from the server when people click the link. Like > downloading php sources tar file. > > Thank you > > Mark > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] stripping white space?
From: "Maxim Maletsky" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, July 10, 2001 1:05 AM Subject: RE: [PHP] stripping white space? > I think it IS a good practice > if you only practicing HTML to be outputted by PHP. Why, if you know that it's illegal XHTML and XML, would you ever conclude that it's _good_ practice to break the rules? Saving 20 or 30 bytes/page? If you really want some space saving on many browsers and you're running Apache why not just install the zlib package? Effective throughtput on my (over 100,000) pages on my site jumped 8-fold for those people able to receive and decode zlib-compressed pages, and I didn't have to change anything ... Mark C. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]