Re: [PHP] Want a Good Book for Ref on PHP
Personally, I never even bought a PHP book. I learned from the web only...hehe. First, go to zend.com and check out their tutorial and article sections. Then check out their links section, which just so happens to have links to 17 books, 10 of which are non-english. Check out phpbuilder.com, devshed.com, and phpbeginner.com. weberdev is also a good one. First of course, read the PHP manual. I basically learned everything I needed to from those sites. The rest comes from just hacking out code. PHP changed alot during the books writing process, so it's really rather impossible to get a totally updated book. For instance if you started writing a book now on PHP v4.0.5, PHP would be nearing version 5 before it ever hit a bookshelf. -- Plutarck Should be working on something... ...but forgot what it was. "Manisha" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi all, I am just entering into PHP world. First what I did is, I signed for PHP mailing list. I want to buy a good PHP book for my initial start and may be later on as a reference. I know there are lot in the market. Can anybody suggest a good book among them ? manisha -- 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] Want a Good Book for Ref on PHP
On Mon, Apr 16, 2001 at 01:23:46AM -0500, Plutarck wrote: First, go to zend.com and check out their tutorial and article sections. Then check out their links section, which just so happens to have links to 17 books, 10 of which are non-english. Why don't you visit php.net/books.php? There you can find much more books. First of course, read the PHP manual. I basically learned everything I needed to from those sites. The rest comes from just hacking out code. Many thanks! I'havent noticed that some people read this manual. PHP changed alot during the books writing process, so it's really rather impossible to get a totally updated book. For instance if you started writing a book now on PHP v4.0.5, PHP would be nearing version 5 before it ever hit a bookshelf. I don't see your point here, PHP version 4 and 5 would be compatible. If you are interested into the latest features, you have to read journals instead of books. -Egon -- LinuxTag, Stuttgart, Germany: July 5-8 2001: http://www.linuxtag.de/ All known books about PHP and related books: http://php.net/books.php Concert Band of the University of Hohenheim: http://www.concert-band.de/ First and second bestselling book in German: http://www.php-buch.de/ -- 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] fetching recursive mail parts
I have that message (at the end of this message) which has recursive parts. First part is a message itself and second is an attachment. Message part is divided into two parts (text/plain and text/html). Is there any way I can fetch only text/html that is part[0]-part[1] to $body variable with imap functions? Thanks, Madis * This is a multi-part message in MIME format. --=_NextPart_000_0012_01C0C331.9C5F9EE0 Content-Type: multipart/alternative; boundary="=_NextPart_001_0013_01C0C331.9C5F9EE0" --=_NextPart_001_0013_01C0C331.9C5F9EE0 Content-Type: text/plain; charset="iso-8859-4" Content-Transfer-Encoding: quoted-printable see kiri on qp formaadis vaatame, mis formaadis on attachment --=_NextPart_001_0013_01C0C331.9C5F9EE0 Content-Type: text/html; charset="iso-8859-4" Content-Transfer-Encoding: quoted-printable !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" HTMLHEAD META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-4" META content=3D"MSHTML 5.50.4522.1801" name=3DGENERATOR STYLE/STYLE /HEAD BODY bgColor=3D#ff DIVFONT size=3D2see kiri on qp formaadis/FONT/DIV DIVFONT size=3D2vaatame, mis formaadis on=20 attachment/FONT/DIV/BODY/HTML --=_NextPart_001_0013_01C0C331.9C5F9EE0-- --=_NextPart_000_0012_01C0C331.9C5F9EE0 Content-Type: application/x-msexcel; name="EXHIBIT_C.xls" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="EXHIBIT_C.xls" 0M8R4KGxGuEAPgADAP7/CQAGAAABGQ AA EAAA/v///wD+ABgAAAD/// // // //etc. --=_NextPart_000_0012_01C0C331.9C5F9EE0-- -- 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] dates
hi all, a little stuck here. trying to pull a bunch of unix timestamps out and show only those that show up today. problem is that when i hit the first match, the rest of the dates don't show. code follows: == $sql = "SELECT * FROM dates"; $result = mysql_query($sql) or mysql_die(); while ($a = mysql_fetch_array($result)) $showsID = $a[showsID]; $ts = $a[timestamp]; $endTime=(spanDay ($ts)); // function that adds 24hrs to initial stamp to make the end of day time. $today = time(); if (($endTime = $today)($ts = $today)) { $sq = "SELECT * FROM shows WHERE id=$showsID"; $result = mysql_query($sq) or mysql_die(); $b = mysql_fetch_array($result); print "brfont color=red$b[name]/fontbr"; } } == thanks in advance, @lvin -- 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 WebServer Question?
Can anyone recommend (or is there) a utility / app that I can use to hit my webserver (say from another computer outside my subnet) -- any number of times to get an idea of performance - based on my bandwidth and hardware? In other words -- I'd like to do some hard core testing of my website and see how much my pipe and servers (simultaneously) can handle... I would like to get page return times, etc... Also -- is there a good add on to IIS or Apache that I can use to monitor not only how much traffic is hitting my site, but which pages, and from where the users are coming (ie. which websites they came from)? Thanks. 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] global env variables not working in php-cgi
I am migrating a site to a new host (westhost.com) and having some issues. PHP was compiled as a cgi instead of a module which is what I have always used. This wasn't really an issue until I realized a lot of my scripts that depended on apaches environment variables ($REQUEST_URI, $HTTP_USER_AGENT, etc.) weren't working. I can write a PERL cgi script and get them from the command line, they also appear in phpinfo(), yet I simply can't obtain them from any of my php scripts. Maybe the cgi issue isn't even related but up to this point it is the only culprit I can find. After spending three days going through the docs at apache, phpbuilder, and php.net I have not ran across anything which offers a solution. Thus, I am not looking in the right place or this is a unique problem. Can anyone out there help, or provide some directions/suggestions? And yes, they are running Apache (note above, I can obtain the variables but just not through my php scripts). Do I need to make an addition to my .htaccess file of some sort? I need these variables for my site to work properly ( css generation, hashing URL strings, etc.) so any/all help is greatly appreciated. If you need more information please let me know and I will get back to you as soon as possible. At this point I can't obtain ANY of the env variables (SERVER_PORT, REMOTE_ADDR, REQUEST_URI, HTTP_USER_AGENT, etc.). Thanks, //frank -- 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] PHP4.0.4pl1+PdfLib3.03+SCO
Pdflib 3.03 compiles OK and builds a static library - /usr/local/lib/libpdf.a. PHP fails to configure - cannot find PDF_show_boxed in the library - pdflib extension requires pdflib 3.x. This command is in the library and the header file. Configure finds my tiff jpeg library (--with-tiff-dir=/usr/local --with-jpeg-dir=/usr/local) but is either not finding the library (--with-pdflib=/usr/local) or is not able to find PDF_show_boxed in the library. Can anyone help?? Chris -- Chris Fry Quillsoft Pty Ltd Specialists in Secure Internet Services and E-Commerce Solutions 10 Gray Street Kogarah NSW 2217 Australia Phone: +61 2 9553 1691 Fax: +61 2 9553 1692 Mobile: 0419 414 323 eMail: [EMAIL PROTECTED] http://www.quillsoft.com.au You can download our Public CA Certificate from:- https://ca.secureanywhere.com/htdocs/cacert.crt ** This information contains confidential information intended only for the use of the authorised recipient. If you are not an authorised recipient of this e-mail, please contact Quillsoft Pty Ltd by return e-mail. In this case, you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. This e-mail and any attachments may also contain copyright material belonging to Quillsoft Pty Ltd. The views expressed in this e-mail or attachments are the views of the author and not the views of Quillsoft Pty Ltd. You should only deal with the material contained in this e-mail if you are authorised to do so. This notice should not be removed. -- 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] fileupload,suexec,virtualhost
hi. i have a project to build a free hosting where its support php,perl mysql for free. i would like to make a file manager like geocities.com, i used php for file manager. if i use file upload to directory in my server, it shlould 777 mode, is in't? if yes, i think it's not secure 'couse every body can write to that directory. Does suEXEC can solve my problem? every user will get their domain such as user1.myfreeserver.com. how to set the directory(homedir of each user) with access write mode for each user? any idea to make file management where every user have domain(these should be my virtualhost), homedir(access write only the owner) ? -JUANG-
Re: [PHP] fwrite not writing
This function suddenly stopped working, and I just can't seem to figure out why. The only change made recently is that now the value of $force at calltime is sometimes true instead of being undefined or null. build_file("file_content","/path/to/file.inc","w",TRUE); function build_file($func_name,$filepath,$mode="w",$force=FALSE) { if($force or !file_exists($filepath) or !filesize($filepath)) //echo filesize($filepath) shows '0' { $content=$func_name(); //echo $content shows it's all there $fp=fopen($filepath,$mode); fwrite($fp,$content); rewind($fp); #temp test $read_back=fread($fp,10); #temp test echo "pfile content:/p\n $read_back"; #temp test, displays nothing fclose($fp); } } I've tried putting echoes and "or die('Error on __LINE__')" on every line, checked all the variable values, and found no answers from that. Everything shows exactly as it should be except that the content that echoes out so nicely *doesn't ever get written to the file*. The function runs to the end without error and the file's modification date is even updated. But the file remains empty. I'm probably missing something ridiculously obvious, but would someone please be kind enough to point out what it is? Thank you!! What is this: !filesize($filepath) If filesize is zero (which it is groan), then do the rest (which it does--except the content it fetches never makes it into the file it writes to. How that can be, I dunno, but that apparently is what it's doing...) Add this above your if loop: $filesize = filesize($filepath); echo $filesize; Already tried echoing that and all the other values. Filesize is 0. That might be causing your loop not to execute...if not, I'm not sure what's wrong. I don't get it. It should work. It did work. Suddenly it's not. -- 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]
Re: [PHP] dates
In article [EMAIL PROTECTED], [EMAIL PROTECTED] ("Alvin Tan") wrote: a little stuck here. trying to pull a bunch of unix timestamps out and show only those that show up today. problem is that when i hit the first match, the rest of the dates don't show. code follows: == $sql = "SELECT * FROM dates"; $result = mysql_query($sql) or mysql_die(); while ($a = mysql_fetch_array($result)) $showsID = $a[showsID]; $ts = $a[timestamp]; $endTime=(spanDay ($ts)); // function that adds 24hrs to initial stamp to make the end of day time. $today = time(); if (($endTime = $today)($ts = $today)) { $sq = "SELECT * FROM shows WHERE id=$showsID"; $result = mysql_query($sq) or mysql_die(); $b = mysql_fetch_array($result); print "brfont color=red$b[name]/fontbr"; } } Which of the queries are you concerned with, 'cuz on that second query you're only fetching array $b once. Wrap a while() loop around it like you did with array $a if you want more rows. BTW, you're missing an opening curly brace for the first while(). -- 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]
RE: [PHP] Want a Good Book for Ref on PHP
You know, I was wondering the same thing. My situation is the same. My opinion is that the professional version probably strips out most of the beginner's content and adds more advanced php content and dives into everything in more detail rather than just trying to get a beginner off their feet by providing simple tasks Wrox is a great company, they come out with books that are the most comprehensive. Both versions might be a good investment for hardcore php programmers. Best thing to do is to just stop by a barnes and nobles bookstore and start looking through both books to see which one is best for you. Navid -Original Message- From: Martin Skjoldebrand [mailto:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 12:53 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Want a Good Book for Ref on PHP Kath wrote: Professional PHP Programming: http://www.amazon.com/exec/obidos/ASIN/1861002963/qid=987388364/sr=1-12/ref= sc_b_13/002-2263539-0333643 I've got Beginning PHP 4 (recommended) on the back cover of which it says that the next book could be "Professional PHP Programming.". However from what I saw in the book shop they cover lots of the same ground. I (and my employer) wouldn't like to pay for the same stuff again. Is there a significant difference between the two? Martin S. -- 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] dates
Why don't you look into mYSQL documentation and rewrite your queries, you might be able to end up with one only single query and 3 lines of PHP, instead of the whole bunch as you're trying to do. The reason I advise you that is that mySQL plays some really sweet games with dates, while PHP treats them as simple set of integers... Hope it helps. Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: Alvin Tan [mailto:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 4:21 PM To: Php-General Subject: [PHP] dates hi all, a little stuck here. trying to pull a bunch of unix timestamps out and show only those that show up today. problem is that when i hit the first match, the rest of the dates don't show. code follows: == $sql = "SELECT * FROM dates"; $result = mysql_query($sql) or mysql_die(); while ($a = mysql_fetch_array($result)) $showsID = $a[showsID]; $ts = $a[timestamp]; $endTime=(spanDay ($ts)); // function that adds 24hrs to initial stamp to make the end of day time. $today = time(); if (($endTime = $today)($ts = $today)) { $sq = "SELECT * FROM shows WHERE id=$showsID"; $result = mysql_query($sq) or mysql_die(); $b = mysql_fetch_array($result); print "brfont color=red$b[name]/fontbr"; } } == thanks in advance, @lvin -- 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] store array in a file?
Hello Jaxon, use serialize() unserialize() as follows: $store_in_file=serialize(your_array); //and store the details of $store_in_file in your file/database. //while retrieving read the data from file/database into store_in_file and then use the following. $retrieve_from_file=unserialize($store_in_file); $retrieve_from_file will be similar to "your_array" read the php4.0 greater manual you will find these functions to be very helpful.. hope this serves your purpose. regards Keyur $$$ - Original Message - From: "jaxon" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, April 16, 2001 5:02 AM Subject: [PHP] store array in a file? Hey all, can someone make a recommendation here? I want to keep site structural info pulled from a database in an array, and store it in a flat file that can eliminate the database hit. Then I'll just delete the file when structure changes, and regenerate it with a call to a recreation script that does the necessary sql once. So - does this make sense? - how to sore the array in a flat file - any way to make the array global once loaded? Thanks for any pointers! cheers, jaxon -- 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-CVS] cvs: php4 /win32 install.txt
jmoore Mon Apr 16 02:44:21 2001 EDT Modified files: /php4/win32 install.txt Log: - Updating order slighly so the install is easier to follow. Index: php4/win32/install.txt diff -u php4/win32/install.txt:1.1 php4/win32/install.txt:1.2 --- php4/win32/install.txt:1.1 Fri Nov 3 03:43:45 2000 +++ php4/win32/install.txt Mon Apr 16 02:44:21 2001 @@ -10,7 +10,6 @@ Apache: 1. Stop the Apache Webserver. Edit the httpd.conf and put in these lines, modified to your environment: -2. Unzip the Package to c:\php, now move php4ts.dll to the windows/system(32) directory, overwritte any older file! # for the apache module LoadModule php4_module c:/php/sapi/php4apache.dll @@ -21,8 +20,11 @@ Action application/x-httpd-php4 "/php4/php.exe" AddType application/x-httpd-php4 .php +2. Unzip the Package to c:\php, now move php4ts.dll to the windows/system(32) +directory, overwritte any older file! + 3. Copy the php.ini-dist to your sysroot (directory where you installed windows), rename it to php.ini, and edit the php.ini to fit your needs. + 4. Restart the Apache server. -- PHP CVS 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] What does url_rewriter.tags do?
From v4.0.4 change log "Added url_rewriter.tags configuration directive (Sascha)" The option shows up in my phpinfo with default settings "a=href,area=href,frame=src,form=fakeentry", but I can't find any info on what this setting does. The change log entry seems to be the only reference to it in the PHP.net docs. What does it do? -- 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]
RE: [PHP] What does url_rewriter.tags do?
Subject: [PHP] What does "url_rewriter.tags" do? What does it do? url_rewriter.tags is a list of HTML elements that will get the PHPSESSID added to them. Its all about sessions: http://www.php.net/manual/en/ref.session.php. Emil -- Emil Rasmussen http://www.noget.net -- 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] enabling PHP functions only on specific virtual hosts
Hi, I'm running a small web hosting server on my machine and offering PHP+MySQL to virtual hosting clients. I've coded an additional PHP module, which I want to be a paid add-on feature to the clients. Is there a way to disable the module or functions (it contains 2 functions) globally and then specifically enable them to certain virtual hosts? Rgds, Tfr --== [EMAIL PROTECTED] == http://tfr.cafe.ee/ == +372-50-17621 ==-- -- 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] What does url_rewriter.tags do?
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Emil Rasmussen) wrote: Subject: [PHP] What does "url_rewriter.tags" do? What does it do? url_rewriter.tags is a list of HTML elements that will get the PHPSESSID added to them. Its all about sessions: http://www.php.net/manual/en/ref.session.php. Thanks. The url_rewriter.tags config option isn't mentioned on that page, but now that you relate it to sessions it does make more sense. Though setting "form" to value "fakeentry" seems odd since PHPSESSID does also get added to forms as a hidden input. shrug Anyway, at least now I have a general idea of its purpose. -- 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] Re:user info?
Hello, have you saw the result of phpinfo(); try and see in Apache Environment, if make a login use a sessions... Good luck and good code Best Regards Miguel Loureiro [EMAIL PROTECTED]
[PHP] Protecting JavaScripts from being Donwloaded
Hi all is it possible to protect your javascripts from being downloaded by visitors ? -- 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] enabling PHP functions only on specific virtual hosts
On Mon, Apr 16, 2001 at 12:42:50PM +0200, indrek siitan wrote: I've coded an additional PHP module, which I want to be a paid add-on feature to the clients. Is there a way to disable the module or functions (it contains 2 functions) globally and then specifically enable them to certain virtual hosts? you can globally disable function with: | disable_functions = in php.ini. For the vhosts, which are allowed to use the functions you can create a special php.ini, which is loadad (afaik) via .htaccess then (I'm not sure on this...remember to have read something like that on this list - you might want to check the archieve) -fkr -- gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0 8A48 0D31 9BD3 D9AC 74D0 |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE | |all your base are belong to us | shame on me | fkr@IRCnet | -- 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] fwrite not writing
Ahhh, I see what's going on now. I had more time to read over the code, so now I see what you are trying to do. I'm not sure why it suddenly stopped working, but let's see if you actually need it to work. First of all, I take it that you have content which you want to write into a file. Correct? If so, why does it matter if the file you want to write it to has data anyway? If you are just going to add data into it, isn't it ok that it is a zerolength file? Or is the problem that the file is _not_ actually zerolength, but PHP says it's zerolength anyway? Just try removing the !filesize() part, and then try executing the function. But maybe I just don't understand what you are trying to write and why. Could you be a little more specific what data is being saved in the file, and what is in the file already? -- Plutarck Should be working on something... ...but forgot what it was. "CC Zona" [EMAIL PROTECTED] wrote in message 9bebi3$133$[EMAIL PROTECTED]">news:9bebi3$133$[EMAIL PROTECTED]... This function suddenly stopped working, and I just can't seem to figure out why. The only change made recently is that now the value of $force at calltime is sometimes true instead of being undefined or null. build_file("file_content","/path/to/file.inc","w",TRUE); function build_file($func_name,$filepath,$mode="w",$force=FALSE) { if($force or !file_exists($filepath) or !filesize($filepath)) //echo filesize($filepath) shows '0' { $content=$func_name(); //echo $content shows it's all there $fp=fopen($filepath,$mode); fwrite($fp,$content); rewind($fp); #temp test $read_back=fread($fp,10); #temp test echo "pfile content:/p\n $read_back"; #temp test, displays nothing fclose($fp); } } I've tried putting echoes and "or die('Error on __LINE__')" on every line, checked all the variable values, and found no answers from that. Everything shows exactly as it should be except that the content that echoes out so nicely *doesn't ever get written to the file*. The function runs to the end without error and the file's modification date is even updated. But the file remains empty. I'm probably missing something ridiculously obvious, but would someone please be kind enough to point out what it is? Thank you!! What is this: !filesize($filepath) If filesize is zero (which it is groan), then do the rest (which it does--except the content it fetches never makes it into the file it writes to. How that can be, I dunno, but that apparently is what it's doing...) Add this above your if loop: $filesize = filesize($filepath); echo $filesize; Already tried echoing that and all the other values. Filesize is 0. That might be causing your loop not to execute...if not, I'm not sure what's wrong. I don't get it. It should work. It did work. Suddenly it's not. -- 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 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] General WebServer Question?
The first thing you need is benchmarking software. Try an internet search for "webserver performance benchmark". I did it on altavista and got some good leads. For instance this one sounds excellant: http://www.softwareqatest.com/qatweb1.html It's description is "Listing of 190 web test tools and management tools - link checking, html validation, load testing, security testing, java testing, publishing...". Never underestimate the power of the search engine :) For the second part, you want a weblog analyzer. I reccommend Analog: http://www.statslab.cam.ac.uk/~sret1/analog/ It has listing for popularity of particular files, directories, etc. Good stuff. Insanely fast. -- Plutarck Should be working on something... ...but forgot what it was. ""Jason Caldwell"" [EMAIL PROTECTED] wrote in message 9be700$b2d$[EMAIL PROTECTED]">news:9be700$b2d$[EMAIL PROTECTED]... Can anyone recommend (or is there) a utility / app that I can use to hit my webserver (say from another computer outside my subnet) -- any number of times to get an idea of performance - based on my bandwidth and hardware? In other words -- I'd like to do some hard core testing of my website and see how much my pipe and servers (simultaneously) can handle... I would like to get page return times, etc... Also -- is there a good add on to IIS or Apache that I can use to monitor not only how much traffic is hitting my site, but which pages, and from where the users are coming (ie. which websites they came from)? Thanks. 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 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] Protecting JavaScripts from being Donwloaded
A funny question! I presume you mean you want to protect your javascripts from being read by users, eg compiled. Internet explorer has a script encoder that scrambles your scripts that you can get from microsoft.com. Doesn't work with netscape. Regards, John ""Steve Haemelinck"" [EMAIL PROTECTED] wrote in message 01c0c663$59401dd0$0200a8c0@shaemeli">news:01c0c663$59401dd0$0200a8c0@shaemeli... Hi all is it possible to protect your javascripts from being downloaded by visitors ? -- 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] PCRE vs. POSIX
Rasmus Lerdorf (inventor of PHP) has said that PCRE is generally faster, but i haven't benchmarked myself. Of course strpos( ) is the fastest. "bill" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... hi everyone, i have been using perl for quite some time, but after getting used to php4, i think it rocks. i am wondering which is better, performance-wise, when trying to match the same text: PCRE or POSIX extended in php4? cheers, Bill -- 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 env variables not working in php-cgi
What version of PHP? I ask because a few test functions aren't available on older versions of PHP4. Try this piece of code: $arr = get_defined_vars(); print_r($arr); (if that doesn't work, try print_r($GLOBALS), but be sure to hit the Stop button on your browser, because it will print off an infinite list) Now, look at the results. In the main listing, does it list any of the ENV variables you are trying to access? If not, page down a bit and look in the HTTP_SERVER_VARS array. Are the ENV variables in there? My guess is that they probably are. Check phpinfo() again and see what register_globals is On. That may be your problem... If none of the variables you seek are in HTTP_SERVER_VARS, then something is wrong with the installation of PHP itself. -- Plutarck Should be working on something... ...but forgot what it was. "Franklin Hays" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am migrating a site to a new host (westhost.com) and having some issues. PHP was compiled as a cgi instead of a module which is what I have always used. This wasn't really an issue until I realized a lot of my scripts that depended on apaches environment variables ($REQUEST_URI, $HTTP_USER_AGENT, etc.) weren't working. I can write a PERL cgi script and get them from the command line, they also appear in phpinfo(), yet I simply can't obtain them from any of my php scripts. Maybe the cgi issue isn't even related but up to this point it is the only culprit I can find. After spending three days going through the docs at apache, phpbuilder, and php.net I have not ran across anything which offers a solution. Thus, I am not looking in the right place or this is a unique problem. Can anyone out there help, or provide some directions/suggestions? And yes, they are running Apache (note above, I can obtain the variables but just not through my php scripts). Do I need to make an addition to my .htaccess file of some sort? I need these variables for my site to work properly ( css generation, hashing URL strings, etc.) so any/all help is greatly appreciated. If you need more information please let me know and I will get back to you as soon as possible. At this point I can't obtain ANY of the env variables (SERVER_PORT, REMOTE_ADDR, REQUEST_URI, HTTP_USER_AGENT, etc.). Thanks, //frank -- 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] PCRE vs. POSIX
On Mon, Apr 16, 2001 at 07:16:06PM +0800, John Lim wrote: Rasmus Lerdorf (inventor of PHP) has said that PCRE is generally faster, but i haven't benchmarked myself. Of course strpos( ) is the fastest. Joerg Krause has posted an URL for a webpage for benchmarking reg-expressions. Sorry, I don't have the URL anymore, maybe someone (who still has/knows it) could repost it to the list? -fkr -- gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0 8A48 0D31 9BD3 D9AC 74D0 |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE | |all your base are belong to us | shame on me | fkr@IRCnet | -- 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] Protecting JavaScripts from being Donwloaded
If you mean Javascript that is in your HTML code, it is both practically and theoretically impossible to do so. HTML source is wide-open to anyone who wants to look at it, and there is little/nothing you can "really" do about it. Some sites try and hide their HTML source, but it servers only to annoy the crap out of users. If I right-click a page and don't get the right-click menu I expect, I tend to become highly irritated. JavaScript is a "scripting language", which was designed for the exact purpose of being easily read by humans. Now, if you are speaking of a JavaApplet or client-side java bean, that's a little different. But in reality you can't really stop people from downloading those to their hard-drive either. There are methods to keep people from easily decompiling them, but I'm betting you aren't talking about Java stuff anyway :) -- Plutarck Should be working on something... ...but forgot what it was. ""Steve Haemelinck"" [EMAIL PROTECTED] wrote in message 01c0c663$59401dd0$0200a8c0@shaemeli">news:01c0c663$59401dd0$0200a8c0@shaemeli... Hi all is it possible to protect your javascripts from being downloaded by visitors ? -- 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] unregister part of array in session
I did it! Too much work for something as simple as this though IMO. I think I will write a function for this... ? session_start(); $newarray = $HTTP_SESSION_VARS["array"]; unset ($newarray["one"]); $array = $newarray; session_register("array"); ? Thanks, // Tobias ""Yasuo Ohgaki"" [EMAIL PROTECTED] wrote in message 9bdeag$88r$[EMAIL PROTECTED]">news:9bdeag$88r$[EMAIL PROTECTED]... You are registered $array as session, You need to unset() element. I think it should work. Regards, -- Yasuo Ohgaki ""Tobias Talltorp"" [EMAIL PROTECTED] wrote in message 9bd8un$kqt$[EMAIL PROTECTED]">news:9bd8un$kqt$[EMAIL PROTECTED]... I know how to unset a specific value in an ordinary array: unset ($array["one"]); How do I do this if my array is in a session? Here is my code: ? session_start(); $array = array(one= "number one", two= "Number two", three= "Number three"); session_register("array"); ? I tried this... Didn't work: ? session_start(); session_unregister("array[one]"); ? Thanks, // Tobias Talltorp -- 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]
[PHP] the search for Ade Smith
hello; This may be a long shot but I'll give it a go. I'm trying to track down an Ade Smith from the UK that I used to know. he would be a bout 30 now and originally came from Bath. he also used to work for a company called "More Balls Than Most". Is this you? If so get in touch. If not, sorry to take up your time. Thanks Jamie
[PHP] resource id #2
I am trying to run a query and in my log I am getting a message the message resource id #2. $query=mysql_query("Select pass from members where uname='$username'"); $result = mysql_query($query) or die("You are not authorized to be here."); Can someone tell me what I am doing wrong and guide me in the right direction -- 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] unregister part of array in session
PHP4 session may not work as it should, unless you use it consistent way. i.e. Use session_(un)register() and only use globals, OR enable track_vars and disable register_globals and only use $HTTP_SESSION_VARS w/o session_(un)register(). It may work even if register_globals is on. I didn't test session module with this configuration enough. Following code works as expected on my systems (PHP4.0.4-PHP4.0.5RC1/Apache SAPI/W2K and PHP4.0.4-PHP4.0.4RC6/Apache SAPI/Linux at least) === code begin === ?php require_once('lib/session.inc'); // Define my custom session handlers and start session ? html head titleSession Test/title /head body bgcolor="#FF" pre ?php if (isset($HTTP_GET_VARS['a'])) { $HTTP_SESSION_VARS['a'] = array( 'a'=1, 'b'=2 ); print_r($HTTP_SESSION_VARS); } elseif (isset($HTTP_GET_VARS['b'])) { unset($HTTP_SESSION_VARS['a']['a']); print_r($HTTP_SESSION_VARS); } else { print_r($HTTP_SESSION_VARS); } ? /pre /body /html code end It should work as expected when you enable track_vars AND disable register_globals in your php.ini. The reason why there is session_register()/unregister() is there is no way for session module to know which variables are session variables. With $HTTP_SESSION_VARS, session module knows all variable in $HTTP_SESSION_VARS are session variables. So programmer does not have to use session_(un)register(). There is also known problem that $HTTP_SESSION_VARS does not work like other $HTTP_*_VARS. You will see what I mean if you write some test codes with register_globals = on. I don't know why many people use register_globals = on track_vars = off magic_quote = on Life would be much easier with register_globals = off track_vars = on magic_quote = off Hope this helps, -- Yasuo Ohgaki ""Tobias Talltorp"" [EMAIL PROTECTED] wrote in message 9bempj$a77$[EMAIL PROTECTED]">news:9bempj$a77$[EMAIL PROTECTED]... I did it! Too much work for something as simple as this though IMO. I think I will write a function for this... ? session_start(); $newarray = $HTTP_SESSION_VARS["array"]; unset ($newarray["one"]); $array = $newarray; session_register("array"); ? Thanks, // Tobias ""Yasuo Ohgaki"" [EMAIL PROTECTED] wrote in message 9bdeag$88r$[EMAIL PROTECTED]">news:9bdeag$88r$[EMAIL PROTECTED]... You are registered $array as session, You need to unset() element. I think it should work. Regards, -- Yasuo Ohgaki ""Tobias Talltorp"" [EMAIL PROTECTED] wrote in message 9bd8un$kqt$[EMAIL PROTECTED]">news:9bd8un$kqt$[EMAIL PROTECTED]... I know how to unset a specific value in an ordinary array: unset ($array["one"]); How do I do this if my array is in a session? Here is my code: ? session_start(); $array = array(one= "number one", two= "Number two", three= "Number three"); session_register("array"); ? I tried this... Didn't work: ? session_start(); session_unregister("array[one]"); ? Thanks, // Tobias Talltorp -- 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] -- 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] Mailing list script ?
Hello, I'd like to know if there is a script with the same (or more) functionality as SubscribePro at: http://cgi.elitehost.com/subpro/ ... in PHP of course :) Thanks for any info, Fabian Rodriguez - Associate Dir., Outsourcing and Business development Toxik Technologies Inc. - www.Toxik.com - (514)528-6945 x1 "Stop worrying about your Internet services. It has never been easier." -- 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
Unless I'm missing something, I've looked all over the PHP site for a link to PEAR but have been unable to find one (including in the PEAR section of the manual, where you would think it would be...). Could someone please provide a link? Chris
Re: [PHP] resource id #2
try $query="Select pass from members where uname='$username'"; $result = mysql_query($query) or die("You are not authorized to be here."); the mysql_query command is executing the statement morgan At 10:40 AM 4/16/2001, Greg K wrote: I am trying to run a query and in my log I am getting a message the message resource id #2. $query=mysql_query("Select pass from members where uname='$username'"); $result = mysql_query($query) or die("You are not authorized to be here."); Can someone tell me what I am doing wrong and guide me in the right direction -- 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] PEAR
Boget, Chris" schrieb: Unless I'm missing something, I've looked all over the PHP site for a link to PEAR but have been unable to find one (including in the PEAR section of the manual, where you would think it would be...). Could someone please provide a link? http://pear.php.net/ Don't be too disappointed about the website, some work on it is in progress and I'm sure there will soon be a website. For the moment you're requested to subscribe to the mailinglists listed on php.net top get help. Ulf -- Neu: PEAR Menu 3 - Navigationsstrukturen dynamisch dargestellt http://www.ulf-wendel.de/projekte/menu/tutorial.php | http://www.phpdoc.de -- 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] PEAR
Unless I'm missing something, I've looked all over the PHP site for a link to PEAR but have been unable to find one (including in the PEAR section of the manual, where you would think it would be...). Could someone please provide a link? http://www.php.net/manual/en/pear.php Ok, where on the above page is a link to the actual code? The PEAR base class that is references all over that section of the manual? I read through that section of the manual and learned some pretty cool things about how one should code when adding to the PEAR, but not where the class resides. Chris
Re: [PHP] resource id #2
$query=mysql_query("Select pass from members where uname='$username'"); $result = mysql_query($query) or die("You are not authorized to be here."); ? $query=mysql_query("Select pass from members where uname='$username'"); $result = mysql_query($query); // If the number of rows is less than one (meaning zero) then die() if ($mysql_num_rows($result) 1)) { die("You are not authorized to be here."); } ? What you are doing is checking if the query is valid. Your die() would print only if you had a faulty query (try changing pass to pass2), but if the username is wrong, it returns an empty set. The mysql_query() returns the "resource id #2" that you can use with the mysql_fetch_array, mysql_num_rows etc to get printable information. // Tobias -- 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] PEAR
Could someone please provide a link? http://pear.php.net/ Don't be too disappointed about the website, some work on it is in progress I can tell. :p There is an error when you access that page. Chris
Re: [PHP] resource id #2
Greg K schrieb: I am trying to run a query and in my log I am getting a message the message resource id #2. $query=mysql_query("Select pass from members where uname='$username'"); $result = mysql_query($query) or die("You are not authorized to be here."); Can someone tell me what I am doing wrong and guide me in the right direction Please check the docs http://www.php.net/manual/en/ref.mysql.php / http://www.php.net/manual/en/function.mysql-fetch-row.php (don't forget to read the user comments!) and the usual sites for tutorials e.g. http://www.phpbuilder.com . Ulf -- Neu: PEAR Menu 3 - Navigationsstrukturen dynamisch dargestellt http://www.ulf-wendel.de/projekte/menu/tutorial.php | http://www.phpdoc.de -- 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] PEAR
"Boget, Chris" schrieb: Unless I'm missing something, I've looked all over the PHP site for a link to PEAR but have been unable to find one (including in the PEAR section of the manual, where you would think it would be...). Could someone please provide a link? http://www.php.net/manual/en/pear.php Ok, where on the above page is a link to the actual code? The PEAR base class that is references all over that section of the manual? I read through that section of the manual http://cvs.php.net/viewcvs.cgi/php4/pear/, every PHP 4 source distribution contains the PEAR sources in the directory pear/. Check the README for install notes. Ulf -- Neu: PEAR Menu 3 - Navigationsstrukturen dynamisch dargestellt http://www.ulf-wendel.de/projekte/menu/tutorial.php | http://www.phpdoc.de -- 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] (Absolute beginner) .PHP3 and .HTM
My configuration: Win98 / Xitami / PHP3 / MySQL PHP is installed in the path of Xitami. path xitami\cgi-bin\HELLO2.PHP3 "http://localhost/cgi-bin/hello2.php3" It works! My bloody newbie question: Where must I put HELLO3.HTM so that it can be run from the localhost "http://localhost/hello3.htm" doesn't work! HELLO2.PHP3 ?php print"html\nbody\n"; echo "hello2"; print"body\nhtml\n"; ? HELLO3.HTM htmlheadtitlePHP Test/title/head body ?php echo "Hello World3P"; ? /body/html -- 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] session variable problem
i am starting and registering session variable succesfully that i can see the file on the server , but when it comes to use or display i can not , the variable has no value ... the "session.save_handler = files" is in php.ini , i tried to change it to user but that occured a fatal error etc.. So shortly what is the thing that i am missing thanks alot -- 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] Want a Good Book for Ref on PHP
On Monday 16 April 2001 08:23, you wrote: Personally, I never even bought a PHP book. I learned from the web only...hehe. Same here. Well, actually I *did* buy a book - "Core PHP programming". I started reading it, saw that it basically only covers (a) introductory programming in general (what is a 'while' loop?) and (b) a PHP3 function reference (copied from the online manual), and I immediately went back to the web resources. That doesn't mean you shouldn't buy any book - the cookbook for example certainly is very useful both as starter (giving examples) and later on (giving more complex examples :). But (1) never forget to have the online manual at hand and (2) check phpbuilder.com etc for new interesting articles from time to time -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) (A)bort (R)etry (P)retend this never happened ... -- 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] include path per script
Martn Marqus schrieb: Is it posible to change the value of include_path in a php script without changing it in php.ini? Try ini_set() friends, http://www.php.net/manual/en/function.ini-set.php . Ulf -- Neu: PEAR Menu 3 - Navigationsstrukturen dynamisch dargestellt http://www.ulf-wendel.de/projekte/menu/tutorial.php | http://www.phpdoc.de -- 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] General WebServer Question?
On Monday 16 April 2001 09:30, you wrote: Can anyone recommend (or is there) a utility / app that I can use to hit my webserver (say from another computer outside my subnet) -- any number of times to get an idea of performance - based on my bandwidth and hardware? Apache comes with "ab" (ApacheBench). -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) (A)bort (R)etry (P)retend this never happened ... -- 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] (Absolute beginner) .PHP3 and .HTM
Change the extension of hello3.htm to php3. The second one doesn't work because the web server only runs the php enginge when the file has a php extension (it depends on the server setting but usually just .php should work fine). PHP code can be embedded within HTML so basically you don't have to do everything in PHP like in your first script. Seung-woo Nam [EMAIL PROTECTED] wrote: My configuration: Win98 / Xitami / PHP3 / MySQL PHP is installed in the path of Xitami. path xitami\cgi-bin\HELLO2.PHP3 "http://localhost/cgi-bin/hello2.php3" It works! My bloody newbie question: Where must I put HELLO3.HTM so that it can be run from the localhost "http://localhost/hello3.htm" doesn't work! HELLO2.PHP3 ?php print"html\nbody\n"; echo "hello2"; print"body\nhtml\n"; ? HELLO3.HTM htmlheadtitlePHP Test/title/head body ?php echo "Hello World3P"; ? /body/html -- 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] Want a Good Book for Ref on PHP
Christian Reiniger schrieb: On Monday 16 April 2001 08:23, you wrote: Personally, I never even bought a PHP book. I learned from the web only...hehe. Same here. Well, actually I *did* buy a book - "Core PHP programming". I started reading it, saw that it basically only covers (a) introductory programming in general (what is a 'while' loop?) and (b) a PHP3 function reference (copied from the online manual), and I immediately went back to the web resources. That doesn't mean you shouldn't buy any book - the cookbook for example certainly is very useful both as starter (giving examples) and later on (giving more complex examples :). Hmm, although Sterlings book is cool, german readers can save the money an check the german FAQ on http://www.koehntopp.de/php. It covers most of Sterlings book except the PHP core hacking. The advanced book I like best is "Web application development with PHP 4.0" written by TillTobel. Don't expect a PHP only book, the authors did very well not to copy the online reference or the usual tutorials. TillTobel wrote a book for those that have a solid basic programming knowledge but lack some more advanced skills like API design or certain web development strategies (CVS, staging server, development process, ...). Ulf -- Neu: PEAR Menu 3 - Navigationsstrukturen dynamisch dargestellt http://www.ulf-wendel.de/projekte/menu/tutorial.php | http://www.phpdoc.de -- 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 Results NULL Error
On Thu, Apr 12, 2001 at 10:20:28PM -0400, Chris Anderson wrote: If I grab values from fields and they contain nothing, and I retrieve them using mysql_field_array, it will give an index out of range. Is there a way to prevent the error or do I have to keep putting a @ in front of the variable declaration? Why not just check how many rows are returned? mysql_num_rows() -- Jason Stechschulte [EMAIL PROTECTED] -- I wouldn't ever write the full sentence myself, but then, I never use goto either. -- Larry Wall in [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-CVS] cvs: php4 / TODO-4.1.txt
andrei Mon Apr 16 06:54:10 2001 EDT Modified files: /php4 TODO-4.1.txt Log: More todo stuff. Index: php4/TODO-4.1.txt diff -u php4/TODO-4.1.txt:1.3 php4/TODO-4.1.txt:1.4 --- php4/TODO-4.1.txt:1.3 Sat Apr 14 03:30:05 2001 +++ php4/TODO-4.1.txt Mon Apr 16 06:54:10 2001 @@ -12,6 +12,8 @@ * renaming functions so that they all are conform to one standard form -* allow foreach($arrray as $key = value) +* allow foreach($array as $key = $value) + +* allow foreach($array as list($var1, $var2)) * clean up "$instance = new object" syntax. -- PHP CVS 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] Wrox - Beginning PHP4 Ch12 example problem
Happy Easter to all! In the user viewer example at the end of Chapter 12 - has anyone had problems with the source downloaded from their website? The story so far with my trials of this example: downloaded source created table in mysql and populated it (with the SQL script provided) First page ie function list_records() works 'fine'. Except a javascript error at the foot of the page - page done, with errors. Sorting hyperlinks all work, as does all the forward, reverse paging. What doesn't work is the function view_record() hyperlinks. I believe things are going awry in javascript (of which I know nothing, and have the dummies guide in front of me) as it doesn't get to opening a new window. I've tried calling the function as follows: a href="javascript:open_window('www.google.com');"Google/a No joy at all - javascript error. SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" !-- function open_window(url) { var NEW_WIN = null; NEW_WIN = window.open ("", "RecordViewer", "toolbar=no,width="+ ?php echo $new_win_width ?+ ",height="+?php echo $new_win_height?+ ",directories=no,status=no, scrollbars=yes,resize=no,menubar=no"); NEW_WIN.location.href = url; } //-- /SCRIPT Any help greatly received. Grrr I'm trying to learn php, not hack javascript... David Mateer. [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-CVS] cvs: php4 / TODO
sbergmann Mon Apr 16 06:55:18 2001 EDT Modified files: /php4 TODO Log: Daniel fixed this for PHP 4.0.6. Index: php4/TODO diff -u php4/TODO:1.120 php4/TODO:1.121 --- php4/TODO:1.120 Tue Feb 27 01:16:48 2001 +++ php4/TODO Mon Apr 16 06:55:18 2001 @@ -14,7 +14,6 @@ but don't declare those as const. This makes interaction with other interfaces difficult which pass const parameters to us. * add try..catch/throw exception handling -* make UNC filenames work with V_CD layer global -- -- PHP CVS 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 sessions and proxies.
Here is the scenario. I have a pure html form where a user login and pass is gathered and sent to a php script via the post method. The php script authenticates against a DB starts a session and uses the header function to send a header with the sessionid back to the browser. Everything works fine and as expected with one catch. While testing, I have accessed the site through a few different proxies. Through an AS/400 proxie, everything is fine. Through another NT proxie everything is fine, but when I try and access it through a novel proxy something falls apart. I am assuming that the data is reaching the script fine since other forms can be posted through the proxie. I am thinking the proxie is screwing up the returned header with the session id attached. Has anyone else encountered this phenomenon before? -- Larry H -- 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 env variables not working in php-cgi
Hello. The version is php-4.02 built on Sep 22, 2000. |What version of PHP? I ask because a few test functions aren't available on |older versions of PHP4. | |Try this piece of code: | |$arr = get_defined_vars(); | |print_r($arr); This gave me an error on get_defined_var() so I tried print_r($GLOBALS) and got a ton of output of the form: Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = | /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array (|(if that doesn't work, try print_r($GLOBALS), but be sure to hit the Stop [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS]|button on your browser, because it will print off an infinite list) | = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( )|Now, look at the results. In the main listing, does it list any of the ENV [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS]|variables you are trying to access? | = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( )|If not, page down a bit and look in the HTTP_SERVER_VARS array. Are the ENV [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS]|variables in there? | = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php|My guess is that they probably are. Check phpinfo() again and see what |register_globals is On. That may be your problem... [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF]| = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array (|If none of the variables you seek are in HTTP_SERVER_VARS, then something is [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS]|wrong with the installation of PHP itself. | | = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php )| |-- [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] =|Plutarck |Should be working on something... /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array (|...but forgot what it was. | [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS]| | = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS]| = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( )| I am migrating a site to a new host (westhost.com) and having some [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS]| issues. PHP was compiled as a cgi instead of a module which is what I = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php| have always used. This wasn't really an issue until I realized a lot of [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF]| my scripts that depended on apaches environment variables ($REQUEST_URI, = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array (| $HTTP_USER_AGENT, etc.) weren't working. I can write a PERL cgi script [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] Something may be amiss with my hosts setup yet I have no idea what that may be. Any suggestions? I have never configured PHP to run as a cgi and have never had trouble getting global server variables.
Re: [PHP] php-lib questions
Here is the script "request.php" 62 lines, 1585 characters ? include ("layout.php"); page_open(array("sess" = "Repository_Session")); if (!isset($s)) { $s=0; }; $sess-register("s"); site_header("Request a Document - Document Cart"); echo 'P align=leftfont face="Arial, Helvetica, sans-serif" size="2" color="#66"Below is your bifont color="#FF"Document Cart/font/i/b.br br /fontfont face="Arial, Helvetica, sans-serif" size="2" color="#66"Any time you request a document we will store it here. You may a href="http://starbase.msfc.nasa.gov/rs-bin/show_files.pl?search='.$s earch.'" return to your search results/a at any time and choose another documentbr or you may perform a a href="search.php"New Search/a.br br /fontfont face="Arial, Helvetica, sans-serif" size="2"You may also Increase or Decrease the Number of copies you wish to request by using the font color="#FF"Add/Remove /fontlinks, or completly empty the cart with the font color="#FF"Clear cart/font link.br br /fontfont face="Arial, Helvetica, sans-serif" size="2" color="#66"Whenever you are done selecting documents click the ifont color="#FF"Checkout/font/ifont color="#FF" /fontlink to process your request./font/P BR'; global $scart; global $obj_id; $scart-start(); switch($action) { case add: $scart-add_item($obj_id,1); break; case remove: $scart-remove_item($obj_id,1); break; case clearcart: $scart-reset(); break; } $scart-show_all(); page_close(); site_footer(); ? I'm not familiar with the ob* functions, is this phplib or just php, I'll look for some docs on it and give it a try though thanks. -Mark ""Plutarck"" [EMAIL PROTECTED] wrote in message 9b4bb7$1tf$[EMAIL PROTECTED]">news:9b4bb7$1tf$[EMAIL PROTECTED]... That sounds like a problem with the way you handle sessions. What happens is your program tries to start a session, but the page isn't sent if a session isn't started. It still shouldn't reply with a 404 though...search your script for header and see if you send any. Once someone has the session, then the page will load correctly. Muck through your php code and see if there are any conditions or loops which require a session to be running. Still, that shouldn't happen and it's probably one of those bugs that you can't figure out why they happen, or what causes them, but after tinkering around suddenly everything works. One thing to try, if it's available, is use the ob_* functions as a debugger. Stick an obstart at the begining and a ob_end_flush at the end, and see if the problem disappears magically. Odd what sometimes fixes things... -- Plutarck Should be working on something... ...but forgot what it was. ""Mark"" [EMAIL PROTECTED] wrote in message 9b4ar1$t6i$[EMAIL PROTECTED]">news:9b4ar1$t6i$[EMAIL PROTECTED]... I have a php script which is like a modified shopping cart. It starts with a search that calls a perl script ( I know, but it's the only way I can include certain proprietary functionality I need). This returns a results set of documents that can be either downloaded or requested depending on permissions. If you click to request a document a php script request.php is called it is sort of like a cart script, and uses phplib sessions and db_oci8. The strange problem I am having is this: If it is the first time you have reqeusted this script since last opening your browser, you will get a 404, if you hit back/forward or refresh the script works fine as if nothing ever happened. You will not get this error again as long as you do not close and reopen your browser. Any ideas? -- 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 env variables not working in php-cgi
Btw, the reason you got all the output is why I said to hit the browser Stop button. Technically it will run forever. The GLOBALS array contains an a array called GLOBALS, which contains GLOBALS, endlessly. It will never ever end ;) It's fixed in 4.0.2. get_defined_vars isn't available till 4.0.4, so that's why you got the error. But from looking at your output, there is definately something screwy with their setup. In phpinfo, what are the settings for track_vars (if listed) and global_vars? "Franklin Hays" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello. The version is php-4.02 built on Sep 22, 2000. |What version of PHP? I ask because a few test functions aren't available on |older versions of PHP4. | |Try this piece of code: | |$arr = get_defined_vars(); | |print_r($arr); This gave me an error on get_defined_var() so I tried print_r($GLOBALS) and got a ton of output of the form: Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = | /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array (|(if that doesn't work, try print_r($GLOBALS), but be sure to hit the Stop [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS]|button on your browser, because it will print off an infinite list) | = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( )|Now, look at the results. In the main listing, does it list any of the ENV [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS]|variables you are trying to access? | = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( )|If not, page down a bit and look in the HTTP_SERVER_VARS array. Are the ENV [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS]|variables in there? | = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php|My guess is that they probably are. Check phpinfo() again and see what |register_globals is On. That may be your problem... [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF]| = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array (|If none of the variables you seek are in HTTP_SERVER_VARS, then something is [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS]|wrong with the installation of PHP itself. | | = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php )| |-- [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] =|Plutarck |Should be working on something... /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array (|...but forgot what it was. | [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS]| | = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS]| = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( )| I am migrating a site to a new host (westhost.com) and having some [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS]| issues. PHP was compiled as a cgi instead of a module which is what I = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php| have always used. This wasn't really an issue until I realized a lot of [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php )
RE: [PHP] accepting credit cards
Tyler, There are MANY ways you can do this. At some point htough, they will have to leave your site but it can be set up so it is invisible to the user. I work for a credit card processing company writing web based software for processing payments. If you have any questions, feel free to shoot them off to me. Jeff Pearson PS: If anyone needs a Merchant Account to process payments, let me know and I can get you set up. Also, if anyone already has a Merchant Account and wants cheaper rates, give me a shout. -Original Message- From: Tyler Longren [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 15, 2001 2:02 PM To: PHP-General Subject: [PHP] accepting credit cards Hello everyone, I know this has been discussed many times before. I even read the past threads in the list archives. I've written a shopping cart/catalog that uses mysql on the backend. I need to be able to accept cc orders. Is Paypal a good choice? I've never really use any service like this before. When the user orders an item, will they have to leave my website? Thanks, Tyler -- 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] Want a Good Book for Ref on PHP
Woh, that book looks excellant. I think I may order it, actually. It is absolutely _hell_ to find a good advanced programming or internet technology book. If the book doesn't expect you to be a moron (how many morons are interested in the implementation of TCP/IP, anyway?), it expects you to be a complete wizard (which basically means the book is a 400 page reference manual). It's hard to find a book on computers that is for an advanced-but-not-perfect user. *orders* I'll give me review to the list once I get it :) -- Plutarck Should be working on something... ...but forgot what it was. "Ulf Wendel" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Christian Reiniger schrieb: On Monday 16 April 2001 08:23, you wrote: Personally, I never even bought a PHP book. I learned from the web only...hehe. Same here. Well, actually I *did* buy a book - "Core PHP programming". I started reading it, saw that it basically only covers (a) introductory programming in general (what is a 'while' loop?) and (b) a PHP3 function reference (copied from the online manual), and I immediately went back to the web resources. That doesn't mean you shouldn't buy any book - the cookbook for example certainly is very useful both as starter (giving examples) and later on (giving more complex examples :). Hmm, although Sterlings book is cool, german readers can save the money an check the german FAQ on http://www.koehntopp.de/php. It covers most of Sterlings book except the PHP core hacking. The advanced book I like best is "Web application development with PHP 4.0" written by TillTobel. Don't expect a PHP only book, the authors did very well not to copy the online reference or the usual tutorials. TillTobel wrote a book for those that have a solid basic programming knowledge but lack some more advanced skills like API design or certain web development strategies (CVS, staging server, development process, ...). Ulf -- Neu: PEAR Menu 3 - Navigationsstrukturen dynamisch dargestellt http://www.ulf-wendel.de/projekte/menu/tutorial.php | http://www.phpdoc.de -- 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 env variables not working in php-cgi
The GLOBALS array contains an a array called GLOBALS, which contains GLOBALS, endlessly. It will never ever end ;) It's fixed in 4.0.2. That was a typo. What I mean to say is that it's fixed in 4.0._4_, not _2_. -- Plutarck Should be working on something... ...but forgot what it was. ""Plutarck"" [EMAIL PROTECTED] wrote in message 9bf39j$j2c$[EMAIL PROTECTED]">news:9bf39j$j2c$[EMAIL PROTECTED]... Btw, the reason you got all the output is why I said to hit the browser Stop button. Technically it will run forever. The GLOBALS array contains an a array called GLOBALS, which contains GLOBALS, endlessly. It will never ever end ;) It's fixed in 4.0.2. get_defined_vars isn't available till 4.0.4, so that's why you got the error. But from looking at your output, there is definately something screwy with their setup. In phpinfo, what are the settings for track_vars (if listed) and global_vars? "Franklin Hays" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello. The version is php-4.02 built on Sep 22, 2000. |What version of PHP? I ask because a few test functions aren't available on |older versions of PHP4. | |Try this piece of code: | |$arr = get_defined_vars(); | |print_r($arr); This gave me an error on get_defined_var() so I tried print_r($GLOBALS) and got a ton of output of the form: Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = | /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array (|(if that doesn't work, try print_r($GLOBALS), but be sure to hit the Stop [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS]|button on your browser, because it will print off an infinite list) | = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( )|Now, look at the results. In the main listing, does it list any of the ENV [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS]|variables you are trying to access? | = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( )|If not, page down a bit and look in the HTTP_SERVER_VARS array. Are the ENV [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS]|variables in there? | = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php|My guess is that they probably are. Check phpinfo() again and see what |register_globals is On. That may be your problem... [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF]| = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array (|If none of the variables you seek are in HTTP_SERVER_VARS, then something is [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS]|wrong with the installation of PHP itself. | | = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php )| |-- [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] =|Plutarck |Should be working on something... /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array (|...but forgot what it was. | [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS]| | = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( ) [HTTP_COOKIE_VARS]| = Array ( ) [HTTP_SERVER_VARS] = Array ( [PHP_SELF] = /test.php ) [GLOBALS] = Array ( [PHP_SELF] = /test.php [HTTP_GET_VARS] = Array ( )| I am migrating a site to a new host (westhost.com) and having some [HTTP_COOKIE_VARS] = Array ( ) [HTTP_SERVER_VARS] = Array (
[PHP] Variables not getting passed when I post info
Hello, I made a GD script that made an image with the name of whatever page I was in in my web site. I would post info to it like this: http://www.domain.com/jpeg-out.php?title=FrontPage what ever I put for title it would make the image. After reinstalling php4 on my win2000 box with apache it doesn't seem to get the $title variable. Does anyone know what might be going wrong? Thanks, 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] Want a Good Book for Ref on PHP
I started with the Professional PHP Programming book. It covers all of the info a beginner would need in good detail. I haven't taken a look at the Beginner's book, but I would suggest getting the Professional one as it provides everything you need to get started, and then jumps right into the next level stuff(Db development, mail features, etc...). -- phill ""Navid Yar"" [EMAIL PROTECTED] wrote in message 000201c0c657$158b9ee0$[EMAIL PROTECTED]">news:000201c0c657$158b9ee0$[EMAIL PROTECTED]... You know, I was wondering the same thing. My situation is the same. My opinion is that the professional version probably strips out most of the beginner's content and adds more advanced php content and dives into everything in more detail rather than just trying to get a beginner off their feet by providing simple tasks Wrox is a great company, they come out with books that are the most comprehensive. Both versions might be a good investment for hardcore php programmers. Best thing to do is to just stop by a barnes and nobles bookstore and start looking through both books to see which one is best for you. Navid -Original Message- From: Martin Skjoldebrand [mailto:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 12:53 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Want a Good Book for Ref on PHP Kath wrote: Professional PHP Programming: http://www.amazon.com/exec/obidos/ASIN/1861002963/qid=987388364/sr=1-12/ref= sc_b_13/002-2263539-0333643 I've got Beginning PHP 4 (recommended) on the back cover of which it says that the next book could be "Professional PHP Programming.". However from what I saw in the book shop they cover lots of the same ground. I (and my employer) wouldn't like to pay for the same stuff again. Is there a significant difference between the two? Martin S. -- 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] Variables not getting passed when I post info
Brandon Orther schrieb: I made a GD script that made an image with the name of whatever page I was in in my web site. I would post info to it like this: http://www.domain.com/jpeg-out.php?title=FrontPage what ever I put for title it would make the image. After reinstalling php4 on my win2000 box with apache it doesn't seem to get the $title variable. Does anyone know what might be going wrong? Check register_globals, http://www.php.net/manual/en/html/configuration.html#ini.register-globals and make sure you're not trying to access a global variable from within a function. BTW, does your script contain img src="button.php?label=whatever" ? If you you've written a perfect killer application. The webserver has to handle your script ( 1st request = 1 process on the webserver) and all the img src="button.php... (another request = 2. process on the webserver). In case you embed 10 images that way, you'll get 10 + 1 processes on the webserver for 1 request done by the user. Image creation should be done in the skript, never use button.php - throw away all books and tutorials that tell you to do so. Ulf -- Neu: PEAR Menu 3 - Navigationsstrukturen dynamisch dargestellt http://www.ulf-wendel.de/projekte/menu/tutorial.php | http://www.phpdoc.de -- 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] is it safe to stripslashes() on all form variables?
would there be any problems caused if i used the stripslashes() function on all posted variables from a form to eliminate sql query errors? - 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] is it safe to stripslashes() on all form variables?
As long as you don't need to ever store a forward slash :) Beyond that, nope. stripslash() away. -- Plutarck Should be working on something... ...but forgot what it was. ""Noah Spitzer-Williams"" [EMAIL PROTECTED] wrote in message 9bf7ec$m1m$[EMAIL PROTECTED]">news:9bf7ec$m1m$[EMAIL PROTECTED]... would there be any problems caused if i used the stripslashes() function on all posted variables from a form to eliminate sql query errors? - 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] -- 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] ldap_search...no results!
if a do ldapsearch -o ",o=xyz" "ent=entry1,uid=ldap,ou=People,o=xyz", it works just fine. How can i access the entry "ent=entry1,uid=ldap,ou=People,o=xyz" using ldap_search/ldap_list or ldap_read? I have tried ldap_search... but i can not find how to write the filter. Can any one, please help me. I have wasted 5 days with this. Thanks Miguel -- 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-CVS] cvs: php4 /ext/fbsql php_fbsql.c
fmk Mon Apr 16 09:27:12 2001 EDT Modified files: /php4/ext/fbsql php_fbsql.c Log: Fixing memory leek on CancelFetch. Index: php4/ext/fbsql/php_fbsql.c diff -u php4/ext/fbsql/php_fbsql.c:1.10 php4/ext/fbsql/php_fbsql.c:1.11 --- php4/ext/fbsql/php_fbsql.c:1.10 Tue Apr 10 11:44:51 2001 +++ php4/ext/fbsql/php_fbsql.c Mon Apr 16 09:27:11 2001 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_fbsql.c,v 1.10 2001/04/10 18:44:51 fmk Exp $ */ +/* $Id: php_fbsql.c,v 1.11 2001/04/16 16:27:11 fmk Exp $ */ /* TODO: * @@ -269,7 +269,10 @@ if (result-retainCount == 0) { - if (result-fetchHandle) fbcdcCancelFetch(result-connection,result-fetchHandle); + if (result-fetchHandle) { + FBCMetaData *md = +fbcdcCancelFetch(result-connection,result-fetchHandle); + fbcmdRelease(md); + } if (result-rowHandler) fbcrhRelease(result-rowHandler); if (result-ResultmetaData) fbcmdRelease(result-ResultmetaData); /* if (result-metaData)fbcmdRelease(result-metaData); */ @@ -717,7 +720,7 @@ { PHPFBDatabase* result = NULL; list_entry *lep; - unsigned i; + unsigned i, port; char name[1024]; FBSQLLS_FETCH(); @@ -742,8 +745,14 @@ else { list_entry le; - FBCDatabaseConnection* c = fbcdcConnectToDatabase(databaseName,link-hostName,FB_SQL_G(databasePassword)); + FBCDatabaseConnection* c; FBCMetaData* md; + + port = atoi(databaseName); + if (port0 port65535) + c = fbcdcConnectToDatabaseUsingPort(link-hostName, +port,FB_SQL_G(databasePassword)); + else + c = +fbcdcConnectToDatabase(databaseName,link-hostName,FB_SQL_G(databasePassword)); if (c == NULL) { php_error(E_WARNING, fbcdcClassErrorMessage()); @@ -942,68 +951,85 @@ /* }}} */ -/* {{{ proto string fbsql_hostname([string host_name]) +/* {{{ proto string fbsql_hostname(int link_identifier [, string host_name]) */ PHP_FUNCTION(fbsql_hostname) { int argc = ARG_COUNT(ht); - zval**argv[1]; + zval**argv[2]; + PHPFBLink* phpLink = NULL; FBSQLLS_FETCH(); - if ((argc 0) || (argc 1)) WRONG_PARAM_COUNT; - if (zend_get_parameters_ex(argc, argv[0])==FAILURE) RETURN_FALSE; + if ((argc 1) || (argc 2)) WRONG_PARAM_COUNT; + if (zend_get_parameters_ex(argc,argv[0],argv[1])==FAILURE) RETURN_FALSE; + + convert_to_long_ex(argv[0]); + phpLink = phpfbGetLink((*argv[0])-value.lval); + if (phpLink == NULL) RETURN_FALSE; - phpfbestrdup(FB_SQL_G(hostName), return_value-value.str.len, return_value-value.str.val); + phpfbestrdup(phpLink-hostName, return_value-value.str.len, +return_value-value.str.val); return_value-type = IS_STRING; - if (argc = 1) + if (argc == 2) { - convert_to_string_ex(argv[0]); - free(FB_SQL_G(hostName)); - FB_SQL_G(hostName) = strdup((*argv[0])-value.str.val); + convert_to_string_ex(argv[1]); + if (phpLink-hostName) free(phpLink-hostName); + phpLink-hostName = strdup((*argv[1])-value.str.val); } } /* }}} */ -/* {{{ proto string fbsql_database([string database]) +/* {{{ proto string fbsql_database(int link_identifier [, string database]) */ PHP_FUNCTION(fbsql_database) { int argc = ARG_COUNT(ht); - zval**argv[1]; + zval**argv[2]; + PHPFBLink* phpLink = NULL; FBSQLLS_FETCH(); - if ((argc 0) || (argc 1)) WRONG_PARAM_COUNT; - if (zend_get_parameters_ex(argc, argv[0])==FAILURE) RETURN_FALSE; + if ((argc 1) || (argc 2)) WRONG_PARAM_COUNT; + if (zend_get_parameters_ex(argc,argv[0],argv[1])==FAILURE) RETURN_FALSE; + + convert_to_long_ex(argv[0]); + phpLink = phpfbGetLink((*argv[0])-value.lval); + if (phpLink == NULL) RETURN_FALSE; - phpfbestrdup(FB_SQL_G(databaseName), return_value-value.str.len, return_value-value.str.val); + phpfbestrdup(phpLink-currentDatabase-databaseName, +return_value-value.str.len, return_value-value.str.val); return_value-type = IS_STRING; - if (argc = 1) + if (argc == 2) { - convert_to_string_ex(argv[0]); - free(FB_SQL_G(databaseName)); - FB_SQL_G(databaseName) = strdup((*argv[0])-value.str.val); + convert_to_string_ex(argv[1]); + if
[PHP] PEAR_Error
Is there any sample code for the above PEAR class around anywhere? Chris
Re: [PHP] session variable problem
The reason for the fatal error is that you can only store the sessions in three (or four) ways, files, in a database or in the memory. What variable has no value? Have you started the session before you try to access the values? session_start(); echo $your_value; (Or preferably) echo $HTTP_SESSION_VARS["your_value"]; Here is a little code for you to test if you can read the session variables: session_start(); while(list($key, $val) = each($HTTP_SESSION_VARS)) echo "Variables name: $key - The value: $val"; } "SERKAN BALKANLI (EBÝ Bþk.-Analist Prog.)" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... i am starting and registering session variable succesfully that i can see the file on the server , but when it comes to use or display i can not , the variable has no value ... the "session.save_handler = files" is in php.ini , i tried to change it to user but that occured a fatal error etc.. So shortly what is the thing that i am missing thanks alot -- 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] True Appreciation
Many THANKS! I find this newsgroup to be one of the *best* I've come across! Responses are quick, usually detailed and always right on target... You guys and gals rock! 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] PEAR_Error
"Boget, Chris" schrieb: Is there any sample code for the above PEAR class around anywhere? You should ask this on the dedicated pear-general list. Examples are all over in the PEAR source. I preferr to use a simple wrapper for it like http://cvs.php.net/viewcvs.cgi/php4/pear/Cache/Error.php as I don't need all of the features for simple code. Stig's DB classes make more intensive use of it's features. Well, have a look at the source and keep on asking on the pear-general and/or pear-dev lists. Ulf -- Neu: PEAR Menu 3 - Navigationsstrukturen dynamisch dargestellt http://www.ulf-wendel.de/projekte/menu/tutorial.php | http://www.phpdoc.de -- 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] enabling PHP functions only on specific virtual hosts
On Mon, Apr 16, 2001 at 07:17:24PM +0200, indrek siitan wrote: but is there an enable_functions keyword to explicitly enable those functions in httpd.conf (this should be possible with the php_value keyword, as far as I understood from the manual). no. But you can put a .htaccess in the directory of the vhost, which you want to enable these functipns for, in which you define a different php.ini to be used (in which you don't disable these functions). wow, lot's of 'whiches' in this sentence. At least, I belive this can be done (but I'm not sure of it). -fkr -- gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0 8A48 0D31 9BD3 D9AC 74D0 |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE | |all your base are belong to us | shame on me | fkr@IRCnet | -- 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] install problem
I have not run into this problem before...so here goes. [root@bfarm1 php-4.0.4pl1]# make Making all in Zend make[1]: Entering directory `/root/php-4.0.4pl1/Zend' /bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../main -DXML_BYTE_ORDER=12 -g -O2 -c zend_language_scanner.c zend_language_scanner.c: In function `zend_fatal_scanner_error': zend_language_scanner.c:2707: Internal error: Segmentation fault. RedHat 7.0 (beta) --with-esoob --enable-ftp --enable-track-vars --enable-force-cgi-redirect I have installed on this beta OS before with no problems. any ideas? Michael Geier 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]
[PHP] Blur some text please
Hello, Does anyone know of an image library that plugs right into php that has a blur function so I can create a drop shadow effect for text? Thanks 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]
[PHP] Installing PHP Extentions for IIS - W2K - Is it possible?
Hi, I was downloading the latest version of PHP (Win32 Binaries) for IIS server, but no external extensions are included. Why? Is it not supported for IIS server? I'm having great difficulty adding those extensions manually (editing the PHP.ini), I always get errors like following example shows (the file sure is there): Unable to load dynamic library 'C:\PHP\extensions\php_gd.dll' - The specified procedure could not be found. This happens for other extensions also (which I copied from Apache PHP_4.0.4pl1.zip download). Has anyone experienced the problem I'm having - and if so, how did you overcome it? Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: [EMAIL PROTECTED] Homepage:www.sed.is - New Homepage! -- -- 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] Link to a html in PHP Code
Hi! I'm a pretty newby, so I have a question: How can I make a link to html or php or any other page in the internet in my PHP code? should be like Command ( "Http://www.xyz.com") Just like a link in a html site would be clicked. Thanx, greetings from austria, Johannes Rumpf -- 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] Link to a html in PHP Code
Johannes Rumpf wrote: Hi! I'm a pretty newby, so I have a question: How can I make a link to html or php or any other page in the internet in my PHP code? should be like Command ( "Http://www.xyz.com") Just like a link in a html site would be clicked. Thanx, greetings from austria, Johannes Rumpf -- 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] I believe the code should be the same as html Luis -- 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 env variables not working in php-cgi
|But from looking at your output, there is definately something screwy with |their setup. | |In phpinfo, what are the settings for track_vars (if listed) and |global_vars? track_vars is set to ON for local and master. register_globals is set to ON for local and master. there isn't a listing for global_vars. should there be? Is there something I can set witn ini_set that will enable these variables? Thanks, //frank -- 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 Digest 16 Apr 2001 18:18:43 -0000 Issue 631
php-general Digest 16 Apr 2001 18:18:43 - Issue 631 Topics (messages 48708 through 48787): Re: fwrite not writing 48708 by: Plutarck 48717 by: CC Zona 48729 by: Plutarck Re: Want a Good Book for Ref on PHP 48709 by: Plutarck 48710 by: eschmid+sic.s.netic.de 48719 by: Navid Yar 48754 by: Christian Reiniger 48758 by: Ulf Wendel 48766 by: Plutarck 48769 by: Phillip Bow fetching recursive mail parts 48711 by: Madis Malv dates 48712 by: Alvin Tan 48718 by: CC Zona 48720 by: Maxim Maletsky General WebServer Question? 48713 by: Jason Caldwell 48730 by: Plutarck 48756 by: Christian Reiniger global env variables not working in php-cgi 48714 by: Franklin Hays 48733 by: Plutarck 48762 by: Franklin Hays 48764 by: Plutarck 48767 by: Plutarck 48787 by: Franklin Hays PHP4.0.4pl1+PdfLib3.03+SCO 48715 by: Chris Fry fileupload,suexec,virtualhost 48716 by: juang Re: store array in a file? 48721 by: Keyur Kalaria What does "url_rewriter.tags" do? 48722 by: CC Zona 48723 by: Emil Rasmussen 48725 by: CC Zona enabling PHP functions only on specific virtual hosts 48724 by: indrek siitan 48728 by: Felix Kronlage 48778 by: indrek siitan 48781 by: Felix Kronlage Re:user info? 48726 by: Miguel Loureiro Protecting JavaScripts from being Donwloaded 48727 by: Steve Haemelinck 48731 by: John Lim 48735 by: Plutarck Re: PCRE vs. POSIX 48732 by: John Lim 48734 by: Felix Kronlage Re: unregister part of array in session 48736 by: Tobias Talltorp 48739 by: Yasuo Ohgaki the search for Ade Smith 48737 by: alt.music resource id #2 48738 by: Greg K 48742 by: Morgan Curley 48747 by: Tobias Talltorp 48749 by: Ulf Wendel 48750 by: Tobias Talltorp Mailing list script ? 48740 by: Toxik - Fabian Rodriguez PEAR 48741 by: Boget, Chris 48743 by: Pavel Jartsev 48744 by: Ulf Wendel 48746 by: Boget, Chris 48748 by: Boget, Chris 48751 by: Ulf Wendel include path per script 48745 by: Martín Marqués 48755 by: Ulf Wendel (Absolute beginner) .PHP3 and .HTM 48752 by: ulrichk.debitel.net 48757 by: Seung-woo Nam session variable problem 48753 by: SERKAN BALKANLI (EBÝ Bþk.-Analist Prog.) 48777 by: Tobias Talltorp Re: MySQL Results NULL Error 48759 by: Jason Stechschulte Wrox - Beginning PHP4 Ch12 example problem 48760 by: Dave Mateer php sessions and proxies. 48761 by: Larry Hotchkiss Re: php-lib questions 48763 by: Mark Re: accepting credit cards 48765 by: Jeff Pearson Variables not getting passed when I post info 48768 by: Brandon Orther 48770 by: Plutarck 48771 by: Ulf Wendel Array problem again. 48772 by: Martin Skjöldebrand is it safe to stripslashes() on all form variables? 48773 by: Noah Spitzer-Williams 48774 by: Plutarck ldap_search...no results! 48775 by: Miguel Carvalho PEAR_Error 48776 by: Boget, Chris 48780 by: Ulf Wendel True Appreciation 48779 by: Jason Caldwell install problem 48782 by: Michael Geier Blur some text please 48783 by: Brandon Orther Installing PHP Extentions for IIS - W2K - Is it possible? 48784 by: SED Link to a html in PHP Code 48785 by: Johannes Rumpf 48786 by: Luis Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- What is this: !filesize($filepath) Add this above your if loop: $filesize = filesize($filepath); echo $filesize; That might be causing your loop not to execute...if not, I'm not sure what's wrong. -- Plutarck Should be working on something... ...but forgot what it was. "CC Zona" [EMAIL PROTECTED] wrote in message 9bdv8u$2la$[EMAIL PROTECTED]">news:9bdv8u$2la$[EMAIL PROTECTED]... This function suddenly stopped working, and I just can't seem to figure out why. The only change made recently is that now the value of $force at calltime is sometimes true instead of being undefined or null. build_file("file_content","/path/to/file.inc","w",TRUE); function build_file($func_name,$filepath,$mode="w",$force=FALSE) { if($force or !file_exists($filepath) or !filesize($filepath)) //echo filesize($filepath) shows '0' { $content=$func_name(); //echo $content shows it's all there $fp=fopen($filepath,$mode); fwrite($fp,$content); rewind($fp); #temp test
[PHP] How do i include ASP script into PHP...??!
How can i include ASP scripts into PHP files or is it posible? thanxz -Joe -- 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] Link to a html in PHP Code
Johannes Rumpf schrieb: I'm a pretty newby, so I have a question: How can I make a link to html or php or any other page in the internet in my PHP code? should be like Command ( "Http://www.xyz.com") Just like a link in a html site would be clicked. print 'a href="http://www.circle.ch"The engaged PHP portal of Urs Gehring/a'; BTW Johannes, there's a german language mailinglist on http://www.php-center.de and - what I preferr cause it's better ;) - the newsgroup de.comp.lang.php . Ulf -- Neu: PEAR Menu 3 - Navigationsstrukturen dynamisch dargestellt http://www.ulf-wendel.de/projekte/menu/tutorial.php | http://www.phpdoc.de -- 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] function to add %20 in place of blank spaces
I'm trying to remember what is the function to replace blank spaces with %20. Can anyone remind me of that? Thanks, C.F.
RE: [PHP] function to add %20 in place of blank spaces
I'm trying to remember what is the function to replace blank spaces with %20. Can anyone remind me of that? urlencode(); Chris
[PHP] RFC: Storing User Info
I'm looking for comments on this one. I'm developing a site that will have user logins on it. What's the best way to do this? What to store, and how? - Are people more inclined to use a username when they need to log in to something, or would asking for an email (as the userID) be better? - How about storing passwords? All of this info will be stored in an MySQL DB. How do admins generally do this type of stuff? Encrypt the password stored in the DB, and decrypt it on the fly to compare? Store it in plain text? Or store it encrypted, and when the user logs in, encrypt that passwd (from the form) and compare the strings? (not sure if the latter would work) - What about sending people passwords through email? Like when someone signs up the first time, they supply a passwd. How do people feel about sending that login information to the user in plain text via email? Or do you? - What about when the user forgets their login? Just fetch the info from DB and mail it out to the (registered) email address? Or, generate a new, generic one, mail that one out, and tell the user to login and change it again? Suggestions please. AMK4 -- W | | I haven't lost my mind; it's backed up on tape somewhere. | ~ Ashley M. Kirchner mailto:[EMAIL PROTECTED] . 303.442.6410 x130 SysAdmin / Websmith . 800.441.3873 x130 Photo Craft Laboratories, Inc. .eFax 248.671.0909 http://www.pcraft.com . 3550 Arapahoe Ave #6 .. . . . . Boulder, CO 80303, USA -- 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] fwrite not writing
In article 9bejks$gl6$[EMAIL PROTECTED], [EMAIL PROTECTED] ("Plutarck") wrote: I'm not sure why it suddenly stopped working, but let's see if you actually need it to work. First of all, I take it that you have content which you want to write into a file. Correct? If so, why does it matter if the file you want to write it to has data anyway? If you are just going to add data into it, isn't it ok that it is a zerolength file? It is needed. I have a dynamically generated page. Most of the content needs to be re-generated with every request. But some of it needs to be re-generated far less often. Rather than unnecessarily hit the db every time to get the exact same content, that content gets cached to an include file. This function checks whether that file needs to get a content refresh, and if so rewrites that content. (I'm not adding data to the file, I'm overwriting it.) Or is the problem that the file is _not_ actually zerolength, but PHP says it's zerolength anyway? Nope, it's really zero length. The filesystem agrees with PHP, and when I open it in a text editor the file is empty. Just try removing the !filesize() part, and then try executing the function. I commented out the entire if() condition, it makes no difference. Maybe I have not made this clear enough: the problem is not in getting inside the loop. The function *is* executing the loop, and *is* reaching the fwite() line as well as continuing without error past that line. The frustrating part is that fwrite() is writing an empty string to the file instead of using the $content variable (which, when echoed immediately before that line, is definitely not empty/null). But maybe I just don't understand what you are trying to write and why. Could you be a little more specific what data is being saved in the file, and what is in the file already? Sometimes the file has data, sometimes it doesn't; sometimes the file exists, sometimes it does. Right now, unfortunately, the file remains empty. I'm trying to fill it with a large block of dynamically generated HTML which will then be used as a static include file for current and subsequent requests. "CC Zona" [EMAIL PROTECTED] wrote in message 9bebi3$133$[EMAIL PROTECTED]">news:9bebi3$133$[EMAIL PROTECTED]... This function suddenly stopped working, and I just can't seem to figure out why. The only change made recently is that now the value of $force at calltime is sometimes true instead of being undefined or null. build_file("file_content","/path/to/file.inc","w",TRUE); function build_file($func_name,$filepath,$mode="w",$force=FALSE) { if($force or !file_exists($filepath) or !filesize($filepath)) //echo filesize($filepath) shows '0' { $content=$func_name(); //echo $content shows it's all there $fp=fopen($filepath,$mode); fwrite($fp,$content); rewind($fp); #temp test $read_back=fread($fp,10); #temp test echo "pfile content:/p\n $read_back"; #temp test, displays nothing fclose($fp); } } I've tried putting echoes and "or die('Error on __LINE__')" on every line, checked all the variable values, and found no answers from that. Everything shows exactly as it should be except that the content that echoes out so nicely *doesn't ever get written to the file*. The function runs to the end without error and the file's modification date is even updated. But the file remains empty. I'm probably missing something ridiculously obvious, but would someone please be kind enough to point out what it is? Thank you!! What is this: !filesize($filepath) If filesize is zero (which it is groan), then do the rest (which it does--except the content it fetches never makes it into the file it writes to. How that can be, I dunno, but that apparently is what it's doing...) Add this above your if loop: $filesize = filesize($filepath); echo $filesize; Already tried echoing that and all the other values. Filesize is 0. That might be causing your loop not to execute...if not, I'm not sure what's wrong. I don't get it. It should work. It did work. Suddenly it's not. -- 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] siimple cookie problem
Can someone help me with an elementary cookie problem? I want to capture a variable, write to a cookie, and be able to access it from other pages. I've done that, and it works well BUT, if I capture the same variable a second time (with a different value), it still remembers the first value, not the second. The only way I can get it to understand the second value is to exit my browser and start over. What am I doing wrong? Thanks in advance, KennM -- 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] set_error_handler()
Can you use the above function to set the error handler to a custom class? If so, how? I've been having no luck no matter what I do... Chris
Re: [PHP] What's XML's Purpose??
Do realize, of course, that you can return a dataset from a database in XML, and store it client side. Wanna sort by name? Reorg the dataset. In HTML you'll have to make another round trip. Wanna see your data sorted by time? Reorg the dataset. XML, while a little more tricky, does have some cool features that HTML just doesn't have. Also, have you ever done inter-company data transfers? How about to 8 different people? You write an XSL sheet for each one, and and XSLT. Save yourself days on import/export/data conversion routines, as well as validation of "good" data across the link. True, XML's not the end-all be-all technology, but just another tool. You choose not to learn it, that's all good; maybe you'll never use it. But if you don't know it, at least a little bit, you may end up doing more work in the long run because you won't recognize the instances where XML will fit in beautifully and save you time. Sure, you(generic form) can code PHP without any other programming knowledge at all. Sure, you(generic form) can even do it well without any other programming knowledge. But I guarantee you that even 1 "C" class, or better yet, a few programming classes will make a huge difference in your coding style, your ability, and your knowledge of what's "really going on" and how to optimise it. XML, like the above example, is just another tool - just like a programming language. Sure, you may not need it, but once you have it, you'll find uses for it. Peace, love, code. -Szii - Original Message - From: Jason Caldwell [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, April 14, 2001 2:44 PM Subject: Re: [PHP] What's XML's Purpose?? amen brother! ""Plutarck"" [EMAIL PROTECTED] wrote in message 9baam8$6sh$[EMAIL PROTECTED]">news:9baam8$6sh$[EMAIL PROTECTED]... I use to be really enthusiastically pro-XML just as I was getting into PHP, but now I've basically taken a "XML shmexXML" approach. I get the initial attraction, but I would think the love would fade off a bit. The key that so many people seem to forget is the best way to do HTML is with, *gasp*, HTML! If you just want a webpage, XML is using a canon to kill a fly. It's like creating classes and objects in PHP for sending text emails. Sure you can do it...but why? XML is new. Common society doesn't do well with new. They always manage to screw it up somehow. XML started as an extensible markup language...that's it. That's all it was supposed to do! Now people are using it to query databases, and concoct entire search engines, and they are trying to use it to control access to restricted data, etc etc. It's the same thing that happened with Java. People just aren't good with "new". XML is nice, and for some things it's even great. But it's not the death of plain old HTML, just like ISDN didn't kill POTS (remember when ISDN was "the future of telecom"?). I fear that there are too many cooks in the kitchen on XML, all with a seasoning all their own that they are dead set on adding to the broth. But for me, I say let people play with their Java and XML and new fangled widgets. I'll take my PHP and plain-old HTML, and I'll create twice as much material with just as high a quality, and I won't need to spend an extra minute learning a bleeding-edge technology. Life's too short to spend it learning how to live it. Translation: Better to program than to learn yet _another_ language. -- Plutarck Should be working on something... ...but forgot what it was. ""Chris Anderson"" [EMAIL PROTECTED] wrote in message 002001c0c506$c70d7f00$0d1012d1@null">news:002001c0c506$c70d7f00$0d1012d1@null... thanks that helped I stll think it sounds like its more geared for the MS crowd - Original Message - From: "Brian Clark" [EMAIL PROTECTED] To: "PHP is not a drug." [EMAIL PROTECTED] Sent: Saturday, April 14, 2001 3:29 PM Subject: Re: [PHP] What's XML's Purpose?? Hi Chris, @ 12:01:45 AM on 4/14/2001, Chris Anderson wrote: Am I missing something here? This has been discussed many times. There was an extremely long thread last year about XML, but I can't find it in the archives. Here's a good start: http://marc.theaimsgroup.com/?l=php-generalm=97969195010857w=2 Use the 'next in thread' link to follow the thread. -Brian -- PGP is spoken here: 0xE4D0C7C8 Please, DO NOT carbon copy me on list replies. -- 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,
Re: [PHP] set_error_handler()
If I'm not mistaken set_error_handler() takes a string that is the name of a function, I am sure in that function you can instantiate whatever class you want. morgan At 03:57 PM 4/16/2001, Boget, Chris wrote: Can you use the above function to set the error handler to a custom class? If so, how? I've been having no luck no matter what I do... Chris
Re: [PHP] function to add %20 in place of blank spaces
On Mon, Apr 16, 2001 at 03:28:11PM -0300, Nando2 wrote: I'm trying to remember what is the function to replace blank spaces with %20. Can anyone remind me of that? urlencode() urldecode() -fkr -- gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0 8A48 0D31 9BD3 D9AC 74D0 |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE | |all your base are belong to us | shame on me | fkr@IRCnet | -- 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] compile Modules
Hi there Could someone tell me how do I compile a php module. look, I mean compile fro example the imap module as an external module so I can call it from php.ini Yes yes yes I know I can compile it inside the PHP binary, but I need to know how to make the mod_imap.so mod_mysql.co, etc any idea ? Please e-mail me directly I'm not subscribed to the list - Yurais Fernndez Leal Systems Administrator Web Developer Medical University - Santiago de Cuba [EMAIL PROTECTED] http://facimed.scu.sld.cu/ Phone: +53(226)-654204 (home) +53(226)-651556 ICQ: 33792610
Re: [PHP] session variable problem
Merhabalar, firstly do you use windows or linux? id you use windows you shoul give the session_save_path to the script. ( session_save_path("c:\\user\\tmp"); ) if you use linux and no changes in your .ini files, your sessions store in /tmp directory... ?php session_start(); $id = 123; session_register('id'); ? html head title/title /head body ?php echo $id; ? /body /html Kolay Gele... Mesut... SERKAN BALKANLI (EB Bk.-Analist Prog.) wrote: i am starting and registering session variable succesfully that i can see the file on the server , but when it comes to use or display i can not , the variable has no value ... the "session.save_handler = files" is in php.ini , i tried to change it to user but that occured a fatal error etc.. So shortly what is the thing that i am missing thanks alot -- 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] fwrite not writing
if($force or !file_exists($filepath) or !filesize($filepath)) May I suggest if ($force || (!file_exists($filepath)) || (!filesize($filepath))) Probably won't make much difference, but I've never used the "or" clause and cannot vouch for it's effectiveness. Also, put a check in after the fopen() call and make sure you're able to open up the file correctly. Perhaps and fflush() call before the rewind() call to ensure that the file buffer's actually written to disk before you try to re-read it? 'Luck -Szii - Original Message - From: CC Zona [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, April 16, 2001 12:06 PM Subject: Re: [PHP] fwrite not writing In article 9bejks$gl6$[EMAIL PROTECTED], [EMAIL PROTECTED] ("Plutarck") wrote: I'm not sure why it suddenly stopped working, but let's see if you actually need it to work. First of all, I take it that you have content which you want to write into a file. Correct? If so, why does it matter if the file you want to write it to has data anyway? If you are just going to add data into it, isn't it ok that it is a zerolength file? It is needed. I have a dynamically generated page. Most of the content needs to be re-generated with every request. But some of it needs to be re-generated far less often. Rather than unnecessarily hit the db every time to get the exact same content, that content gets cached to an include file. This function checks whether that file needs to get a content refresh, and if so rewrites that content. (I'm not adding data to the file, I'm overwriting it.) Or is the problem that the file is _not_ actually zerolength, but PHP says it's zerolength anyway? Nope, it's really zero length. The filesystem agrees with PHP, and when I open it in a text editor the file is empty. Just try removing the !filesize() part, and then try executing the function. I commented out the entire if() condition, it makes no difference. Maybe I have not made this clear enough: the problem is not in getting inside the loop. The function *is* executing the loop, and *is* reaching the fwite() line as well as continuing without error past that line. The frustrating part is that fwrite() is writing an empty string to the file instead of using the $content variable (which, when echoed immediately before that line, is definitely not empty/null). But maybe I just don't understand what you are trying to write and why. Could you be a little more specific what data is being saved in the file, and what is in the file already? Sometimes the file has data, sometimes it doesn't; sometimes the file exists, sometimes it does. Right now, unfortunately, the file remains empty. I'm trying to fill it with a large block of dynamically generated HTML which will then be used as a static include file for current and subsequent requests. "CC Zona" [EMAIL PROTECTED] wrote in message 9bebi3$133$[EMAIL PROTECTED]">news:9bebi3$133$[EMAIL PROTECTED]... This function suddenly stopped working, and I just can't seem to figure out why. The only change made recently is that now the value of $force at calltime is sometimes true instead of being undefined or null. build_file("file_content","/path/to/file.inc","w",TRUE); function build_file($func_name,$filepath,$mode="w",$force=FALSE) { if($force or !file_exists($filepath) or !filesize($filepath)) file://echo filesize($filepath) shows '0' { $content=$func_name(); file://echo $content shows it's all there $fp=fopen($filepath,$mode); fwrite($fp,$content); rewind($fp); #temp test $read_back=fread($fp,10); #temp test echo "pfile content:/p\n $read_back"; #temp test, displays nothing fclose($fp); } } I've tried putting echoes and "or die('Error on __LINE__')" on every line, checked all the variable values, and found no answers from that. Everything shows exactly as it should be except that the content that echoes out so nicely *doesn't ever get written to the file*. The function runs to the end without error and the file's modification date is even updated. But the file remains empty. I'm probably missing something ridiculously obvious, but would someone please be kind enough to point out what it is? Thank you!! What is this: !filesize($filepath) If filesize is zero (which it is groan), then do the rest (which it does--except the content it fetches never makes it into the file it writes to. How that can be, I dunno, but that apparently is what it's doing...) Add this above your if loop: $filesize = filesize($filepath); echo $filesize; Already tried echoing that and all the other values. Filesize is 0. That might be causing your loop not to execute...if not, I'm not sure
RE: [PHP] set_error_handler()
If I'm not mistaken set_error_handler() takes a string that is the name of a function, I am sure in that function you can instantiate whatever class you want. I thought about that. But ideally, what I'm trying to do is trap the errors with a class method (after instantiating) then print out or handle the errors all at once. Kind of like this: pseudocode $myErrors = new ErrorClass; $old_error_handler = set_error_handler( "myErrors-handler" ); // all of these will be caught with my class' method trigger_error( "Error 1", E_USER_WARNING ); trigger_error( "Error 2", E_USER_WARNING ); trigger_error( "Error 3", E_USER_WARNING ); $myErrors-printAllErrors(); /pseudocode Or something along those lines. Using the function to instiate the class and process the error basically makes the class moot. Why would you really need the class in the first place? You would just have the function do all the work. Chris
Re: [PHP] is it safe to stripslashes() on all form variables?
If you strip slashes, it will make a security hole. For example, SELECT * FROM tablename WHERE name = '$name'; what if $name is \'garbage\';DROP TABLE tablename;SELECT \'something After stripslashes($name) SELECT * FROM table WHERE name = 'garbage';DROP TABLE tablename;SELECT 'something'; Regards, -- Yasuo Ohgaki ""Noah Spitzer-Williams"" [EMAIL PROTECTED] wrote in message 9bf7ec$m1m$[EMAIL PROTECTED]">news:9bf7ec$m1m$[EMAIL PROTECTED]... would there be any problems caused if i used the stripslashes() function on all posted variables from a form to eliminate sql query errors? - 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] -- 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] fwrite not writing (simpler example), PHP 4.0.4pl1, Apache/1.3.14
Suggestions so far have focused on parts of the function other than fwrite, so I'm trying again with a stripped-down example. After spending many hours trying to make this very simple function work again, I'm beginning to think fwrite in broken--either in 4.0.4pl1 (?!) or in my build of it (it was working fine before...). Before filing a bug report, would a few people test whether this fails to write on their system too? Thank you! function build_file() { $fp=fopen("/path/to/directory/test.inc","w") or die("ERROR on fopen" . $php_errormsg); fwrite($fp,"pHi, I'm some test content/p",1) or die("ERROR: fwrite " . $php_errormsg); fclose($fp) or die("ERROR: fclose" . $php_errormsg); } build_file(); //no errors and file modification date is updated echo "pBegin include...p"; //ok include("/path/to/directory/test.inc"); //NOTHING! echo "p...End includep"; //ok (Checking from the commandline, the file is definitely being set to empty. It's writing an empty string to the file instead of writing the specified content.) -- 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] php like cgi
Hi.. I'm tring to use a php-script like cgi, but the only thing i got is "Internal Server Error..." That's my test-script.. --- #!/bin/php -q ?php echo "Content-type: text/html\n\n"; echo "Hello World!\n"; ? I tried whithout "-q" and "echo "Content-", but i got the same error! That's my httpd_error.log - [Mon Apr 16 17:19:24 2001] [error] [client 127.0.0.1] Premature end of script headers: /home/httpd/cgi-bin/teste.cgi How can i do it? I have bash, perl, C, cgis working here, just my php-script dosn't work. Before asking, Yeah, i need to exec it like cgi, 'cos that was the only way that i find to use posix_setuid(). Thanks... []s .~. Ulysses Almeida / V \ [EMAIL PROTECTED] / ( ) \ Seja livre, use GNU/Linux! ^^-^^ -- 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] include files with PHP 3.0.16
Hi, I'm currently working on a rather large site and have just completed the navigation portion of it. I'd like to make use of server side includes so that if I have to make changes down the road, I won't have to chance potentially 100s of files. Normally I use !--#include file="filename.inc"-- with .asp and .shtml files, however, this does not seem to work for me using PHP 3.0.16 (the version my web host uses). Is there an equivalent to !--#include file="filename.inc"-- in PHP? And will it work in version 3.0.16. I've gone through the online manual but found nothing that would help in this situation. Thanks -Tim -- 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] include files with PHP 3.0.16
Is there an equivalent to !--#include file="filename.inc"-- in PHP? And will it work in version 3.0.16. I've gone through the online manual but found nothing that would help in this situation. include("filename.inc"); or require("filename.inc"); http://www.php.net/include http://www.php.net/require Enjoy, James 'theFinn' Atkinson http://www.phpbb.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] include files with PHP 3.0.16
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Tim Thorburn) wrote: Is there an equivalent to !--#include file="filename.inc"-- in PHP? And will it work in version 3.0.16. I've gone through the online manual but found nothing that would help in this situation. http://php.net/manual/en/function.virtual.php -- 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]
Re: [PHP-CVS] cvs: php4 /ext/gd config.m4
+ + if test "$with_freetype_dir" != "no" ; then + CHECK_TTF="" + else +CHECK_TTF="$withval" + fi + Can you describe in plain words what this is supposed to do? Note that $withval is not defined outside the scope of AC_ARG_WITH(..). - Sascha Experience IRCG http://schumann.cx/http://schumann.cx/ircg -- PHP CVS 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]