[PHP] file uploads in Win9x, anyone? please?
Has anyone successfully set up a script to upload a file with PHP running Apache in Win9x (in my case 98Me)? I tried everything... the script is correct, I checked out a lot of examples... is there any config in Apache or in PHP I'm missing??? I really need this... . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer -- 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] Is there a user group in Colorado?
At 11:24 AM 6/22/01 -0600, Unni wrote: Is there a user group in Colorado? Thanks If there is one, I'd like to be a part of it. John Meyer [EMAIL PROTECTED] Programmer If we didn't have Microsoft, we'd have to blame ourselves for all of our programs crashing -- 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] REG_EMPTY error
Hi all, I'm getting the following error when I try to load complex web pages with a version of Hans Anderson's class.browser that I've modified to translate relative links to absolute links (as well as images, flash object / embed links). It's going to be part of a larger templating class (I'm going to merge it into Stefan Bocskai Quicktemplate.) In any case, here's the error I'm getting: Warning: REG_EMPTY:?empty (sub)expression in c:\foxserv\www\browser.class\class.browser.php on line 388 On line 388, I'm doing an eregi_replace: $absolute_links[] = eregi_replace($r[1], $this_url, $array[$i]); I'd appreciate some help if anyone's run into this problem before. Thanks, Aral :) -- 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] Variable variable names...
There's a number of things you can do with variable variables... they're quite powerful, I like 'em a lot. :) Anyway, you can do ?php $myvar2 = 'stuff'; $othervar = 2; if (isset($myvar{$othervar})) echo $myvar{$othervar}; ? This would output snip stuff /snip I think that's what you were asking... You've got to use the { and } around the variables you're using to make teh variable variable. --Jason -- 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] file(http://www.php.net) error?
file(http://www.163.com;) error? this is a test: ?php $fcontents = file ('http://www.php.net'); while (list ($line_num, $line) = each ($fcontents)) { echo bLine $line_num:/b . htmlspecialchars ($line) . br\n; } ? / This program run no error in my server ; but it not work when i sent it to the Server (mtkj.51.net) The message: Warning: file(http://www.163.com;) - Permission denied in /z1/mtkj/public_html/test.php on line 2 Warning: Variable passed to each() is not an array or object in /z1/mtkj/public_html/test.php on line 3 why? -- 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] protected Images without using htaccess
Hi, and the shorthand for this : ?php $img=ImageCreateFromJPEG($filename); ImageJPEG($img); ? Thanks Arash Dejkam Fredrik Arild Takle [EMAIL PROTECTED] wrote in message 9gvl19$er6$[EMAIL PROTECTED]">news:9gvl19$er6$[EMAIL PROTECTED]... 1. Authenticate user 2. Put the pictures in a secret folder or outside http_root 3. Do this: ?php header(Content-Type: application/download\n); header(Content-Disposition: filename=\$file\); $fn = fopen($file , r); fpassthru($fn); ? I hope this helps! Fredrik A. Takle [EMAIL PROTECTED] www.iportal1.com -- 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 to change process permissions?
On 22-Jun-01 Nick wrote: I writing a web based admin panel for myself for my site. My PHP script needs to be able to read, write, and move files around. The way I'm currently getting it to work is by making a directory owned by nobody with all permissions set so the script can write files there. Any file that is created by the script also turns out to be owned by nobody. This is ok, except that don't want to have a directory owned by nobody which has all permissions set, and I want to be able to overwrite files logged in as myself without su'ing and chown'ing everything first. Run your sever as root use posix_setuid() --a stunningly Bad Idea(tm). Is there a way like there is in PERL to change the account the script runs as? Perl can't (or shouldn't) do it either. SUID Perl is evil. Web-admin controls can have nasty dragons lurking about. If you absolutely _must_ have it; let the PHP/CGI scripts modify copies of the files. Then run a small shell script to move 'em into place after root has eyeball'd them. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- 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] mysql_free_result() question
I'm a bit unclear as to which result it is I use this function on. So lets say I; $Query = mysql_query(SELECT something FROM here); $Result = mysql_fetch_assoc($Query); Do I mysql_free_result the $Query or the $Result? If it's $Result, would this be the same as just going unset($Result)? Thanks, Chris -- If you don't find it in the index, look very carefully through the entire catalogue. - Sears, Roebuck, and Co., Consumer's Guide, 1897 -- 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] passing arrays
Jason Jacobs wrote: Hi all. I'm trying to pass an array to another page, and I'm not having luck. I thought maybe it would do something slick by passing it in the url, but it doesn't. So, how can I pass the array? You can pass an array between pages by using the serialize() and unserialize() functions in conjunction with rawurlencode(). Serializing a variable is kind of like freezing food. You freeze food so that you can store it for later use. Serializing does roughly the same thing for a variable, converting a 'fresh' variable into a string that you can store and then 'thaw' for later use. The basic steps to use serialize to transfer data between pages are: 0.) Page foo.php has an array that it wants to pass to bar.php $array = array ('doe', 'diddy', 'dee', 'dum'); 1.) Serialize the array $serialized_array = serialize ($array); 2.) Make the serialized data safe for transport via http by passing it to rawurlencode() $serialized_array = rawurlencode ($serialized_array); 3.) Pass the serialized array to another page via GET. (You could also use a form and POST) echo The serialized array looks like this: $serialized_arraybr; a href=bar.php?array=?php echo $serialized_array ?Send/a 4.) Unserialize the array at page bar.php (You may need to call stripslashes() on the passed data - review the magic_quotes directives in your php.ini file for more information) $array = unserialize (stripslashes ($array)); 5.) Voilà! Garnish with a 'Powered by PHP Logo' and it is ready to serve. ;) Good Luck! --zak -- 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] Is it possible to have the parameters fo a function be exited HTML?
rant Its probably just as fast for you to test it out using what you have written here as it is for someone to give you the answer. /rant Well, that thought occurred to me just after I sent the email... but there's nothing you can do after hitting the send button, can you? --Jason -- 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] Also related....(params)
In article 9h05jt$cav$[EMAIL PROTECTED], [EMAIL PROTECTED] (Brian Weisenthal) wrote: I am trying to create a function that will check if a variable exists, if it does leave it alone, if not create it. This is similar to cfparam for those who know cold fusion. Anyone know a good way to deal with this in php4? I just started learning php, im sure someone has had to deal with this for some reason, there must be a good way, I trust php, dont fail me now baby! php.net/isset -- CC -- 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] good chat script?
Anybody know of a good chat script? I'm hoping for the chat equivalent of phorum. Thanks for any help. daniel Daniel Goldin [EMAIL PROTECTED] 323.225.1926 BlueLamp Productions www.blue-lamp.com -- 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] Is this a joke?!
Title: RE: [PHP] Is this a joke?! Indeedy... http://uptime.netcraft.com/up/graph?mode_u=off_w=on=www.perl.com=Examine -- Aaron -Original Message- From: James Moore [mailto:[EMAIL PROTECTED]] Sent: Friday, June 22, 2001 1:06 PM To: 'Fredrik Arild Takle'; [EMAIL PROTECTED] Subject: RE: [PHP] Is this a joke?! Is this a joke? http://www.perl.com/search/index.php *hehe* I see someone has been reading my sig, and no its for real. - James -- James Moore [EMAIL PROTECTED] http://www.perl.com/search/index.php - we must be doing somthing right -- 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] math question
$theta = 15*pi/360; gives a value of 0 for $theta... it should be something like 0.131... Julia -- [ Julia Anne Case ] [Ships are safe inside the harbor, ] [Programmer at large] [ but is that what ships are really for.] [ Admining Linux ] [ To thine own self be true. ] [ Windows/WindowsNT ] [ Fair is where you take your cows to be judged. ] -- 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] math question
Julia A. Case [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... $theta = 15*pi/360; gives a value of 0 for $theta... it should be something like 0.131... Julia I get echo 15 * M_PI / 360; returns 0.13089969389957 -- 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] OCIExecute hangs with invalid sql statement
On Fri, Jun 22, 2001 at 11:27:42AM +0100, Euan Greig wrote: The following code works fine if passed a valid sql statement in $sql, but if not it hangs. $this-conn=OCIPLogon($orauser,$orapwd,$tns) or die (Could not log on to database); $this-stmnt = OCIParse($this-conn, $sql) or die (Could not initialize database query (parse)); $result = OCIExecute($this-stmnt) or die (Could not perform database query (exec)); I have tried to identify an error at the OCIParse stage, using OCIError, but without success. It seems OCIParse does not return or generate an error for an invalid statement. Instead it returns a statement ID which apparently sends OCIExecute into a coma. Any ideas? what version of php? tc -- 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] Oracle Database keeps disconnecting - or something
On Fri, Jun 22, 2001 at 09:16:08PM +0300, Rouvas Stathis wrote: Do you experience any other sort of problems other than those warnings? I mean, is anything wrong with the data? Normally, nothing should be wrong. I have seen the same messages (especially the service handle not intitialized one) in my server too. I have traced it to attemtps to close an already closed connection, as in $cone = OciLogon(...); ...stuff... OciLogout($cone); ...stuff... OciLogout($cone); believe me - this is not the cause of the message. tc -- 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] Using post method thru php-script
Hi, I am developing a shopping-cart application and i need to authorize the credit-card no. of the customer. I need to use a post method thru my php-script a replica of which I am giving below: Script Start: // Build the request string $request.='cardnum='.urlencode(); $request.='address='.urlencode(99 xyz); $request.='zipcode='.urlencode(96004); $request.='amount='.urlencode(2.00); // Build the header $header=POST /cgi-bin/xyz.exe HTTPS/1.0\r\n; $header.=Host: secure.aaa.com\n. User-Agent: PostIt\r\n; $header.=Content-type: application/x-www-form-urlencoded\r\n; $header.=Content-length: .strlen($request).\r\n\r\n; // Open the connection $fp = fsockopen('secure.aaa.com',443,$err_num,$err_msg); $i=0; if ($fp) { // Send everything fputs($fp,$header.$request); // Get the response $response=I am in; while (!feof($fp)) { $response.=fgets($fp,128); $i++; } fclose($fp); } else $response=Dead; ? html head titleResponse from aaa.com/title /head body bgcolor=#FF p ? echo Response from aaa: .$response; ? ? echo brNo. of loops: .$i; ? ? echo brError no: .$err_num. Error Message: .$err_msg; ? /p /body /html Script End. In the above code I am posting my form data to https://secure.aaa.com/cgi-bin/xyz.exe which processes the credit card and returns some string values showing whether the credit-card is valid or not. My question is that whether the method I'm using is correct to post data to secure servers. Well my code runs on a normal server ie. non- secure. My code is able to connect to the secure server i.e fsockopen works but i do not get any response from the server. Well you can judge this by the result I am getting on my browser. The result I am getting on browser is: Response from aaa: I am in No. of loops: 1 Error no: 0 Error Message: So am i doing anything wrong somewhere or is there some other way to do this thing. Please help asap. I need to finish this stuff by 27th of this month. regards George _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- 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] math question
pi is a function. Try this: $theta = 15*pi()/360; It should return 0.13089969389957 -Evan Nemerson $theta = 15*pi/360; gives a value of 0 for $theta... it should be something like 0.131... Julia -- 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] math question
Have you defined the 'pi' constant? If you are trying to use PHP's built-in PI constant, it is named 'M_PI' Perhaps consider increasing your error reporting level so that PHP reports problems like undefined constants - see error_reporting() for more details. --zak - Original Message - From: Julia A. Case [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, June 23, 2001 12:07 AM Subject: [PHP] math question $theta = 15*pi/360; gives a value of 0 for $theta... it should be something like 0.131... -- 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] SubDomain Redirect
Jon Shoberg [EMAIL PROTECTED] wrote: Using Apache ... Any thoughts no how I can create a link: http://cars.mydomain.com and have it redirect to http://www.mydomain.com/index.php?id=cars and http://www.mydomain.com/cars and have it redirect to http://www.mydomain.com/jump.php?id=cars without messing up my default in the top of your index page write something like: switch(StrToUpper($HTTP_HOST)){ case WWW.CARS.MYDOMAIN.COM; case CARS.MYDOMAIN.COM; header(Location: http://www.mydomain.com/index.php?id=cars;); break; } and so on -- Henrik Hansen -- 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] good chat script?
Daniel Goldin \(E-mail\) [EMAIL PROTECTED] wrote: Anybody know of a good chat script? I'm hoping for the chat equivalent of phorum. Thanks for any help. http://phpwizard.net/projects/phpChat/ - might give that one a go. -- Henrik Hansen -- 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] math question
If u don't want to use the pi() function. Try M_PI. This is a pi constant its value is 3.14159265358979323846 $theta=15*M_PI/360; - Original Message - From: Anon Y Mous [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, June 23, 2001 2:21 PM Subject: Re: [PHP] math question pi is a function. Try this: $theta = 15*pi()/360; It should return 0.13089969389957 -Evan Nemerson $theta = 15*pi/360; gives a value of 0 for $theta... it should be something like 0.131... Julia -- 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] _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- 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_free_result() question
Do I mysql_free_result the $Query or the $Result? If it's $Result, would this be the same as just going unset($Result)? mysql_free_result() frees the ressources that the MySQL server allocated for the results of your query. This is in the memory space of the MySQL server, while if you unset($Result), it only frees the MySQL result id (an integer if I remember corretly) in the memory space of your script. So, no, calling unset() is not the same to call mysql_free_result(). Hope this helps. Kristian -- 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] RE: [PHP-DB] Design conundrum...
The problem involves 2 tables, one of editors and one of categories, both have unique ID numbers. Each editor can have authority over an arbitrary number of categories, and conversely, each category can have an arbitrary number of editors. So what is the best way to represent this in the DB? (Which is PostgreSQL 7 BTW) This is a so-called N:N relation, and this usually calls for a third table to store the cross-relations: table editors id, name, email table categories id, name table ediors_categories editor (id of editor) category (id of category) Now if you want to give an editor authority over a category, you would insert a new record into editors_categories with the respective ids of the editor and the category. If you want to select all categories that belong to a certain author, you would do this: SELECT c.* FROM categories c LEFT JOIN editors_categories ed ON c.id = ed.category WHERE ed.editor = ' . $editor_id . ' This selects all category records and joins them with the editors_categories table, then filtering the resulting recordset by the editor id stored in the editors_categories table. Hope this helps Kristian -- 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] readfile() question
Hi there, I was wondering what happens if you call the readfile function to output a large binary file to a client with a slow connection. Does the script run until the whole file is sent to the client (leading to timeout errors on servers with a low max execution time) or does it fill some sort of buffer on the web server which then takes over and sends the file to the client? Thanks a lot Kristian -- 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] good chat script?
Daniel Goldin (E-mail) wrote: Anybody know of a good chat script? I'm hoping for the chat equivalent of phorum. Thanks for any help. If you can live with the hassle of rebuilding PHP, you might try ircg from Sascha Schumann (http://www.schumann.cx). This is by FAR the most performant chat for PHP out there. It can easily handle thousands of clients even on medium machines. regards Wagner -- Isn't it strange? The same people who laugh at gypsy fortune tellers take economists seriously. - Cincinnati Enquirer -- 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] file upload: $userfile is never none
sice i installed php 3.0.18 html forms whith blank file-input never returns 'none'. $userfile is always unset. with php 3.0.12 my file-upload scripts worked perfectly. i know i could do samething like: if ($userfile != 'none' strlen($userfile)) { ... } but i have alot of scripts to change. is there a possibilty to configure php 3.0.18 returning $userfile = 'none' if the input-tag in the form left blank. thx matthias -- 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] Problems with include directory which falls under .htaccess protection
Hi all, I have a .htaccess file with the following in it order allow,deny allow from all require user pilot Authname MySite Authtype Basic The page itselfs prompts for and accepts username/password correctly, however on that page are a number of included files.. The included files are in a subdirectory of the root of the site and hence fall under the jursidiction of the .htaccess. PHP cannot however access these.. I guess because it also needs to be authenticated... Oh, I checked the PHP code etc... and everything works fine... Thanks in Advance.. Tom Carter Web Architect roundcorners ltd. -- 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] Setup Question
Im installing PHP 4.0.5, I have Apache 1.3.20 installed currently and Im also using a built in module of mod_perl 1.25. Heres my apache mod list [grumster]:12:38pm:/usr/local/apache/bin:(raq)- ./httpd -l Compiled-in modules: http_core.c mod_env.c mod_log_config.c mod_mime.c mod_negotiation.c mod_status.c mod_include.c mod_autoindex.c mod_dir.c mod_cgi.c mod_asis.c mod_imap.c mod_actions.c mod_userdir.c mod_alias.c mod_access.c mod_auth.c mod_so.c mod_setenvif.c mod_perl.c suexec: disabled; invalid wrapper /usr/local/apache/bin/suexec Ive added LoadModule php4_module libexec/libphp4.so to my httpd.conf file after doing the DSO compile for PHP. Whenever I try to load a webpage with PHP, Im getting errors like Document Contains no Data. When I do a gdb I get the following..: bash-2.04# gdb /usr/local/apache/bin/httpd (gdb) run -X Starting program: /usr/local/apache/bin/httpd -X warning: Unable to find dynamic linker breakpoint function. GDB will be unable to debug shared library initializers and track explicitly loaded dynamic code. Program received signal SIGSEGV, Segmentation fault. 0x401fa9d0 in ?? () (gdb) bt #0 0x401fa9d0 in ?? () #1 0x401fab24 in ?? () #2 0x8098103 in ap_invoke_handler () #3 0x80abac9 in process_request_internal () #4 0x80abb28 in ap_process_request () #5 0x80a31e5 in child_main () #6 0x80a3378 in make_child () #7 0x80a34d3 in startup_children () #8 0x80a3b08 in standalone_main () #9 0x80a4287 in main () #10 0x400cf577 in __libc_start_main () from /lib/libc.so.6 (gdb) ANY HELP would be appreciated, I wasnt able to find anything in the archives. -- Regards, Patrick Smith
[PHP] Making a string title case ?
Hi Whats the best way to make $string title case? In other words, turn this is a string into This Is A String ? Thanks a bunch Jason -- 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] php 4.06 as an apache DSO Error
I'm trying to install PHP 4.06 as a DSO with apache 1.3.20 on redhat 7.1 and it produces this error. No of which are the problem. What else can it be?? Configuring SAPI modules checking for Apache module support via DSO through APXS... ./configure: /software/apache/bin: is a directory Sorry, I was not able to successfully run APXS. Possible reasons: 1. Perl is not installed; 2. Apache was not compiled with DSO support (--enable-module=so); 3. 'apxs' is not in your path. __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ -- 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] newbie algorithm help!!!!!
please share if you know hwo to di it. thanks you McShen [EMAIL PROTECTED] wrote in message 9gqm6o$g6n$[EMAIL PROTECTED]">news:9gqm6o$g6n$[EMAIL PROTECTED]... hi i have a mysql table with approx. 30 entries. I wanna get them(i know how to do that) and list them in a 2-column table. I have been trying to use a loop to do it. But it will only produce a 1-column table. it's like entry 1 entey 2 entry 3 entry 4 etc Please help me so that i can get this : entry1 entry2 entry3 entry4 Thanks in advanced. -- 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] OOP
Hello! Is it possible to do normal inheritance on PHP? I've following code: --- class one { function one() { echo one ; } } class two extends one { function two() { echo two ; } } class three extends two { function three() { echo three; } } $foo = new three(); --- And the output of this programm is three, but not one two three :( Best regards, Andrew Kirilenko, Seniour Programmer / System Administrator, Internet Service. -- 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] gd library on win2k?
how can i install the gd library for php on win2k using iis5? - Noah -- 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.06 as an apache DSO Error
Make sure your configure statement contains something like this --with-apxs=/path/to/apxs Julia Quoting Daniel Guerrier ([EMAIL PROTECTED]): I'm trying to install PHP 4.06 as a DSO with apache 1.3.20 on redhat 7.1 and it produces this error. No of which are the problem. What else can it be?? Configuring SAPI modules checking for Apache module support via DSO through APXS... ./configure: /software/apache/bin: is a directory Sorry, I was not able to successfully run APXS. Possible reasons: 1. Perl is not installed; 2. Apache was not compiled with DSO support (--enable-module=so); 3. 'apxs' is not in your path. __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ -- 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] -- [ Julia Anne Case ] [Ships are safe inside the harbor, ] [Programmer at large] [ but is that what ships are really for.] [ Admining Linux ] [ To thine own self be true. ] [ Windows/WindowsNT ] [ Fair is where you take your cows to be judged. ] -- 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] newbie algorithm help!!!!
is this what you want? there must be an easier way. i am sure some one else knows it be i would - ?php $result = mysql_query("select * from table"); ? table $i = 0; while($my_array = mysql_fetch_array($result)) { if($i%2) { print"td{$my_array[0]/td/tr"; } else { print"trtd{$my_array[0]}/td"; } $i++: } /table or am i completely off on what you need? please share if you know hwo to di it. thanks you""McShen"" [EMAIL PROTECTED] wrote in message9gqm6o$g6n$[EMAIL PROTECTED]">news:9gqm6o$g6n$[EMAIL PROTECTED]... hi i have a mysql table with approx. 30 entries. I wanna get them(i know how to do that) and list them in a 2-column table.I have been trying to use a loop to do it. But it will only produce a1-column table. it's like entry 1 entey 2 entry 3 entry 4 etc Please help me so that i can get this : entry1 entry2 entry3 entry4 Thanks in advanced. Thank You,Jon Yaggiewww.design-monster.comAnd they were singing . . . '100 little bugs in the code100 bugs in the codefix one bug, compile it again101 little bugs in the code101 little bugs in the code . . .'And it continued until they reached 0
[PHP] Practical flock() implementation
I'm having trouble understanding the docs and annotations on flock(). I've got a script that needs to overwrite a data file's contents without letting Instance B of that script truncate the data file while Instance A is still writing new content to it. How do other people do this? It seems to me that if I fopen() in w or w+ mode, then the file will be truncated before it can be determined whether there's a lock already in effect or the current instance can acquire a lock; but flock() requires a filepointer argument, so don't I *have* to fopen the file before going to flock()? Or should I fopen first in r mode, acquire the lock, then re-open in w mode, counting on the lock to stay in effect even though it's a different file pointer? I'd also be grateful if someone could clarify the difference between blocking and locking (i.e. If you don't want flock() to block while locking, add LOCK_NB (4 prior to PHP 4.0.1) to operation.). TIA -- CC -- 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] Get the value of a input type=image...
I always use InputImageName_x 0 to know if a button was clicked. How can I get the value on my input type=image? Like: input type=image name=contatc value=002545645 how can I get 002545645 with $contatc? thanks, Augusto -- 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] Practical flock() implementation
Hello CC, On 23-Jun-01 17:25:54, you wrote: I'm having trouble understanding the docs and annotations on flock(). I've got a script that needs to overwrite a data file's contents without letting Instance B of that script truncate the data file while Instance A is still writing new content to it. How do other people do this? It seems to me Let me guess: you are developing a cache system, right? :-) that if I fopen() in w or w+ mode, then the file will be truncated before it can be determined whether there's a lock already in effect or the current instance can acquire a lock; but flock() requires a filepointer argument, so don't I *have* to fopen the file before going to flock()? Or should I fopen first in r mode, acquire the lock, then re-open in w mode, counting on the lock to stay in effect even though it's a different file pointer? I know that second solution works, but I don't know about its portability. I'd also be grateful if someone could clarify the difference between blocking and locking (i.e. If you don't want flock() to block while locking, add LOCK_NB (4 prior to PHP 4.0.1) to operation.). If you don't want to wait in case it is not possible to obtain the lock right away, using non-blocking locks. Regards, Manuel Lemos Web Programming Components using PHP Classes. Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED] -- E-mail: [EMAIL PROTECTED] URL: http://www.mlemos.e-na.net/ PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp -- -- 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] newbie algorithm help!!!!!
I use this code to do this kind stuff: - BEGIN --- $result=mysql_query(...); $columns=2; //Count of columns $table="TABLE\n"; $table.='TR'; $col=0; //current column //Draw table content while ($row=mysql_fetch_row($result)){ $table.='TD'.$row[0].'/TD'; $col++; if ($col=$columns) { $table.="/TR\nTR"; $col=0;} // Next row } //Correct last row, add or remove empty cells. if ($col) { $table.=str_repeat('TDnbsp;/TD',$columns-$col); //Add empty cells }else{ $table=substr($table,0,strlen($table)-10); //Remove empty row } $table.="/TR\n"; $table.='/TABLE'; echo $table; - END --- X -- 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] Running external programs
Hi: I´m using PHP4 on IIS 5 on Windows 2000 Server and it works fine. The Microsoft NNTP Service from IIS 5 can be managed from command shell with commands like this bellow: cscript d:\\temp\\rgroup.vbs -t a -g new.group.01 And it works also fine in my system. But, when I try to run a program from a simple PHP script like the following: ? $commandstring = "cscript d:\\temp\\rgroup.vbs -t a -g new.group.01"; passthru($commandstring);? I get this Warning.. Warning: Unable to fork [cscript d:\temp\rgroup.vbs -t a -g new.group.01] in d:\inetpub\wwwroot\nntpadm\creategroup.php on line 3 Whatam I doing wrong? Thanks in advance.
[PHP] PhpDEV
www.oosha.com/phpdev/index.php3 Ive had some great response to the site but not as much as id hoped if you have any ideas please email them to me and ill implement them -- [EMAIL PROTECTED] [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] variables / reading files
Michael Hall pressed the little lettered thingies in this order... I'm stuck on a piece of code for a shopping cart. I'm on the final page where the buyer clicks BUY and several things happen. I want to loop through the table that stores the session info and extract details such as item, price, quantity, subtotal and assign all this info to one variable: $var = the output of a while($row = mysql_fetch_array($query)) statement Why I'm trying to do this is I'd like to store all the purchase details in one variable for inclusion in an email: $message = $var; // (from above) mail($address,$subject,$message); I'd also like to put the info in that same variable into a table that records actual sales data: $details = $var; insert into table ('details') values ('$details'); I know there must be a (probably very easy) way, but just can't crack it. $result = mysql(DBName,QUERY); while ($row = mysql_fetch_row($result)) { $var = $row[0]; $message .= $var; } $details = $message The period and equal sign cause $message to prepend itself to $var. This is the same thing as writing: $message = $message.$var; In either case, $message is preserved and added to on each loop. That being the case, if you are puting this into an e-mail message, you probably want to add line breaks after each line: $message .= $var.\n; Check out string operators: http://www.php.net/manual/en/language.operators.string.php and assignement operators: http://www.php.net/manual/en/language.operators.assignment.php Good luck... Christopher Ostmo a.k.a. [EMAIL PROTECTED] AppIdeas.com Meeting cutting edge dynamic web site needs For a good time, http://www.AppIdeas.com/ -- 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] PHP 4.0.6 + GD 2.0.1
Hi all- Is anyone using PHP 4.0.6 with GD 2.0.1? (yes I like to live on the bleeding edge :-) I'm developing an application that does a lot of image operations and would like to be able to use the new ImageCopyResampled() and ImageCreateFromString() functions. I'm using PHP 4.0.6 with GD 1.8.4 right now, and all is well. However, when I install GD 2.0.1, PHP's make dies, saying there is something wrong with gdio.h. I've removed all GD 1.8.4 bits from my box, just in case there is a library conflict; and the --with-gd-[DIR] is set correctly during PHP's ./configure, but make still goes kablooey. TIA, Ben Gollmer -- 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] PEAR
I just installed PHP 4.06 on my setup, and noticed that there's a bunch of classes/scripts in the /pear directory. Does anyone know what the status of these scripts are, as in if they are finished quality (ie, they can be used successfully on websites)? I thought that PEAR was still being developed. --Jason -- 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] Output an image stream?
I have created a barcode as an image stream ($im). Now, I want to output it in HTML to a particular row and column on a form. Do I have to save it as a file so that I can use the routine img src=xx or is there a way to directly output the stream? Many thanks... Todd -- Todd Cary Ariste Software [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] mysql_free_result() question
You should call mysql_free_result($Query) !! It all becomes a little clearer if you change the names of the variables as such: $result = mysql_query(select ...); $row = mysql_fetch_assoc($result); That is, mysql_query() returns a result, and mysql_fetch_*() returns a row from such a result. Using mysql_free_result on a row is not advisable. Also, in my terminology, the query would be the string passed to mysql_query(), so you could do like this: $query = select ...; $result = mysql_query($query); $row = ... Regards, Jakob Kruse Chris Cameron [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I'm a bit unclear as to which result it is I use this function on. So lets say I; $Query = mysql_query(SELECT something FROM here); $Result = mysql_fetch_assoc($Query); Do I mysql_free_result the $Query or the $Result? If it's $Result, would this be the same as just going unset($Result)? Thanks, Chris -- If you don't find it in the index, look very carefully through the entire catalogue. - Sears, Roebuck, and Co., Consumer's Guide, 1897 -- 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] newbie algorithm help!!!!!
You'll probably get as many approaches as replies. How about the following; after you have connected to mysql and selected the database; $query = SELECT * FROM table; $result = mysql_query ($query) or die (Query b$query/b failed. The error message was .mysql_error ()); // The following wipes out any trace of a memory table in the working $table element $table = ''; while ($rows = mysql_fetch_row ($result)) { $table[] = $rows[0];// add the row to a working table } mysql_free_result($result) // always do this as soon as you can $top = sizeof($table); $halfway = ceil($top/2);// round up if odd $col2 = $halfway; echo TABLE; for($col1 = 0; $col1 $halfway; $col1++) { echo TRTD$table[$col1]/TD; if($col2 $top) echo TD$table[$col2++]/TD/TR; else echo TDnbsp;/TD/TR; // this avoids that hole in your grid } echo /TABLE; -Original Message- From: Zak Greant [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 23, 2001 1:22 PM To: McShen Cc: Php-General Subject: Re: [PHP] newbie algorithm help! McShen wrote: hi i have a mysql table with approx. 30 entries. I wanna get them(i know how to do that) and list them in a 2-column table. I have been trying to use a loop to do it. But it will only produce a 1-column table. it's like entry 1 entey 2 entry 3 entry 4 etc Please help me so that i can get this : entry1 entry2 entry3 entry4 The code is easier to understand than the explanation! :) $query = SELECT * FROM table; $result = mysql_query ($query) or die (Query b$query/b failed. The error message was . mysql_error ()); // Initialize a value to stored the table rows $table = ''; // Initialize a counter for the column number $column = 0; // Loop through the query results while ($rows = mysql_fetch_row ($result)) { // Put the contents of the field into a cell $cell = td$rows[0]/td; // If we are in column 0 if (0 == $column) { // Start the row $table .= tr$cell; } else { // End the row $table .= $cell/tr\n; } // Make the column number equal to // The whole number remainder left over // from dividing the value of $column // plus one by two $column = ($column + 1) % 2; } // Handle dangling rows if (1 == $column) { $table .= td/td/tr\n; } echo table$table/table; Good Luck! --zak -- 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] Events Listings
Hello, I have a script that does TV/Tour listings for artist, I need it to sort the list automatically so that it goes in date order but I have absolutely no idea. I have put together the script with little to no PHP skills so it look pretty horrific. If you could help me out with figuring out how to fix it, it would be muchly appreciated. The code is below Rick ?php if ($max_days == ){ $max_days = 365; } $current_day = date( z); echo table border=\0\ cellspacing=\1\ cellpadding=\1\ bgcolor=\#00\\n; echo tr bgcolor=\#E5E5E5\td colspan=\6\ align=\right\balanis guide/b/td/tr\n; echo tr bgcolor=\#E5E5E5\\n; echo td align=\center\font face=\Arial\ size=\1\ bgcolor=\#E5E5E5\date/FONT/td\n; echo td align=\center\font face=\Arial\ size=\1\ bgcolor=\#E5E5E5\time/FONT/td\n; echo td align=\center\font face=\Arial\ size=\1\ bgcolor=\#E5E5E5\where/FONT/td\n; echo td align=\center\font face=\Arial\ size=\1\ bgcolor=\#E5E5E5\what/FONT/td\n; echo td align=\center\font face=\Arial\ size=\1\ bgcolor=\#E5E5E5\days till/FONT/td\n; echo /tr\n; //Create Function function create($listing, $max_days){ list ($month, $day, $year, $time,$channel,$show) = split('/', $listing); $year = 20$year; if ($channel == VH1){ $url = http://www.vh1.com;; } if ($channel == MTV){ $url = http://www.mtv.com;; } if ($channel == COM){ $url = http://www.comedycentral.com;; } if ($channel == HBO){ $url = http://www.hbo.com;; } if ($channel == HBOZ){ $url = http://www.hbo.com;; } if ($channel == HBOS){ $url = http://www.hbo.com;; } if ($channel == TRIO){ $url = http://www.triotv.com;; } $current_day = date( z); $show_day = date( z, mktime( 0, 0, 0, $month, $day, $year ) ); $time_till_event = $show_day - $current_day; if ($time_till_event $max_days){ if ($time_till_event == '0'){ $time_till_event = Today; } if ($time_till_event == '1'){ $time_till_event = Tomorrow; } if ($time_till_event 0){ return; } if ($url != ''){ $start = a href=\$url\; $end = /a; } if ($confirmed == 'yes'){ $image = images/yes.gif; } if ($confirmed == 'no'){ $image = images/no.gif; } echo tr bgcolor=\#E5E5E5\\n; echo tdfont face=\Arial\ size=\1\$start$month.$day.$year$end/FONT/td\n; echo tdfont face=\Arial\ size=\1\$start$time$end/FONT/td\n; echo tdfont face=\Arial\ size=\1\$start$channel$end/FONT/td\n; echo tdfont face=\Arial\ size=\1\$start$show$end/FONT/td\n; echo td align=\center\font face=\Arial\ size=\1\$start$time_till_event$end/FONT/td\n; echo /tr\n; } else{ return; } } //Dates $listing = 06/24/01/04:00 pm/VH1/Saturday Night Live 25: The Music; create($listing, $max_days); $listing = 06/24/01/05:00 pm/VH1/Before They Were Rock Stars; create($listing, $max_days); $listing = 06/24/01/11:00 pm/HBOZ/Reverb; create($listing, $max_days); $listing = 06/28/01/01:00 am/HBOZ/Reverb; create($listing, $max_days); $listing = 06/28/01/11:00 am/VH1/VH1: All Access; create($listing, $max_days); $listing = 06/28/01/10:00 pm/VH1/VH1: All Access; create($listing, $max_days); $listing = 06/28/01/11:30 pm/VH1/VH1: All Access; create($listing, $max_days); $listing = 06/29/01/09:30 pm/HBOS/Sex And The City; create($listing, $max_days); $listing = 06/30/01/07:00 pm/VH1/VH1: All Access; create($listing, $max_days); $listing = 07/01/01/01:00 am/TRIO/Paris Concert for Amnesty International; create($listing, $max_days); $listing = 07/09/01/09:00 am/TRIO/Alanis Morissette Stevie Nicks; create($listing, $max_days); $listing = 07/09/01/03:00 pm/TRIO/Alanis Morissette Stevie Nicks; create($listing, $max_days); $listing = 07/13/01/12:00 pm/MTV/MTV and Rolling Stone's 100 Greatest Pop Songs ; create($listing, $max_days); $listing = 07/13/01/08:00 pm/MTV/MTV and Rolling Stone's 100 Greatest Pop Songs ; create($listing, $max_days); $listing = 07/27/01/09:00 am/TRIO/Alanis Morissette Stevie Nicks; create($listing, $max_days); $listing = 07/27/01/03:00 pm/TRIO/Alanis Morissette Stevie Nicks; create($listing, $max_days); $listing = 07/01/01//Ottawa, ON/Canada Day; create($listing, $max_days); $listing = 07/03/01//Kristiansand, NOR/Quart Festival ; create($listing, $max_days); $listing = 07/05/01//Stockholm, SWE/Annex ; create($listing, $max_days); $listing = 07/06/01//Sundsvall, SWE/City Festival ; create($listing, $max_days); $listing = 07/07/01//Odense, DEN/Midtfyns Festival ; create($listing, $max_days); $listing = 07/09/01//Hamburg, GER/Stadtpark ; create($listing, $max_days); $listing = 07/11/01//Montreux, SWI/Montreux Jazz Festival ; create($listing, $max_days); $listing = 07/12/01//Brescia, ITA/Piazza Duomo ; create($listing, $max_days); $listing = 07/13/01//Palermo, ITA/To Be Announced ; create($listing, $max_days); $listing = 07/28/01//Nigata, JPN/Fuji Rock Festival ; create($listing, $max_days); $listing = 07/31/01//Anchorage, AK/Egan Civic Conv. Ctr. ; create($listing, $max_days); echo tr align=\center\ bgcolor=\#E5E5E5\td colspan=\6\font size=\-2\All shows are Eastern Standard Time unless otherwise noted/font/td/tr\n; echo /table\n; ? -- PHP General Mailing List
[PHP] Php Files on Browser
G'day - Sorry for this stupid question but I'm a newby trying to install php on my win98 computer and find that neither netscape nor IE 5.5 won't open php files that are located on my c: drive but will access php files on the net. There must be a simple explanation. Any help greatly appreciated... Ted Shaw -- 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] OOP
As I understand it in PHP the constructor of the parent class is not called when a child class is initiated. You can call it manually. Eg., using your example: class one { function one() { echo one ; } } class two extends one { function two() { one::one(); echo two ; } } class three extends two { function three() { two::two(); echo three; } } $foo = new three(); $foo should now equal 'one two three'. (:: lets you access functions from within a class without explicitly declaring a new object). Hope this helps (PS. The PHP Developer's Cookbook by Sterling Hughes has a short but good chapter on classes). Aral :) __ ([EMAIL PROTECTED]) New Media Producer, Kismia, Inc. ([EMAIL PROTECTED]) Adj. Prof., American University ?? -- 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] Creating formatted documents
I need to create a document that confirms to certain formatting criteria and then be able to give the surfer the ability to download the completed document preferrable, pdf. In other words, the document is a legal document and has some dynamic fields. Can this be done in php and if so, is there some code available that can give me an idea on how to do it? Todd -- Todd Cary Ariste Software [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] variables / reading files
OK, thanks for that Chris. I did get it in the end, with something very similar to what you suggested: $message = ; while ( ) { $var1 = $row[1]; ... etc $item = $var1 $var2 $var3 etc; $message = $message . $item . \n; } Your solution is cleaner so I'll change it over. I'd written the whole cart in one sitting up to then, and was fairly cross-eyed by that stage. On Sat, 23 Jun 2001, Christopher Ostmo wrote: Michael Hall pressed the little lettered thingies in this order... I'm stuck on a piece of code for a shopping cart. I'm on the final page where the buyer clicks BUY and several things happen. I want to loop through the table that stores the session info and extract details such as item, price, quantity, subtotal and assign all this info to one variable: $var = the output of a while($row = mysql_fetch_array($query)) statement A Why I'm trying to do this is I'd like to store all the purchase details in one variable for inclusion in an email: $message = $var; // (from above) mail($address,$subject,$message); I'd also like to put the info in that same variable into a table that records actual sales data: $details = $var; insert into table ('details') values ('$details'); I know there must be a (probably very easy) way, but just can't crack it. $result = mysql(DBName,QUERY); while ($row = mysql_fetch_row($result)) { $var = $row[0]; $message .= $var; } $details = $message The period and equal sign cause $message to prepend itself to $var. This is the same thing as writing: $message = $message.$var; In either case, $message is preserved and added to on each loop. That being the case, if you are puting this into an e-mail message, you probably want to add line breaks after each line: $message .= $var.\n; Check out string operators: http://www.php.net/manual/en/language.operators.string.php and assignement operators: http://www.php.net/manual/en/language.operators.assignment.php Good luck... Christopher Ostmo a.k.a. [EMAIL PROTECTED] AppIdeas.com Meeting cutting edge dynamic web site needs For a good time, http://www.AppIdeas.com/ -- 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] RSVP script anyone ???
Hi all, Does anyone out there have a PHP script that will serve as an input form which are e-mailed to wedding invitees, in turn, linking them to a form where they can RSVP their decision to attend the wedding or not and how many they plan to bring? Visit http://www.lunenburg.org/wedding/rsvp.php for an example of exactly what I'm expecting to accomplish. I've asked the web master of that site to share the code. No response yet. Thanks for any help anyone can provide. :-) Gene Kelley -- 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] -coding help
Hi I have a script which queries mySQL and outputs 32 links at once. Here is my scipt ?php $connection = mysql_connect(***,,); if ($connection==false) { echo mysql_errno().:.mysql_error().; exit; } $end = $list + 16; $query = SELECT * FROM refer ORDER BY hits desc LIMIT $list, $end; $result = mysql_db_query (celebzone, $query); $num = mysql_num_rows($result); $j=0; $i=0; echo table border=0\n; echo tr\n; while ($j!=$num) { @$r = mysql_fetch_array($result); @$id = $r[id]; @$title = $r[title]; echo td\n; echo $title; echo /td\n; // new row in table every other link $i++; if (($i % 2) 1) { echo /tr\ntr\n; } $j++; } echo /table; echo brbr\n; ? --- And here is the link to see it in action http://www.celebritieszones.com/ln.php?list=0 If you check my HTML source, at the end, right before /table, you will see an extra tr. I know the cause of this. It's because of this --- $i++; if (($i % 2) 1) { echo /tr\ntr\n; } - I don't know how to fix the problem. Please help me re-write the script a bit so that it doesn't add the extra tr. Thanks in advance. -- 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] -coding help
McShen wrote: Hi I have a script which queries mySQL and outputs 32 links at once. Here is my scipt ?php $connection = mysql_connect(***,,); if ($connection==false) { echo mysql_errno().:.mysql_error().; exit; } $end = $list + 16; $query = SELECT * FROM refer ORDER BY hits desc LIMIT $list, $end; $result = mysql_db_query (celebzone, $query); $num = mysql_num_rows($result); $j=0; $i=0; echo table border=0\n; echo tr\n; while ($j!=$num) { @$r = mysql_fetch_array($result); @$id = $r[id]; @$title = $r[title]; echo td\n; echo $title; echo /td\n; // new row in table every other link $i++; if (($i % 2) 1) { echo /tr\ntr\n; } $j++; } echo /table; echo brbr\n; ? --- And here is the link to see it in action http://www.celebritieszones.com/ln.php?list=0 If you check my HTML source, at the end, right before /table, you will see an extra tr. I know the cause of this. It's because of this --- $i++; if (($i % 2) 1) { echo /tr\ntr\n; } - I don't know how to fix the problem. Please help me re-write the script a bit so that it doesn't add the extra tr. Thanks in advance. -- 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] Try adding a ; after the \n -- 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] PHP 4.07-dev + Apache 2.0.19-dev
Has anyone had any luck getting it to work? I can compile both Apache fine and add php as a module no problem and Apache is happy. But it will not parse any PHP content. Please help! -- Austin Gonyou Systems Architect, CCNA Coremetrics, Inc. Phone: 512-796-9023 email: [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] -coding help
This should work... ?php $connection = mysql_connect(***,,); if ($connection==false) { echo mysql_errno().:.mysql_error().; exit; } $end = $list + 16; $query = SELECT * FROM refer ORDER BY hits desc LIMIT $list, $end; $result = mysql_db_query (celebzone, $query); $num = mysql_num_rows($result); $j=0; $i=0; echo table border=0\n; for ($j = 0; $j $num; $j++) { echo 'tr\n'; for ($i = 0; $i = 1; $i++) { @$result = mysql_fetch_array($result); @$id = $result[id]; @$title = $result[title]; echo td\n; echo $title; echo /td\n; } echo /tr\n; } echo /table; echo brbr\n; ? Jason Lotito www.NewbieNetwork.net PHP Newsletter: http://www.newbienetwork.net/ciao.php PHP, MySQL, PostgreSQL Tutorials, Code Snippets, and so much more -Original Message- From: McShen [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 23, 2001 11:22 PM To: [EMAIL PROTECTED] Subject: [PHP] -coding help Hi I have a script which queries mySQL and outputs 32 links at once. Here is my scipt ?php $connection = mysql_connect(***,,); if ($connection==false) { echo mysql_errno().:.mysql_error().; exit; } $end = $list + 16; $query = SELECT * FROM refer ORDER BY hits desc LIMIT $list, $end; $result = mysql_db_query (celebzone, $query); $num = mysql_num_rows($result); $j=0; $i=0; echo table border=0\n; echo tr\n; while ($j!=$num) { @$r = mysql_fetch_array($result); @$id = $r[id]; @$title = $r[title]; echo td\n; echo $title; echo /td\n; // new row in table every other link $i++; if (($i % 2) 1) { echo /tr\ntr\n; } $j++; } echo /table; echo brbr\n; ? --- And here is the link to see it in action http://www.celebritieszones.com/ln.php?list=0 If you check my HTML source, at the end, right before /table, you will see an extra tr. I know the cause of this. It's because of this --- $i++; if (($i % 2) 1) { echo /tr\ntr\n; } - I don't know how to fix the problem. Please help me re-write the script a bit so that it doesn't add the extra tr. Thanks in advance. -- 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] OOP
It sure is, but your code needs to look like this: class one { function one() { echo one ; } } class two extends one { function two() { parent::one(); echo two ; } } class three extends two { function three() { parent::two(); echo three; } } $foo = new three(); --- Matty. - Original Message - From: Andrew Kirilenko [EMAIL PROTECTED] To: PHP General [EMAIL PROTECTED] Sent: Sunday, June 24, 2001 6:04 AM Subject: [PHP] OOP Hello! Is it possible to do normal inheritance on PHP? I've following code: --- class one { function one() { echo one ; } } class two extends one { function two() { echo two ; } } class three extends two { function three() { echo three; } } $foo = new three(); --- And the output of this programm is three, but not one two three :( Best regards, Andrew Kirilenko, Seniour Programmer / System Administrator, Internet Service. -- 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] Output an image stream?
On Sat, Jun 23, 2001 at 04:50:48PM -0700, Todd Cary wrote: I have created a barcode as an image stream ($im). Now, I want to output it in HTML to a particular row and column on a form. Do I have to save it as a file so that I can use the routine img src=xx or is there a way to directly output the stream? img src=script_that_outputs_barcode_image.php Make sure to send a Content-type header before sending the image data: Header('Content-type: image/png'); ImagePNG($im); Matt -- 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] Running scripts from within PHP similar to SSI
Hi All, Just wondering if it were possible to do like the following SSI line: !--#exec cgi=./cgi-bin/txtcounter.cgi-- from within php. I know a php alternative should be made, but for the time being and for future's sake So far i've tried back ticks, passthru(), exec(), but the problem is that the URI and other variables aren't being passed to the perl script in question. Any idea would be appreciated. Deniz -- 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] PHP 4.0.6 Released!
PHP 4.0.6 has been released. Like 4.0.5, this is a maintenance release which mostly includes fixes to bugs and issues found in earlier versions. Those of you who decided not to upgrade to 4.0.5, may now wish to jump directly to 4.0.6 to get all the new fixes of both versions. One very important addition is the Japanese support through the new multibyte extension, that was ported from the PHP 3.0-jp code and improved by Rui Hirokawa. This makes PHP 4.0.6 the first version of PHP to have integrated support for Japanese in the standard distribution package, which is significantly better than the old solution of having a different version especially for Japanaese users. We hope that additional far-eastern languages will be supported in the future. Another major feature in 4.0.6 is the reduced memory requirements, thanks to a patch from Andi ([EMAIL PROTECTED]) that reduced memory fragmentation very significantly. Finally, the MySQL module now features the ability to use unbuffered queries, for reduced memory consumption when having large result sets. Look at mysql_unbuffered_query() for further details. A full list of changes is available below, and at http://www.php.net/ChangeLog-4.php. As with 4.0.5, we waited until the Windows binaries are built before announcing the availability of the new version. Thanks goes to Phil Driscoll ([EMAIL PROTECTED]) and Daniel Beulshausen ([EMAIL PROTECTED]) for providing the Win32 builds. To go on, point your browsers at http://www.php.net/downloads.php. Zeev 23 Jun 2001, Version 4.0.6 - Fixed memory fragmention problem which could lead to web server processes growing much more than they should. (Andi, Zend Engine) - Made $HTTP_SESSION_VARS['foo'] and $foo be references to the same value when register_globals is on. (Andrei) - Fixed disk_free_space() and disk_total_space() under FreeBSD. (Jon) - Fixed readfile/passthru losing resources during connection abort (Sascha) - Fixed bug in the mcrypt extension that caused segfaults when using a key that is too large for the used algorithm, and a bug that caused mcrypt_generic() to segfault PHP (Derick) - Fixed getopt so that it accepts command line arguments in the form -optarg and -opt arg. (Jmoore) - Fixed race in writing session files (Sascha) - Fixed a possible crash in the PHP CGI when no input file is specified (Zeev) - Added is_callable() function that can be used to find out whether its argument is a valid callable construct. (Andrei) - Fixed a rare possible crash when generating extended information. (Dmitri Dmitrienko, Zend Engine) - Improved virtual() to support PHP-enabled URIs. (Zeev) - Fixed undefined behavior when using floating point keys in array() expressions. (Zeev, Zend Engine) - Fixed a possible crash in case of parse errors in include files or eval statements. (Zeev, Zend Engine) - Added --with-layout configure option. (Stig) - Improved interactive mode - supports function calls, and works in multithreaded builds. (Zeev, Zend Engine) - Fixed a crash bug in interactive mode. (Zeev, Zend Engine) - Added pg_last_notice() function. (Rasmus from suggestion by [EMAIL PROTECTED]) - Fixed a bug in preg_split() that would incorrectly limit the number of results when used along with PREG_SPLIT_NO_EMPTY flag. (Andrei) - Added connection error support to mysql_error() and mysql_errno(). (Jason) - Added support to getimagesize to return dimensions of BMP and PSD files. (Derick) - Added heuristic to kill stale IRC connections, message scanner caching, and nickname escaping to IRCG, suppress option to ircg_msg(), and statistics to IRCG phpinfo() output. (Sascha) - Added Japanese multibyte string functions support. (Rui) - Added Mac OS X \r line ending support. (Andi, Zend Engine) - Fixed a bug regarding the $PHP_SELF being incorrectly registered when force-cgi-redirect was not enabled. (Sterling) - pfpro extension now supports version 3 of the Verisign SDK. (John Donagher) - Udm_Cat_List and Udm_Cat_Path functions has been added. - Added key_exists() to check if a given key or index exists in an array or object. (David Croft) - Modify the cURL extension to compile only with the latest cURL release. Backwards compatibility with regards to the extension api has not been broken. (Sterling) - Added the ability to use user-defined callbacks with cURL. (Sterling) - Added the SSL_VERIFYPEER, CAINFO, MAXREDIRS, FILETIME, RANDOM_FILE, EGDSOCKET and CONNECTTIMEOUT options to curl_setopt(). (Sterling) - Added support for persistent connections with cURL. (Sterling) - Fixed a problem in cURL with file descriptors being allocated, but never closed. (Sterling) - Fixed interactive mode (-a). It works again with the same limitations it has always had. (Andi, Zend Engine) - Improved memory manager to use less memory and provide better memory overflow detection abilities in debug mode. (Andi, Zend Engine) - Fixed resource leaks when