Re: [PHP] new user of php
On Feb 9, 2004, at 12:22 PM, Dominique ANOKRE wrote: So where is the best link to download some documentation about php with interbase. The best place to get documentation about PHP is the PHP website at http://www.php.net For InterBase functions, you should check out this page: http://www.php.net/manual/en/ref.ibase.php -- Chris Garaffa [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] .html or.php extension
On Feb 5, 2004, at 5:15 PM, E.H.Terwiel wrote: My PHP system demands that files to be interpreted by PHP MUST have the .php extension. If I have an .html file with ?php ? in it, it won't interpret the PHP code. Unlike JavaScript, f.i. Right, the browser interprets the JavaScript that's sent to it; the server has to process the PHP before sending it to the client. Is there a way to make the server do the PHP code anyway, in an HTML file ? Or must the action yes-php/no-php be taken before looking into the file ? You're spot on here. You can have your web server process other files as PHP. Check the documentation for your web server to figure it out. The other way around is ok: put HTML code in a .php file... Yep, that's fine. PHP ignores anything that's not in ? ? and just outputs it to the browser. HTH, -- Chris Garaffa [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OOP methodology{O|T} kinda'
On Jan 30, 2004, at 2:19 PM, Jay Blanchard wrote: I'd be curious as to how many cam to PHP from a programming background? Likewise, how many start with PHP and go on to other languages? And what those languages are either direction? Probably a strange mix, but... I came to PHP from an AppleScript/JavaScript/very-basi-C background. While I was beginning to learn PHP, I took 2 C++ classes at college (this was beginning over a year ago), and have since moved on to Objective-C. -- Chris Garaffa [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] $_POST[$variable]
On Dec 11, 2003, at 8:02 AM, Christian Jancso wrote: Hi there, I have the following problem: How can I use variables in the $_POST statement? Here is my code: $old_station[$o] = $_POST['$i']; $new_station[$o] = $_POST['$i']; Christian, My biggest question is: What are $i and $o set to? Unless $i is set to a string with the same name as POST variable you're trying to access, this code won't work. -- Chris Garaffa [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to view the structure of a table
On Nov 30, 2003, at 2:07 PM, narayanan wrote: Can any tell me how to view the structure of a table from php. I am using postgresql database. A Google search for postgresql describe table revealed this as the first result: http://forums.devshed.com/t38544/s.html Quote: To get fields from a table unfortunately, there is no simple command. But, you can query the PostgreSQL internal tables such as pg_class for that info: You can then use the PostgreSQL functions (documentation at http://us3.php.net/manual/en/ref.pgsql.php) to go through the results. HTH -- Chris Garaffa [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Telling GD2 Where Fonts Are
On Nov 27, 2003, at 9:12 PM, [EMAIL PROTECTED] wrote: The line of PHP code that gives this info goes like this--at least the way I unsuccessfully put it: putenv('GDFONTPATH=Macintosh HD/Fonts $fontname = 'arial.ttf' Steve, I've never used fonts with GD before, but on the surface, this looks to be a path issue. Assuming that Macintosh HD is the volume you boot up OS X from, try changing the first line to: putenv('GDFONTPATH=/Fonts/'); because what you see as Macintosh HD is actually / to the UNIX layer of the OS. Hope this helps! -- Chris Garaffa [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Add Reply-To to this list(s)
On Nov 25, 2003, at 11:57 AM, Thomas Svenson wrote: Hi, It would be nice if the moderator of this, and the other PHP-lists could fix so the listserver automatically add a Reply-To header to all the mails. When I hit Reply my message would then automatically reply to the list and not the author. Less hassle for me when replying and less risk of forgetting it. Thomas, You might be interested in reading this document: http://www.unicom.com/pw/reply-to-harmful.html. -- Chris Garaffa [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] text input truncated
On Nov 4, 2003, at 6:27 PM, Jay Frumkin wrote: Hi all, I am having a bit of a problem, and was wondering if you could help? Here's the sample code (very simple) ?php $xyz = Hello World; echo forminput type=test size=25 value=$xyz/form; ? The text box shows up with Hello NOT Hello World. How do I get the entire variable? If you look at the HTML returned, you'll probably see World at the very end of the input tag. To fix this, put quotes around the value attribute. Really, it's good practice to put quotes around all attribute values in HTML: echo forminput type=\test\ size=\25\ value=\$xyz\/form; HTH -- Chris Garaffa Nil Zero Heavy Industries http://moondrop.nilzero.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Echo issue RESOLVED!
Sorry to continue this, but I just have to know... On Oct 30, 2003, at 6:32 PM, Chris W. Parker wrote: But seriously folks... The reason I don't like Macs is not because they don't perform well but it's because they have a retarded UI. It looks like crap and it works like crap. They do some of the most stupid things as far as user interface goes. You mean you're looking forward to this: http://www.neowin.net/staff/creamhackered/longhornbuild4051/ie.jpg and this: http://imac.taxrecords.com/mstearne/foghorn/explorer.jpg ? -- Chris Garaffa [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Archives
On Oct 22, 2003, at 2:27 PM, Nathan Taylor wrote: Hey guys, Just a quickie: where are the archives for this list? What URL? You'll find the answer in the arch--- oops, nevermind. This URL was just launched: http://phparch.com/mailinglists -- Chris Garaffa [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem with CHMOD
On Monday, December 30, 2002, at 04:34 PM, Stephen wrote: I'm running the CHMOD function and I get this error: Warning: chmod() [function.chmod]: Permission denied in c:\inetpub\wwwroot\chatness2\admin\save.php on line 13 I'm running IIS 5 which may be causing it. Here's my code: chmod($file, 0666); $file = $HTTP_GET_VARS['file']..html; Hm. It looks like you're trying to chmod a variable that hasn't been defined yet. Try switching your statements, so that you have: $file = $HTTP_GET_VARS['file']..html; chmod($file, 0666); And let us know what happens. -- Chris Garaffa [EMAIL PROTECTED] http://moondrop.heli0s.net -- coming whenever heli0s pays his bill If you give someone a program, you will frustrate them for one day. If you teach someone how to program, you'll frustrate them for a lifetime.
Re: [PHP] Re: Problem whith query in query
On Monday, November 18, 2002, at 12:07 AM, OrangeHairedBoy wrote: MySQL doesn't support queries inside queries. I think it's on their TODO list... Yup, it is. From http://www.mysql.com/doc/en/TODO_MySQL_4.1.html: --Begin quote-- 1.8.2 Things That Should be in 4.1 The following features are planned for inclusion into MySQL 4.1. Note that because we have many developers that are working on different projects, there will also be many additional features. There is also a small chance that some of these features will be added to MySQL 4.0. Some of the work on MySQL 4.1 is already in progress. * Subqueries. SELECT id FROM t WHERE grp IN (SELECT grp FROM g WHERE u 100); --End Quote-- I also just did a quick search of the list (the list being [EMAIL PROTECTED]) archive on my computer and got info that subqueries will be in 4.1. Unfortunately, 4.0.x is still in beta. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] script language=php???
On Saturday, October 26, 2002, at 09:45 PM, John W. Holmes wrote: Ok then without asp how do I get script language=php to work? I checked out a PHP book today and it did mention running PHP scripts that way, without a .php extension. No, it still has to have a .php extension, or an extension that your web server recognizes as PHP. It might be worth pointing out that this behavior is customizable in any decent HTTP server. I know Apache lets you specify what extensions get parsed by which parser. Being that you're wanting to use ASP, I'm assuming you're also using IIS. Good luck finding out how to do that. Your original question (I think, I'm just coming into this thread) was using PHP and ASP in the same page. You can't do that, but this is how close you can get: (Note that it's very inefficient and resource-intensive): Say you wanted ASP to parse the file first, then PHP. Have the ASP file be called, do your ASP voodoo there, and then call the PHP file (like with a HTTP redirect or form submission). Pass variables back and forth via the querystring. Not that I'm recommending this. I'm just saying it's possible, if you absolutely have to do it this way. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What the heck is this Zope?
On Friday, August 9, 2002, at 07:27 AM, Jason Wong wrote: Which is better PHP or Zope? How long is a piece of string? Twice the length of one of its halves. Sorry. Couldn't resist. c. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What the heck is this Zope?
On Friday, August 9, 2002, at 10:07 AM, Kondwani Spike Mkandawire wrote: Chris Garaffa [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Friday, August 9, 2002, at 07:27 AM, Jason Wong wrote: Which is better PHP or Zope? How long is a piece of string? Twice the length of one of its halves. c. What if the String cannot be split into equal halves? Then we're all screwed. Ladies and gentlemen, start your debuggers! c. (And sometime before I leave work today, I will stop posting OT to php-general and get some real work done over here... famous last words) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] apache and php
I'd recommend: http://www.apache.org/dist/httpd/Announcement.html -- Apache 1.3.26 -and- http://www.php.net/release_4_2_2.php -- PHP 4.2.2 Both include the latest bug fixes and are the latest stable releases. I've been running these on a RedHat 7.1 box (64MB RAM, 225mHz Pentium), with MySQL as well for about 4 months without any problems that weren't my fault. HTH chris [EMAIL PROTECTED] On Tuesday, July 30, 2002, at 12:25 PM, [EMAIL PROTECTED] wrote: So, which version of apache and php are the best for working together under any OS system ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [Getting OT] Re: [PHP] php redirect
On Friday, July 26, 2002, at 11:32 AM, David Buerer wrote: ASP is about next on my list. I'm just trying to get javascript and PHP under my belt a little better firstwell ok, I'm waiting for my next paying client. I've found that you do have to use what you know to know whatever you need to do. I couldn't live without Javascript+PHP+SQL when it comes to site design. ASP is next on my list. Good luck. I had a summer job once (would've been longer if my boss didn't spend all the company money and had to shut the company down) where we used ASP for all our dynamic pages. It's a joke. You go (back) to using dim statements and VBScript! Of course you can use JScript, but that's even more difficult at times. Connecting to a server? There are methods, but error reporting is not ASP's best feature. IMHO, stick with PHP, maybe a bit of Perl, but anything you can do in ASP you can do better in PHP. c. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Running ./configure multiple times
Well my RedHat system got hosed, so I reinstalled everything. I'm back to installing PHP now, and I'm wondering if it's safe for me to run ./configure multiple times. Here's the situation: I want to compile with gd support, and pdflib, and a bunch of other options. Instead of running a whole huge 5 line ./configure, can I run one at a time to make sure they all work, then run the whole thing? Also, just noticed this: I have gd installed, and libgd.so in /usr/lib, so I tried ./configure --with-apxs --with-gd=/usr/lib/ (also tried without the trailing /), but it gives: configure: error: Unable to find libgd.(a|so) anywhere under /usr/lib/ What gives? (in this ouptut, the stuff that's not important is cut out -- dates, etc) [root@saturn php-4.2.2]# ls -l /usr/lib/libgd.* lrwxrwxrwx /usr/lib/libgd.so - libgd.so.1.8.3 lrwxrwxrwx /usr/lib/libgd.so.1 - libgd.so.1.8.3 lrwxrwxrwx /usr/lib/libgd.so.1.8 - libgd.so.1.8.3 lrwxrwxrwx /usr/lib/libgd.so.1.8.3 [root@saturn php-4.2.2]# TIA, c. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to access javascipt variables in PHP
I can't think of a way to do it in the page itself... Unfortunately (there could be a way, I just can't think of it - frazzled after a day of work), but if you're using forms on your page, then set the values of some hidden form elements to the JS variables you want to use, and pass them along. You could have the page refresh itself to give you the variables, too. I'm sure there's a better way, though. Good luck, -- Chris Garaffa #!/usr/local/lib/php $contact_info[Name] = Chris Garaffa; $contact_info[Email] = [EMAIL PROTECTED]; $contact_info[Work] = [EMAIL PROTECTED]; $contact_info[cell] = 203.803.9066; Seppo Laukkanen (from [EMAIL PROTECTED]) wrote on 7/17/02 3:06 PM: Can anybody help? I have javascript code to find out browsers width and height, but they are stored in javascript variables. How can I access them from PHP? Or is there a method to do same in PHP straightly? Thanks, Seppo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Using index.php instead of index.html
He who calles himself Sailom (from [EMAIL PROTECTED]) wrote on 7/16/02 12:13 PM: Hello, I am a novice on PHP and web programming. Can any one suggest me if I can use index.php in place of index.html? I really need to concern about security issue too. Are you using Apache? If so, just edit your httpd.conf file. The line that reads DirectoryIndex index.html and change it. Mine reads: DirectoryIndex index.html index.shtml index.html.var index.php index.phtml If you're using IIS, I'm sure it's available somewhere in the configs... -- Chris Garaffa #!/usr/local/lib/php $contact_info[Name] = Chris Garaffa; $contact_info[Email] = [EMAIL PROTECTED]; $contact_info[Work] = [EMAIL PROTECTED]; $contact_info[cell] = 203.803.9066; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Development Tools
Ahm... Anything good for MacOS X out there? I currently use and love BBEdit, but am open to other alternatives. Chris He who calles himself Lord Loh. (from [EMAIL PROTECTED]) wrote on 7/14/02 1:40 PM: www.phpide.de -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP 4 broken after Apache upgrade
OK, so I upgraded to Apache 1.3.26 on my RedHat machine after the security stuff last week. Saved my old httpd.conf file, just in case, and I did need it. Unfortunately, neither the old file, nor the new file, nor the new file modified to include PHP support, work. I added: LoadModule php4_module libexec/libphp4.so AddModule libphp4.c AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps to httpd.conf in their proper sections. Also, added index.php as one of the possible index files (along with index.html and index.shtml) I checked libexec/; libphp4.so is there. Then I get this: [root@saturn /]apachectl start Syntax error on line 276 of /usr/local/apache/conf/httpd.conf Cannot add module via name 'libphp4.c'; not in list of loaded modules OK, so I comment out AddModule libphp4.c, and [root@saturn /]apachectl start /usr/local/apache/bin/apachectl start: httpd started [root@saturn /] But then, I load up Internet Explorer, go to my site, and get this: Unhandled File Type dialog box: Internet Explorer doesn't know how to handle the type of file you have selected. You can choose to save this file to your disk or you can configure a Helper Application for this file. MIME Type: application/x-httpd-php File Name: - I downloaded the file via Save File As and it is the php source for index.php. So do I need to reinstal PHP, or am I just missing something in the config file? -- Chris Garaffa #!/usr/local/lib/php $contact_info[Name] = Chris Garaffa; $contact_info[Email] = [EMAIL PROTECTED]; $contact_info[Work] = [EMAIL PROTECTED]; $contact_info[cell] = 203.803.9066; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 4 broken after Apache upgrade
That's exactly what I needed to do... Thanks Devrim and Chris for your quick help. Ahhh back to coding! -- Chris Garaffa #!/usr/local/lib/php $contact_info[Name] = Chris Garaffa; $contact_info[Email] = [EMAIL PROTECTED]; $contact_info[Work] = [EMAIL PROTECTED]; $contact_info[cell] = 203.803.9066; He who calles himself Devrim GUNDUZ (from [EMAIL PROTECTED]) wrote on 7/6/02 1:15 PM: You need to compile php with apache again, I think. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is there an easy way to divid up HTTP_USER_AGENT?
JJ, I don't know of an *easy* way, but this script (with regex's ) isn't too bad; you can figure it out with a little bit of research. /* begin script ereg(^([[:alpha:]]+)/([[:digit:]\.]+)( .*)$, $HTTP_USER_AGENT, $match); $Browser_Name=$match[1]; $Browser_Version=$match[2]; $Browser_Description=$match[3]; If(eregi(msie, $Browser_Description)) eregi(MSIE ([[:digit:]\.]+);, $Browser_Description, $match); $Browser_Name=MSIE; $Browser_Version = $match[1]; } // end script */ So now, you have a script which gets the Name, Version and Description, and also looks to specify MSIE as the browser. Read up on Regular Expressions, and you can modify this for any browser/version combo. (adopted from Listing 16.3 in Core PHP Programming by Leon Atkinson) -- Chris Garaffa #!/usr/local/lib/php $contact_info[Name] = Chris Garaffa; $contact_info[Email] = [EMAIL PROTECTED]; $contact_info[Work] = [EMAIL PROTECTED]; $contact_info[cell] = 203.803.9066; He who calles himself JJ Harrison (from [EMAIL PROTECTED]) wrote on 7/5/02 10:25 AM: Because! Also the audiance that will probably see the site will highly likely not have the knowledge or intention to change the user agent var. So my Q remains. To add to my original Q is there seperate vars for browser and OS? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Detecting Browser Type/OS from HTTP_USER_AGENT
Erik, While I agree in principal, you must remember that not all UAs (User Agents) comply with the Standards, especially newer ones like XHTML, CSS 2, etc. Even a somewhat mainstream UA, like OmniWeb, for example (because I've been having problems with it lately) will not render your page the same as, say, IE or NS4 or the Gecko engine. Patrick, To answer your question without coding for you, search some JavaScript sites for UA detection scripts. Then, translate them into PHP (I'd say just use the JS, but 1: Not all UAs support JS, 2: those who do support JS may have it turned off by user preference, and 3: this is, after all, a PHP list ;) I once saw a beautiful script which detected everything from Netscape to IE to Sun's UA to Amaya to Opera, iCab, OmniWeb, Mozilla, Konqueror, WebTV, etc, and versions of each, too, then grouped the UAs together by capability (which standards they support/do not support), and redirected appropriately. I, unfortunately, cannot remember where I saw this script. May have been at www.javascript.com (there are some good ones there). Or, try builder.com's Web Builder Library. -- Chris Garaffa At 9:58 AM -0400 6/27/02, Erik Price wrote: On Thursday, June 27, 2002, at 08:57 AM, Patrick Teague wrote: Has anyone else done something similar to this? The main purpose for doing this is to find out what clients are using the most so that we can provide content more specific to the browsers. I've noticed things that work on Win MSIE don't look half the same on Mac MSIE, not to mention the differences between MSIE, Konqueror, Mozilla. The other reason is I have people developing stuff on Mac, Linux, Windoze. I'm trying to put together something sane to mesh all of these together. The best thing you can do is make every attempt to code to the standards, and then hope that the browsers do their best to meet those standards too. You could argue with my opinion on this, saying that Well that's just not realistic because everyone's using IE or whatever, but then something like AOL's decision to use Mozilla as its internal browser engine comes along and changes the whole paradigm. Boom, you now have to change your entire site because now most people aren't using IE. Coding to the standards is your best option. In my opinion. Good luck. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [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] alternatives? (Was: Shot in the dark)
Hello, any chance you could set your clock to the correct date? It says July 6, and is really screwing up my sorting order for mail... thanks On Saturday, July 6, 2002, at 04:49 PM, jtjohnston -- Chris Garaffa [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Apache/2.0.36 + Win98 + PHP4=Error(31)
Prachait, If I recall correctly, PHP 4.x doesn't work with Apache 2... Actually, no Apache 1.x modules do, because of the new apxs architechture. Apache 2 support is planned for the 4.3 release (someone correct me if I'm wrong). On UNIX, I compiled with a -apxs2=[path] option to the configure script, but I'm not sure on Windows... Chris Garaffa On 6/15/02 10:24 AM, Prachait Saxena [EMAIL PROTECTED] wrote: Hello !!! I am using Apache/2.0.36 (Win32) DAV/2 on Win98. my server is running very fine when i use PHP4 as a interpreter. but as i use LoadModule to use PHP4 as a modules i am getting the error as (31) A device attached to the system is not functioning: This error also come when i try to load SSL I also tried to run server on Win 2k. Same error :( Can any one help me out. why this error is comming ? Or where i am wrong ? Thanks is advance Prachait Saxena WebMaster [SitesOnTesting.Com] If you do for other's ! Other's will do for you !! Visit me at http://www.sitesontesting.com/prachait -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php