[PHP] storing arrays
Two questions: 1) Is it possible to write an array to a file? 2) Is it possible to specify the name of the key to each item of an array when you get the array using file(). Thanks a lot. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] storing arrays
I'm having trouble storing my array to a text file, utilizing serialize() and unserialize(). Could you please show a very basic layout of the proper way to serialize and unserialize and store that to a file? Thanks. "Matt" <[EMAIL PROTECTED]> wrote in message 001e01c1b7c0$404d5be0$059aa8c0@Pooch">news:001e01c1b7c0$404d5be0$059aa8c0@Pooch... > > ----- Original Message - > From: "Clark" <[EMAIL PROTECTED]> > Sent: Saturday, February 16, 2002 9:15 PM > > > > Two questions: > > > > 1) Is it possible to write an array to a file? > > Yes, serialize it first with http://www.php.net/serialize. You can also > place this in a db text field because it will be a character representation. > > > 2) Is it possible to specify the name of the key to each item of an array > > when you get the array using file(). > > When retrieving the saved array, unserialize it, and you'll get the same > array back. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Can PHP do this...?
John, PHP-general, OK. I think I understand this, but let me ask just to be sure. So if I setup in my page something to this effect: if ($_SERVER['!HTTPS']) { echo "Switching over to SSL..."; echo ""; } else { echo "**Rest of Page**"; } Would this work? I am about to add a secind site to my site using an alias in Apache. Example is http://www.mysite.com for first site and http://www.mysite.com/2ndsite. Except I want everything for the second site to be https. Make sense? Thanks again, Ron Clark -Original Message- From: John W. Holmes [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 11, 2002 11:45 AM To: Ronald Clark; [EMAIL PROTECTED] Subject: RE: [PHP] Can PHP do this...? > Hello all. I have a question that I hope someone can answer. Is it > possible to determine is someone is hitting your site over SSL or > plain http using > PHP? If so, is it part of getenv()? I think it's $_SERVER['HTTPS']. If that is set, then the connection is over SSL. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ CONFIDENTIALITY NOTICE: The information contained in this ELECTRONIC MAIL transmission is confidential. It may also be privileged work product or proprietary information. This information is intended for the exclusive use of the addressee(s). If you are not the intended recipient, you are hereby notified that any use, disclosure, dissemination, distribution [other than to the addressee(s)], copying or taking of any action because of this information is strictly prohibited.
RE: [PHP] "include" question
Thanks! Works perfect with double quotes! RC -Original Message- From: Tom Rogers [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12, 2002 8:21 AM To: Ronald Clark Cc: [EMAIL PROTECTED] Subject: Re: [PHP] "include" question Hi, Friday, December 13, 2002, 12:07:05 AM, you wrote: R> Hello all, R> I am passing a variable like so: R> R> On the "link.php" page, I have this simple code: R> $job = $_GET['foo']; R> echo "$job"; // for error checking R> include 'path/to/$job'; ?>> R> The 'echo "$job";' statement works just fine, but the outbout for the R> include statement looks like this: bar.php R> Warning: Failed opening 'scripts/$job' for inclusion R> (include_path='.:/usr/local/lib/php') in /usr/local/www/data-dist/link.php R> on line 142 R> Can I not use a $variable in an include 'something.php '; statement? R> Thanks in advance, R> Ron Clark You have to use double quotes like: include "path/to/$job" or add like this: include 'path/to/'.$job -- regards, Tom CONFIDENTIALITY NOTICE: The information contained in this ELECTRONIC MAIL transmission is confidential. It may also be privileged work product or proprietary information. This information is intended for the exclusive use of the addressee(s). If you are not the intended recipient, you are hereby notified that any use, disclosure, dissemination, distribution [other than to the addressee(s)], copying or taking of any action because of this information is strictly prohibited.
[PHP] newbie - decimal places in arthimetic functions
Hi- How can I control the decimal places returned by an arthimetic function? I would like this divsion function to only return two decimal places (rounded up). $calcsize = $value / $oneGig; Thanks in advance, Max -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Testing smtp server
Hi- I would like to open a connection to tcp port 25 (smtp) as a conditional in a script (if succeeds to this, else to that). I found the socket_create function that is listed as experimental and requires a re-compile of php. Is there a built in way to perform this kind of test? Thanks in advance, Max -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Socket_connect() timeout
Warning: socket_connect() unable to connect [60]: Operation timed out in /usr/home/maxc/public_html/admin/functions.inc on line 66 Is there any way to time out this function? I only want to wait 5 seconds. Thanks in advance, Max "Johannes Schlueter" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Friday 13 December 2002 21:30, Max Clark wrote: > I found the socket_create function that is listed as experimental and > requires a re-compile of php. Is there a built in way to perform this kind > of test? Based upon the second example on http://www.php.net/manual/en/ref.sockets.php : echo "TCP/IP Connection\n"; /* Get the service for TCP-Port 25. */ $service_port = getservbyport (25, 'tcp'); /* Get the IP address for the target host. */ $address = gethostbyname ('www.example.com'); /* Create a TCP/IP socket. */ $socket = socket_create (AF_INET, SOCK_STREAM, 0); if ($socket < 0) { echo "socket_create() failed: reason: " . socket_strerror ($socket) . "\n"; } else { echo "OK.\n"; } echo "Attempting to connect to '$address' on port '$service_port'..."; $result = socket_connect ($socket, $address, $service_port); if ($result < 0) { echo "socket_connect() failed.\nReason: ($result) " . socket_strerror($result) . "\n"; } else { echo "OK.\n"; } johannes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] regex for fqdn test
Hi- I was wondering if someone could help me with a regex to test for a valid domain name (foo.com). Thanks in advance, Max -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Socket_connect() timeout
Hi- Warning: socket_connect() unable to connect [60]: Operation timed out in /usr/home/maxc/public_html/admin/functions.inc on line 66 Is there any way to time out this function? I only want to wait 5 seconds. Thanks in advance, Max -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] pcre pattern match help
Hi- I would like to do a pattern match against a string, sometimes this pattern will include the full string, and sometimes it will not, if the pattern does not include the second match I still want to get the first pattern match. Below is my code, and the results I am looking for. Thanks in advance, Max preg_match ("/\:\[(\S+)\]\:(\S*)/",$transport,$matches); print_r ($matches); $tranport = ":[127.0.0.l)"; print_r ($transport) -> Array ( ) ** I want this to return "127.0.0.1" $transport = "smtp:[64.70.36.4]:25"; print_r ($transport) -> Array ( [0] => :[64.70.36.4]:25 [1] => 64.70.36.4 [2] => 25 ) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Verisign Credit Card Processing with PHP
Hi- I was wondering anyone out there is using the verisign payflo product with php and could share their experiances with me. Are there good alternate choices that I should be looking at? Thanks in advance, Max -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] case statement?
Hi- I was wondering if php had a case function? Instead of building a large if/elseif/else block I would like to do a case $page in (list). Thanks in advance, Max -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] New mailing list
http://betterphp.org The Better PHP mailing list is available for anyone who wants to learn how to write secure, efficient web applications. We focus on the LAMP (Linux-Apache-MySQL-PHP) platform but welcome other questions. This list is intended for people who use PHP, and who want feedback on code style, security, and other more advanced PHP topics. Please note: this list is moderated. Anything you can find in standard documentation will not be forwarded to the list, as we are trying to keep the discussion about style, not syntax. Everyone is welcome to join and learn, the goal is to get programmers thinking about security. -- Ron Clark System Administrator/Web Coordinator Armstrong Atlantic State University 11935 Abercorn Street Savannah, Ga 31419 Phone: 912 961 3234 Fax: 912 927 5353 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Why Can't I get this to work
Hello all, I have a php script that reads a flat text file with fields seperated by a space. I explode them into an array just fine, but when I try then to load that array into a mysql database, it doesn't work. Here is my script: for ($i=0; $i<$number_of_alerts; $i++) { // Split each line $line = explode(" ", $ipfwlog[$i]); $line[1] = intval($line[1]); $IPFWsql = "INSERT INTO Firewall_Logs (month, date, time, fw_name, kernel, fw_engine, rule_number, action, protocol, src $results = mysql_query($IPFWsql) or die ("Could not execute query"); } Any ideas why this does not work? I am completely stuck. Thanks in advance, RonC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Why Can't I get this to work
OK, normally I do not respond to my own posts, but I have been shown that I did not get the whole script. So here it is: for ($i=0; $i<$number_of_alerts; $i++) { // Split each line $line = explode(" ", $ipfwlog[$i]); $line[1] = intval($line[1]); $IPFWsql = "INSERT INTO Firewall_Logs (month, date, time, fw_name, kernel, fw_engine, rule_number, action, protocol, src_ip_port, dst_ip_port, direction, via, interface) VALUES ('$line[0]', '$line[1]', '$line[2]', '$line[3]', '$line[4]', '$line[5]', '$line[6]','$line[7]', '$line[8]', '$line[9]', '$line[10]', '$line[11]', '$line[12]')"; $results = mysql_query($IPFWsql) or die ("Could not execute query"); } Again, any help with this issue is appreciated. Thanks, Ron Clark "Ron Clark" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello all, > > I have a php script that reads a flat text file with fields seperated by a > space. I explode them into an array just fine, but when I try then to load > that array into a mysql database, it doesn't work. Here is my script: > > for ($i=0; $i<$number_of_alerts; $i++) { > // Split each line > $line = explode(" ", $ipfwlog[$i]); > > $line[1] = intval($line[1]); > > $IPFWsql = "INSERT INTO Firewall_Logs (month, date, time, fw_name, kernel, > fw_engine, rule_number, action, protocol, src > $results = mysql_query($IPFWsql) or die ("Could not execute query"); > > } > > Any ideas why this does not work? I am completely stuck. > > Thanks in advance, > RonC > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Inserting a variable into a mysql_query() statement
I'm trying to insert the variable $hidden_manuf_id into a mysql_query() statement. If i do this: mysql_query("DELETE FROM product WHERE manufacturer=$hidden_manuf_id",$bb) or die(mysql_error()); PHP server doesn't see the variable because it is inside the string quotes"". If I do this: mysql_query("DELETE FROM product WHERE manufacturer="$hidden_manuf_id,$bb) or die(mysql_error()); PHP server reports a parsing error. What is the correct syntax? ($bb is correctly defined.) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] passing variable question
Hello all, I have a php script that reads all the files in a directory (pictures), the outputs each picture as a link to be displayed in the main frame of the html page. All of that works fine. I want to be able to "pretty up" the picture out put by placing the picture into a html table so it is centered, add color, etc. But I cannot seem to figure out how to pass the variable from the menu page to the main frame page without using a goofy gray button form. Anyone know how to pass a variable on just a link alone? Thanks, Ronnie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] XML to PHP help
No, what I'm looking for is a script that will download the backend.php file like you get from slashdot.org, and turn it into a readable html file that can be insterted into another php file. Make sense? Thanks, RC -Original Message- From: Raditha Dissanayake [mailto:[EMAIL PROTECTED] Sent: Sunday, August 31, 2003 11:20 AM To: Ron Clark; [EMAIL PROTECTED] Subject: Re: [PHP] XML to PHP help hi Ron, There's no way you can retrieve the php on a remote server (unless of course they have a major security flow :-) ) Ron Clark wrote: >Hello all, > >Does anyone have a script, or know where to find a working script to >pull backend.php files from a site, parse them into a html type file, >and display them correctly? I have been working on one for my site for >some time now, and I cannot sem to get it right. I want to see the >structure of a working script and compare it to my own. > >Thanks, >Ron Clark > > > -- http://www.raditha.com/php/progress.php A progress bar for PHP file uploads. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] XML to PHP help
Hello all, Does anyone have a script, or know where to find a working script to pull backend.php files from a site, parse them into a html type file, and display them correctly? I have been working on one for my site for some time now, and I cannot sem to get it right. I want to see the structure of a working script and compare it to my own. Thanks, Ron Clark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Handling checkboxes that aren't checked!!!
>> I have a page with a Form and a Checkbox. >> >> I have a second page which wants to do something depending on if the >> checkbox is selected or not. >> If its selected there is no problem. But if I tryand do anything if >> it isn't selected then it says the variable is 'undefined'. How can I >> test For checkbox's I like to have a HIDDEN checkbox. With the hidden name and value, I'll always have at least a blank form variable passed. Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] text input truncated
> $xyz = "Hello World"; > > echo ""; > > ?> > > The text box shows up with "Hello" NOT "Hello World". How do I get the > entire variable? I would try single quotes here. $xyz = 'Hello World'; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] signing in as php user?
Hello Jason, (JJ == "Jason Jacobs") [EMAIL PROTECTED] writes: JJ> Does anyone know how I can sign into a site through a shell JJ> (Telnet, FTP program, etc) with the PHP user? $ ps aux | egrep '([w]ww|[n]obody)' | su `awk '{ print $1 }'` or $ which php | ls -l `awk '{ print $1 }'` ..And look in columns 3 and 4 for user and group, respectively. JJ> How can I find out the password that PHP uses (or does it...)? If it is a CGI, it's the password of the user that owns the executable. (there may also be setuid/setgid issues but I'm not getting into that). If it's running as an Apache static or DSO, it's the user the webserver is running as. JJ> Jason -Brian -- Structured Programming supports the law of the excluded muddle. -- 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] need admin help please...
Hello Sebastian, (SS == "Sebastian Stadtlich") [EMAIL PROTECTED] writes: SS> I switched my provider and now i often get this error message when SS> using mysql from my php-skripts: SS> "Warning: MySQL Connection Failed: Can't create a new SS> thread (errno 11). If you are not out of available SS> memory, you can consult the manual for a possible SS> OS-dependent bug in include/dbcall.inc.php3 on line 6 SS> Unable to select database" SS> could someone tell me what this exactly want's to tell me? SS> and even better : what the admin of the server can do about it? *I'm no expert on this topic*, but.. Ask the admin to check the ulimit for mysql and to place this in it's startup script: # Increase number of file descriptors ulimit -n 1024 I've had similar problems in the past. Also check the archives at http://www.deadly.org/ as the site owner ran into that problem quite a while ago. A whole article about it is there somewhere. -Brian -- Press any key to continue, or any other key to quit. -- 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] Baby's First Regex! (Repost - Please Help)
Hello Murray, (MS == "Murray Shields") [EMAIL PROTECTED] writes: MS> I have written my first regex's, which are simply used for MS> validation of input into a web form. Basically, they check to see MS> if an invalid characters are being entered, and is working MS> perfectly. A different regex is used to different types of input. MS> They are as follows MS> At the moment, the error message sent to the browser is along the MS> lines of "You have entered invalid characters. Please check and MS> try again." However, I would rather be able to tell them WHICH MS> characters they entered represent a problem. You can use parentheses around items you wish to match-and-store and refer to those items later. There is a 3rd argument to ereg(), and that can hold your matches. ereg (string pattern, string string [, array regs]) Look at the example on this page: http://www.php.net/manual/html/function.ereg.html And for a different flavor: http://www.php.net/manual/html/function.ereg-replace.html MS> How can I get a the list of characters tht causes one of these MS> regex's to fail? -Brian -- While money can't buy happiness, it certainly lets you choose your own form of misery. -- 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] Looking for a script
Hello PeterOblivion, (Pac == "[EMAIL PROTECTED]") [EMAIL PROTECTED] writes: Pac> since im too busy to write my own script, does anyone know of a Pac> FilePlanet (fileplanet.com) or Download.com type indexing script, Pac> where when you click on a link it will take you to the details of Pac> the file, and etc. http://www.hotscripts.com/ http://px.sklar.com/ http://php.resourceindex.com/ Pac> - Thanks -Brian -- The trouble with a lot of self-made men is that they worship their creator. -- 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 confusion
Hello Randy, (R == "Randy") [EMAIL PROTECTED] writes: R> How I think it SHOULD work is like DOS - First it looks at where R> you say it is. If not there, it looks in the current directory. Let's not forget Unix. ;-) R> If not there, it looks in the directories in the path. I'm sure PHP R> doesn't work this way, but I can't figure out how it does work. % egrep include /usr/local/lib/php3.ini include_path = ; UNIX: "/path1:/path2" Windows: "\path1;\path2" It checks each path in order. It will stop when it finds the file in the first available location. R> Please, if anybody understands this, let me know. -Brian -- An adequate bootstrap is a contradiction in terms. -- 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] looking for a PHP editor
Hello Alexander, (AW == "Alexander Wagner") [EMAIL PROTECTED] writes: >> Mmmmfff... ultraedit's wordlist file still lacks the color of >> allaire's homesite - it does detect which parts of the .php file >> are HTML and what parts of the file are PHP code, and colours >> syntax very well... AW> Who needs that? Nesting PHP in HTML is bad style, IMHO. Bad style?! You _actually_ print() or echo() everything you want to send to the browser? If it doesn't need to be interpolated by PHP, why print() it? -Brian -- Life may have no meaning, or, even worse, it may have a meaning of which you disapprove. -- 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] problem with includes
Hello James, (JM == "James Mclean") [EMAIL PROTECTED] writes: JM> i am having a problem with pages that use includes. What is the extension of the document that you're placing include() in? JM> i am requiring the page like this JM> require("./comment.php"); So us what is in comment.php JM> problem is, as soon as i view the page, only the tags JM> show up!! what could this be? i have no JM> trouble if i comment out the pages... the pages are running on JM> debain 2.2, php4, and use some mysql stuff. JM> please help!! -Brian -- Most people find the concept of programming obvious, but the doing impossible. -- 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] Connect problem
Hello Maximiliano, (MB == "Maximiliano Bubenick") [EMAIL PROTECTED] writes: MB> I run linux red hat 6.2 with apache 1.3.12, php4 and mysql 3.22.32 MB> The first time my problem was Call to undefined function: MB> mysql_connect(), and I add the line dl("mysql.so"); and then bring MB> me: Why put yourself through that abuse? :-) Just build PHP with MySQL support. ./configure --with-mysql [other options here] MB> Thanks MB> Max -Brian -- The trouble with a lot of self-made men is that they worship their creator. -- 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] problem with includes
(BC == "Brian Clark") [EMAIL PROTECTED] writes: BC> So us what is in comment.php ^^ Show -Brian -- There are two ways to write error-free programs, and only the third one works. -- 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] Funny running PHP4 on Apache, Windows 95
Hello Patrick, (PD == "Patrick Dunford") [EMAIL PROTECTED] writes: PD> I have this funny thing when running PHP 4 on Apache on Win95. If PD> the script PD> AddType application/x-tar .tgz PD> AddType application/x-httpd-php3 .php3 PD> AddType application/x-httpd-php3-source .phps PD> AddType application/x-httpd-php .php PD> AddType application/x-httpd-php-source .phps Instead of all of those lines, try: AddType application/x-tar .tgz AddType application/x-httpd-php .php .php3 AddType application/x-httpd-php-source .phps -Brian -- Why do we ask rhetorical questions? -- 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] looking for a PHP editor
(BC == "Brian Clark") [EMAIL PROTECTED] writes: BC> Likewise, if you get into the habit of doing or ?> tandem, your worries will soon disappear. P.S. a decent editor that has *good* syntax highlighting (Ie. different schemes for HTML, JavaScript and PHP highlighting in the same document) helps that sort of thing too. -Brian -- A)bort, R)etry, I)gnore, V)alium? -- 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] looking for a PHP editor
Hello Miles, (MT == "Miles Thompson") [EMAIL PROTECTED] writes: MT> When I turn PHP on and off I tend to have "OOPS" scenarios, and MT> have to go searching for the previous "?>" or " or ?> Miles -Brian -- Don't try to be like Jackie. There is only one Jackie. Study computers instead. -- Jackie Chan -- 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] Apache error after setting path for mysql=
Hello Shane, (SR == "Shane Reid") [EMAIL PROTECTED] writes: SR> I reconfigured php with ./configure SR> --with-mysql=/usr/local/etc/mysql SR> --with-apxs=/usr/local/etc/apache/bin/apxs and apache will no SR> longer start. I removed the path from the mysql to get the SR> webserver back up but my question was why would it not be able to SR> find libmysqlclient.so.10 (error down below). The file is located SR> at /usr/local/etc/mysql/lib/mysql/libmysqlclient.so.10 ... any SR> reason its not picking up the fact that its there when I pointed SR> it to the directory I told mysql to install to? I don't know if this is your problem for sure, but here goes.. configure says: for i in lib lib/mysql; do str="$MYSQL_DIR/$i/libmysqlclient.*" for j in `echo $str`; do if test -r $j; then MYSQL_LIB_DIR="$MYSQL_DIR/$i" break 2 fi done done if test -z "$MYSQL_LIB_DIR"; then { echo "configure: error: Cannot find mysqlclient library under $MYSQL_DIR" 1>&2; exit 1; } fi So it's checking /usr/local/etc/mysql/lib/libmysqlclient.* and /usr/local/etc/mysql/lib/mysql/libmysqlclient.* And it didn't spit out: "configure: error: Cannot find mysqlclient library under /usr/local/etc/mysql" Right? Then it obviously found it, which prompted you to start Apache. SR> Cannot load /usr/local/etc/apache/libexec/libphp4.so into server: SR> Shared object "libmysqlclient.so.10" not found Try sticking the path to that library (/usr/local/etc/mysql/lib/mysql) into ld.so.conf and run ldconfig once as root. Then build php with mysql support again and start apache. I find myself saying this a lot , but see if that fixes it. SR> -Shane Maybe someone else will pipe up here soon with a definite answer if that doesn't fix your problem. -Brian -- The end of the day is near when small men make long shadows. -- 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] case ?
Hello Jon, (JR == "Jon Rosenberg") [EMAIL PROTECTED] writes: JR> I know this is kinda silly. but, if I have the following, will the JR> file only be included when the case is matched or does require JR> always bring in the file regarless? That is *supposed* to be the way it works. That is *supposed* to be one of the differences of require() and include(). You'd use include(), for example, within a conditional. I can only speak for PHP 3.0.18, but yes. require() includes it regardless. include() only includes it if 'blah' is met. JR> case blah: JR> require('include.php'); JR> do something JR> break; -Brian -- Everything should be built top-down, except the first time. -- 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] Exponents
Hello Ian, (IL == "Ian LeBlanc") [EMAIL PROTECTED] writes: IL> Hey guys this one might be simple for ya.. IL> how do you get a exponent of a verable.. example... http://www.php.net/manual/html/function.pow.html -Brian -- Logic: The systematic method of coming to the wrong conclusion with confidence. -- 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 confusion
Hello Randy, (R == "Randy") [EMAIL PROTECTED] writes: R> Thanks for the info Brian. But what about the path you have in the R> include statement? IE: include "../path1/file.php" R> Does it ignore the path? Try the path? Or just append that path to R> the end of each path in the include_path? Using PHP 3.0.18, every, single time I've used something like: include('../farmers/underwear.php'); It works as expected. -Brian -- Crashing is the only thing windows does quickly. -- 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 confusion
(BC == "Brian Clark") [EMAIL PROTECTED] writes: R>> Thanks for the info Brian. But what about the path you have in the R>> include statement? IE: include "../path1/file.php" R>> Does it ignore the path? Try the path? Or just append that path to R>> the end of each path in the include_path? BC> Using PHP 3.0.18, every, single time I've used something like: BC> include('../farmers/underwear.php'); BC> It works as expected. I'm half alseep. I see what you're saying. I suppose if you did: include('corn.php'); It's going to try each path. Ie. ".:/include:/usr/src" ./corn.php (if not in .) /include/corn.php (if not in /include) /usr/src/corn.php (if not in /usr/src) Error. And I *suspect* that even if you use ../corn.php, it's going to try the include paths in the same way. ../corn.php is equivalent to ./../corn.php -Brian -- Like punning, programming is a play on words. -- 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] Use
Hello Alex, (AB == "Alex Black") [EMAIL PROTECTED] writes: AB> can people give me opinions as to why > From: [EMAIL PROTECTED] (Philip Olson) >> Newsgroups: php.general >> Date: 13 Jan 2001 12:18:08 -0800 >> Subject: Re: [PHP] Use > >> My understanding is : >> >> 1. 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] tie string value together
Hello Jacky, (Jl == "Jacky@lilst") [EMAIL PROTECTED] writes: Jl> This may sound too easy to ask but I want ot make sure if I'm Jl> correct. I have a form with date, month and year select fields in Jl> it. When I submit, i want to tie those three fields value together Jl> and insert into a field in table which has date data type. Is it Jl> correct to tie those three value like below? Jl> $Birthdate = $year&$month&&day; Not quite; you want the concatenation operator: $Birthdate = $year . $month . $day; /* assuming &&day was a typo */ This will also work: $Birthdate = "$year$month$day"; And so will this: $Birthdate = "${year}${month}${day}"; Jl> And I will insert value in $Birthdate into table. Jl> cheers Jl> Jack -Brian -- 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] hello
Hello Herb, (SOM == "SuiteNet Operations Manager") [EMAIL PROTECTED] writes: SOM> I was wondering what Im sure a well knowledged php expert like SOM> your self would recommend a hands on php crash course. The best SOM> way for me to jump right in to understanding php and getting SOM> started making my first data base. These are a good start, then move on to some of the other sites on the links page. http://www.php.net/manual/en/html/introduction.html http://www.php.net/tut.php http://www.php.net/links.php SOM> Ps. Any books you think would be my best start. http://www.php.net/books.php SOM> I also Know about php4 but I have users I guess up till now are SOM> using php3 will this change what the are doing and continuing to SOM> do. I mean do they have learn and change everything to or is it I SOM> except everything till now and then more of what php4 offers too. SOM> Im not sure how that works. Most of it is the same, but there are small differences. Be sure you read this: http://www.php.net/version4/migration.php I would also suggest that you notify your users and give them a chance to respond if they wish. SOM> I do not want to change anything on the server UN LESS IM VERY SOM> VERY SURE<<< Agreed. SOM> Ok well I thank you so much. Hope I helped, and best of luck. -Brian -- 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] Upgrade PHP3 to PHP4
Hello TOM, (T == "TOM") [EMAIL PROTECTED] writes: T> I would like to upgrade PHP3 to PHP4 on my Turbo Linux, does anyone T> has experience on this? Not specifically on Turbo Linux, but this may shed some light on the subject: http://www.php.net/version4/migration.php T> enethk -Brian -- 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] A little problem
Hello Emiliano, (EM == "Emiliano Marmonti") [EMAIL PROTECTED] writes: EM> I have a little problem: Sometimes when you invokes some .php EM> page, appears "could not redefine function...". It looks like a Try: -Brian -- You may be recognized soon. Hide. -- 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] Apache .htaccess Help (OT)
Hello Website4S, (Wac == "[EMAIL PROTECTED]") [EMAIL PROTECTED] writes: Wac> Sorry this is off topic but I just can`t find anywhere with Wac> reliable information to help me get my .htaccess working on my Wac> server. I have followed many tutorials and none of them give me a Wac> working password protected dir, so if anyone can help I would Wac> appreciate it. Wac> My .htaccess file is as follows: Wac> And My .htpasswd file just contains the user shaun101 with the Wac> scrambled up password. They are both in the same directory so Wac> when I log into my server I first click usr then home etc etc. Wac> But for some reason no matter what I do I still get direct access Wac> to the directory volunteer when I go to it in a browser. Wac> Anyone have any ideas what I`m doing wrong?? It's not going to happen if AllowOverride in http.conf is set to None, depending on where it's at. http://httpd.apache.org/docs/misc/FAQ.html#htaccess-work -Brian -- In the long run every program becomes rococo - then rubble. -- 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] changed database context message
Hello Slappy, (SS == "Slappy Smith") [EMAIL PROTECTED] writes: SS> i am getting this message on top of one of my pages. i have read SS> up on it and everyone says its a warning message but from the SS> things ive seen online no one seems to know how to get rid of it. Something along the lines of this?: "X-Powered-By: PHP/4.0.2-dev Content-type: text/html" If so, stick this at the top of your script(s): #!/path/to/php -q (obviously change the /path/to/php) -Brian -- There are two ways to write error-free programs, and only the third one works. -- 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] Cookies still store old value(Help!!)
Hello Hendry, (HS == "Hendry Sumilo") [EMAIL PROTECTED] writes: HS> When User "A" enter ,the cookies will store User "A" name,when he HS> enters the lecturer page,he will be directed to login page HS> again(because he is not allowed to enter lecturer page) and so do HS> User "B". BUT THE PROBLEM HAPPENS LIKE THIS: When User "A" enters HS> ,and then User "B" enters,User "B" CAN ENTER THE STUDENT PAGE AND HS> THE COOKIES STORE USER USER "A" VALUE.BUT WHEN I REFRESH IT ,THE HS> COOKIES WILL STORE NOTHING AND REDIRECT TO LOGIN PAGE. Can i know HS> what the problem is? If you show us some code, maybe. *hint* :-) HS> Hendry Sumilo -Brian -- Once you understand how to write a program, get someone else to write it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Grabbing referring keywords.....
Hello Dallas, (DK == "Dallas Kropka") [EMAIL PROTECTED] writes: DK> (Note: I know about using $HTTP_REFERER But how can I take that DK> info and strip it, if that is what I need to do?) I've never done this, but I think the basic idea would be to determine what the query strings of each spider/search-engine look like, take $HTTP_REFERER and determine which engine it came from, parse it (using explode() probably (maybe by the ? mark; again I haven't done this)), then maybe explode() it again based on &, then explode() each key/value pair on = -- if they even use that type of query string. That's why I mentioned, "determine which engine it came from." All wild guesses, but that may lead you in the right direction. -Brian -- Simplicity does not precede complexity, but follows it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php 4.0.5.dev will not read php.ini on NT
Hello Robert, (R == "Robert") [EMAIL PROTECTED] writes: R> PHP 4.0.5.dev I installed it on my Windows 2000 Pro machine with R> IIS and MySQL and it works like a champ I installed it on my R> Windows NT Server with IIS and MSSQL and it will not read the R> php.ini file I put it in the following folders to try to get it to R> work R> C:\winnt R> C:\ R> C:\winnt\system32 R> C:\windows <---created just to see if it would work Stick into a file and load it in a browser. Look for the line that says something along the lines of: php.ini file path is set to: X Where X is the base directory. I'm not sure about 4.x's phpfino() saying those exact words, but where ever it says it should be, put it in that directory and try it. R> GRRR!!! R> What's up here? R> Thanks -Brian -- If a listener nods his head when you're explaining your program, wake him up. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP not working on Win95/Apache
Hello Phil, (PS == "Phil Scopes") [EMAIL PROTECTED] writes: PS> I am trying to run PHP in Windows '95 with Apache server. I followed all PS> the instructions in the installation doc, including editting the Apache and PS> PHP configuration files, and putting the PHP.INI file in my Windows PS> directory, and when I try to run a PHP file, I just see everything from the PS> file as plain text in the browser. What might I be doing wrong? Did you restart Apache after you setup PHP? (common mistake) Do you have lines similar to this in your httpd.conf?: AddType application/x-httpd-php .php .php3 .phtml -Brian -- Disclaimer: Any errors in spelling, tact, or fact are transmission errors. -- 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] Postgres pconnect
Hello Wade, (HWM == "H. Wade Minter") [EMAIL PROTECTED] writes: HWM> So, can I change all of the pg_connect calls to pg_pconnect call HWM> and have the pages use persistent connections, or is there HWM> something more that needs to be done? Yes. AFAIK. -Brian -- The trouble with a lot of self-made men is that they worship their creator. -- 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] Session and Cookies
Hello Hendry, (HS == "Hendry Sumilo") [EMAIL PROTECTED] writes: HS> Can someone tell me how to use Session Object because when the HS> user login the page I want to store the login,pass,and type_login HS> so that I can pass this throughout the process. I found that i can HS> store that by using cookies ,but the problem ,some computer can't HS> store cookies,and it caused redirect to main page. So,that i was HS> asked to use Session Object By ASP people,and i wonder how to do HS> that in PHP? http://www.php.net/manual/en/html/ref.session.html HS> thank you very much -Brian -- Syntactic sugar causes cancer of the semi-colons. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] stripping the keywords from a search engine... again...
Hello Dallas, (DK == "Dallas Kropka") [EMAIL PROTECTED] writes: DK> Posted earlier but got no response so here it is again... I gave you a quick explanation of one way to do it earlier, but I know of no tutorials off the top of my head. Here is a lengthy example if you _have_ to see code: http://www.altavista.com/cgi-bin/query?q=foo+and+bar+and+baz&kl=XX&pg=q&Translate=on'; /* the above would obviously be $HTTP_REFERER */ /* I typed in 'foo and bar and baz' */ $parts = explode('?',$URI); $query = explode('&',$parts[1]); $terms = explode('=',$query[0]); $keywords = explode('+',$terms[1]); print 'They used: '; while(list(,$keyword) = each($keywords)) { print "$keyword"; /* still going to print 'and' and 'or' and 'not' and .. */ } ?> But there has to be an easier solution out there that's already been ridden to death. The above is going to get nasty rather quickly I'd imagine, and every search engine, more than likely, is going to have a completely different query string. There's no way I'm going to look. :) I wouldn't reinvent the wheel; go do some searching, poke through someone's "stats" code. I'm sure this has been done before in PHP, and I _know_ it's been done in Perl -- which is fairly easy to translate. -Brian -- A)bort, R)etry, I)gnore, V)alium? -- 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 CGI question
Hello Hrishi, (H == "Hrishi") [EMAIL PROTECTED] writes: H> I need to know how to get apache to parse CGI output with the SSI H> parser (the [php] script will have includes, which need to go H> through mod_include). changing the mime-type to x-server-parsed or H> anything hooked by mod_include doesnt help. Why not use the CGI to write the output to a shtml (or whatever) on disk, then after the write, send the Location header() to the file that you just wrote. With the right extension, as defined in your server conf files, it should treat it as an SSI parsed document. Is that not an option? H> thanks, H> Hrishi -Brian -- I got vision, and the rest of the world wears bifocals. -- Butch Cassidy -- 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] File upload on linux
Hello MacBane, (M == "MacBane") [EMAIL PROTECTED] writes: M> I have some file upload code but it is not woking on debian linux, M> could some one give me a hand M> $the_path is set some where else What is the value of $the_path? M> $path = "/var/www/cms/gentext/$section/$doctype/"; This isn't even used in the code below. It's trying to copy $the_file to $the_path. Ie. from one location, maybe /tmp if you're on Unix, to another location. Judging by '\' you might not be on a Unix machine. M> if (!@copy($the_file, $the_path."\".$the_file_name)) $the_path needs to be a valid directory -- it needs to exist, unless you use mkdir() somewhere before it. It also must be writable by the user the webserver is running as. M> { M>// print("Something barfed, check u r path M> $the_path$the_file_name"); M> } M> } Find out what $the_path is and make sure it exists. -Brian -- Is it possible to feel gruntled? -- 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] Error connecting to MySQL server
Hello Rosen, (R == "Rosen") [EMAIL PROTECTED] writes: R> When I try to connect to MySQL server I get message "Can't connect R> to MySQL server (10060 )! Where's your code? Are you using someone else's application? Is mysqld even running? Is it /still/ running after you get that error? Are you trying to connect locally (localhost), or are you trying to connect to another server running mysqld? This can be cause by any number of things. R> Please Help! R> Thanks R> Rosen Marinov -Brian -- An adequate bootstrap is a contradiction in terms. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Good Reads
Hello Sean, (SB == "Sean Brown") [EMAIL PROTECTED] writes: SB> Does anyone have any suggestions on a good book for beginners. I SB> currently own "PHP3 Programming Browser-Based Applications" by SB> David Medinets. I have no regrets thus far on purchasing the book SB> but it seems to leave a lot out and his examples are somewhat... SB> skewed. I hear Julie Meloni's book is good for beginners, but I've never read it. The Wrox books (red covers with photos) are good, as well. http://www.php.net/books.php (`more info' link under each) SB> Cheers -Brian -- As Will Rogers would have said, "There is no such thing as a free variable." -- 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] Help with PHP Shell Scripting
Hello Justin, (JY == "Justin Yu") [EMAIL PROTECTED] writes: JY> When I tried connecting to Postgres through a shell script that I JY> wrote, I get the following error: JY> "Fatal error: Call to undefined function: pg_connect()" Because you don't have pgsql (PostgreSQL) support built into your version of PHP. But you know that by now. JY> After searching the web for a solution, I realized that I have to JY> compile PHP into its CGI version. Currently, PHP is installed as JY> an Apache module on my machine. Either a CGI or a DSO can have pgsql support. You just have to build it that way. JY> So, I tried to compile PHP by doing the following in the JY> /usr/local/php-4.0RC1 JY> directory where the source files for PHP4.0RC1 are located: JY> ./configure -with-pgsql JY> make Try the snapshot at: http://snaps.php.net/php4-latest.tar.gz Make sure you have a good installation of PostgreSQL from: http://www.postgresql.org/software.html Configure: ./configure --with-pgsql=/path/to/postgresql/base You may want --enable-force-cgi-redirect, you decide (http://www.php.net/manual/en/html/security.html#security.cgi) Then see if it builds correctly. JY> Justin -Brian -- Every program is a part of some other program and rarely fits. -- 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] Off The Topic But Please Help....
Hello Statbat, (S == "Statbat") [EMAIL PROTECTED] writes: S> 1. In my htdocs folder, I am able to access any file which is in S> the htdocs folder but I am not able to access any file which in the S> sub folder of htdocs. It says file not found. Lets suppose If I S> have a test.php file in php folder in htdocs and I access it in S> http://localhost/php/test.php than it says file not found although S> it is in php folder in htdocs. Make sure you created the php sub-directory _within_ the directory that is specified in the httpd.conf's ServerRoot line. S> 2. How do I configure apache to handle cgi. My cgi is installed in S> c:\perl\ Do you mean you have perl installed in c:\perl? S> Where my cgi scripts should be placed in the apache folder. How about a sub-directory (although it might not work until you get #1, above, corrected)? In httpd.conf: # # ScriptAlias: This controls which directories contain server scripts. # ScriptAliases are essentially the same as Aliases, except that # documents in the realname directory are treated as applications and # run by the server when requested rather than as documents sent to the client. # The same rules about trailing "/" apply to ScriptAlias directives as to # Alias. # ScriptAlias /cgi/ "C:/apache/cgi-bin/" # # "C:/Apache/cgi-bin" should be changed to whatever your ScriptAliased # CGI directory exists, if you have that configured. # AllowOverride None Options None # # AddHandler allows you to map certain file extensions to "handlers", # actions unrelated to filetype. These can be either built into the server # or added with the Action command (see below) # # If you want to use server side includes, or CGI outside # ScriptAliased directories, uncomment the following lines. # # To use CGI scripts: # #AddHandler cgi-script .cgi S> Thanks again S> Statbat -Brian -- A society that will trade a little liberty for a little order will lose both, and deserve neither. --Thomas Jefferson -- 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] PDFLib and PHP and pdf_open_image_file
Hello goood, (gg == "goood goood") [EMAIL PROTECTED] writes: gg> I have an problem with PDFLib and PHP. I'm trying to include gg> images in PDF file using pdf_open_image_file If in my source code gg> is line: gg> $o=pdf_open_image_file($pdf,"gif","pict.gif"); gg> i get the error: Cannot find server or DNS Error (The page cannot gg> be displayed). What's wrong. This sounds more like a server or browser problem to me. I don't think this has anything to do with the pdf* functions. -Brian -- You may be recognized soon. Hide. -- 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] temporary unsubscribe mailing list
Hello Wen, (WNL == "Wen Ni Leong") [EMAIL PROTECTED] writes: WNL> I would like to unsubscribe the mailing list for a week which is WNL> effective from 20th of Jan 2001 to 28th of Jan 2001. I hope you WNL> can automatic reactive me into the mailing list after the 28th of WNL> Jan 2001. -- 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] WNL> Thank you. Your servant, ;-) -Brian -- Programming is an unnatural act. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Newbie : info/tut on XML and PHP
Hello Rahul, (RB == "Rahul Bhide") [EMAIL PROTECTED] writes: RB> Can you give me pointers(read urls) to "Good Sites" on tutorials RB> or info from scratch on XML with PHP. http://www.phpbuilder.com/columns/justin2428.php3 http://www.phpbuilder.com/columns/joe2907.php3 http://www.phpbuilder.com/columns/ RB> Thanks in Advance. RB> ~Rahul -Brian -- Man who pee on electric fence receive shocking news. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] question on time-based function
Hello Rudy, (RM == "Rudy McDaniel") [EMAIL PROTECTED] writes: RM> Anyone have any ideas on how to make a function reset every RM> 24-hours? For example, I have a function that grabs a random quote RM> from a file and selects a new one every time the page is reloaded. RM> What I want, however, is for the quote to remain the same for a RM> day and then reset at some specified time (say midnight) and grab RM> a new random quote for the next day. It seems like their should be RM> any easy way to do this using mktime( ) or a similar function but RM> I'm not fully grasping it. Any ideas on how to do this would be RM> much appreciated. Why not just make cron (once a day) read the quotes file, pick a random line, write the quote to a file called quoteoftheday.php, then just include() that file into your page? Unless you're running this one a windows machine.. in that case you might be able to do the same thing with some scheduler instead of cron, I'm not sure. -Brian -- Opportunity makes a thief. -Francis Bacon, 1598 -- 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] Error connecting to MySQL server
Hello Rosen, (R == "Rosen") [EMAIL PROTECTED] writes: R> When I connect via WEB based admin, there is no problems ! The R> MySQL Server is remote. But when I install on my computer software R> ( Artronoc Admin, DbTools ) I receive error "Can't connect to MySQL R> server on host . (10060). MySQL has a database of its own (named, oddly enough, mysql ;)). That database and it's tables control permissions. You more than likely need to set permissions for your user so that you are allowed to connect to the database without having to connect through localhost (ie. what you are wanting to do). % mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 97 to server version: 3.22.32 Type 'help' for help. mysql> use mysql Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> describe user; +-+---+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +-+---+--+-+-+---+ | Host| char(60) | | PRI | | | | User| char(16) | | PRI | | | | Password| char(16) | | | | | | Select_priv | enum('N','Y') | | | N | | | Insert_priv | enum('N','Y') | | | N | | | Update_priv | enum('N','Y') | | | N | | | Delete_priv | enum('N','Y') | | | N | | | Create_priv | enum('N','Y') | | | N | | | Drop_priv | enum('N','Y') | | | N | | | Reload_priv | enum('N','Y') | | | N | | | Shutdown_priv | enum('N','Y') | | | N | | | Process_priv| enum('N','Y') | | | N | | | File_priv | enum('N','Y') | | | N | | | Grant_priv | enum('N','Y') | | | N | | | References_priv | enum('N','Y') | | | N | | | Index_priv | enum('N','Y') | | | N | | | Alter_priv | enum('N','Y') | | | N | | +-+---+--+-+-+---+ 17 rows in set (0.00 sec) mysql> describe db; +-+---+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +-+---+--+-+-+---+ | Host| char(60) | | PRI | | | | Db | char(32) | | PRI | | | | User| char(16) | | PRI | | | | Select_priv | enum('N','Y') | | | N | | | Insert_priv | enum('N','Y') | | | N | | | Update_priv | enum('N','Y') | | | N | | | Delete_priv | enum('N','Y') | | | N | | | Create_priv | enum('N','Y') | | | N | | | Drop_priv | enum('N','Y') | | | N | | | Grant_priv | enum('N','Y') | | | N | | | References_priv | enum('N','Y') | | | N | | | Index_priv | enum('N','Y') | | | N | | | Alter_priv | enum('N','Y') | | | N | | +-+---+--+-+-+---+ 13 rows in set (0.01 sec) mysql> describe host; +-+---+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +-+---+--+-+-+---+ | Host| char(60) | | PRI | | | | Db | char(32) | | PRI | | | | Select_priv | enum('N','Y') | | | N | | | Insert_priv | enum('N','Y') | | | N | | | Update_priv | enum('N','Y') | | | N | | | Delete_priv | enum('N','Y') | | | N | | | Create_priv | enum('N','Y') | | | N | | | Drop_priv | enum('N','Y') | | | N | | | Grant_priv | enum('N','Y') | | | N | | | References_priv | enum('N','Y') | | | N | | | Index_priv | enum('N','Y') | | | N | | | Alter_priv | enum('N','Y') | | | N | | +-+---+--+-+-+---+ 12 rows in set (0.00 sec) mysql> You need to start here, and read the whole online chapter on the MySQL Access Privilege System: http://www.mysql.com/documentation/mysql/bychapter/manual_Privilege_system.html#Privilege_system And you will need root (mysql) access to modify those tables. If you get your databa
Re: [PHP] Compiling PHP with "--with-apxs"
Hello Jero, (J == "Jero") [EMAIL PROTECTED] writes: J> checking for Apache module support via DSO through APXS... apxs:Error: J> Sorry, no DSO support for Apache available J> apxs:Error: under your platform. Make sure the Apache J> apxs:Error: module mod_so is compiled into your server J> apxs:Error: binary `/usr/local/apache/bin/httpd'. The only time I've ever gotten this error is when there were either two installations of Apache on the system, or leftovers from a previous installation (Ie. BSDi (the worst) and RedHat). Run updatedb if you're on Linux, then do a locate for apxs. If you find more than one, you need to find out which one belongs to the currently running httpd. If all else fails you can backup your web files, cgi-bin, configuration files, etc. and remove everything that is Apache on the system. Then do a complete, fresh install of Apache and try building PHP as a DSO again. But, I would probably make sure it's not getting confused by the multiple apxs scripts first. -Brian -- 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] DBase functions
Hello Piotr, (PD == "Piotr Duszynski") [EMAIL PROTECTED] writes: PD> Fatal error: Call to unsupported or undefined function PD> dbase_open() in ... PD> What's the problem? You'll probably need to re./configure PHP with the --enable-dbase option. -Brian -- 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] oops, little problem with mysql
Hello Dominick, (DV == "Dominick Vansevenant") [EMAIL PROTECTED] writes: DV> I deleted all the records from the privileges tables (mysql database) and DV> restarted the daemon. http://www.mysql.com/documentation/mysql/bychapter/manual_Problems.html#Resetting_permissions DV> Now off course I cannot access the databases, what can I do? -Brian -- 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] Local Path of Script
Hello Karl, (KJS == "Karl J. Stubsjoen") [EMAIL PROTECTED] writes: KJS> How do I obtain the path of the local script? Or do I have to KJS> build it from the $DOCUMENT_ROOT? I think this is specific to Apache, but try $SCRIPT_FILENAME -Brian -- Syntactic sugar causes cancer of the semi-colons. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Newbie: array help....
Hello Brian, (BVB == "Brian V Bonini") [EMAIL PROTECTED] writes: BVB> That's what I thought, which seemed to be the obvious BVB> however, when I tried that it returns an error. BVB> "Warning: Variable passed to each() is not an array or object in pagetop.inc BVB> on line 105" array( "Trek 5200" => "URL", "Schwinn Fastback Pro" => "URL", "Va Moots" => "url" ), "Mountain" => array( "Trek Fuel 90" => "url", "Schwinn Homegrown" => "url" ), "BMX" => array( "Haro Mira 540" => "url", "Schwinn Powermatic Pro" => "url" ), "Kids" => array( "Schwinn Tiger" => "put URL here", "Schwinn Bumblebee" => "URL" ) ); while(list($type,) = each($bikes)) { while(list($model,$url) = each($bikes[$type])) { print "Type: $type"; print "Model: $model"; print "URL: $url"; print ""; } } ?> -Brian -- Point not found. (A)bort (R)eread (I)gnore. -- 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] upload files from the local PC/UNIX to the web sever
Hello david, (dk == "david klein") [EMAIL PROTECTED] writes: dk> Hello, Is there a way to upload files from the local PC/UNIX to the web dk> sever? Especially multiple files at the same time? What we need to do at dk> the server and client side? Documents: http://www.php.net/manual/en/html/features.file-upload.html http://www.php.net/manual/en/html/feature-fileupload.multiple.html -Brian -- Caution: Cape does not enable user to fly. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Getting warning using split
Hello Matt, (MW == "Matt Williams") [EMAIL PROTECTED] writes: MW> $query_string = split("+",$search); $query_string = explode('+', $search); -Brian -- 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] Turning off scrollbar
Hello Website4S, (Wac == "[EMAIL PROTECTED]") [EMAIL PROTECTED] writes: Wac> Can anyone tell me how to turn off the bottom scrollbar in both Wac> IE and Netscape?? Check all of your table widths (use percentages or a width of around 550) and validate your HTML. http://validator.w3.org/ Your content is causing the page to scroll horizontally. It has nothing to do with PHP or any browser settings. Wac> TIA Wac> Ade -Brian -- 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] Search for the documentation
Hello Philip, (PO == "Philip Olson") [EMAIL PROTECTED] forecasted: PO> http://www.php.net/tips.php PO> it will turn your browser into a search machine. Even better, for people who use EditPlus (sorry, unsure about other editors) you can do this with just one shortcut from within EditPlus itself. Since IE 5 is my primary browser: Follow the instructions on http://www.php.net/tips.php for adding the Quick Search add-on. (I named my shortcut php, but you could use anything you wanted.) Then in EditPlus, go to: Tools -> Configure User Tools Click on the 'Add Tool >>' button. Choose 'Program' from the pop-out. I named mine 'PHP Search' Command: C:\Program Files\Internet Explorer\Iexplore.exe Argument: php $(CurWord) (Where 'php' in the above is the same shortcut name you entered in IE Quicksearch) Initial Directory: leave it blank or you'll get the the 'Launch Window' MS-DOS box along with the browser. Click 'Apply' then 'OK' Now, when you need to consult the manual for a specific function (or heck, any term), just hit Ctrl+[number] where [number] is the shortcut displayed beside 'PHP Search' in the Tools menu. For example, if I placed my cursor right before the 'm' in: @mysql_pconnect($host, $username, $password) And hit Ctrl+6, it opens IE and takes me straight to: http://www.php.net/manual/en/function.mysql-pconnect.php For the 'Argument' line in 'Configure User Tools' you could also use php $(CurSel) but you'll have to highlight a word before you hit Ctrl+[number]. If you're not using IE, this should still be pretty easy to configure. If anyone can't get this to work, let me know off-list. I'll be glad to help. -Brian -- 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] Search for the documentation
Hello Philip, (PO == "Philip Olson") [EMAIL PROTECTED] ciphered: PO> This is a good idea. I just played with it a bit and notice for it PO> to work "properly" one must space out the function so (pretending PO> that | is our cursor) : Both examples work with my version of EditPlus (see below). PO> As it interpets it all together as one CurWord. Is there a way PO> around this? Like creating an alphanumeric form of "CurWord" ? PO> Hmm. Anyway, this is pretty cool and should be exploited by all PO> editplus users. At some point everyone should look into doing this PO> for other editors too. Ah, well it depends one which version you're using. Ack, in that case you could always use $(CurSel) and highlight the function name and it would work OK in all versions (but an upgrade would be better). I'm using Beta 2.10a (I'm in the Beta program), but I'm not completely sure when this new feature was added (some where between 2.00 and 2.10a): If you go into settings and syntax for PHP in Preferences, I see a 'function pattern' text field which has: ^[ \t\s]*function[ \t\s].*\([^;]*$ And I'm now guessing that's why $(CurWord) is smart enough to "figure it out" :-) -Brian -- In computing, the mean time to failure keeps getting shorter. -- 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] Search for the documentation
(BC == "Brian Clark") [EMAIL PROTECTED] betokened: BC> I'm using Beta 2.10a (I'm in the Beta program), but I'm not BC> completely sure when this new feature was added (some where BC> between 2.00 and 2.10a): BC> If you go into settings and syntax for PHP in Preferences, I see a BC> 'function pattern' text field which has: BC> ^[ \t\s]*function[ \t\s].*\([^;]*$ BC> And I'm now guessing that's why $(CurWord) is smart enough to BC> "figure it out" :-) No, that's not right either. That shouldn't have anything to do with it. Because it still works with something like: $GLOBALS['|HTTP_HOST'] for HTTP_HOST and $|GLOBALS['HTTP_HOST'] for the word globals. Where | is the cursor. Ahh! It's because of the new (?) 'Word Delimiters' field in Prefs -> General where you have: ,.?!;:/<>(){}[]"' Spiffy. -Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Stripping HTML selectively?
Hi Erick, @ 12:22:39 AM on 3/3/2001, [EMAIL PROTECTED] wrote: > i tried to look at "strip_tags" but then it only returns me: http://www.php.net/manual/en/function.strip-tags.php string strip_tags (string str [, string allowable_tags]) "Note: Allowable_tags was added in PHP 3.0.13, PHP4B3." -Brian -- 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]
Re: [PHP] any way to count subscribers to PHP lists?
Hi Ned, @ 9:27:57 AM on 3/3/2001, Ned Lilly wrote: > Hi, I'm wondering if there's an ezmlm equivalent of the "lists-full" > command for majordomo. That command returns data like the > following (from the PostgreSQL list): While not exactly what you wanted, this may provide some of those statistics: http://www.zend.com/cgi-bin/m_stats.pl?list=php-general&date=200101 http://www.zend.com/cgi-bin/m_stats.pl?list=php-general&date=200102 http://www.zend.com/cgi-bin/m_stats.pl?list=php-general&date=200103 January 2001, February 2001, and March 2001 respectively. -Brian -- 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]
Re: [PHP] PHP without a webserver
Hi Plutarck, @ 11:37:09 AM on 4/14/2001, Plutarck wrote: > I've heard much about how PHP is far more than just a language for > web programming, and I agree. I agree enough that I would like to > actually try it. I'd like to use PHP scripting in a C/C++ program > that doesn't need a webserver as an intermediary. It doesn't. You don't have to have a web server installed in order to use PHP. -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]
Re: [PHP] HTML and PHP?
Hi Steve, @ 11:34:26 PM on 4/13/2001, Steve Werby wrote: ... > echo << > Yes, echo can use here-docs! Is it really that *hard* to take 1 minute to > test for yourself? ;-) > And you can use whatever marker (the 'STOP' above and below) you choose. > Just make sure you don't indent the closing marker or the parser will miss > it! > > STOP; ?>> Why even bother? Why not just do this? ?> Boo 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] Supplied argument is not a valid MS SQL-Link resource
Hi davek, @ 1:50:14 PM on 4/14/2001, davek wrote: > Does anybody know how to fix this error? "Supplied argument is not a > valid MS SQL-Link resource" I am running: ... > $Conn=mssql_connect('192.168.1.20','username','password') or die("Could not connect to the mssql server"); > $ThisConnect=mssql_select_db('My_Database',$Conn) or die("Could not select My_Database"); > $QueryString="select id, name from my_table"; > $Test=mssql_query($QueryString, $ThisConnect) or die("Could query mssql server"); > Please help! Thanks. > Dave -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]
Re: [PHP] PHP without a webserver
Hi Plutarck, @ 2:11:35 PM on 4/14/2001, Plutarck wrote: > Ah, even better. However, how would the script be passed to PHP? As > a command line argument? Install the CGI executable of PHP in c:\php In your autoexec.bat: SET PATH=c:\php;%PATH% Reboot. >From the command line: php -q script.php And read about $argc and $argv. If you're familiar with C, those shouldn't be a problem. -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]
Re: [PHP] user info?
Hi Ramiro, @ 6:48:38 AM on 4/14/2001, Ramiro Radjiman wrote: ... > I'm just wondering if there is a method to extract user specific > info when this user connects to the site. http://www.php.net/manual/nl/function.getenv.php May be what you're looking for. > U user must have a handle, but i don't want him to login. So i > thaught if i can get specific userinfo from the client, this info > would be his handle to walk trough the site. > If he logs in it aint a problem :-) I'd use sessions: http://www.php.net/manual/nl/ref.session.php Because you can't depend on something like IP addresses or hostnames to build Unique IDs because of things like proxies. And I wouldn't depend solely on cookies either. -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]
Re: [PHP] Any one have PHP voteBOOTH source code...?!?
@ 6:50:49 AM on 4/14/2001, news.php.net wrote: > hello... anyone know where i can downlaod voteBOOTH.php w/ the image > viewer?! or does anyone have it that you can send to me..? I don't know anything about a poll type script with an image viewer, but look around here: http://www.hotscripts.com/ -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]
Re: [PHP] Forcing Case
Hi James, @ 6:44:08 AM on 4/14/2001, James Moore wrote: ... > http://www.php.net/manual/en/function.strtoupper.php > http://www.php.net/manual/en/function.strtolower.php > http://www.php.net/manual/en/function.ucfirst.php Another extremely useful one is ucwords() http://www.php.net/manual/en/function.ucwords.php :) -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]
Re: [PHP] antifraud logic for voting poll, banner clicks
Hi Keyur, @ 2:57:56 AM on 4/14/2001, Keyur Kalaria wrote: ... > Can anyone suggest me how to avoid the fraud rating and fraud banner clicks. > What all things we need to take care for the same etc. Have a look at how those are implemented in phpAds and phpPolls: http://www.phpwizard.net/ -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]
Re: [PHP] HTML and PHP?
Hi Les, @ 2:09:01 PM on 4/14/2001, Les Neste wrote: > I think the echo approach is pretty handy if you want a subroutine > to spit out a common chunk of HTML which is less than an entire > page. And the here-doc marker lets you just paste existing HTML in > place without having to escape all the quotation marks. To me, this > is a Good Thing. And you can do the exact same thing with what I posted. bar. didn't "example.com" ain't aren't Granted, one wouldn't bother when only one string needed to be printed, but it works just fine for large amounts of HTML. If you needed to interpolate variables, then you'd probably want to print(), echo() or use here-doc. -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]
Re: [PHP] PHP without a webserver
Hi Plutarck, @ 2:40:28 PM on 4/14/2001, Plutarck wrote: > Ahh, so it's the location of the script that get's passed. Yes: % cat test.php % php -q test.php a b c d e f g 0: test.php 1: a 2: b 3: c 4: d 5: e 6: f 7: g % > Now, if the script was coming from a program, is there a way to hand the > file directly to PHP, or will a temporary file have to be used? I have no idea. What language? Using system() in C and Perl, I'm sure you could concoct something. Why would you want to do that? > So if a user filled in a form and clicked a button in the program, the > program would toy with the form a little, then send the form to PHP. Is that > possible using the CGI executible? I have no idea what you're talking about here, but if you're wanting to build some type of GUI based application you might as well either use PHP-GTK (http://gtk.php.net) or just use a HTML, PHP and a web server. -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]
Re: [PHP] A tricky problem
Hi David, @ 3:06:19 PM on 4/14/2001, David Tandberg-Johansen wrote: ... > The problem is: > If a user leaves the site because the user doesn't want to go thrue with the > order, or if the user closes the broser, then the recods of the selected > info are still in the temp TABLE. How can I delete this info when the user > leaves or close the browser? You don't. Just store the age of the session (date,time,whatever) in the table along with the other information. Then, when someone visits the site, the dates are checked in the table and the old entries are cleared. -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]
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-general&m=97969195010857&w=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]
Re: [PHP] What's XML's Purpose??
Hi Chris, @ 1:17:25 PM on 4/14/2001, Chris Anderson wrote: ... > I stll think it sounds like its more geared for the MS crowd No way. "XML is a set of rules, guidelines, conventions, whatever you want to call them, for designing text formats for such data, in a way that produces files that are easy to generate and read (by a computer), that are unambiguous, and that avoid common pitfalls, such as lack of extensibility, lack of support for internationalization/localization, and platform-dependency." http://www.w3.org/XML/ -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]
Re: [PHP] Sorry :(
Hi Chris, @ 3:51:02 PM on 4/14/2001, Chris Anderson wrote: > I realized that'll that I don't do much to help this community. I > rarely reply to people's questions. Mainly because I have 56.6 and > when I get mail people answered already. I also ask alot of > questions. Just saying thanks for putting up with me. Chris, The 17 > yr Old Php Coder As far as I'm concerned, you don't have a thing to be sorry about. There isn't a thing wrong with asking questions here. In fact, if you have a good book and this list to get help from, you're far more likely to become successful with PHP. -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]
Re: [PHP] 2 Different Mysql Server Connection Problem
Hi Mesut, @ 6:19:04 PM on 4/14/2001, Mesut TUNGA wrote: ... > Warning: MySQL Connection Failed: Can't initialize character set 30 > (path: default) in /home/user/public_html/createtable.php on line 2 http://www.mysql.com/doc/C/a/Cannot_initialize_character_set.html -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]
Re: [PHP] converting DATETIME to a readable date.
Hi DRN, @ 8:34:08 PM on 4/14/2001, DRN wrote: ... > $date = $row["date"]; > $new_date = date("l, j M Y, G:i:s", strtotime($date)); > ~~ > but I cannot get this to work :(, I get an "unexpected error in > date()" ... Try this and see if it functions correctly: Your original code gives me the same error, but the above code functions normally for me. -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]
Re: [PHP] Display Formatted Query Results
Hi Jeff, @ 8:52:10 PM on 4/14/2001, Jeff Holzfaster wrote: ... > My apologies if this is too wordy. A little confusing, but here we go. If this makes no sense what so ever, maybe someone else can provide a better way of doing what you're describing here. ... > I have a form page that looks like this: > http://www.webtinker.com/fran_info.htm This form has several things > going on. 1st, the first pull down list needs to reflect the same > info as the two location descriptions. That's easy. If you're getting the two locations' data from a mysql table, just reuse the same information for the pull down. Is 'location' in your table the 'label' for that meeting? Ie., is 'location' in your SQL below going to be something like "Chicogo Round Table Discussion"? If not, add another column for that label and use that for the listings above the form, and use that again for the select. > 2nd, the two locations "Round Table Discussion" will grow to an > unknown number of entries over time so the two may become 6 or 8 > or... My first big (for me) hurdle is to figure out how to get these > to show up at the top of this form in order of the date with the > closest one first. They need to be in the same format as they appear > but with additional rows showing as more entries are made. The ones > showing can't be past due, or, don't show past dates. For the date column in your SQL below, use either the value of time() from PHP, or use one of the built in mysql date functions like DATETIME. Then you'll just need to compare the current date to the ones listed in the table and only show the meetings dated for the current day or greater. If the expired meetings won't change, you could leave them in the table and only modify the date down the road. If they're a one time thing, you can drop the expired listings as you're doing your date check for the current/future meetings to extract from the table. Since you're reusing the 'location,' your drop down matching the top listings should already be taken care of. > What I have figured out so far is how to populate the pull down, how > to make the admin form to fill in the needed info into the MySQL > table and I have had limited success in displaying the meeting info > at the top of the form. You'll just need to read the data using mysql_fetch_array() or mysql_fetch_object(). There are examples of those in the manual at http://www.php.net. (enough to do what you're wanting to do.) As you read the data, you can print rows with two cells. If you have 5 meeting entries, you'll end up with a 2 x 3 table with the 2nd cell in the last row being empty. Since you'll be reusing the 'location label' from the rows' printing, your select should be populated with the same information. > I just can't figure out how to make them wrap into groups of info No idea what you mean by 'groups of info' unless you mean rows from the table. > , say with 5 entries of different meetings. Do I need a separate > query for each row of info using the limit statement in the query or > is there a way to do this using arrays? Grabbing the data into an array is going to be a lot quicker than making several separate queries, probably. If you're having trouble with arrays, there are lots of folks here willing to help to clarify them when you get into trouble. ... > Here is the table I am using: > CREATE TABLE rnd_tbl ( >id tinyint(10) DEFAULT '0' NOT NULL auto_increment, >location varchar(100) NOT NULL, >address varchar(45) NOT NULL, >address2 varchar(45) NOT NULL, >city varchar(50) NOT NULL, >state char(2) NOT NULL, >zip varchar(14) NOT NULL, >day char(3) NOT NULL, >date varchar(25) NOT NULL, >time varchar(25) NOT NULL, time and date could be combined. You can use PHP's date conversion functions to convert the date and time into any format you'd like, or vise versa. >phone varchar(15) NOT NULL, >PRIMARY KEY (id) > ); -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]
Re: [PHP] search string
Hi Joseph, @ 12:08:46 PM on 4/15/2001, Joseph Bannon wrote: > What is the function to search a string? Basically, I want search a string > (a url) to see if it has "www.yahoo.com" in it and if yes, tell the user > their submission cannot be accepted. -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]
Re: [PHP] test
Hi George, @ 7:19:12 PM on 4/15/2001, george wrote: ... > User-Agent: MT-NewsWatcher/3.1 (PPC) > Subject: [PHP] test > Just a test Use news://alt.test next time, please. -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]
Re: [PHP] limiting page for printing
Hi Fabian, @ 11:47:22 PM on 4/14/2001, Fabian Fabela wrote: ... > I have a page with a lot of data, all of this data is formated in > that page to be printed, in a table with 500 px width, but how can I > messure the length of the page with my results, for example a query > can give me exactly the height of the page, but other queries can > give me more of the height of the page and the results are cutted at > the end when I send the page to the printer. > How can I solve this problem? I don't think you can. Are you not getting the rest of the material on the next half of the second sheet or something? I don't understand what you're saying here. -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]
Re: [PHP] Creating thumbnails
Hi Lauri, @ 11:55:51 AM on 4/15/2001, Lauri Vain wrote: ... > I just finished reading a message from the server root and I have > been told that the server I have to work with by our current project > doesn't support GD and they can't install it neither. > We will, however, need to create thumbnails from larger images > (JPEG). Are there any other solutions that don't require installing? > Some CGI scripts or something similar perhaps? ... > Our main scripting language will be PHP and the database will be > some form of SQL. Ask your sysadmin if the server has ImageMagick or NetPBM installed. You can use either of those to create thumbnails using system(). -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]
Re: [PHP] store array in a file?
Hi jaxon, @ 7:32:10 PM on 4/15/2001, jaxon wrote: ... > 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 you'll be hitting the disk too (really, either way), but I doubt that's going to speed it up very much. > 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? No, I'm lost. > - how to sore the array in a flat file One way is to implode() the data from an array into a single line (separated by whatever you wish), then write the line to the file on disk. http://www.php.net/manual/en/function.implode.php > - any way to make the array global once loaded? By using global? http://www.php.net/manual/it/language.variables.scope.php -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]
Re: [PHP] Access/SQL Server?
Hi Bob, @ 2:40:21 PM on 4/15/2001, Bob Clingan wrote: > What to I need to do/configure in order for PHP 4 to be able to > connect to Access and/or SQL Server databases? http://www.php.net/manual/en/install.configure.php#install.configure.databases -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]
Re: [PHP] unregister part of array in session
Hi Tobias, @ 7:01:41 PM on 4/15/2001, Tobias Talltorp wrote: ... > I tried this... Didn't work: > session_start(); > session_unregister("array[one]"); ?>> Why not save the values to a temp variable, destroy the session, unset the value you want to unset, then register it again? -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]