[PHP] Numerical refs to assoc array suddenly undefined offset??
This is weird. Did I only imagine that PHP allows numerical referencing of associative array elements? 'Cuz suddenly the parser is calling all the numerical references undefined. ex. $my_arr['foo']='first'; $my_arr['bar']='second'; $my_arr['more']='third'; echo p . $my_arr[0] . /p\n; echo p . $my_arr[1] . /p\n; echo p . $my_arr[2] . /p\n; for($i=0;$icount($my_arr);$i++) { echo p . $my_arr[$i] . /p\n; } ex. $my_arr=array( 'foo'='first', 'bar'='second', 'more'='third' ); echo p . $my_arr[0] . /p\n; echo p . $my_arr[1] . /p\n; echo p . $my_arr[2] . /p\n; for($i=0;$icount($my_arr);$i++) { echo p . $my_arr[$i] . /p\n; } The above spits out nothing but a page full of undefined offset errors. I can't find anything in the arrays chapter, nor in the array function reference, to explain why the numerical referencing would've stopped working. This *should* work, right? So why would it not be working now? -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] What does this error mean?
The user the web server runs as (often 'nobody') does not have write access to the logs directory. - Tim http://www.phptemplates.org - Original Message - From: Jimi Malcolm [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 28, 2001 3:17 PM Subject: [PHP] What does this error mean? I'm trying to from a file in a directory called 'logs'. I've never seen this error before. What does it mean? ERROR Warning: fopen(logs/993700800.log,w+) - Permission denied in /home/sites/site20/users/guide/web/counter.php on line 28 -- PHP General Mailing List (http://www.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] Numerical refs to assoc array suddenly undefined offset??
No.. if you are referencing $my_arr['foo'] == then $my_array[0] will not be set. I think it used to work that way, but it stopped. If you want to print it out... use $my_array['foo'] If you don't need the associative referencing, you can just use $my_array[], which will set $my_array[0] If you want to print out your array elements in order, use: while (list ($key, $val) = each ($my_array)) { echo $key = $valbr; } Brian Tanner Project Manager Zaam Internet Solutions Toll Free: 1-866-225-2675 [EMAIL PROTECTED] http://www.zaam.com CC Zona [EMAIL PROTECTED] wrote in message 9hico0$l4l$[EMAIL PROTECTED]">news:9hico0$l4l$[EMAIL PROTECTED]... This is weird. Did I only imagine that PHP allows numerical referencing of associative array elements? 'Cuz suddenly the parser is calling all the numerical references undefined. ex. $my_arr['foo']='first'; $my_arr['bar']='second'; $my_arr['more']='third'; echo p . $my_arr[0] . /p\n; echo p . $my_arr[1] . /p\n; echo p . $my_arr[2] . /p\n; for($i=0;$icount($my_arr);$i++) { echo p . $my_arr[$i] . /p\n; } ex. $my_arr=array( 'foo'='first', 'bar'='second', 'more'='third' ); echo p . $my_arr[0] . /p\n; echo p . $my_arr[1] . /p\n; echo p . $my_arr[2] . /p\n; for($i=0;$icount($my_arr);$i++) { echo p . $my_arr[$i] . /p\n; } The above spits out nothing but a page full of undefined offset errors. I can't find anything in the arrays chapter, nor in the array function reference, to explain why the numerical referencing would've stopped working. This *should* work, right? So why would it not be working now? -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] looking for a class that handles cookies and sessions
read the manual!!! there's a set cookie function built into PHP. -Original Message- From: Jason Stechschulte [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 27, 2001 9:30 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] looking for a class that handles cookies and sessions On Tue, Jun 26, 2001 at 12:44:15PM -0400, [EMAIL PROTECTED] wrote: I need a class that can quickly help me set cookies and sessions, and check up against them anyone have an idea where i can get one like this? Yes, the University I work at has a class that will teach you this. The University is at http://www.unoh.edu and the class you want is: DP237 - Programming Server-Side Scripts I -- Jason Stechschulte [EMAIL PROTECTED] -- And we can always supply them with a program that makes identical files into links to a single file. -- Larry Wall in [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.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] Mail slow
That sounds like a unix answer, I should probably have said that my web server is NT running Apache. Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html -Original Message- From: Don Read [mailto:[EMAIL PROTECTED]] Sent: 28 June 2001 17:20 To: Tim Ward Cc: PHP News Group (E-mail) Subject: RE: [PHP] Mail slow On 27-Jun-01 Tim Ward wrote: I've finally got a mail client running on our web server and it works fine, except in the time it takes to run the mail() function. I've put diagnostics round the call and it seems to be taking 22 seconds to return. All I'm doing is forwarding the results of an enquiry form as plain text. I'm sure I've seen reference to this problem somewhere but can't remember (or find) where it was. Can anyone out there help? Sounds like sendmail is timing-out on a dns lookup ... is sendmail running as a daemon ? try it from the shell df | /usr/sbin/sendmail [EMAIL PROTECTED] Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Uploading files
Okay, I'm absolutely certain that there's a simple solution to my problem, but my forehead is getting sore from banging it against the wall, so I thought I'd pick y'all's brains. I'm using a form to upload a number of files named $input_form_$i where $i is from 0 to 5 and the following is my code: for ($i = 0; $i=5; $i++){ $l = input_form_$i; $location = $$l; move_uploaded_file($location, $upload_path/$location_name); } with that, I get the following warnings: Warning: Unable to create '/': Invalid argument in [php file running program] on line 64 Warning: Unable to move '/var/tmp//php9Uai9S' to '/' in [php file running program] on line 64 /var/tmp//php9Uai9S not loadable Funny thing is another page that doesn't use the $$l method to dynamically grab variable names (just uses a static variable name) works totally fine with essentially the same code. FYI: The form type is multipart/form-data and the input fields are set to file so I have no idea what's going wrong. Any thoughts? David Castillo Application Systems Analyst Human Resources Department Northern Arizona University [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Week Number
Matt TrollBoy Wiseman [EMAIL PROTECTED] wrote: Does know of anyway to get PHP to return the week number? As in there are 52 weeks in a year and this is week x? If there is no internal feature, perhaps something built into PHPLib? How about: intval( date(z)/7 ); Luke Welling --- PHP and MySQL Web Development by Luke Welling and Laura Thomson http://www.amazon.com/exec/obidos/ASIN/0672317842/tangledwebdesign -- PHP General Mailing List (http://www.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] Week Number
here's a quick-n-dirty way. $doy = date('z'); $week = (int)($doy / 7); print $week+1; but there's one thing to be wary of: this counts full 7-day weeks, not calendar weeks, so since the first week of a calendar year might begin on wednesday or friday, this algorithm might be a few days off if you're trying to match up the results with a calendar program. i solved the calendar-week problem in perl a few months ago, so i'll go look for the code and translate it into PHP. -Original Message- From: Matt TrollBoy Wiseman [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 28, 2001 3:33 PM To: [EMAIL PROTECTED] Subject: [PHP] Week Number Does know of anyway to get PHP to return the week number? As in there are 52 weeks in a year and this is week x? If there is no internal feature, perhaps something built into PHPLib? Lemme know, Matt TrollBoy Wiseman Webmaster: Shoggoth.net Site Designer: phpslash.org The oldest and strongest emotion of mankind is fear, and the oldest and strongest kind of fear is fear of the unknown. -H.P. Lovecraft - Please do not resell my e-mail address to anyone or send me unsolicited e-mail - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] $REMOTE_ADDR subnet consistency?
Hi PHP heads, I have question regarding $REMOTE_ADDRes consistency. I am developing a custom session library and I need a way to uniquely identify each http client. Hasnt this has been a never-ending struggle for web developers? Anyways, Im using the variables $HTTP_USER_AGENT and $HTTP_ACCEPT_ENCODING to help create the session hash and am now considering putting $REMOTE_ADDR into the pot. I know that there are problems with $REMOTE_ADDR, like proxies and NATs, BUT I WAS WONDERING, and now here comes my question, do the first two subnets of an IP address (i.e. 204.57.x.x) typically stay the same, so that they could be relied upon for general authenticity? By grepping through the access logs this appears to be true. Ok and dont tell me, Why dont you just use cookies? Because we must support non-cookie clients and cookies are not as authentic as IP addresses. Thank you for your brilliant insights to this question. Nathan Cassano ContractJobHunter Web Developer
Re: [PHP] Week Number
I didn't see anything built in but you might try (date(z)/7) +1 Data Driven Design P.O. Box 1084 Holly Hill, Florida 32125-1084 http://www.datadrivendesign.com http://www.rossidesigns.net - Original Message - From: Matt TrollBoy Wiseman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 28, 2001 3:33 PM Subject: [PHP] Week Number Does know of anyway to get PHP to return the week number? As in there are 52 weeks in a year and this is week x? If there is no internal feature, perhaps something built into PHPLib? Lemme know, Matt TrollBoy Wiseman Webmaster: Shoggoth.net Site Designer: phpslash.org The oldest and strongest emotion of mankind is fear, and the oldest and strongest kind of fear is fear of the unknown. -H.P. Lovecraft - Please do not resell my e-mail address to anyone or send me unsolicited e-mail - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] What does this error mean?
it means that the script doesn't have write permission to write the logs/993700800.log file... most probably the directory or the file itself are not owned by the webserver user. it also looks like the authour of the script did a real shoddy job of checking for errors, and tried to pass the invalid file descriptor to other functions. (which is what those next two errors are about) one more reason why people *need* to put in error handling code on *all* file or network operations. to fix this the quick-n-dirty way, set correct permissions on the 'logs' directory. to fix this the correct way, first put some error handling in the script, then set file permissions ;) -Original Message- From: Jimi Malcolm [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 28, 2001 3:17 PM To: [EMAIL PROTECTED] Subject: [PHP] What does this error mean? I'm trying to from a file in a directory called 'logs'. I've never seen this error before. What does it mean? ERROR Warning: fopen(logs/993700800.log,w+) - Permission denied in /home/sites/site20/users/guide/web/counter.php on line 28 Warning: Supplied argument is not a valid File-Handle resource in /home/sites/site20/users/guide/web/counter.php on line 29 Warning: Supplied argument is not a valid File-Handle resource in /home/sites/site20/users/guide/web/counter.php on line 30 1 END The last two errors are becuase the first fails to return a file handle. Here's the actual offending code. It's just a simple counter. CODE ?PHP $iDate = mktime(0, 0, 0, date(m), date(d), date(Y)); $iCount = 1; $sFile = logs/.$iDate..log; if (file_exists($sFile)) { $iCount = incCount($sFile); } else { createCountLog($sFile); } echo BFONT COLOR=BLUE$iCount/FONR/B; function incCount($sFile) { // Open and read existing count $hCounter = fopen($sFile, r); $iCount = fgets($hCounter, 1024); fclose($hCounter); // Write over it with the new count $hCounter = fopen($sFile, w); fputs($hCounter, ++$iCount); fclose($hCounter); return $iCount; } function createCountLog($sFile) { $hCounter = fopen($sFile, w+); fputs($hCounter, 1); fclose($hCounter); } ? END Usually I've been able to fix every PHP error I've gotten in the past - they've been pretty straightforward - but I've been playing around with this error for a few days now to no avail. I'm new to this mailing list and have never used it before so I'm not sure which one/s to join or post this specific message to. I apologize if this is the wrong forum for this type of question. Thank you for your time. -- Jimi Malcolm Web Content Manager inburst Internet Media inburst.com jimi.malcolm@inburst -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Week Number
Thanks to all of you that responded, I was so busy searching the manual for that specific function I forgot all about figuring it myself from date(z)... I really gotta lay off that crack pipe. Thanks again guys. Also, another item, I know the list is back up now, but this was mail was sent a solid DAY before I recieved it back through the list.. that's not very good, perhaps the powers that be should look over the list again... Matt TrollBoy Wiseman Webmaster: Shoggoth.net Site Designer: phpslash.org The oldest and strongest emotion of mankind is fear, and the oldest and strongest kind of fear is fear of the unknown. -H.P. Lovecraft - Please do not resell my e-mail address to anyone or send me unsolicited e-mail - - Original Message - From: Brian Paulson [EMAIL PROTECTED] To: 'Matt TrollBoy Wiseman' [EMAIL PROTECTED] Sent: Friday, June 29, 2001 2:27 PM Subject: RE: [PHP] Week Number When I needed this before I did dome thing like this ? // z day of the year i.e. 0-365 $days = date(z); //Devide number of days by 7 number of day in the week $math = ($days/7); //result is a number like 25.7435445 //so we explode that and take the first number which is what we want $math = explode(.,$math); //then set week to = that number $week = $math[0]; //and print Print($week); ? Hope that helps Thank You Brian Paulson Sr. Web Developer [EMAIL PROTECTED] The Pueblo Chieftain www.chieftain.com 1-800-279-6397 -Original Message- From: Matt TrollBoy Wiseman [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 28, 2001 1:33 PM To: [EMAIL PROTECTED] Subject: [PHP] Week Number Does know of anyway to get PHP to return the week number? As in there are 52 weeks in a year and this is week x? If there is no internal feature, perhaps something built into PHPLib? Lemme know, Matt TrollBoy Wiseman Webmaster: Shoggoth.net Site Designer: phpslash.org The oldest and strongest emotion of mankind is fear, and the oldest and strongest kind of fear is fear of the unknown. -H.P. Lovecraft - Please do not resell my e-mail address to anyone or send me unsolicited e-mail - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] What does this error mean?
-Original Message- From: Jimi Malcolm [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 28, 2001 2:17 PM To: [EMAIL PROTECTED] Subject: [PHP] What does this error mean? I'm trying to from a file in a directory called 'logs'. I've never seen this error before. What does it mean? ERROR Warning: fopen(logs/993700800.log,w+) - Permission denied in /home/sites/site20/users/guide/web/counter.php on line 28 If this is a file that already exists, your script does not have permission to write to it. (Check file permissions.) If the file doesn't already exist, your script does not have permission to create a file in that location. (Check directory permissions.) In both cases, keep in mind that the script is most likely running as whatever userID the web server runs as (commonly 'nobody'), not as your own userID. Make sure file and directory permissions are set accordingly. --- Mark Roedel ([EMAIL PROTECTED]) || There cannot be a crisis next week. Systems Programmer / WebMaster || My schedule is already full. LeTourneau University ||-- Henry Kissinger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Question on Commercial Offerings
I don't know quite how to word that subject but here's what we want to do. We have a shopping cart softwre (like a million others out there) which based in windows NT with a COM+ object to guard the source code. We mainly offer this product to our hosting customers as an add-on solution to their hosting. Well, we want to migrate this to PHP/MySQL and I don't know how to protect the source code. My boss is suggesting to make a DSO but I really am not a C programmer to do all that. I want to make it all in PHP but somehow protect the code. Any ideas? -- Thomas Deliduka IT Manager - New Eve Media The Solution To Your Internet Angst http://www.neweve.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] newbie has include path error
In article 001a01c100cd$3146be20$033a22c7@daniel, [EMAIL PROTECTED] (Daniel Goldin) wrote: Warning: Failed opening '/etc/httpd/php/prepend.php' for inclusion (include_path=) in unknown in line 0. I've tried putting in this include path in my php.ini file to no effect. It looks as though your include_path setting may be messed up. Call phpinfo() to see what PHP is using for include_path. Make sure you're quoting the value correctly in php.ini--that one quote above makes me think that it's wonky right now. -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] I want to get the input of keyboard
php://stdin php://stdout php://stderr are also for console input/output... -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED]] Subject: Re: [PHP] I want to get the input of keyboard $file = fopen('php://input', 'r'); $char = fread($file, 1); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] win 98 + php4 + pws4
Mein system win98se php4 pws4 ich habe den pws4 installiert und die auf den Seiten beschriebenen Einstellungen durchgeführt. Jedoch funktioniert bei mir kein Test mit der erstellten phptest.php datei. Wie muss bei pws4 + php4 die php.ini konfiguriert werden und wie die registry und wo muss ich meine php-skripts ablegen damit sie laufen. Die FAQ gibt nur die Konfig für php3 + pws3 wieder -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Auto submit form, How?
How do I auto load or auto submit a form on the same page? I don't want to have to press the submit button instead just click on a value in the drop down form and it loads (I am lazy). Using php4.something -- This email was sent using w3mail. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] 4.0.6 + mcrypt = segmentation fault
Hi, I've recently downloaded and instaled PHP4.0.6 in my linux box. Eveything seems fine expect by the fact that my mcrypt scripts started to cause a segmentation fault in apache. libmcrypt 2.4.4 php 4.0.6 Linux RedHat 7.0 + updates ldd libphp4.so libpam.so.0 = /lib/libpam.so.0 (0x4014f000) libdl.so.2 = /lib/libdl.so.2 (0x40157000) libpq.so.2 = /usr/lib/libpq.so.2 (0x4015a000) libmcrypt.so.4 = /usr/local/lib/libmcrypt.so.4 (0x4016a000) libltdl.so.0 = /usr/lib/libltdl.so.0 (0x4017) libgd.so.1.8 = /usr/lib/libgd.so.1.8 (0x40174000) libz.so.1 = /usr/lib/libz.so.1 (0x401a5000) libcrypt.so.1 = /lib/libcrypt.so.1 (0x401b3000) libresolv.so.2 = /lib/libresolv.so.2 (0x401e1000) libm.so.6 = /lib/libm.so.6 (0x401f3000) libnsl.so.1 = /lib/libnsl.so.1 (0x40212000) libc.so.6 = /lib/libc.so.6 (0x40229000) libssl.so.0 = /usr/lib/libssl.so.0 (0x4034b000) libcrypto.so.0 = /usr/lib/libcrypto.so.0 (0x40379000) libttf.so.2 = /usr/lib/libttf.so.2 (0x40431000) libjpeg.so.62 = /usr/lib/libjpeg.so.62 (0x40458000) libpng.so.2 = /usr/lib/libpng.so.2 (0x40477000) /lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0x8000) ldd /usr/sbin/httpd libm.so.6 = /lib/libm.so.6 (0x4001e000) libcrypt.so.1 = /lib/libcrypt.so.1 (0x4003d000) libdb.so.3 = /usr/lib/libdb.so.3 (0x4006b000) libdb-3.1.so = /lib/libdb-3.1.so (0x400a9000) libdl.so.2 = /lib/libdl.so.2 (0x40126000) libc.so.6 = /lib/libc.so.6 (0x40129000) /lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0x4000) Is this happening to somebody else ? Should I upgrade to a latter mcrypt ? I've noticed that there is a 2.4.15... Thanks. __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] session.gc_probablity
Hi, I am running PHP 4.0.5 as an Apache Module (with Zend Optimizer) on NT 4.0 SP6 and have been very happy with it. Until we think about using Easysoft solution the only method we have to get into our HP3000 is a Windows' based ODBC one (which works well). Okay, so I explained why I am running PHP on NT :) The question I am having is I wrote my own session handler to store in a MySQL database. All works well. But I noticed in 4.0.3 pl1 the gc_probability of garbage collection routine being called doesn't work right. Anything below 75 in the php.ini file would have it not being called at all (i put in a print statement to let me know when it was being called). Anything over 75 had it called on EVERY session_start(). I upgraded to 4.0.5 and now it only gets called when the probability in the php.ini file is set = 99 . I was okay with the overhead of the gc being called every time with 4.0.3 but with the 99 limit nowit may only take one more release until it is never called :-) Anyone know what is going on with the NT Apache PHP? BTW- I call a script which has phpinfo() to make sure it is reading the correct php.ini file (C:\WINNT\php.ini and it is and the probability value is set correctly). Any advice? Relevant entries from phpinfo(): PHP Version 4.0.5 System Windows NT 4.0 build 1381 Build Date Apr 30 2001 Server API Apache Configuration File (php.ini) Path C:\WINNT\php.ini session Session Support enabled session.auto_start Off Off session.cache_expire180 180 session.cache_limiter nocache nocache session.cookie_domain no valueno value session.cookie_lifetime 0 0 session.cookie_path / / session.cookie_secure Off Off session.entropy_fileno valueno value session.entropy_length 0 0 session.gc_maxlifetime 14401440 session.gc_probability 99 99 session.namePHPSESSID PHPSESSID session.referer_check no valueno value session.save_handleruseruser session.save_path /tmp/tmp session.serialize_handler php php session.use_cookies On On apache Apache for Windows 95/NT Apache Version Apache/1.3.19 Apache Release 10319100 Apache API Version 19990320 Hostname:Port myserver:80 TimeoutsConnection: 300 Keep-Alive: 15 -- PHP General Mailing List (http://www.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] Auto submit form, How?
http://www.devguru.com/Technologies/ecmascript/quickref/select.html Javascript. Use onBlur or onChange and call document.formname.submit(). Pete. Fates [EMAIL PROTECTED] wrote in message 20010629125135.ELXV13240.femail10.sdc1.sfba.home.com@localhost">news:20010629125135.ELXV13240.femail10.sdc1.sfba.home.com@localhost... How do I auto load or auto submit a form on the same page? I don't want to have to press the submit button instead just click on a value in the drop down form and it loads (I am lazy). Using php4.something -- This email was sent using w3mail. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Mail slow
On 29-Jun-01 Tim Ward wrote: That sounds like a unix answer, I should probably have said that my web server is NT running Apache. Tim Ward Senior Systems Engineer Yes it was, but the principle is the same. mail() can't go any faster than the MTA (Mail Transport Agent). Test the host defined on the 'SMTP' of your php.ini file; How long does it take? If it's slow, then PHP's mail() is not the problem. telnet mail.domain.com 25 Trying 209.272.0.212... Connected to mail.domain.com. Escape character is '^]'. 220 mail.domain.com Sendmail 8.71.1; Fri, 29 Jun 2001 15:03:32-0500 (CDT) MAIL FROM: [EMAIL PROTECTED] 250 2.1.0 [EMAIL PROTECTED] Sender ok RCPT TO: [EMAIL PROTECTED] 250 2.1.5 [EMAIL PROTECTED] Recipient ok DATA 354 Enter mail, end with . on a line by itself foo bar baz . 250 2.0.0 f5TK3uM20182 Message accepted for delivery quit 221 2.0.0 mail.domain.com closing connection Connection closed by foreign host. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Week Number
On 28-Jun-01 Matt \TrollBoy\ Wiseman wrote: Does know of anyway to get PHP to return the week number? As in there are 52 weeks in a year and this is week x? don't bet on it. If there is no internal feature, perhaps something built into PHPLib? date('z') / 7; strftime('%U %V %W'); Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] closing window after submit
use onsubmit = somefunction(); in the form tag, and make the somefunction() function close the window. --Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Capturing output of shell script.
Hello all, I have an .sh shell script being executed from a php4 call. I need to capture the string return and work with that in the php script. The only problem is that the call works but I cannot get the returned string. I've tried using exec, passthru, ``, system, and escapeshellcommand. Nothing seems to work. any ideas? thanks. chuck -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] pc/mac and ie/nav
use the $HTTP_USER_AGENT variable. Search through it to see if it contains Mac. If it does, then it's a Mac. Tyler - Original Message - From: Wilbert Enserink To: [EMAIL PROTECTED] Sent: Thursday, June 28, 2001 7:07 AM Subject: [PHP] pc/mac and ie/nav Hi all, does anybody know a good piece of script or has a good tip for me how to detect platform and browser of the client? thanx in advance! Wilbert- Pas de Deux Van Mierisstraat 25 2526 NM Den Haag tel 070 4450855 fax 070 4450852 http://www.pdd.nl [EMAIL PROTECTED] -
Re: [PHP] shared object not open
Richard Lynch wrote: I had ldconfig running several times (editing ld.so.conf in between by even changing the sequence in the ld.so.conf) but it doesn't help me. Thanks Martin Try running ldconfig from your command line. I think you just run it and it does things, and it all then works... It's been ages since I did it though... -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm - Original Message - From: Martin Schmidt [EMAIL PROTECTED] Newsgroups: php.general Sent: Monday, June 25, 2001 4:14 PM Subject: [PHP] shared object not open Hi, I am just starting with PHP, I installed the new version on my Suse 7.1 with apache 1.3.14, because I need a tool for accessing databases (Informix/Oracle). Everything seemed fine, until I tried to start apache, it told me: Cannot load /usr/lib/apache/libphp4.so into server: shared object not open All my investigations showed me a very kind member of bug.php.net, who told someone else, that this isn't a bug and we should connect the mailing-lists. He generously had a hint : /etc/ld.so.conf and ldconfig. In the archive of the mailing lists I found the same informations ( a little bit more informative), but my ld.so.conf is o.k. and at this point any help stops. I hope, that someone found out what's happening here and helps me. So I have: Intel Celreon 366 on Asus Mainboard, 256 MB RAM, Adaptec 2940UW with all together 20GB HD, 5 swap-Areas with 128MB each. SuSE 7.1 Prof-Edition, from this distribution I installed apache and PHP (everything working fine, but no idea how to activate informix/oracle-support) Apache says, PHP4-module installed. Thanks a lot for any help Martin Schmidt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Printing a string issue
Greetings everyone. I have been lurking for a while now, and now I am developing my first application with PHP. I am running into an issue that I would love some help with. I am writing an application to handle phonelists and such. Now I am creating a wireless version of the search page so that all the number links will be automatically dialed when you click on them with your wap phone. A link in WML would look like this wtai://wp/mc;1-555-555-1212 from html it would look like this pa href=wtai://wp/mc;1-555-555-1212"Asst/a/p So I am trying to figure out how to write this. I have a statement like this: print (pa href=\wtai://wp/mc;$row[officenum]\Office/a/p); Although I can't get this to parse! $row["officenum"] is a variable that will have the number that I am calling. It is coming from a mysql db. Any thoughts?? Thanks Craig Craig Simon Senior Systems Engineer Mobileum Inc. 4234 Hacienda Drive, Pleasanton Ca 94588 (O) 925-251-7269 (C) 925-487-6005
[PHP] Postcard/Tell a friend app
Hi, First of all, thanks to all that answered my Auction question a few days ago. It looks like http://www.phpauction.org/ was the clear winner. So, on to the next question. Has anyone seen an app that can send digital cards, where a user can choose their picture, and add whatever text and font they want, then send to as many people as they want? Here's what I'm going for: http://itools.mac.com/WebObjects/iCards.woa?aff=consumercty=USlang=eniden tifier=BPimK6ft7BH2KBYf This one was built in WebObjects, but is pretty robust. Thanks in advance. mto -- Michael O'Neal Web Producer/ Autocrosser ST 28 '89 Civic Si - M A N G O B O U L D E R - http://www.thinkmango.com e- [EMAIL PROTECTED] p- 303.442.1821 f- 303.938.8507 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] perl and php data-structure interoperability
i've been working on a method of handling sessions that would be portable and easy to implement in PHP and Perl. i've got everything working fine except the interoperability of serialized data. the reason it's important is becuase my session table basically looks like this: (i left out the 'timestamp' field, becuase it's not relevant) id namedata -- 1 scott serialized array the 'data' field is a TEXT type (in my Mysql DB) that is meant to store a serialized assoc. array. this enables me to easily store and retrieve an arbitrary amount of data about the user. but i havent found any cross-language way of serializing and unserializing data structures. of course, i could roll my own, but before i go to the trouble of writing a whole php-compatible serialize and deserialize module for perl, can anyone offer any help or suggestions on how to make PHP and Perl recognize each other's serialized data? -- PHP General Mailing List (http://www.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] closing window after submit
onMouseUp=window.close() Jerry Lake Interface Engineering Technician Europa Communications - http://www.europa.com Pacifier Online - http://www.pacifier.com -Original Message- From: Richard Kurth [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 28, 2001 3:57 PM To: php Subject: [PHP] closing window after submit I have a form that is in a pop up window it has an image for a submit button how can I close the pop up after submitting. I know I can do it with javascript with a standard submit button. but how can I do it when I use an image for a submit button form method=post action=?echo $PHP_SELF;? input type=TEXT name=email size=30 maxlength=50 input type=image src=fm_sub.gif width=71 height=11 border=0 Best regards, Richard mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: Regular Expression help
Clayton Dukes wrote: Okay, here's what I have so far: ---snip--- if ((!$email) || ($email==) || (!eregi(^[_\.0-9a-z-]+@domain.+[a-z],$email)) ) $stop = center._ERRORINVEMAIL./centerbr; ---snip--- This works, but how can I add a second domain? ie: Try: ^[_\.0-9a-z-]+@(domainA|domainB|etc)\.[a-z]{2,3}$ A complete email address check is insanely hard to to if you want to get RFC 822 compliant-checking, but who needs that anyways? (fwiw, the regex in Mastering Regular Expressions for checking email address syntax is some 4,700 bytes long.) J -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] newbie help!
hi I wrote a script to display all file in a directory. Here is my script --- ?php $dir_name = e:\celebs\christina_aguilera; $dir = opendir($dir_name); while ($file_name=readdir($dir)) { if (($file_name!=. $file_name!=..)) { echo $file_name.\nnbsp;nbsp;; } } closedir($dir); ? This is working fine. But it displays all files in 1 single page. Here is what i wanna do, but i don't know how to do it. I wanna display 15 files names at once, and have prev. and next buttons and the end, when i click on next, it will display the next 15 files. Please help me. Thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] IMAP Question.
Does the IMAP functionalities require UW IMAP server since compiling PHP requires the libraries and header files from UW IMAP server. Does it work with Cyrus IMAP server? Thank you, Yan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] (slightly OT) the bad and the good (hosting recommentations)
hi all, i'm about to change ISPs, and i'll probably be moving to a US based server, on Unix, with Apache, PHP4, CGI, Perl 5, MySQL, etc etc. so far the best I can find (price/service level/features) is experthost.com.au. Has anyone got a bad experience with these guys, or a good experience with annother ISP that they can recommend? for what it's worth they offer a reseller package with 2-4 domains for US$10/month each, all the way down to 25+ for US$4.99 each / month. this is with 50 meg space, MySQL DB, 20 POPs, and much more. i don't require dial up access, just hosting. i'd be interested to hear of competitors to this ISP, or of any good / bad experiences. I'm ony interested in Australian, US, Canada or UK ISPs. many thanks jsutin french -- PHP General Mailing List (http://www.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 help!
I wrote a script to display all file in a directory. Here is my script (snip) This is working fine. But it displays all files in 1 single page. Here is what i wanna do, but i don't know how to do it. I wanna display 15 files names at once, and have prev. and next buttons and the end, when i click on next, it will display the next 15 files. If you have to do it all in PHP, I would pass a start-file index to the page; something like this: ?php $ind = ( isset($ind) ? $ind : 0 ); $dir_name = e:\celebs\christina_aguilera; $dir = opendir($dir_name); $prev = ( $ind 0 );// should 'prev' be active? $next = false;// should 'next' be active? $ignore = array(., ..);// files to skip $i = 0; while ($fname = readdir($dir)) { if (in_array($fname, $ignore)) continue; if ($i = $ind) { if ($i $ind + 15) { echo \nbrnbsp;nbsp;$fname; } else { $next = true;// more files; make 'next' active break; } } $i++; } closedir($dir); $prev_pre = ( $prev ? 'a href=#?ind='.max($ind-15,0).'' : '' ); $prev_post = ( $prev ? '/a' : '' ); $next_pre = ( $next ? 'a href=#?ind='.$ind+15.'' : '' ); $next_post = ( $next ? '/a' : '' ); echo \nbr$prev_pre lt;lt;prev $prev_post | $next_pre nextgt;gt; $next_post; ? This will skip '.' and '..' without counting them, will enable/disable the 'prev' and 'next' links as needed, will ignore all files past $ind+16 (it has to read one past the end to know if 'next' should be enabled), and will automatically stop when it runs out of files. It will work for all browsers, at a cost of increased server load. Personally, I would consider writing all the filenames into a JavaScript array, and do the paging on the client. -- PHP General Mailing List (http://www.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] win 98 + php4 + pws4
I really suggest you get rid of PWS and install Apache, which is a much better server all 'round. cmoehle [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Mein system win98se php4 pws4 ich habe den pws4 installiert und die auf den Seiten beschriebenen Einstellungen durchgeführt. Jedoch funktioniert bei mir kein Test mit der erstellten phptest.php datei. Wie muss bei pws4 + php4 die php.ini konfiguriert werden und wie die registry und wo muss ich meine php-skripts ablegen damit sie laufen. Die FAQ gibt nur die Konfig für php3 + pws3 wieder -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] how to flip an image using GD?
I don't see any function for this in GD; it looks like you'll have to either find a third-party library or do it pixel-by-pixel, something like ?php $width = imagesx($img); $height = imagesy($img); for ($j = 0; $j $height; $j++) { $left = 0; $right = $width-1; while ($left $right) { $t = imagecolorat($img, $left, $j); imagesetpixel($img, $left, $j, imagecolorat($img, $right, $j)); imagesetpixel($img, $right, $j, $t); $left++; $right--; } } ? (obviously, a library would be faster, but would essentially do the same thing). Noah Spitzer-Williams [EMAIL PROTECTED] wrote in message 9hi9v6$hn$[EMAIL PROTECTED]">news:9hi9v6$hn$[EMAIL PROTECTED]... how would i flip an image horizontally using the GD library in PHP? -- PHP General Mailing List (http://www.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] Function No Longer works
Look for 'allow_url_fopen' in your config file. Black S. [EMAIL PROTECTED] wrote in message 9hi6hi$2s9$[EMAIL PROTECTED]">news:9hi6hi$2s9$[EMAIL PROTECTED]... I have found the problem with my previous post and PHP functions no longer working. It seems the code: include(http://www.domain.com/path/to/file.txt;); no longer works? If I type in a complete directory path then it works great, but no Internet include, any one know why? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] extract data from html
1. Open the html file in read only mode 2. Start reading the html file till I encounter a td tag (I don't know how to do this) 3. Grab that data after the td tag (and then what?) See http://php.net/manual/en/function.fopen.php and http://php.net/manual/en/function.fgetss.php plus the chapter for whatever DBMS you want to drop the file contents into. Thanks. One thing just reading the manual without the idea of how the function works is of no use. Some examples would help. In fact I did use fopen, fgets, fgetss but the problems is that the html tag that I am looking is td. Now this is easy but if td width=25% or td colspan=7 would give a problem. (grimace) The PHP manual is actually very well written; I can usually find exactly what I need in 10s. I think your complaint just covers sloppy thinking. I'd think you should be able to find screen-scraper code around; if not, try this: - search for 'td'. NOTE: use a case-insensitive search! - search for the first trailing ''. Save (this character position + 1). - search for the first trailing '/td'. Again, case-insensitive! - store everything between the two; strip all HTML tags, add slashes, and store it. - increment your file position by 5 characters and repeat. I'd give you actual code, but I think you could use some manual practice (smirk). -- PHP General Mailing List (http://www.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] Week Number
How about this? $today = getdate(); $week = (int) ($today[yday] / 7); Note: I'm not sure whether $today[yday] begins with 0 or 1. Matt TrollBoy Wiseman [EMAIL PROTECTED] wrote in message 009801c10009$2a68c720$[EMAIL PROTECTED]">news:009801c10009$2a68c720$[EMAIL PROTECTED]... Does know of anyway to get PHP to return the week number? As in there are 52 weeks in a year and this is week x? If there is no internal feature, perhaps something built into PHPLib? -- PHP General Mailing List (http://www.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 and Windows XP
Windows XP is the combination of the two lines. -Original Message- From: Young C. Fan [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 28, 2001 5:00 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] PHP and Windows XP elias [EMAIL PROTECTED] wrote in message 9heq8k$e6$[EMAIL PROTECTED]">news:9heq8k$e6$[EMAIL PROTECTED]... Why not? if it works with WinME and PWS, I suppose it will with XP too. I was under the impression that XP is the next in line after Win 2000, not the 95/98/Me line. Young snip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] how to determine size of gz-handler output
Hi Sebastian! On Fri, 29 Jun 2001, Sebastian Stadtlich wrote: Hi all I'd like to know how small my content gets when i use ob_gzhandler. so far i tried $cont=ob_get_contents(); $length=strlen($cont); try using $length = ob_get_length(); instead. echo !-- $length --\n; but it outputs !-- 17280 -- -- teodor -- PHP General Mailing List (http://www.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 Commercial Offerings
Hi Thomas! On Fri, 29 Jun 2001, Thomas Deliduka wrote: I don't know quite how to word that subject but here's what we want to do. We have a shopping cart softwre (like a million others out there) which based in windows NT with a COM+ object to guard the source code. We mainly offer this product to our hosting customers as an add-on solution to their hosting. Well, we want to migrate this to PHP/MySQL and I don't know how to protect the source code. My boss is suggesting to make a DSO but I really am not a C programmer to do all that. I want to make it all in PHP but somehow protect the code. Any ideas? buy the PHP Encoder from Zend. otherwise, have a well written licence -- teodor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Adding 1 to a whole number
Way is this doing this Starting with 1000 all I what to do is increse this number by one the first time I run it it adds 1 to the number 10001 second time it 10001002 Shouldn't it just add 1 to the number 1000,1001,1002,1003 ? //$num =1000; $fp2=fopen (number,r+)or die(unable to open file (number)); $data = fgets($fp2, 1000); $data1 = $data + 1; fwrite($fp2,$data1); echo $data1; ? Best regards, Richard mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Creating domain and default page
It's understood that when creating new domain, the user has to be root. But, the problem is the user of script is nobody when program is running if i'm not mistaken. So, how to solve this kind of permission stuff? From: scott [gts] [EMAIL PROTECTED] To: php [EMAIL PROTECTED] Subject: RE: [PHP] Creating domain and default page Date: Thu, 28 Jun 2001 16:19:29 -0400 1) read apache and named docs so you know what changes need to be made, and where to make them 2) update 'httpd.conf' and the domain's 'zone' file 3) restart both 'named' and 'apache' 4) copy an 'index.php' into the subdomain's newly created directory. there are probably better ways to do it, but that's how i add subdomains to my machine when i do it manually... it's a start -Original Message- From: E K L [mailto:[EMAIL PROTECTED]] Subject: [PHP] Creating domain and default page Hi all, Can anybody give me a guideline or idea on how to write a PHP scriot which is used to create a domain or sub-domain and a default page and a same time. My OS is Red Hat Linux 6.1. For example, in my program, when i press activate' button, the script will create me a sub-domain try.php.com and a default page index.php is created for that sub-domain. Thanks for advice.. _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] trying to get started in PHP
Hi I Installed PHP configered as per instructions, and a simple PHP file saved as *.HTML would not work from a PWS (personnel web server) on windows 98. Is there a Tutorial to get started somewhere all the tutorials find is PHP theory NOT how to get started, from a PWS or has anybody got a sample file I could put on a web site to try out. From Eric -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] makeing a post
Hi How do you make a posting is group PHP From Eric --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.262 / Virus Database: 132 - Release Date: 12-Jun-01 -- PHP General Mailing List (http://www.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] Week Number
You can use Date_Calc class http://www.phpinsider.com/php/code/Date_Calc/ - Original Message - From: Don Read [EMAIL PROTECTED] To: Matt TrollBoy Wiseman [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, June 29, 2001 10:19 PM Subject: RE: [PHP] Week Number On 28-Jun-01 Matt \TrollBoy\ Wiseman wrote: Does know of anyway to get PHP to return the week number? As in there are 52 weeks in a year and this is week x? don't bet on it. If there is no internal feature, perhaps something built into PHPLib? date('z') / 7; strftime('%U %V %W'); Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Auto submit form
How do I autoload a selection from a drop down menu form based on the selection without having to click a submit button? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Convert
Hi Roman! On Fri, 29 Jun 2001, Roman wrote: Have you some program for convert Microsoft Access Database (*.mdb) to the MySQL database ? Search on MySQL site : dbf2mysql or mssql2mysql on windows you can move your data from Access to a MS-SQL, or to export it as DBF. -- teodor -- PHP General Mailing List (http://www.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] Problems upgrading APACHE/PHP/Mysql on remote server
Hi M! On Thu, 28 Jun 2001, M wrote: Complete msg subject is what can developer do when server provider upgrades any of Apache/PHP/Mysql softwares to newer version and this causes crash on already working transactions? I am posting this also into MySql discussion list. MySQL transation are known to be unstable (discl: I've never used them, for this stuff Postgres is the way to go). What sais your contract w/ them? Doesn't it specify a version of the software? If not, they are right. Before deploying, try to reproduce the same platform on a test box, and test on it. You'll find most of the problems. Also, check the changelogs of PHP releases, to see what nasty known bug was fixed in the next revision they don't have and might relate to your problems. etc. ciao -- teodor -- PHP General Mailing List (http://www.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] passwd in php....
I don't think this is going to work, passwd requires you to input the passwword, not just pass it as an option on the command line. On top of that, you have to be root to change a password other than yours. Julia Quoting Bruno Freire ([EMAIL PROTECTED]): Hi... My name is Bruno. Somebody Knows how to use passwd in php? I mean, create linux users on my httpd server using a php page. I already try the EXEC(), but i had no sucess.. Any help will be needed Thanks everyone -- [ Julia Anne Case ] [Ships are safe inside the harbor, ] [Programmer at large] [ but is that what ships are really for.] [ Admining Linux ] [ To thine own self be true. ] [ Windows/WindowsNT ] [ Fair is where you take your cows to be judged. ] PGP signature
Re: [PHP] Please Help......
This could be difficult or not even possible... first you would need to add entries to the DNS zone file (and update the serial number) and then reload the DNS database, and this is only if you run your own DNS and not have your provider do it for you, like many of us do. Then you would have to update the /etc/httpd/conf/httpd.conf file with the correct info for the sub-domain and then restart apache And if you intend to have the new user upload content for the new sub-domain you would need to add a user and set a password, and as I stated in a previous message running passwd from php isn't possible as it requires you to enter a password, you can't supply one on the command line, and it needs to run as root to change the password of another user. Julia Quoting Man He ([EMAIL PROTECTED]): Hi all, Can anybody give me a guideline or idea on how to write a PHP scriot which is used to create a domain or sub-domain and a default page and a same time. My OS is Red Hat Linux 6.1. For example, in my program, when i press activate' button, the script will create me a sub-domain try.php.com and a default page index.php is created for that sub-domain. Thanks for advice.. _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- [ Julia Anne Case ] [Ships are safe inside the harbor, ] [Programmer at large] [ but is that what ships are really for.] [ Admining Linux ] [ To thine own self be true. ] [ Windows/WindowsNT ] [ Fair is where you take your cows to be judged. ] PGP signature
Re: [PHP] ADD a user in linux using PHP
ADD a user in linux using PHPsure, I use a small C program I wrote and set to setuid root. that way I can hide it and it all works good with an exec call from php. I wouldn't advise setting setuid adduser to root. It's way too dangerous. chuck - Original Message - From: Bruno Freire To: '[EMAIL PROTECTED]' Cc: '[EMAIL PROTECTED]' Sent: Thursday, June 28, 2001 4:30 PM Subject: [PHP] ADD a user in linux using PHP Hi! I'm Bruno, from brazil Somebody knows how to create a new user in LINUX (not http server) using PHP? Something like useradd and passwd Thanks, Bruno.
Re: [PHP] PHP ImageMagick
In PHP I try to run a shell command with the following source code: $fotonaam = 'convert -font arial -pointsize 20 -gravity center -fill white -draw text 5,5 VERKOCHT image.jpg image2.jpg'; exec($fotonaam); PHP runs the program but the -draw text 5,5 VERKOCHT is not executed (there is no VERKOCHT in the image2.jpg). I tried everything but I can't solve the problem. Could somebody explain to me how it's possible that the program (convert) runs but there (seams to be) a problem with -draw text 5,5 VERKOCHT. If I run the same command troughs telnet/ssh as root or nobody it works fine Is it something with the and the combinative with the exec function (I also tried \)? Or is it because I run PHP in safe mode and the convert program tries to run a external program what is not in the . path (you now, the basic safe mode restriction)? Probably. Or maybe that program/lib just isn't in PHP's PATH. Try running it as nobody, but set your $PATH to first. Also, try using the optional parameters to http://php.net/exec so you can get some feedback from the OS about what error is happening, if any. -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] how to determine size of gz-handler output
I'd like to know how small my content gets when i use ob_gzhandler. so far i tried $cont=ob_get_contents(); $length=strlen($cont); echo !-- $length --\n; but it outputs !-- 17280 -- while apache says in its logfile: 217.81.41.121 - - [29/Jun/2001:12:43:59 +0200] GET / HTTP/1.1 200 2028 [WILD GUESS ALERT!] I'm guessing the gzip part happens in place as the data is being streamed to the browser, not before you call ob_get_contents. If so, you now have one data point. Your 17280-character string gets turned into 2028 (?) bytes??? To see if this is maybe a correct thesis, snag the HTML output, and run gzip on it, and see if it's 17,280 bytes before and 2028 after. So maybe there's no real way to know what the compressed size is... Unless you want to try to match up your log file entries with your ob_get_contents measurement above. Does gz-handler not provide any facility for measuring its performance or anything?... You'd think it would... -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.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] $REMOTE_ADDR subnet consistency?
BUT I WAS WONDERING, and now here comes my question, do the first two subnets of an IP address (i.e. 204.57.x.x) typically stay the same, so that they could be relied upon for general authenticity? In practice, I would say yes. However, theoretically, AOL may suddenly use switch your connection to use a proxy on the other side of the country on a completely different B class if their proxy gets congested. And if they can do that within a country (I'm almost sure they do, or can now), they can do it around the world :) So in practice yes, in theory and perhaps in practice no. Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Convert
Have you some program for convert Microsoft Access Database (*.mdb) to the MySQL database ? http://www.google.com/ Type in "convert database access mysql". Press "I'm feeling lucky". You'd find the answers a lot faster than asking on a mailing list for PHP. Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Compiling PHP with IMAP
Hiall, I am compiling php4.0.5 with imap support as a DSO for APache. with ./configure --with-apxs. --with-imap And I got an error saying rfc822.h missing. So I downloaded the latest Imap Beta 2001 tilldate And cp'd the c-client to /usr/include And after compiling the imapd and ipop3d I cp'd the imapd and ipopd to /usr/sbin and activated them thru inetd.conf (I'm on RH6.2) Now configure --with-imap is giving a different error like this cannot find imap Library, Check your imap installation But the imap server is working fine. Any suggestions ? /Chandu __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Parse error: Needs T_VARIABLE or $
This is really weird. Very, very, very weird. I have the following code in a script: if (!empty(trim($rowData[3]))) { $tdStr.= trim($rowData[3]); } Now, when I run it, I get the following error: Parse error: parse error, expecting `T_VARIABLE' or `'$'' in c:\server\wwwroot\contributors.php on line 70 (note: line 70 is the first liine of the code snippet above) Now, this shouldn't be a problem. There is no problem with the parens, and I don't see anything wrong with the code. Can someone help me out with this? This is happening in another script (when I use the empty() function) and it is really weird... --Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Mail()'s not playing nicely :(
Instead of \n try \r\n Robin Jamie Thompson wrote: ok so i got mail([EMAIL PROTECTED], $message, sms alert, Return-Path: $email $email\nFrom: $email $email\nReply-To: $email $email\nX-Mailer: . phpversion()); the email appears as from [EMAIL PROTECTED] istead of [EMAIL PROTECTED] which it should (and always has done previousy) I looked at the headers and from reply-to and return path are all set ok but it sticks in another return path right at the top to [EMAIL PROTECTED] wtf is going on?/ -- PHP General Mailing List (http://www.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] Please Help......
I think that maybe when somebody subs to the list they get a info-email. mostly saying THIS IS PHP ONLY. Not a clueless linux newbie list. that's why they have LUGS. Do any of you agree with me? I think that its neededbasically saying - look at the manual first..then ask on the list.or your post will be ignored. what about a php-experts mailing list. a list for people that have php running know php but just need collaboration from their peers? If the list maintainer is unwilling to set such a list up, I can set one up on one of USAExpress.net Servers ~kurth -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Automatic backup application
Hello. I was wondering if there was a free app that will: a) Backup my entire Mysql Database (via a dump, I guess). b) Backup the entire directory where my pages are, preferrably to a different location (say a remote server by FTP or Mail). Thanks in advance. -- Ivan R. Quintero E.* (507)228-3477 Aptdo 1263 * (507)228-9105 Balboa, Ancon * 612-1103 Republic of Panama * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Convert
Roman [EMAIL PROTECTED] wrote: Have you some program for convert Microsoft Access Database (*.mdb) to the MySQL database ? take a look at mysqlfront, mysqlfront.de, which can import data from ODBC-datasources. you can also convert your db to csv files and import it to mysql that way. -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
AW: [PHP] Stopping stolen / spoofed / linked sessions
Sebastian Stadtlich said: there is an option in php ini : session.referer_check = which should fit your needs not sure how to use it, but probably one of the php-developers on this list can assist... I looked at this thing and can't figure out that it does very much. If someone makes a web page that contains a link to my site that contains the PHPSESSID=... then that session id will be invalid. However, if they just type the same string into their browser by hand, it is accepted? It seems that there is no stopping session spoofing if using the URL method. The only work around is to expire sessions quickly or to require that cookies be used? -- Bill Rausch, Software Development, Unix, Mac, Windows Numerical Applications, Inc. 509-943-0861 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Parse error: Needs T_VARIABLE or $
You are trying to add the output of a function call, called twice, BTW, to a string, apparantly. You don't saw what $tdStr is, really, in the scope. Jason Lustig wrote: This is really weird. Very, very, very weird. I have the following code in a script: if (!empty(trim($rowData[3]))) { $tdStr.= trim($rowData[3]); } Now, when I run it, I get the following error: Parse error: parse error, expecting `T_VARIABLE' or `'$'' in c:\server\wwwroot\contributors.php on line 70 (note: line 70 is the first liine of the code snippet above) Now, this shouldn't be a problem. There is no problem with the parens, and I don't see anything wrong with the code. Can someone help me out with this? This is happening in another script (when I use the empty() function) and it is really weird... --Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Justin Farnsworth Eye Integrated Communications 321 South Evans - Suite 203 Greenville, NC 27858 | Tel: (252) 353-0722 -- PHP General Mailing List (http://www.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] Stopping stolen / spoofed / linked sessions
I want to use PHP4 sessions for authentication, Ok, stop right there. Sessions and authentication have nothing to do with each other. To create a secure authenticated site you should be using HTTP-based authentication over SSL. Sessions are simply for maintaining state across http requests and have nothing to do with authentication. -Rasmus So setting a 'loggedin' session variable once a person has authenticated, and checking for that session variable each request before proceeding is not ok? jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] extracting h1 element for TOC
I have a directory with many small html files...which I'd like to return the text within the h1 tags for the purpose of creating a table of contents (TOC). I currently have a script which reads the directory, and returns all the files which I'd like to open. I'm a bit lost on how to write a loop which would open each file, and return the info within h1 tags. How could this best be accomplished? Thanks in advance. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] php / apache
Why would you want to do that? I don't think it's really possible... unless you do something wacky with Apache... --Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP ImageMagick
Did you try the escapeshellcmd () function ? - Russ --- Toolshed Computer Productions - Professional PHP Hosting Hosting - Dedicated Servers - Design - Programming http://www.toolshed51.com -Original Message- From: Jeffrey Barendse [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 28, 2001 8:01 AM To: [EMAIL PROTECTED] Subject: [PHP] PHP ImageMagick In PHP I try to run a shell command with the following source code: $fotonaam = 'convert -font arial -pointsize 20 -gravity center -fill white -draw text 5,5 VERKOCHT image.jpg image2.jpg'; exec($fotonaam); PHP runs the program but the -draw text 5,5 VERKOCHT is not executed (there is no VERKOCHT in the image2.jpg). I tried everything but I can't solve the problem. Could somebody explain to me how it's possible that the program (convert) runs but there (seams to be) a problem with -draw text 5,5 VERKOCHT. If I run the same command troughs telnet/ssh as root or nobody it works fine Is it something with the and the combinative with the exec function (I also tried \)? Or is it because I run PHP in safe mode and the convert program tries to run a external program what is not in the . path (you now, the basic safe mode restriction)? Please help me.. I'm getting despaired on this in. ;-) Regards, Jeffrey Barendse -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Parse error: Needs T_VARIABLE or $
Try this: $r = trim($rowData[3]); if ( !empty( $r ) ) { $tdStr.= trim($rowData[3]); } I tokk a look at the manual: 1. Note: empty() is a language construct. so: !empty is like to say !if or !while : so it's wrong- 2. Note that this is meaningless when used on anything which isn't a variable; i.e. empty (addslashes ($name)) has no meaning since it would be checking whether something which isn't a variable is a variable with a false value. - Original Message - From: Jason Lustig [EMAIL PROTECTED] To: Php-General@Lists. Php. Net [EMAIL PROTECTED] Sent: Friday, June 29, 2001 11:55 PM Subject: [PHP] Parse error: Needs T_VARIABLE or $ This is really weird. Very, very, very weird. I have the following code in a script: if (!empty(trim($rowData[3]))) { $tdStr.= trim($rowData[3]); } Now, when I run it, I get the following error: Parse error: parse error, expecting `T_VARIABLE' or `'$'' in c:\server\wwwroot\contributors.php on line 70 (note: line 70 is the first liine of the code snippet above) Now, this shouldn't be a problem. There is no problem with the parens, and I don't see anything wrong with the code. Can someone help me out with this? This is happening in another script (when I use the empty() function) and it is really weird... --Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] ENC: ADD a user in linux using PHP
http://expect.nist.gov/ http://expect.nist.gov/ --- Toolshed Computer Productions - Professional PHP Hosting Hosting - Dedicated Servers - Design - Programming http://www.toolshed51.com http://www.toolshed51.com -Original Message- From: Bruno Freire [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 28, 2001 9:24 AM To: '[EMAIL PROTECTED]' Subject: [PHP] ENC: ADD a user in linux using PHP BM__MailData-Mensagem original- De: Bruno Freire Enviada em: quinta-feira, 28 de junho de 2001 11:31 Para: '[EMAIL PROTECTED]' Cc: '[EMAIL PROTECTED]' Assunto:ADD a user in linux using PHP Hi! I'm Bruno, from brazil Somebody knows how to create a new user in LINUX (not http server) using PHP? Something like useradd and passwd Thanks, Bruno.
Re: [PHP] making e-mail link
On Fri, 29 Jun 2001 01:28, richard greene wrote: Bill I grabed this function from the www.php.net manual and it works great, it covers all your bases, except that it will show you http://www.something.com for http://www.something.com or www.something.com. If somone knows how to modify it so it would only show www.something.com when linked, that would be perfect. How about; function getAutoLink($text) { if( !ereg( http, $text ) ) { $text = ereg_replace(((www.)([a-zA-Z0-9@:%_.~#-\?]+[a-zA-Z0-9@:%_~#\?/])),A HREF=\http://\\1\; TARGET=\_blank\\\1/A, $text); return $text; } $text = ereg_replace(((ftp://|http://|https://){2})([a-zA-Z0-9@:%_.~#-\?]+[a-zA-Z0-9@:%_~#\?/]), http://\\3;, $text); $text = ereg_replaceftp://|http://|https://){1})[a-zA-Z0-9@:%_.~#-\?]+[a-zA-Z0-9@:%_~#\?/]), A HREF=\\\1\ TARGET=\_blank\\\1/A, $text); $text = ereg_replace(([_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}),A HREF=\mailto:\\1\;\\1/A, $text); return $text; } Excuse the wrapping butchery. Cheers, Brad -- Brad Hubbard Congo Systems 12 Northgate Drive, Thomastown, Victoria, Australia 3074 Email: [EMAIL PROTECTED] Ph: +61-3-94645981 Fax: +61-3-94645982 Mob: +61-419107559 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Help with custom session handler
I'm writing a custom session handler that saves sessions using Manuel Lemos' excellent Metabase library. The problem is, although I've got the session_set_save_handler function pointing to the correct start, end, read, write, destroy and garbage collection functions, when I call session_start and session_register, the write function does not get called (the only function that gets called is the read function.) I read on a post at PHPBuilder that the write function cannot output to the browser so just to make sure I logged my debug code to a global variable and it really is not getting called. I'd really appreciate any suggestions you might have -- it's got me stumped! Thanks, Aral :) __ ([EMAIL PROTECTED]) New Media Producer, Kismia, Inc. ([EMAIL PROTECTED]) Adj. Prof., American University ¯¯ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] closing window after submit
on 6/28/01 3:57 PM, Richard Kurth at [EMAIL PROTECTED] wrote: I have a form that is in a pop up window it has an image for a submit button how can I close the pop up after submitting. I know I can do it with javascript with a standard submit button. but how can I do it when I use an image for a submit button form method=post action=?echo $PHP_SELF;? input type=TEXT name=email size=30 maxlength=50 input type=image src=fm_sub.gif width=71 height=11 border=0 Best regards, Richard mailto:[EMAIL PROTECTED] Set a hidden variable within the form, then have PHP check the value when the page reloads. if the variable is set, have PHP add a JavaScript line to close the window immediately. !!! Note my syntax may be incorrect. htmlheadtitleTest pagetitle script language='Javascript' ?php // if we have been here before, my_hidden_var = 1, // output some JavaScript to close the window. if ( $HTTP_POST_VARS[my_hidden_var] == 1 ){print window.close();} ? /script /head body form method=post action=?echo $PHP_SELF;? input type=TEXT name=email size=30 maxlength=50 input type=image src=fm_sub.gif width=71 height=11 border=0 !--add a hidden variable to tell PHP we have been here before--- input type=hidden name=my_hidden_var value=1 I believe this will do what you want. If the form has been submitted then the value of my_hidden_var should cause PHP to insert the correct JavaScript to close the window. Is that what you are looking for? I think a cleaner solution would be to have PHP check the value of the my_hidden_var and redirect to a thank you page. This could be set to time out and close if you wanted, or offer a validation step as well. DAve -- Dave Goodrich Director of Interface Development Reality Based Learning Company 9521 NE Willows Road, Suite 100 Redmond, WA 98052 Toll Free 1-877-869-6603 ext. 237 Fax (425) 558-5655 [EMAIL PROTECTED] http://www.rblc.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Question on Commercial Offerings
Thomas Deliduka wrote: I don't know quite how to word that subject but here's what we want to do. We have a shopping cart softwre (like a million others out there) which based in windows NT with a COM+ object to guard the source code. We mainly offer this product to our hosting customers as an add-on solution to their hosting. Well, we want to migrate this to PHP/MySQL and I don't know how to protect the source code. My boss is suggesting to make a DSO but I really am not a C programmer to do all that. I want to make it all in PHP but somehow protect the code. Any ideas? http://www.zend.com/zend/products.php#encoder - James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Stopping stolen / spoofed / linked sessions
Hi Rasmus, nice to see you still watching over us on the lists. I feel like I've been ticked off by my dad though... :) Rasmus Lerdorf [EMAIL PROTECTED] said: I want to use PHP4 sessions for authentication, Ok, stop right there. Sessions and authentication have nothing to do with each other. To create a secure authenticated site you should be using HTTP-based authentication over SSL. Sessions are simply for maintaining state across http requests and have nothing to do with authentication. Ah, have a little more faith in one of your older users Rasmus. I'm not talking about the be-all and end-all of authentication here - if I was doing that, I would set up a PKI. I'm talking about regular authentication on websites, like thousands - tens of thousands - of sites use every day. Sites like Hotmail, Yahoo!, even Zend.com, which uses PHP sessions for tracking a users session after they been authenticated (which is really a follow-on type of authentication). It also uses the users IP address, which seems a bit icky for the reasons stated in my previous email, but maybe they've figured a way around the problem. What I'm asking is basically What's the best and easiest way to go about this? I have come up with a solution of sorts though, and I'd be interested in your opinion. I set up a user with a PHP session, and of course a timeout. If they have cookies turned on, I set another cookie with a hash of the username and password, or somthing else. But my final line of defense for users that don't have cookies is a URL and HTTP_REFERER comparison check. That is, on every request I log the URL requested as a session variable. On every subsequent request I compare the HTTP_REFERER with the logged URL, and if they match there's a pretty good chance it's not someone spoofing. Granted, it's not foolproof, but it'd be pretty hard to spoof, right? Anyway, I'd be interested in your opinion, and I'd also be interested in whether you're coming to Dublin for ApacheCon Europe? I hope to meet you there if you are. adam -- PHP General Mailing List (http://www.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] Stopping stolen / spoofed / linked sessions
I wasn't trying to be overly critical, I just worry that new users are reading these posts and see these insecure solutions to this problem and don't realize that they are inherently insecure. What I'm asking is basically What's the best and easiest way to go about this? I have come up with a solution of sorts though, and I'd be interested in your opinion. I set up a user with a PHP session, and of course a timeout. If they have cookies turned on, I set another cookie with a hash of the username and password, or somthing else. But my final line of defense for users that don't have cookies is a URL and HTTP_REFERER comparison check. That is, on every request I log the URL requested as a session variable. On every subsequent request I compare the HTTP_REFERER with the logged URL, and if they match there's a pretty good chance it's not someone spoofing. Granted, it's not foolproof, but it'd be pretty hard to spoof, right? Well, pretty hard to spoof is very relative. It is basically security through obscurity. From the description you just provided it is trivial to spoof it. Remember that the HTTP_REFERER comes from the client and can very easily be spoofed. -Rasmus -- PHP General Mailing List (http://www.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] Stopping stolen / spoofed / linked sessions
Hi Richard, Richard Lynch [EMAIL PROTECTED] said: I want to use PHP4 sessions for authentication, but I'm having difficulty If it's as important as all that, go with SSL. Ah, I'll be using SSL for the original authentication anyway. But the users will be browsing using regular HTTP, which means I need a session to *keep* them authenticated. I could use HTTP-AUTH of course, but I don't particularly want to - some users don't seem to be able to understand it (I kid you not). Otherwise, live with the risk and just use HTTP Basic Authentication, perhaps via PHP sending the headers. See above. Unsolicited (and only slightly related) Tip: I recently figured out that RaQ servers I am on a RaQ(4) right now, gods love me, but this is an across the board thing. I'm developing this for my customers use, but I'll be releasing it as open source later. So it needs to be as compatible as possible, and cater for all possible eventualities - including users who don't use cookies and don't understand HTTP-AUTH. It's a wee bit ironic you mentioned it too, because I'll be using it to create a server management interface, so I can dump the RaQ altogether. They're great little machines, but they're about as secure as my tummy after 10 pints of Heineken. (Too graphic? :) have some funky-ass httpd.conf settings already in them Very funky actually. They use Perl Sections (mod_perl) to configure the SSL VirtualHosts on the fly when httpd is started. I'm experimenting with it meself at the moment, but I'm going to use PHP instead of Perl, because mod_perl makes for very fat httpd processes, which is pretty annoying when you don't even use it on the server. Unfortunately, PHP can't be embedded in httpd.conf (add that to the wish list lads), so I'm building a custom apachectl to read configuration data from a MySQL database and build a httpd.conf, and then start Apache with that confid file. It's really quite cool, even if I do say so myself. :) doing HTTP Basic Authentication already, so trying to do HTTP Basic Authentication via .htaccess just plain won't work. (Or, rather, it will only work for users already defined in their goofy interface...) Kind of, but not really. Actually a RaQ has two httpd's running, one listening on ports 80 and 443, and one listening on 81. The regular httpd uses mod_rewrite to listen for requests for secured areas (/admin, /siteadmin, /personal and /stats on boxes that use Webalizer), and redirects to the port 81 server, which then authenticates using the users and groups defined on the machine. So you can use HTTP-AUTH as normal on the regular httpd, as long you define your AuthUserFile/AuthGroupFile's correctly, and the HTTP-AUTH protected areas don't clash with the RaQ secured areas. The server is configured with 'AllowOverride none' by default though, but you just need to change it to 'AuthConfig' to fix that. PHP sending the headers, however, works just fine and dandy. :-) Yip. I have decided I don't really like RaQ servers. They don't totally suck, especially if you're in a hurry, but if you can do it a little later and way better, don't go RaQ. YMMV. Well, it the same old problem, isn't it? Convenience V security. The RaQ's are *very* convenient for a small but reasonably busy webdev/hosting company that doesn't have their own interface. When it comes to security though, it's not the best solution in the world by any manner of means. But if we were to be 100% secure all the time, everyone would use SSH and SC. If only life were that simple... :) Like I said above though, I'll be losing the RaQ as soon as I get the chance. I'd prefer to write and use my own code, I'd prefer to take the responsibility myself. And I'd just like to point out that I'm on this box now for conveniences sake, because it's closer to home than my prefered box (Red Hat, sorry :). Anyway, thanks Richard, adam -- PHP General Mailing List (http://www.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] Stopping stolen / spoofed / linked sessions
Depends on what you want to do, first you have to define what are valid sessions, So think of things like this - One Session can only come from one IP address - A session ID that was created n minutes ago is no longer valid - A user using Netscape x can't be using IExplorer y After a user connects to you with a session ID you could check all those things yourself in your PHP script and respond appropriately. In this case, store the session in a Database with the remote IP address, expire the Session and check the referer. That should block a lot of script kiddies but of course slows down the site. Also, it's not that hard to create cookies by hand so that won't stop people who realy want to enter your site :-( and remember sessions are not meant to be secure, that is why we have SSL :-) Robert Klinkenberg -Oorspronkelijk bericht- Van: Bill Rausch [SMTP:[EMAIL PROTECTED]] Verzonden:Saturday, June 30, 2001 12:43 AM Aan: [EMAIL PROTECTED] Onderwerp:AW: [PHP] Stopping stolen / spoofed / linked sessions Sebastian Stadtlich said: there is an option in php ini : session.referer_check = which should fit your needs not sure how to use it, but probably one of the php-developers on this list can assist... I looked at this thing and can't figure out that it does very much. If someone makes a web page that contains a link to my site that contains the PHPSESSID=... then that session id will be invalid. However, if they just type the same string into their browser by hand, it is accepted? It seems that there is no stopping session spoofing if using the URL method. The only work around is to expire sessions quickly or to require that cookies be used? -- PHP General Mailing List (http://www.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] Stopping stolen / spoofed / linked sessions
Hi again Rasmus, thanks for your reply. Rasmus Lerdorf [EMAIL PROTECTED] said: I wasn't trying to be overly critical, I just worry that new users are reading these posts and see these insecure solutions to this problem and don't realize that they are inherently insecure. I understand Rasmus, and don't worry, I wasn't being overly-sensitive. However as I said, I'm not looking for the ultimate authentication solution here, I'm looking for the best I can possibly do - without making it too awkward - in a forms- and sessions- based situation. What I have difficulty with is understanding how the thousands of websites I mentioned manage it without being overly concerned about security. Or is that the problem - they're not concerned enough, and we should all be using PKI's? For regular websites though, I think that might be overkill, especially when a huge majority of people don't understand even the fundamentals of security and encryption. (I tried to explain it to my Dad last night, it was painful but productive. :) Well, pretty hard to spoof is very relative. It is basically security through obscurity. From the description you just provided it is trivial to spoof it. Remember that the HTTP_REFERER comes from the client and can very easily be spoofed. I know security through obscurity is a bad thing (or at least it's *seen* as a bad thing. I don't necessarily subscribe to it being inherently bad, just something that should be used with care) but in this case I have to clench my teeth, put my hands over my head and say I think you're missing my point, or that you're not following me fully. I realise that the HTTP_REFERER can be spoofed - quite easily in fact, I could spoof it myself in a few lines of PHP code - but the chances of Eve guessing the right HTTP_REFERER to send are pretty remote, don't you think? Unless they're standing behind Alice and looking over her shoulder - in which case Alice's security is compromised anyway - Eve isn't going to know which page Alice last visited. So the only way Eve could take over Alice's session is to visit every page on the site using Alice's session ID. And if Alice is still browsing the site, it makes it even harder, because Alice will be moving the target around. Yes, it's security through obscurity, but isn't is so obscure that It Just Might Work? Please, I'm not saying your wrong here, I'm genuinely interested in your opinion. If you think I'm wrong, tell me, I'd prefer to know. And if you have a better solution for the problem I'm facing, I'd love to hear about it. I just have a blank wall in front of me and I can't find my sledge. :) adam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] setting up / configuring mail()
hey does anyone know any good resource sites or documents about configuring the mail services for php so it works? Thanks, James Cox. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . James Cox :: Creative Director :: AWP imaJes t: +44 (0)7968 349990 | f: +44 (0)1992 300939 e: [EMAIL PROTECTED] w: http://www.awpimajes.com/ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
[PHP] ½Ãµð ÆË´Ï´Ù
¿©·¯ºÐ¿¡°Ô °¡Àå ÇÊ¿äÇÏ°í À¯ÀÍÇÑ ÄÄÇ»ÅÍ °ü·ÃÇÁ·Î±×·¥À» ÆÄ°ÝÀûÀ¸·Î ½Ñ °¡°Ý¿¡ °ø±ÞÇÕ´Ï´Ù ÃֽŰÔÀÓ. À¯Æ¿°ü·ÃÇÁ·Î±×·¥. MP3. ºñµð¿À½Ãµð µîµî ¸ðµç ÇÁ·Î±×·¥À» ÆǸÅÇÕ´Ï´Ù. 6¿ù ÃֽŸ®½ºÆ®ÀÔ´Ï´Ù ¹°·Ð ½Å¿ë °ÆÁ¤À» ÀüÇô ½Å°æ¾²Áö ¸¶½Ê½Ã¿ä ÀÌ ¸ÞÀÏÀ» º¸³½ ¾ÆÀ̵ð·Î´Â ¿¬¶ôÀÌ µÇÁö ¾Ê½À´Ï´Ù. ¾ÐÃàÈÀϼӿ¡ ¿¬¶ôó°¡ ÀÖ½À´Ï´Ù(¸ÞÀÏ.ÀüȹøÈ£) === Ưº° º¸³Ê½º ½Ãµð¸¦ ÁõÁ¤ÇÕ´Ï´Ù === È®½ÇÇÏ°Ô ÈÞ´ëÆùÀ¸·Î ¿¬¶ôÁÖ½Ê½Ã¿ä °¨»çÇÕ´Ï´Ù ³¡À¸·Î Çã¶ô¾øÀÌ ¸ÞÀÏÀ» µå¸°°ÍÀ» »ç°úµå¸³´Ï´Ù.±×¸®°í ¿©·¯ºÐÀÇ ¸ÞÀÏÁÖ¼Ò´Â ¹«ÀÛÀ§·Î ¸ð¾ÆÁø°ÍÀÌ´Ï ´Ù¸¥ °ÆÁ¤Àº ÇÏÁö ¾ÊÀ¸¼Åµµ µË´Ï´Ù. ¹Ø¿¡ À̾îÁö´Â ±Û¿¡¼ ¸®½ºÆ®¸¦ ´Ù¿î¹ÞÀ¸½Ç¼ö ÀÖ½À´Ï´Ù ¹Ø¿¡ ±ÛÀÌ º¸ÀÌÁö ¾ÊÀ¸½Ã¸é ÷ºÎµÈ ÈÀÏ cdlist.htm À» ¿©½Ã°í ´Ù¿î¹ÞÀ¸½Ã¸é µË´Ï´Ù Next Entertainment, LYCOS Áñ°ÌÁö ¾ÊÀ¸¸é ÀÎÅͳÝÀÌ ¾Æ´Õ´Ï´Ù!! http://www.lycos.co.kr ÀÎÅÍ³Ý ¸¸ÈÀÇ ÃÖ°, ¶óÀÌÄÚ½º ¸¸È (http://comics.lycos.co.kr) ½±°í ºü¸¥ ¹®ÀÚ¸Þ¼¼Áö, ¶óÀÌÄÚ½º ¹«¼±¸ÞÀÏ (http://m-mail.lycos.co.kr) -- PHP General Mailing List (http://www.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] Capturing output of shell script.
On 29-Jun-01 Charles Williams wrote: Hello all, I have an .sh shell script being executed from a php4 call. I need to capture the string return and work with that in the php script. The only problem is that the call works but I cannot get the returned string. I've tried using exec, passthru, ``, system, and escapeshellcommand. Nothing seems to work. any ideas? $cmd='stuff.sh'; $p=popen($cmd, 'r'); if ($p) { while ($str=fgetss($p,1000)) { do_foo($str); } pclose($p); } else { echo Pphsst. bad command: $cmd BR; } Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Auto submit form
David wrote: How do I autoload a selection from a drop down menu form based on the selection without having to click a submit button? Everything to do with forms is either to do with hitting a submit button (call to a server) or without (which means that the browser/client is handling it), so anything you want to do (like auto-submits, dynamic pop-ups, etc etc) is done via the browser -- Javascript would be the obvious one. I Suggest looking at onChange and onBlur attributes of FORM elements for more info. As per usual, you'll probably be able to learn quite a bit by looking at the HTML/JavaScript source code of a page that already does it. It's not really PHP related, try to think of it as a HTML / browser / client side issue. Also, be aware that you shoudl still prolly include a submit button, so that people with stone age browsers, or worse still, javascript turned off, can still submit the form and use your site. I saw an e-commerce site once that ignored this basic little rule, thus preventing sales to those without javascript. I don't think any online store is doing well enough yet to start excluding customers :) Justin French Creative Director Indent.com.au -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] ImageCopy
I am creating an image on the fly based on newest entries in one my mySQL tables. In this created image I am trying to add a small one to it. Now I am TRYING to use the below code: $image = ImageCreate(500, 70); $bg = ImageColorAllocate($image, 255, 255, 255); $blue = ImageColorAllocate($image, 0, 0, 255); $black = ImageColorAllocate($image, 0, 0, 0); $himage= usr/hyrum/public_html/images/topics/hyrum.gif; ImageRectangle($image, 0, 0, 500, 70, $white); ImageString($image, 4, 0, 0, $text, $blue); ImageString($image, 3, 0, 20, $title1, $black); ImageString($image, 3, 0, 35, $title2, $black); ImageString($image, 3, 0, 50, $title3, $black); //ImageCopy($image, $himage, 400, 20, 1, 1, 60, 60) Imagepng($image, signature.png); ImageDestroy($image); Am I using ImageCopy incorrectly? It doesn't put anything in the new image. Jeff
[PHP] reading records alphebetically
Hi, I have a MySQL database set-up containing a few hundred records. I'm trying to make a script that reads the 'name' field of the records and displays only the records of which the name field begins with a specific letter: if ($letter = A) { display all records of which field 'name' beings with A } else if ($letter = B) { ... I'm just starting out on this, so please excuse my ignorance :) Jamie Saunders [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Telnet and PHP
I was doing some research on creating a webbased telnet client and I am unsatisfied with Java applets. I would like to create a server side telnet client, so the user side is only required to have a working web browser that supports HTML. Thus, I turned to PHP. I found one example, but it does not allow for active user input. While I will sit down this evening and work with the code, I was wondering if anyone had/knew of a good example of a PHP telnet client.
Re: [PHP] Pricing Advice Needed
Hi Brad! On Sat, 30 Jun 2001, Brad Hubbard wrote: On Fri, 29 Jun 2001 01:42, Thomas Deliduka wrote: I think in general it's about $100-$150/hour for programming/database work. Yankee dollars? Gawwd... I AM being exploited due to geographic disadvantage! to make you feel better, lemme tell you that after more than 3ys w/ PHP I earn somewhere arround 3 ( I mean 3!) $/h in Romania so let me tell you more about geographic disadvantages :) -- teodor -- PHP General Mailing List (http://www.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] reading records alphebetically
You can either select the letter you want through mysql with SELECT * FROM table WHERE name LIKE '$letter%' Or you can select everything: $result = mysql_query(SELECT * FROM table order by name); while ($row = mysql_fetch_array($result)) { extract($row); $first_letter = strtolower($name[0]); } lets say $name = Fred; then $name[0] is set to F; $name[1] is set to r; $name[2] is set toe; and so on... - Original Message - From: Jamie Saunders [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, June 30, 2001 9:29 AM Subject: [PHP] reading records alphebetically Hi, I have a MySQL database set-up containing a few hundred records. I'm trying to make a script that reads the 'name' field of the records and displays only the records of which the name field begins with a specific letter: if ($letter = A) { display all records of which field 'name' beings with A } else if ($letter = B) { ... I'm just starting out on this, so please excuse my ignorance :) Jamie Saunders [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Telnet and PHP
By active user input, I would assume that you mean every time the user makes a keystroke, the keystroke is sent to the host machine. This is not a characteristic of html which only sends information to the host machine when some form of submit is clicked. The advantage of the applet for this sort of thing is it runs on the browser client, and has the capability of sending every keystroke directly to the host, bypassing the server side. On the server side, once the (PHP) application is done sending the requested files to the web browser for one user, it moves on to handling the requests for other users. Can you imagine the load on a server if it had to reload your application every time, your user pressed a key. You never really made it clear where you expected this client to run, although PHP, at this point, can only run on the server. Now if you are looking for something that your PHP code could use to 1. signon to a host somewhere, 2. execute some commands, 3. capture and process the results and 4. disconnect before completing a single page to a web browser client (it will probably never do active user input, because of the nature of PHP and the web server), then I would suggest you consider rexec, rcp, rsh or if what you want is in a file on the host machine, you could use the ftp functions. These are not telnet, and do require special deamons running on the host machine, but may do the trick. I have been looking for your telnet client for a long time as well, and if you find one, please remember to post it here, but I would suspect that one of the problems in doing a telnet client in php is that the telnet client needs to be multi-threaded. Perhaps someone will someday take open source like Dave's Telnet and fashion an extension to PHP. Til then, try the options above, Warren Vail -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 30, 2001 10:36 AM To: [EMAIL PROTECTED] Subject: [PHP] Telnet and PHP I was doing some research on creating a webbased telnet client and I am unsatisfied with Java applets. I would like to create a server side telnet client, so the user side is only required to have a working web browser that supports HTML. Thus, I turned to PHP. I found one example, but it does not allow for active user input. While I will sit down this evening and work with the code, I was wondering if anyone had/knew of a good example of a PHP telnet client. -- PHP General Mailing List (http://www.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] Adding 1 to a whole number
On 30-Jun-01 Richard Kurth wrote: Way is this doing this Starting with 1000 all I what to do is increse this number by one the first time I run it it adds 1 to the number 10001 second time it 10001002 Shouldn't it just add 1 to the number 1000,1001,1002,1003 strings don't add well, give a hint to php to use integers: $data = fgets($fp2, 1000); $data1 = $data + 1; fwrite($fp2,$data1); echo $data1; Strings don't add nearly as well as numbers, give a hint to php to use integers; reset your file pointer. $data = 1 + $data; rewind($fp); fwrite($fp, $data); Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Telnet and PHP
Instead of performing a send for each stroke, the user code type in a whole string in a text box, and then submit that string. I have found this code at http://www.phpbuilder.com/mail/php-general/2001051/1479.php: ? error_reporting(-1); class Telnet { /* (c) [EMAIL PROTECTED] */ var $sock = NULL; function telnet($host,$port) { $this-sock = fsockopen($host,$port); socket_set_timeout($this-sock,2,0); } function close() { if ($this-sock) fclose($this-sock); $this-sock = NULL; } function write($buffer) { $buffer = str_replace(chr(255),chr(255).chr(255),$buffer); fwrite($this-sock,$buffer); } function getc() { return fgetc($this-sock); } function read_till($what) { $buf = ''; while (1) { $IAC = chr(255); $DONT = chr(254); $DO = chr(253); $WONT = chr(252); $WILL = chr(251); $theNULL = chr(0); $c = $this-getc(); if ($c === false) return $buf; if ($c == $theNULL) { continue; } if ($c == \021) { continue; } if ($c != $IAC) { $buf .= $c; if ($what == (substr($buf,strlen($buf)-strlen($what { return $buf; } else { continue; } } $c = $this-getc(); if ($c == $IAC) { $buf .= $c; } else if (($c == $DO) || ($c == $DONT)) { $opt = $this-getc(); // echo we wont .ord($opt).\n; fwrite($this-sock,$IAC.$WONT.$opt); } elseif (($c == $WILL) || ($c == $WONT)) { $opt = $this-getc(); // echo we dont .ord($opt).\n; fwrite($this-sock,$IAC.$DONT.$opt); } else { // echo where are we? c=.ord($c).\n; } } } } $tn = new telnet(192.168.255.100,23); echo $tn-read_till(ogin: ); $tn-write(admin\r\n); echo $tn-read_till(word: ); $tn-write(thieso\r\n); echo $tn-read_till(: ); $tn-write(ps\r\n); echo $tn-read_till(: ); echo $tn-close(); ? - Original Message - From: Warren Vail [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, June 30, 2001 2:01 PM Subject: RE: [PHP] Telnet and PHP By active user input, I would assume that you mean every time the user makes a keystroke, the keystroke is sent to the host machine. This is not a characteristic of html which only sends information to the host machine when some form of submit is clicked. The advantage of the applet for this sort of thing is it runs on the browser client, and has the capability of sending every keystroke directly to the host, bypassing the server side. On the server side, once the (PHP) application is done sending the requested files to the web browser for one user, it moves on to handling the requests for other users. Can you imagine the load on a server if it had to reload your application every time, your user pressed a key. You never really made it clear where you expected this client to run, although PHP, at this point, can only run on the server. Now if you are looking for something that your PHP code could use to 1. signon to a host somewhere, 2. execute some commands, 3. capture and process the results and 4. disconnect before completing a single page to a web browser client (it will probably never do active user input, because of the nature of PHP and the web server), then I would suggest you consider rexec, rcp, rsh or if what you want is in a file on the host machine, you could use the ftp functions. These are not telnet, and do require special deamons running on the host machine, but may do the trick. I have been looking for your telnet client for a long time as well, and if you find one, please remember to post it here, but I would suspect that one of the problems in doing a telnet client in php is that the telnet client needs to be multi-threaded. Perhaps someone will someday take open source like Dave's Telnet and fashion an extension to PHP. Til then, try the options above, Warren Vail -Original Message- From: [EMAIL PROTECTED]
Re: [PHP] Urgent Help: Problem with apache+php
Hi Imran! On Sat, 30 Jun 2001, Imran Hussain wrote: hi Iam running Freebsd4.3 i hv installed apache-1.3.20,php4.0.5 and postgres-6.5.3. there was no problem with the configuration of all the above packages, My problem is when i start apache it gives me this error. hub#/usr/local/apache/bin/apachectl start Syntax error on line 205 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/libexec/libphp4.so into server: /usr/local/apache/libexec/libphp4.so: Undefined symbol PQoidValue /usr/local/apache/bin/apachectl start: httpd could not be started hub# before this it was saying libphp4.so not found then i had to do ldconfig with the path to the lib dir then it gave me this errorcan anyone help me on this issue. as root: ldconfig -m /path/to/postgres/libs/dir/ e.g.: ldconfig -m /usr/local/pgsql/lib -- teodor -- PHP General Mailing List (http://www.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] reading records alphebetically
If you are planning to have a lot of records, you may want to create a column with just that letter and index it, followed by the full name. SELECT name from Table WHERE first_letter = $letter ORDER by name should produce pretty fast results if first_letter, name is indexed. Warren Vail -Original Message- From: Jamie Saunders [mailto:[EMAIL PROTECTED]] Sent: Saturday, June 30, 2001 10:30 AM To: [EMAIL PROTECTED] Subject: [PHP] reading records alphebetically Hi, I have a MySQL database set-up containing a few hundred records. I'm trying to make a script that reads the 'name' field of the records and displays only the records of which the name field begins with a specific letter: if ($letter = A) { display all records of which field 'name' beings with A } else if ($letter = B) { ... I'm just starting out on this, so please excuse my ignorance :) Jamie Saunders [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] reading records alphebetically
Try using a query like select * from table_name where name like '$letter%'; Julia Quoting Jamie Saunders ([EMAIL PROTECTED]): Hi, I have a MySQL database set-up containing a few hundred records. I'm trying to make a script that reads the 'name' field of the records and displays only the records of which the name field begins with a specific letter: if ($letter = A) { display all records of which field 'name' beings with A } else if ($letter = B) { ... I'm just starting out on this, so please excuse my ignorance :) Jamie Saunders [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- [ Julia Anne Case ] [Ships are safe inside the harbor, ] [Programmer at large] [ but is that what ships are really for.] [ Admining Linux ] [ To thine own self be true. ] [ Windows/WindowsNT ] [ Fair is where you take your cows to be judged. ] PGP signature
Re: [PHP] Auto submit form, How?
Fates [EMAIL PROTECTED] wrote: How do I auto load or auto submit a form on the same page? I don't want to have to press the submit button instead just click on a value in the drop down form and it loads (I am lazy). use javascript, to find you answer look here http://www.developer.irt.org/script/script.htm -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] reading records alphebetically
Since you only have a few records, creating a second index with the first letter doesn't apply to you, but is a good idea in a huge db scheme. The simplest fastest way is to take the suggestions a few people made which is SELECT * FROM table WHERE name LIKE '$letter%' I would not suggest this $result = mysql_query(SELECT * FROM table order by name); while ($row = mysql_fetch_array($result)) { extract($row); $first_letter = strtolower($name[0]); } NOT that it won't work, but you should consider CPU in your design, and you don't want to make the computer go through all the records sequentially to display the valid records. This would take a lot longer to deliver the results in a large file, and would consume more resources... Jack Ethan Schroeder wrote: You can either select the letter you want through mysql with SELECT * FROM table WHERE name LIKE '$letter%' Or you can select everything: $result = mysql_query(SELECT * FROM table order by name); while ($row = mysql_fetch_array($result)) { extract($row); $first_letter = strtolower($name[0]); } lets say $name = Fred; then $name[0] is set to F; $name[1] is set to r; $name[2] is set toe; and so on... - Original Message - From: Jamie Saunders [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, June 30, 2001 9:29 AM Subject: [PHP] reading records alphebetically Hi, I have a MySQL database set-up containing a few hundred records. I'm trying to make a script that reads the 'name' field of the records and displays only the records of which the name field begins with a specific letter: if ($letter = A) { display all records of which field 'name' beings with A } else if ($letter = B) { ... I'm just starting out on this, so please excuse my ignorance :) Jamie Saunders [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- ___ Jack Sasportas Innovative Internet Solutions Phone 305.665.2500 Fax 305.665.2551 www.innovativeinternet.com www.web56.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: Regular Expression help
On Fri, 29 Jun 2001 23:43, Clayton Dukes wrote: Okay, here's what I have so far: ---snip--- if ((!$email) || ($email==) || (!eregi(^[_\.0-9a-z-]+@domain.+[a-z],$email)) ) $stop = center._ERRORINVEMAIL./centerbr; ---snip--- This works, but how can I add a second domain? How 'bout; ---snip--- if ((!$email) || ($email==) || (!eregi(^[_\.0-9a-z-]+@domain|otherdomain.+[a-z],$email) ) $stop = center._ERRORINVEMAIL./centerbr; ---snip--- Cheers, Brad -- Brad Hubbard Congo Systems 12 Northgate Drive, Thomastown, Victoria, Australia 3074 Email: [EMAIL PROTECTED] Ph: +61-3-94645981 Fax: +61-3-94645982 Mob: +61-419107559 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]