Re: [PHP] ssh
Tyrone Mills pressed the little lettered thingies in this order... How about using something like puTTY or SecureCRT? Just a side note. I also like SecureCRT, but it isn't free (which was the original request) unless you install an alternative license. It's worth the $99 to me, but the requestor was looking for free. I use puTTY to connect Windoze boxes to my linux servers all the time, it works great and actually passes the function keys to remote server instead of interpreting them itself. puTTY's the best freebie I've seen. With the recent release of the SSH2 patents, I wouldn't be surprised to see some REALLY good SSH clients in the freeware community soon. Have fun... Christopher Ostmo a.k.a. [EMAIL PROTECTED] AppIdeas.com For a good time, http://www.AppIdeas.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] ssh
On Mon, 14 May 2001 23:29:03 -0800, Christopher Ostmo ([EMAIL PROTECTED]) wrote: Tyrone Mills pressed the little lettered thingies in this order... How about using something like puTTY or SecureCRT? Just a side note. I also like SecureCRT, but it isn't free (which was the original request) unless you install an alternative license. It's worth the $99 to me, but the requestor was looking for free. I like just regular ssh under cygwin, which are both free, its especially nice on NT and win2000 where you can get a full size command prompt window -- PHP General Mailing List (http://www.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] Extensions for PHP
Hi, does anybody know which extension I need to connect to a MSSQL DB, and wher I could get it? go to www.php4win.de they offer a .exe with lots of extensions. hope it helps Johannes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] What's more effecient: var on every page or simple function?
I'd say the first one, but if you'd use $myvar as a constant only, try this: define(MYVAR,3); Might be even more efficient ;-) btw. You can call this value like this: echo MYVAR; Zef Noah Spitzer-Williams [EMAIL PROTECTED] schreef in berichtnieuws 9dpjiu$5nu$[EMAIL PROTECTED] Which of the two is more efficient: # start of file.php $myvar = 3; # end file.php #start of file.php function myvar() { return 3; } #end file.php the difference between the two is the first example would set the variable on every page regardless of whether it was used whereas with the function obviously it would be used only if it were called. what's better? (myvar is a constant #) - Noah -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] output of file contents while reading
On Tue, 15 May 2001 10:38, Maree Talbot wrote: Is it possible in PHP, to open a remote file with fopen() and begin sending the contents of the file to the client before the entire file has been read from the remote source? If so, how? I've been unable to get it to work so far, probably because I don't understand the nitty gritty of file handles. Thanks Not so much a problem with the file, rather the way the webserver handles output. Try using flush() to force data to be sent to the client. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Figures won't lie, but liars will figure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] php propaganda request
Greetings PHP friends, I'm compiling a list of PHP related propaganda, please send any that you know of. Positive, Negative, Neutral ... all is welcome! ;-) Thus far : Stats : - * http://www.netcraft.com/survey/ * http://www.php.net/usage.php * http://www.securityspace.com/s_survey/data/man.200103/apachemods.html About PHP : - * http://conf.php.net/ * http://www.php.net/manual/en/introduction.php (intro/whatcando/history) * http://www.zend.com/zend/aboutphp.php Reviews, Comparisons and Discussions: - * http://www.infoworld.com/articles/op/xml/99/06/21/990621oppetreley.xml * http://www.intranetjournal.com/articles/25/php_05_30_00a.html * http://www.intranetjournal.com/articles/26/php_06_20_00a.html * http://www.intranetjournal.com/articles/28/php_08_30_00a.html * http://lw.itworld.com/linuxworld/lw-2001-01/lw-01-php.html * http://www.linuxplanet.com/linuxplanet/reviews/1891/1/ * http://www.linuxpower.com/display.php?id=149 * http://hotwired.lycos.com/webmonkey/radio/php.html * http://www.networkcomputing.com/1020/1020f1.html * http://www.slashdot.org/askslashdot/99/09/22/1157210.shtml * http://www.slashdot.org/developers/01/04/21/1432206.shtml * http://www.slashdot.org/apache/00/05/22/1858206_F.shtml (sorta but interesting) * http://www.techweb.com/se/directlink.cgi?NWC19991101S0014 * http://www.webdevelopersjournal.com/articles/php.html * http://www.webdevelopersjournal.com/articles/why_php.html * http://php.weblogs.com/php_asp_7_reasons/ * http://php.weblogs.com/php_vs_cold_fusion/ * http://php.weblogs.com/php_versus_perl/ * http://php.weblogs.com/popularity/ * http://www.webreview.com/1999/07_09/developers/07_09_99_1.shtml * http://www.webreview.com/2000/01_21/developers/01_21_00_2.shtml * http://www.zdnet.com/pcmag/stories/reviews/0,6755,2713481,00.html * http://www.zdnet.com/enterprise/stories/main/0,10228,2646051,00.html * http://www.zdnet.com/enterprise/stories/linux/0,12249,2646052,00.html * http://www.zend.com/zend/art/enterprise.php * http://www.zend.com/zend/art/under-php4-hood.php * http://www.devshed.com/Server_Side/Zend/Interview/ * http://www.computerweekly.com/cwarchive/gwfeat/19991209/cwcontainer.asp?name=F1.html * http://www-106.ibm.com/developerworks/web/library/wa-sssl.html?t=gr,p=PHP-Perl-JSP Some/most reviews are outdated, don't mind that. Know of other places that belong in the above categories or related? ... please share! regards, Philip -- PHP General Mailing List (http://www.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] Needing help hear
I am trying to pull all the e-mail out of the database and put them in a format like this [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED] this is what I have now but I don't seam to be going in the right direction. Could somebody give me a hint $sql = SELECT email FROM customers; $result = mysql_query($sql); $num_rows = mysql_num_rows($result); while ($myrow = mysql_fetch_array($result)){ $recipient=$myrow[email] . ,; } 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] finding a variables name
Hello. you can try passing the name of the variable? i.e.: function makeJSArray($array_name) { global $$array_name $array = $$array_name; ... ... } otherwise, I don't think you can logically access the name. Consider this: $a=array(...); $b = a; makeJSArray( $b ); What name will you get, 'a' or 'b' ? Regards, Eetay -Original Message- From: Joseph Blythe [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 15, 2001 6:45 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] finding a variables name Joseph Blythe wrote: Ok here is what I am trying to acheive, basically turning a php array into a javascript array, note this is untested and most likley won't work :-) Where $array_name I need the same name as the functions first and only argument $array, so I need the name of the array that has been passed to the function. /// function makeJSArray($array) { $out = $array_name = new Array(; $size = sizeof($array); $i = 0; while ( list($key, $val) = each($array) ) { $out .= $array_name[$key] = $val; if ($size != $i - 1) $out .= ,; } $out .= );; return $out; } / Thanks, Joseph He he, would also help if I closed my while loop and added the increment for $i -- PHP General Mailing List (http://www.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] assign values to variables, all taken from txt file
Hello, I am trying to get values assigned to variables, by taking these data from a textfile. my txt file looks like that: variable1 // value1 variable2 // value2 etc... The point here is that I want to be able to get BOTH the variable name and its corresponding value.. I tried things like: --//--- $configuration_data = file(conf/configuration.txt); for($index=0; $index count($configuration_data); $index++) { $line = explode(//,$configuration_data[$index]); $value = $line[0]; $variable = $line[1]; $\$variable = $value; } --// So it's that $\$variable = $value; which is wrong and now I don't have any inspiration anymore... Could somebody help me plase?! thanks, -Alain- -- PHP General Mailing List (http://www.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] Needing help hear
Hi Richard, Richard I am trying to pull all the e-mail out of the database and put them Richard in a format like this [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED] Richard this is what I have now but I don't seam to be going in the right Richard direction. Could somebody give me a hint Richard $sql = SELECT email FROM customers; Richard $result = mysql_query($sql); Richard $num_rows = mysql_num_rows($result); Richard while ($myrow = mysql_fetch_array($result)){ Richard $recipient=$myrow[email] . ,; Richard } This way you'll only get the last recipient. Try: $recipient .= $myrow[email] . ,; --- EnjoY, Adaran ([EMAIL PROTECTED]) check http://www.adaran.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] Needing help hear
Hi Richard, I *always* get this word wrong, but here goes You need to concantenate (grimace), which means (simply) add to to the variable, using .= Modify your code slightly: ? $recipient = ; $result = @mysql_query($sql); $num_rows = mysql_num_rows($result); while($myrow = mysql_fetch_array($result)) { $email = $myrow['email']; $recipient .= $email . ,; } ? Notice the .= before $recipient = $email ? Also why, is the $num_rows in there? It's not being used for anything. If you might have blank emails in there, you could make good use of the num rows. ? $recipient = ; $result = @mysql_query($sql); $num_rows = mysql_num_rows($result); $x = 0; while($myrow = mysql_fetch_array($result)) { $email = $myrow['email']; if (isset($email)) { $recipient .= $email . ,; $x++; } } echo Email sent to . $x . number of people, out of . $num_rows . residing in the database.; ? Hope that helps, James. Richard Kurth [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am trying to pull all the e-mail out of the database and put them in a format like this [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED] this is what I have now but I don't seam to be going in the right direction. Could somebody give me a hint $sql = SELECT email FROM customers; $result = mysql_query($sql); $num_rows = mysql_num_rows($result); while ($myrow = mysql_fetch_array($result)){ $recipient=$myrow[email] . ,; } 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]
[PHP] Pushing to Multidimensional Arrays.
How do i do this? I have tried using the array_push function without sucess and when i try this : $stack[]['id'] = $menuArray[$rowID]['id']; $stack[]['parentId'] = $menuArray[$rowID]['parentId']; $stack[]['name'] = $menuArray[$rowID]['name'];A obviously the array's internal pointer will increment and it will write to the next element. I suppose i could use prev() (could I?) but surely there has to be a better way ;) Thanks. Nick. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] RE: Macbinary? How to deal with it?
Hello Jason. I had similar problems on windows. I found out that somewhere in my script there was a fopen() and a consequent file read, which behaves different on Unix than on windows when used on binary files. I could solve this by using the b-switch with fopen(), forcing binary file (see docs for precise use). It has no effect on Unix. Hope this helps, Marcel. --- Marcel Dormanns, system manager Kossuth Zsuzsanna Technical and Grammar School 6800 Hodmezovasarhely, Kaszap u 29, Hungary Tel(work) +36-62-241811 Fax(work) +36-62-244884 SMS: [EMAIL PROTECTED] -Eredeti zenet- Felad: Jason Lam [mailto:[EMAIL PROTECTED]] Kldve: Tuesday, May 15, 2001 01:15 Cmzett: [EMAIL PROTECTED] Trgy: Macbinary? How to deal with it? I am having a lot of trouble with letting user upload files and download again (target group - mac user). I tried with many application files that does not work (executable in PC terms). Everytime I upload this kind of files, it will become corrupted, the content type of the upload is application/x-macbinary. Is this the right type? I have tried to make some self extracting file with stuffit (MacOS format, filename.sea) then upload it. FTPing it back down, the file is already corrupted, however just normal FTP won't corrupt the file, I am assuming something has to do with handle of the uploaded file. Can anyone provide some hints as to how to properly handle these mac files? Jason Lam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Install Prob PHP4
Hi, i try to install PHP4 under Suse Linux 7.1 When i use the configure command i get the following error message: checking lex output file root... ./configure: lex: command not found configure: error: cannot find output from lex; giving up this is the command i used: ./configure --enable-track-vars --with-mysql=/usr/local/mysql --with-apxs=/usr/local/apache/bin/apxs thx !!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] RE: Needing help hear
I think you want $recipient .= $myrow[email] . ,; although that does leave a comma at the end. You can just knock the last character off the end or , more elegantly, $recipient = array(); while ($myrow = mysql_fetch_array($result)) $recipient[] = $myrow[email]; $recipient_list = implode(,, $recipient); 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: Richard Kurth [mailto:[EMAIL PROTECTED]] Sent: 15 May 2001 09:16 To: [EMAIL PROTECTED] Subject: Needing help hear I am trying to pull all the e-mail out of the database and put them in a format like this [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED] this is what I have now but I don't seam to be going in the right direction. Could somebody give me a hint $sql = SELECT email FROM customers; $result = mysql_query($sql); $num_rows = mysql_num_rows($result); while ($myrow = mysql_fetch_array($result)){ $recipient=$myrow[email] . ,; } 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] Needing help hear
sure it won't like that! patch the while{} body and make it look like: $recipient .= $myrow[email] . ,; but better initialize the $recipient to before the while loop and after the while loop do remove the last trailing , -elias http://www.eassoft.cjb.net Richard Kurth [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am trying to pull all the e-mail out of the database and put them in a format like this [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED] this is what I have now but I don't seam to be going in the right direction. Could somebody give me a hint $sql = SELECT email FROM customers; $result = mysql_query($sql); $num_rows = mysql_num_rows($result); while ($myrow = mysql_fetch_array($result)){ $recipient=$myrow[email] . ,; } 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] Multiple ASP 2 PHP conversion
yes, almost same for MS platforms with batch files: converall.bat: for %%a in (*.php;*.php3) DO asp2php %%a eof -elias http://www.eassoft.cjb.net Brandon Orther [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, I found asp2php to be a great tool. Does anyone know of a way to make it convert a whole directory or more than one file at a time? Brandon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.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] This newsgroup
Just wondering... That the first newsgroup i ever joinedand I noticed that it hold almost 100,000 message w/o deleting old one and keeping new ones... How much can it hold? How much it's owner will allow it to hold messages? Just wondering again... ;) -elias -- PHP General Mailing List (http://www.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] assign values to variables, all taken from txt file
From what I could see you want variable variables $value = $line[0]; $variable = $line[1]; $$variable = $value; // Tobias Alain [EMAIL PROTECTED] wrote in message 9dqrh1$23a$[EMAIL PROTECTED]">news:9dqrh1$23a$[EMAIL PROTECTED]... Hello, I am trying to get values assigned to variables, by taking these data from a textfile. my txt file looks like that: variable1 // value1 variable2 // value2 etc... The point here is that I want to be able to get BOTH the variable name and its corresponding value.. I tried things like: --//--- $configuration_data = file(conf/configuration.txt); for($index=0; $index count($configuration_data); $index++) { $line = explode(//,$configuration_data[$index]); $value = $line[0]; $variable = $line[1]; $\$variable = $value; } --// So it's that $\$variable = $value; which is wrong and now I don't have any inspiration anymore... Could somebody help me plase?! thanks, -Alain- -- PHP General Mailing List (http://www.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] Recursively create directories
This should do what you want... $dir = dir1/dir2/dir3/dir4; $dir_array = explode(/,$dir); $full_path = ; foreach($dir_array as $current_dir) { $full_path .= /$current_dir; if (!is_dir($DOCUMENT_ROOT . $full_path)) { mkdir($DOCUMENT_ROOT./ .$full_path,0700); } } adamw - Original Message - From: Darin Isola [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, May 14, 2001 8:01 PM Subject: [PHP] Recursively create directories hi all, does anyone have a function to recursively create directories? heres what I have so far: $dir = dir1/dir2/dir3/dir4; $dir_array = explode(/,$dir); foreach($dir_array as $current_dir) { if(! is_dir($DOCUMENT_ROOT./.$current_dir) ) { mkdir($DOCUMENT_ROOT./.$current_dir,0700); } } which works, but this will only create these dirs off the document root, not recursivley underneth one another. im getting stuck on how to remember what directory has been created and travel down from there. can anyone help a brother out? __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.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 General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] File pointers
Any easy way to make the file pointer go up one line in a text file? (I am thinking of using ftell(), then working out the length of the line, and then fseek()?) Thanks :-) swadie ~~~ Steve Wade Youth Outreach Coordinator Fusion Australia Ltd (Sydney North) ABN 26 001 273 105 +61 2 9477 1110
Re: [PHP] assign values to variables, all taken from txt file
So now my code looks like: --- $configuration_data = file(configuration.txt); for($index=0; $index count($configuration_data); $index++) { $line = explode( // ,$configuration_data[$index]); $value = $line[0]; $variable = $line[1]; $$variable = $value; echo $variable:b$value/bbr\n; } echo $admin_email$sys_host$root_path$www\nhr\n; And there is still something wrong, because it does print me a good list $variable_name:corresponding_value from the echo inside the loop, but the echo at the end doesn't return any value... I'm still missing something there... :( -Alain- Tobias Talltorp [EMAIL PROTECTED] wrote in message 9dr0g8$cgs$[EMAIL PROTECTED]">news:9dr0g8$cgs$[EMAIL PROTECTED]... From what I could see you want variable variables $value = $line[0]; $variable = $line[1]; $$variable = $value; // Tobias Alain [EMAIL PROTECTED] wrote in message 9dqrh1$23a$[EMAIL PROTECTED]">news:9dqrh1$23a$[EMAIL PROTECTED]... Hello, I am trying to get values assigned to variables, by taking these data from a textfile. my txt file looks like that: variable1 // value1 variable2 // value2 etc... The point here is that I want to be able to get BOTH the variable name and its corresponding value.. I tried things like: --//--- $configuration_data = file(conf/configuration.txt); for($index=0; $index count($configuration_data); $index++) { $line = explode(//,$configuration_data[$index]); $value = $line[0]; $variable = $line[1]; $\$variable = $value; } --// So it's that $\$variable = $value; which is wrong and now I don't have any inspiration anymore... Could somebody help me plase?! thanks, -Alain- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] still not friends with RegExps..
$string = preg_replace(/[\\\*\+\-;]/s,,$string); I think, you might have to escape the ; too Zef elias [EMAIL PROTECTED] schreef in berichtnieuws 9dr733$knl$[EMAIL PROTECTED] Hello, Maybe RegExps are still my point of weakness...but I still like them as much as I like the Self-Reference phrases... Okay now, how can i replace all the matches of \ , *, +, - and ; with an empty string by calling once the preg_replace() or str_replace() or any string replace function? () Do i have to call it as many times as i got different replacments? -elias -- PHP General Mailing List (http://www.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] php4 phplib problems
Hi is anyone using phplib with php4? yes I seem to be unable to get it working on a win98 machine with php4.0.5 with apache or PWS? I have been using it with php3 before successfully Please help I am missing something obvious? I would suggest searching the phplib archives. Using phplib with php 4 has come up quite a few times. It should work as is but there are a few files in CVS to make use of php4's native session handling. M@ -- PHP General Mailing List (http://www.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] PHP4 and MySQL on Macintosh
Andy, Go Mac OS X - and roll your own install. I notice you are using ODBC in another post - there is a HOWTO at www.iodbc.org for compiling PHP, Apache, and iODBC (ODBC Driver Manager) under Mac OS X. Let me know if you run into problems. Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology Providers -Original Message- From: Andreas Pucko [mailto:[EMAIL PROTECTED]] Sent: Monday, May 14, 2001 5:44 PM To: Php (E-mail) Subject: [PHP] PHP4 and MySQL on Macintosh Hi there, does anybody know if it is possible to run these applications on MAC 0S? Any experiences? Cheers Andy -- PHP General Mailing List (http://www.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] ODBC connect
Andy, What information are you trying to get? If nr and name are fields that you want values for, then odbc_fetch_row() or odbc_fetch_into() should work fine. If you are looking for column information, check out odbc_field_name() and odbc_field_num() http://www.php.net/manual/en/ref.odbc.php Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Data Integration Technology Providers -Original Message- From: Andreas Pucko [mailto:[EMAIL PROTECTED]] Sent: Monday, May 14, 2001 9:02 PM To: Php (E-mail) Subject: [PHP] ODBC connect Hi there, I would like to get information out of a database via ODBC. I switched from MySQL. The old syntax does not work which was like: while ($row = odbc_fetch_row($result)) { printf (option value = \%s\%s/option, $row-nr,$row-name); } so, how do I get the nr and name out of the row?? Any suggestions? Cheers Andy -- PHP General Mailing List (http://www.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] indexing records
Create another table in your database called category with columns, id and title, each record in category table should be something like: 1 Iran 2 Florida 3 Family 4 Friends Then add a column to you picture table called category_id, store the id of each category in the new column category_id in the picture table. Then when you want to get picture out do this SELECT picture.filename, picture.title, category.title FROM picture, category WHERE picture.category_id = 1 ORDER BY picture.title Where 1 is category_id of Iran or whatever. Now if you want to associate pictures to multiple categories that is a different story, but this should be enough to get you started. Robert Zwink -Original Message- From: midget2000x [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 18, 2001 11:26 AM To: [EMAIL PROTECTED] Subject: [PHP] indexing records What I want to do is figure out a way to index MySQL query results on my PHP site that's not dependent on the id of each record. I've got a MySQL photo database that runs my photo site. Right now, the 'id' field is a sequential, auto-incremented number, and I am using that id as an index for the photos (because it was easy for me to grasp). It works now because the groups are organized in order (for example all the Iran pictures are sequential). But --- providing the finest in midget technology -- PHP General Mailing List (http://www.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] This newsgroup
This is not a Newsgroup. It is a Mailing List. That means ALL the emails are stored on your computer. So, the answer to both your questions is however much you want to keep. Jason Lotito www.NewbieNetwork.net -Original Message- From: Paulo Rocha [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 15, 2001 6:47 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] This newsgroup I am also curious to know how much disk space is php.general taking. elias wrote: Just wondering... That the first newsgroup i ever joinedand I noticed that it hold almost 100,000 message w/o deleting old one and keeping new ones... How much can it hold? How much it's owner will allow it to hold messages? -- PHP General Mailing List (http://www.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] Capturing the url in the location bar
On 5/15/2001 9:27 AM this was written: Is there a way of capturing the entire url contianed in the location bar within a variable? $location = getenv(HTTP_HOST) . getenv(REQUEST_URI); Or if your system handles it do this: $location = $HTTP_HOST . $REQUEST_URI; This will concatinate the site requested with the rest of the url. -- 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]
[PHP] Re: WELCOME to php-general@lists.php.net
Dear sir, I am new to php.kindly recommend me tutorials tp get started. thanks asif -- PHP General Mailing List (http://www.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 the url in the location bar
$variable = http://;. $HTTP_HOST. $REQUEST_URI; Is there a way of capturing the entire url contianed in the location bar within a variable? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: WELCOME to php-general@lists.php.net
http://hotwired.lycos.com/webmonkey/programming/php/index.html and, for general use: http://www.php.net/manual And this one can be usefull too. http://marc.theaimsgroup.com/?l=php-general http://marc.theaimsgroup.com/?l=php-generalw=2r=1s=tutorialsq=b Kees - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 15, 2001 3:45 PM Subject: [PHP] Re: WELCOME to [EMAIL PROTECTED] Dear sir, I am new to php.kindly recommend me tutorials tp get started. thanks asif -- PHP General Mailing List (http://www.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: WELCOME to php-general@lists.php.net
have a look at : http://www.hotscripts.com/PHP/ and www.devshed.com and zend.com sunny -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 15 May 2001 14:45 To: [EMAIL PROTECTED] Subject: [PHP] Re: WELCOME to [EMAIL PROTECTED] Dear sir, I am new to php.kindly recommend me tutorials tp get started. thanks asif -- PHP General Mailing List (http://www.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] Bound comboboxes on form
A hidden form element to store the value of the second select box? Use javascript to update a hidden form element in the original form, that way when you submit the form you will have the newly selected element. Sounds kind of strange though. What if you on change Combo 1 submitted the whole page, then prepopulated all of the form element with what the user has already typed. So I go to this form, type my name city state, then select a country, the form is then automatically submitted via javascript, the page re-appears with what I typed still available for me to edit, now I have a second combo box to choose from. Choose a different country, the page re-submits and I have different values in Combo 2 Robert Zwink -Original Message- From: Dezider Gora [mailto:[EMAIL PROTECTED]] Sent: Monday, May 07, 2001 3:54 PM To: PHP General Subject: [PHP] Bound comboboxes on form I want to create two bound comboboxes for selecting cell operators within a range of available countries. I want it behave like this: Combo 1 will consist of list of available contries - user selects a country and the second combo will requery the database and show the list od of all available ooperators in this contry. I've searched the phpclasses and found the class called linked_select, but I'm having problems with it. So I'm thinking about embedding and iframe which will contain only the second combo and requerying will be done replacing a a source url when user selects a country from first combo using a javascript onChange event. Now here's my question. Is this doable? If yes, how do I get the value from the second combo into original form for submitting? When I create an iframe from within a from, will the value be submitted with the form or not? Any thoughts greatly welcome. tia, Dezider. -- PHP General Mailing List (http://www.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 let PHP cgi find oracle TNS?
At 10:09 AM 5/15/01 +0800, Jude Chen wrote: Warning: Unable to connect to ORACLE (ORA-12154: TNS:could not resolve service name) in E:\website\yktest\web\includes\db\dbenv.php on line 4 But I have the correct TNS, through which I can connect to Oracle using SQL*PLUS, configured on the machine, using SQL*NET configuration tool. I don't know why, can anyone help me? Can you show us the PHP code that produces this error? Are the ORACLE_HOME, NLS_LANG, and ORACLE_SID environment variables set for the 'nobody' user (or whichever entity runs apache/php) ? How, exactly, are you calling the OCI8 functions? - Brian S. Dunworth Sr. Software Development Engineer Oracle Database Administrator The Printing House, Ltd. (850) 875-1500 x225 [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] super global variable
Is it possible to declare some kind of super global variable in PHP, which would be avaliable to all later PHP scripts/processes? I suppose I could use a database or filesystem. But in this case of mine I need to store and retrieve some values very fast and consuming as little resourses as possible. These values would actually be used to determine if a connection to database is required. Any advice or comment would be really helpfull. Sigitas -- PHP General Mailing List (http://www.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] Install Prob PHP4
Hi, checking lex output file root... ./configure: lex: command not found configure: error: cannot find output from lex; giving up you have to go into YaST an install a programm called lex. It might be that you also need flex. Just install lex and see if you get more errors. hope it helps Johannes -- PHP General Mailing List (http://www.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] Compressing uploads
Does anyone have an example of compressing file uploads or files in general? Basically some big files are being uploaded and I want to be able to zip/tar them to cut down on disc usage. I've tried playing with the zlib functions but haven't had much/any success at adding files into archives. The file sizes end up as 0. Many thanks in advance M@ -- PHP General Mailing List (http://www.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] super global variable
Sigitas Paulavicius wrote: Is it possible to declare some kind of super global variable in PHP, which would be avaliable to all later PHP scripts/processes? As long as you use one server only (no load-balancing), you can use shared memory. http://php.net/shmop Try phpbuilder.com or google to find a tutorial. regards Wagner -- Some guy hit my fender, and I told him, 'Be fruitful and multiply,' but not in those words. - Woody Allen -- PHP General Mailing List (http://www.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] Multi Dimensional Arrays?
You are on the right track but doing something wrong: You are correctly assigning a string to an array: //Main Menu Array $main_menu[0] = Menu 1; //Represents the name of the menu But then you are taking that string one character at a time and replacing it with invalid data: //Menu 1 Array $main_menu[0][0] = Test 1; $main_menu[0][1] = Test 2; $main_menu[0][2] = Test 3; $main_menu[0][3] = Test 4; The result is echo $main_menu[0] prints: 4 This is doing exactly what you are asking it to do. Create an array then one character at a time replace it with with the first character in the provided string. You would be better of doing this: $main_menu[0][] = Title of the Menu; $main_menu[0][] = Test 1; $main_menu[0][] = Test 2; $main_menu[0][] = Test 3; $main_menu[0][] = Test 4; That way element [0] will always be the title and all following values will be elements in that menu. If you do the above, then type: echo count($mail_menu[0]); It will return 5. This whole thing about recursive funcions to count multiple dimensional arrays that don't really exist is incorrect. The count() function will work fine in your example, just build your multi-dimensional array correctly. If you need to count the all the elements in a multi-dimensional array then you will need to write a function that is recursive, but you shouldn't need to iterate through each element incrementing a counter to do so. Just use count(). It works fine on multi-dimensional arrays. Robert Zwink -Original Message- From: Brandon Orther [mailto:[EMAIL PROTECTED]] Sent: Monday, May 07, 2001 12:00 PM To: PHP User Group Subject: [PHP] Multi Dimensional Arrays? Hello, I am working on a menu script that I wanted to use multi-dimensional arrays for. Here is the conf file I have: //Main Menu Array $main_menu[0] = Menu 1; //Represents the name of the menu //Menu 1 Array $main_menu[0][0] = Test 1; $main_menu[0][1] = Test 2; $main_menu[0][2] = Test 3; $main_menu[0][3] = Test 4; When I try to us count like: $count = count($main_menu[0]); I only get 1. My question is how do I count a multi dimensional array. Thanks for the help, Brandon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.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] detecting HTML tags
Is there a way to detect the presence of HTML tags? I don't want them stripped out, I just want to know if a string contains them. I'm rolling my own mailing program and want it to detect the HTML if present and send it appropriately. kind regards, bill hollett -- PHP General Mailing List (http://www.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] Integer size limitations
Please copy me on responses. TIA. I am trying to do some IP address arithmetic using php, but am running into problems because the biggest number that php can handle is 32 bits signed. No good for IP addresses. Try the following: echo 2473473024 127; // gives 0 - correct echo 2473473025 127; // gives 0 - incorrect echo 28288 127;// gives 0 - correct echo 28289 127;// gives 1 - correct What happens is that numbers that are bigger than 31 bits are automagically converted to double, which does not allow binary operations (no error though, just wrong results!!!). Is there anyway to make the number unsigned or a long int as in C? Else, how do I do binary arithmetic for IP addresses? This is using 4.04p1. -- Richard Ellerbrock [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] This newsgroup
Jason Lotito, This mailing list is also a newsgroup you can access it via newserver hosted by php group. My guess is that elias is accesses the mailing list via the news-server. From http://www.php.net/support.php Mailing Lists There are many PHP-related mailing lists available. Most of them have archives are available, and many are also available as newsgroups on our news server (news.php.net). The archives are searchable. Robert Zwink -Original Message- From: Jason Lotito [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 15, 2001 9:57 AM To: 'Paulo Rocha'; [EMAIL PROTECTED] Subject: RE: [PHP] This newsgroup This is not a Newsgroup. It is a Mailing List. That means ALL the emails are stored on your computer. So, the answer to both your questions is however much you want to keep. Jason Lotito www.NewbieNetwork.net -Original Message- From: Paulo Rocha [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 15, 2001 6:47 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] This newsgroup I am also curious to know how much disk space is php.general taking. elias wrote: Just wondering... That the first newsgroup i ever joinedand I noticed that it hold almost 100,000 message w/o deleting old one and keeping new ones... How much can it hold? How much it's owner will allow it to hold messages? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Multi Dimensional Arrays?
Anyone knows how to determine how many levels has an array? TIA Rom -Original Message- From: Robert V. Zwink [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 15, 2001 10:30 AM To: Brandon Orther; PHP User Group Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Multi Dimensional Arrays? You are on the right track but doing something wrong: You are correctly assigning a string to an array: //Main Menu Array $main_menu[0] = Menu 1; //Represents the name of the menu But then you are taking that string one character at a time and replacing it with invalid data: //Menu 1 Array $main_menu[0][0] = Test 1; $main_menu[0][1] = Test 2; $main_menu[0][2] = Test 3; $main_menu[0][3] = Test 4; The result is echo $main_menu[0] prints: 4 This is doing exactly what you are asking it to do. Create an array then one character at a time replace it with with the first character in the provided string. You would be better of doing this: $main_menu[0][] = Title of the Menu; $main_menu[0][] = Test 1; $main_menu[0][] = Test 2; $main_menu[0][] = Test 3; $main_menu[0][] = Test 4; That way element [0] will always be the title and all following values will be elements in that menu. If you do the above, then type: echo count($mail_menu[0]); It will return 5. This whole thing about recursive funcions to count multiple dimensional arrays that don't really exist is incorrect. The count() function will work fine in your example, just build your multi-dimensional array correctly. If you need to count the all the elements in a multi-dimensional array then you will need to write a function that is recursive, but you shouldn't need to iterate through each element incrementing a counter to do so. Just use count(). It works fine on multi-dimensional arrays. Robert Zwink -Original Message- From: Brandon Orther [mailto:[EMAIL PROTECTED]] Sent: Monday, May 07, 2001 12:00 PM To: PHP User Group Subject: [PHP] Multi Dimensional Arrays? Hello, I am working on a menu script that I wanted to use multi-dimensional arrays for. Here is the conf file I have: //Main Menu Array $main_menu[0] = Menu 1; //Represents the name of the menu //Menu 1 Array $main_menu[0][0] = Test 1; $main_menu[0][1] = Test 2; $main_menu[0][2] = Test 3; $main_menu[0][3] = Test 4; When I try to us count like: $count = count($main_menu[0]); I only get 1. My question is how do I count a multi dimensional array. Thanks for the help, Brandon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.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] NES/iPlanet Web server won't start after php make install (Solaris 7 / 8)
I am trying to configure PHP4 to be used with Netscape Enterprise 3.6 with NSAPI, LDAP, and SYBASE-CT on a Solaris 2.7 machine. The error from the NES admin tool is pclose() failed. (2: unknown early startup error) Error An error occurred during startup. The server https-server was not started. PHP4.0.5 compile is successfull with the following configuration: ./configure --with-nsapi=/opt/netscape/suitspot --with-ldap=/usr/local/ldap --with-sybase-ct=/usr/syb119/11.1.1 --enable-track-vars --enable-libgcc I have completed the PHP4 install steps mentioned on: http://www.php.net/manual/en/install.netscape-enterprise.ph I have verified clean tests from the Netscape bug report with Netscape Engineers: http://help.netscape.com/kb/corporate/19990524-10.html If I comment out the following line from the obj.conf file the server will start as expected. Init fn=load-modules funcs=php4_init,php4_close,php4_execute,php4_auth_tr ans shlib=/opt/netscape/suitspot/bin/libphp4.so My previous PHP install without the LDAP and Sybase extensions worked just fine. Problem is that I need the LDAP and Sybase modules. I have attempted this with Solaris 2.8 and iPlanet Webserver 4.1 SP7 with the same problems. Anyone have any ideas? Take Care, Eric G. Grant
Re: [PHP] php on PWS
On Tuesday 15 May 2001 16:18, Matt Davis wrote: I am trying to install PHP 4.05 CGI onto my WIN 98 machine which is running PWS once have followed all the instructions but when I try to run a php script I get a HTTP 500 error. I have checked that my registry entry is pointing to the right place. Does anybody have any ideas how to fix this. From the commandline change to the directory containing php.exe and run php.exe -i An error message will tell you what's wrong, a screen ful of html will tell you that PHP is ok, but your PWS configuration is not. If the latter, you can double check the registry settings, try to reinstall PWS, or better yet, install Apache or Xitami. Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.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] PHP4 and MySQL on Macintosh
On Mon, 14 May 2001 17:49:08 -0400, Hoover, Josh [EMAIL PROTECTED] wrote: Andy, I believe you can run PHP on Mac OS with the use of WebTen by Tenon (http://www.tenon.com/products/webten/). MySQL does not run on Mac OS. You can run both PHP 4 and MySQL on Mac OS X. Since it sounds like you're a Mac developer, I would suggest you check out the AMP mailing list which is full of Mac developers using technologies like PHP, MySQL, Mac OS X, etc. The URL is http://www.developersplace.com/ Hope that helps out. Josh Hoover KnowledgeStorm, Inc. [EMAIL PROTECTED] Searching for a new IT solution for your company? Need to improve your product marketing? Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify the process for you. KnowledgeStorm - Your IT Search Starts Here does anybody know if it is possible to run these applications on MAC 0S? I have PHP, MySQL, and Apache running on my OS X box beautifully. There are double-click installers out there that will install all of those apps. Actually, PHP and Apache come installed by default. You just have to edit the httpd.conf file to turn them on. You can get all this great UNIX functionality with the Out of the box version of OS X consumer, for $99. OS X server 2 will be out shortly, and will have web, mail, and file server admin features. HTH, 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 [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]
Re: [PHP] need some ideas here...
At 20:32 14/5/2001 -0500, Ben Gollmer wrote: If you have an account on a remote host, you can always do something like this: ?php include(http://www.remotehost.com/~myaccount/mailfunction.inc;); mymail($to, $mailbody); ? where mailfunction.inc has the mymail function defined to just take your parameters and stuff them into the standard mail(). Of course include()ing from remote hosts can be disabled when compiling PHP, and if your host is really evil, the will have disabled this too. Your last resort is to create your own mail function by fsockopen()ing a connection to port 25 of your SMTP server and sending raw SMTP commands. This would require some reading of the relevant mail RFCs...but is definitely feasible. I tried using fopen('.') on a script hosted at a domain that belongs to me that sends email... trying it here (even calling the script elsewhere on the internet 'http://www.mydomain.com') it wordked perfect... then I tried the fsockopen alternative... it didn't work... f2s runs in safemode... so in their faq, they tell us that if we won't some more advanced scripts... to use the cgi version (script.cgi starting with '#!/usr/bin/php'... and so on)... nothing works... they must have a real protection against acessing outer files there... -- PHP General Mailing List (http://www.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] detecting HTML tags
On Tuesday 15 May 2001 16:39, bill wrote: Is there a way to detect the presence of HTML tags? I don't want them stripped out, I just want to know if a string contains them. I'm rolling my own mailing program and want it to detect the HTML if present and send it appropriately. if (strstr ($text, '')) { UseHTML ($text); } else { UsePlaintext ($text); } -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) The most exciting phrase to hear in science, the one that heralds new discoveries, is not Eureka, but That's funny... - Isaac Asimov -- PHP General Mailing List (http://www.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 on PWS
even though i dont use PWS, the only time i seem to get 500 errors is when i mistype the a filename and the server cannot find the file so that's probably where your problem lies. triple check that PHP is working and installed correctly. then triple check that the server works OK (try to load a simple HTML page). rant from what i know about PWS, it gives people endless problems. i'd reccomend you check out Apache (http://apache.org/) when you get a chance. it's free and it comes for unix/win32 and is usually easier to setup/configure than MS servers. -Original Message- From: Matt Davis [mailto:[EMAIL PROTECTED]] Subject: [PHP] php on PWS I am trying to install PHP 4.05 CGI onto my WIN 98 machine which is running PWS once have followed all the instructions but when I try to run a php script I get a HTTP 500 error. I have checked that my registry entry is pointing to the right place. Does anybody have any ideas how to fix this. Matt. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] need some ideas here...
At 22:40 14/5/2001 -0700, Ethan Schroeder wrote: I don't know how you can find sendmail on that system if you don't have telnet access. Try writing a script that does an exec(which sendmail) and see if it tells you. I doubt it will, though. Otherwise try different sendmail locations: /usr/sbin/sendmail, /usr/lib/sendmail, etc. The .htacess file overwrites the value of the php.ini file, so you can specify to php where sendmail is for any script that is under the directory your .htaccess file resides in (unless they don't allow .htaccess). I've had to use this approach a couple times to get php to send mail off properly. actually I discovered with ini_get()... I'll try now with popen() and stuff again... may it'll work... this is my last hope... I tried calling a script in another domain, I tried fsockopen... nothing seems to work... this is my last attempt... -- PHP General Mailing List (http://www.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] detecting HTML tags
Hi Bill ? if (preg_match(/([\])([^\]{1,})*([\])/i, $string)) { echo Houston, we have a problem.; } ? James. bill [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Is there a way to detect the presence of HTML tags? I don't want them stripped out, I just want to know if a string contains them. I'm rolling my own mailing program and want it to detect the HTML if present and send it appropriately. kind regards, bill hollett -- PHP General Mailing List (http://www.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] ssh
As others metioned, you feel free to use Putty. If it doesn't fit your needs, I 've a fairly old SSH extension to Teraterm Pro, i can post it to you. But it takes a little time to find it. - Original Message - From: Dennis Gearon [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 2001. május 15. 00:26 Subject: [PHP] ssh anyone got the easy directions to setting up teraterm pro with SSH ***AND*** getting the certificate to work for it? My provider that runs php/mysql/etc only lets people use SSH connections for telnet, which I agree with. Right, now, I don't want to pay the $139 for the non open source windows SSH 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] -- PHP General Mailing List (http://www.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] detecting HTML tags
Yes, I thought similarly. But so far, neither works. $string=blah x4 blah; if (strlen($string) != strlen(strip_tags($string))){ echo html; } else { echo text; } The above still echos html. kind regards, bill Jack Dempsey wrote: $text = 50 100 + 240; not html... would want regex's i would think, or the striptags version someone sent before... -jack Christian Reiniger wrote: On Tuesday 15 May 2001 16:39, bill wrote: Is there a way to detect the presence of HTML tags? I don't want them stripped out, I just want to know if a string contains them. I'm rolling my own mailing program and want it to detect the HTML if present and send it appropriately. if (strstr ($text, '')) { UseHTML ($text); } else { UsePlaintext ($text); } -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) The most exciting phrase to hear in science, the one that heralds new discoveries, is not Eureka, but That's funny... - Isaac Asimov -- PHP General Mailing List (http://www.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] server alias
$HTTP_HOST ? Not sure - don't feel like setting up a wildcard... :) Joe Stump wrote: Say i have a server foobar.com and in my httpd.conf i have *.foobar.com as a ServerAlias in my virtualhost is there a common PHP var that will give me the domain someone actually types in? $SERVER_NAME only gives me foober.com (since that is the servername), but not the alias someone typed in to get there ... --Joe Joe Stump [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] ssh
you can get a really great SSH program (free for non-commercial use) at http://ssh.com/ i use a registered copy here at work, but i downloaded a free copy for use at home... it's the best client i've found so far. even supports SFTP. -Original Message- From: Gyozo Papp [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 15, 2001 8:43 AM To: Dennis Gearon; [EMAIL PROTECTED] Subject: Re: [PHP] ssh As others metioned, you feel free to use Putty. If it doesn't fit your needs, I 've a fairly old SSH extension to Teraterm Pro, i can post it to you. But it takes a little time to find it. - Original Message - From: Dennis Gearon [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 2001. május 15. 00:26 Subject: [PHP] ssh anyone got the easy directions to setting up teraterm pro with SSH ***AND*** getting the certificate to work for it? My provider that runs php/mysql/etc only lets people use SSH connections for telnet, which I agree with. Right, now, I don't want to pay the $139 for the non open source windows SSH 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] Recursively create directories
If you're on unix, and don't mind a system call you could do: system(/bin/mkdir -p $dir); From the man page for mkdir. -p Create intermediate directories as required. If this option is not specified, the full path prefix of each operand must already exist. Intermediate directories are created with permission bits of rwxrwxrwx (0777) as modified by the current umask, plus write and search permission for the owner. In article [EMAIL PROTECTED] you write: hi all, does anyone have a function to recursively create directories? heres what I have so far: $dir = dir1/dir2/dir3/dir4; $dir_array = explode(/,$dir); foreach($dir_array as $current_dir) { if(! is_dir($DOCUMENT_ROOT./.$current_dir) ) { mkdir($DOCUMENT_ROOT./.$current_dir,0700); } } which works, but this will only create these dirs off the document root, not recursivley underneth one another. im getting stuck on how to remember what directory has been created and travel down from there. can anyone help a brother out? __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.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 General Mailing List (http://www.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] Recursively create directories
- Original Message - From: Philip Hallstrom [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, May 15, 2001 7:01 PM Subject: Re: [PHP] Recursively create directories foreach($dir_array as $current_dir) { if(! is_dir($DOCUMENT_ROOT./.$current_dir) ) { mkdir($DOCUMENT_ROOT./.$current_dir,0700); } } Here's my appraoch: if( ! @is_dir( $this-cachedir)) { $dirs = split( '/', $this-cachedir); $createdir = ''; foreach( $dirs as $dir) { $createdir .= '/' . $dir; @mkdir( $createdir, 0775);} } HTH - Markus -- PHP General Mailing List (http://www.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] Image problem
Hi, I'm still pretty new to PHP, and would like help on a solution for a problem I have. I have a website that has 6 different sections. (about, news, buying, selling, community, and relocation) Each of the sections has it's own subfolder in the root directory of the website. (/about, /news, etc...) Each of the sections also has a header image and footer image associated with that section. (hdr_txt_about.gif, ftr_txt_about.gif, hdr_txt_news.gif, etc..) I want to use PHP to know what section of the website the user is in, and load the appropriate header/footer image. I know that I need some sort of if/then statement, and I know that it has to use the URL to see where it is, but I don't know where to implement it, and I'm not quite sure how. The website is setup with an included header that has most of the html/javascript, a mostly text file for the content, and an included footer that takes care of the rest. Any help with this would be greatly appreciated. Thanks, 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 [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]
RE: [PHP] Image problem
This is how I fixed that same issue in the head of my page snip if (ereg (new, $PHP_SELF)) { $header = img src=location/of/header/image; $title = www.website.com - What's New; } elseif (ereg (products, $PHP_SELF)) { $header = img src=location/of/header/image; $title = www.website.com - Products; } else { $header = img src=location/of/header/image; $title = www.website.com; } /snip then call the header in in the appropriate place in your html ? echo $header; ? Jerry Lake Interface Engineering Technician Europa Communications - http://www.europa.com Pacifier Online - http://www.pacifier.com -Original Message- From: Michael O'Neal [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 15, 2001 10:14 AM To: php Subject: [PHP] Image problem Hi, I'm still pretty new to PHP, and would like help on a solution for a problem I have. I have a website that has 6 different sections. (about, news, buying, selling, community, and relocation) Each of the sections has it's own subfolder in the root directory of the website. (/about, /news, etc...) Each of the sections also has a header image and footer image associated with that section. (hdr_txt_about.gif, ftr_txt_about.gif, hdr_txt_news.gif, etc..) I want to use PHP to know what section of the website the user is in, and load the appropriate header/footer image. I know that I need some sort of if/then statement, and I know that it has to use the URL to see where it is, but I don't know where to implement it, and I'm not quite sure how. The website is setup with an included header that has most of the html/javascript, a mostly text file for the content, and an included footer that takes care of the rest. Any help with this would be greatly appreciated. Thanks, 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 [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 General Mailing List (http://www.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] detecting HTML tags
On Tuesday 15 May 2001 18:25, Jack Dempsey wrote: $text = 50 100 + 240; not html... would want regex's i would think, or the striptags version someone sent before... Well, then preg_match ('/[a-z]/i', $text) should work. Is there a way to detect the presence of HTML tags? I'm rolling my own mailing program and want it to detect the HTML if present and send it appropriately. if (strstr ($text, '')) { UseHTML ($text); } else { UsePlaintext ($text); } -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) The most exciting phrase to hear in science, the one that heralds new discoveries, is not Eureka, but That's funny... - Isaac Asimov -- PHP General Mailing List (http://www.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] Replacing JavaScript functionality with PHP
Hi, I'm rewriting some web pages trying to replace a lot of JavaScript with PHP (before including some mySQL for even more dynamic content); however, I am having a little difficulty in one area... Currently, if a page is displayed in the main window for the site, then a menu is displayed on the left (where else); however, if the same page is displayed in a popup window, then the menu is suppressed. This works because, the site launches all popup windows with the same name, 'popupWin', so I can use if (self.name == 'popupWin')... in the JavaScript to suppress the menu. The HTML for the menu is built dynamically by the JavaScript. I can't see how PHP (on the server) will know about the browser window name, so is there a way to reproduce this functionality in PHP? I'm new to PHP, so apologies if this is a time-waster. I spent quite a while looking through the archives, but... well needles and haystacks! Thanks, Richard -- PHP General Mailing List (http://www.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] Directory - exist or not ? :)
Hi, I've got a one simple question. How I can check directory exist or not ? Plz, help me :) TIA ! -- regards, - scream - scream(at)w.pl ICQ#46072336 ||| GG#480681 Artificial Reins Productions -- PHP General Mailing List (http://www.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] Directory - exist or not ? :)
Hi There, ? $dir_to_check = /this/dir; if (!is_dir($dir_to_check)) { echo No directory here; } else { echo Bingo.; } ? James. Scream [EMAIL PROTECTED] wrote in message 9drq8v$ngb$[EMAIL PROTECTED]">news:9drq8v$ngb$[EMAIL PROTECTED]... Hi, I've got a one simple question. How I can check directory exist or not ? Plz, help me :) TIA ! -- regards, - scream - scream(at)w.pl ICQ#46072336 ||| GG#480681 Artificial Reins Productions -- PHP General Mailing List (http://www.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] still not friends with RegExps..
Hello, while I was reading the post from 'elias', a fairly old question came in my mind which I've not get any answer yet. Maybe you can do it. There is a function quotemeta() which escapes all special regexp character such as: . \ + * ? [ ^ ] ( $ ) with a '\' except one the '|' pipe. what reason for this behaviour? - Original Message - From: Taylor, Stewart [EMAIL PROTECTED] To: 'elias' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: 2001. május 15. 15:16 Subject: RE: [PHP] still not friends with RegExps.. preg_replace does not seem to agree with '\\'. Below seems to work with ereg_replace. ?php $pat = [*+;\\-]; $rep = ; echo ereg_replace($pat,$rep,$string); ? -Stewart ~ -Original Message- From: elias [mailto:[EMAIL PROTECTED]] Sent: 15 May 2001 23:37 To: [EMAIL PROTECTED] Subject: [PHP] still not friends with RegExps.. Hello, Maybe RegExps are still my point of weakness...but I still like them as much as I like the Self-Reference phrases... Okay now, how can i replace all the matches of \ , *, +, - and ; with an empty string by calling once the preg_replace() or str_replace() or any string replace function? () Do i have to call it as many times as i got different replacments? -elias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Using the key in documents (Newbie needs help)
Greetings fellow devs! I am new to PHP (having tried my hand at running ASP/SQL here at the house. No, I didnt chose ASP, it just happened to be the software I had when I decided to mess with dynamic content. My problem is probably really simple. I am learning to use PHP via online documents and the first examply I am trying to implement is a simple clock. My script is fine up to the point I have: if ($hours 12) { $hours=$hours-12; $ampm=PM; } The '' prior to 12 closes my '?php' tag and the results return 12) {... on. If there a way I can use the greater-then and NOT close the damn tag? Any help would be greatly appreciated. (As well as any links to good tutorials/code examples for any aspect of using PHP/MySQL/Apache). Thanks in advance, Marc -- PHP General Mailing List (http://www.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 needs help! '' closing PHP Tag
Greetings fellow devs! I am new to PHP (having tried my hand at running ASP/SQL here at the house. No, I didnt chose ASP, it just happened to be the software I had when I decided to mess with dynamic content. My problem is probably really simple. I am learning to use PHP via online documents and the first examply I am trying to implement is a simple clock. My script is fine up to the point I have: if ($hours 12) { $hours=$hours-12; $ampm=PM; } The '' prior to 12 closes my '?php' tag and the results return 12) {... on. If there a way I can use the greater-then and NOT close the damn tag? Any help would be greatly appreciated. (As well as any links to good tutorials/code examples for any aspect of using PHP/MySQL/Apache). Thanks in advance, Marc -- PHP General Mailing List (http://www.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 needs help! '' closing PHP Tag
Marc: should not close php ? will can you paste in the script so i can see what you mean? -jack Marc Johnson wrote: Greetings fellow devs! I am new to PHP (having tried my hand at running ASP/SQL here at the house. No, I didnt chose ASP, it just happened to be the software I had when I decided to mess with dynamic content. My problem is probably really simple. I am learning to use PHP via online documents and the first examply I am trying to implement is a simple clock. My script is fine up to the point I have: if ($hours 12) { $hours=$hours-12; $ampm=PM; } The '' prior to 12 closes my '?php' tag and the results return 12) {... on. If there a way I can use the greater-then and NOT close the damn tag? Any help would be greatly appreciated. (As well as any links to good tutorials/code examples for any aspect of using PHP/MySQL/Apache). Thanks in advance, Marc -- PHP General Mailing List (http://www.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] MYSQLDUMP
mysqldump --opt -u username -p password databasename filename.sql Try mysqldump --help for additional options, or the MySQL manual. Robert Zwink -Original Message- From: TopFive [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 08, 2001 5:06 PM To: [EMAIL PROTECTED] Subject: [PHP] MYSQLDUMP When I attempt to backup my database using MYSQLDUMP, I get repeated syntax error messages from MySQL. This is driving me nuts. I've even attempted the simplest form of the command I can muster: mysqldump mydatabasename dump.sql; Am I overlooking something dreadfully obvious here? Chris W. -- PHP General Mailing List (http://www.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] Missing Records
Hi all, I have a setup where I populate one table as a temporary holding place for data. When the user's session is complete, I want to transfer all that data to a similar, permanent table. The strangeness is this - most of the time the data is all transferred fine, but sometimes only a few of the records will make it. If it always failed, I'd just figure the code was wonky, but becuase it gets through sporadically, I'm stumped. I'm guessing it has something to do with one mysql_query starting up before the previous one is finished. Help, please. Here's the code: for($counter = 1; $counter =20; $counter++) { if($carray[$counter] != $carray[$counter] != 0) { $sql = SELECT * FROM feedback_results_temp where about_user_pkey = '$aboutradio' and by_user_pkey = '$user_pkeytemp' and competency_pkey = '$carray[$counter]'; $result = mysql_query($sql); $num = mysql_numrows($result); if ($num != 0) { $row=mysql_fetch_object($result); $competency_pkey = $row-competency_pkey; $rating = $row-rating; $notes = $row-notes; $sql_insert = INSERT INTO feedback_results (about_user_pkey, by_user_pkey, competency_pkey, rating, date, notes) VALUES ('$aboutradio', '$user_pkeytemp', '$competency_pkey', '$rating', '$todaysdate', '$notes'); $result_insert = mysql_query($sql_insert); } } } (After this, the code erases everything from feedback_results_temp)
Re: [PHP] super global variable
this is something I never needed todo, but it works. ?php // www.miningsurplus.com/counter.php session_id('0a99a548c57c06306e408cf44b2d5d10'); session_start(); if (!isset($HTTP_SESSION_VARS['counter'])) { $counter = 0; session_register('counter'); } $counter++; echo $counter; ? ?php // www.mediawaveonline.com/counter.php session_id('0a99a548c57c06306e408cf44b2d5d10'); session_start(); if (!isset($HTTP_SESSION_VARS['counter'])) { $counter = 0; session_register('counter'); } $counter++; echo $counter; ? these two files are on the same server, just under different domains. because I am using the same session_id() they share the same value. -- Chris Lee [EMAIL PROTECTED] Sigitas Paulavicius [EMAIL PROTECTED] wrote in message 9drd9l$jpp$[EMAIL PROTECTED]">news:9drd9l$jpp$[EMAIL PROTECTED]... Is it possible to declare some kind of super global variable in PHP, which would be avaliable to all later PHP scripts/processes? I suppose I could use a database or filesystem. But in this case of mine I need to store and retrieve some values very fast and consuming as little resourses as possible. These values would actually be used to determine if a connection to database is required. Any advice or comment would be really helpfull. Sigitas -- PHP General Mailing List (http://www.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] pulling data out of a string
this will remove the www plus the top level domain ?php $site = 'www.somesite.home.com'; $site = str_replace('www.', '', $site); $site = explode('.', $site); $site = array_pop($site); $site = implode('.', $site); // somesite.home ? this will remove the first host and the top level domain. ?php $site = 'www.somesite.home.com'; $site = explode('.', $site); $site = array_pop($site); $site = array_shift($site); $site = implode('.', $site); // somesite.home ? -- Chris Lee [EMAIL PROTECTED] Richard Kurth [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am trying to figure out how to pull data out of a string. This is driving me crazy. I figure an if statement of some sort would work but I'm not sure how to structure it. I know how to get what I want if it is just $fullhostname = www.domain.net; $exp = explode(., $fullhostname); $host = $exp[0]; $domain = $exp[1]; $tld = $exp[2]; But what if it looks like this $fullhostname = www.mysit.dom.net; I need $host= www $domain = mysit.dom $tld = net or this $fullhostname = mysite.domain.net; $host = $domain = mysite.domain $tld = net Or even worse this $fullhostname = mysit.dom.net; $host = $domain = mysit.dom $tld = net 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] Passing vars between functions (with POSTs)
this will ensure that the variable is a POST var vs a GET var too... function test() { global $HTTP_POST_VARS; echo $HTTP_POST_VARS['login']; } -- Chris Lee [EMAIL PROTECTED] Miguel Ribeiro [EMAIL PROTECTED] wrote in message 9dpgkk$mdb$[EMAIL PROTECTED]">news:9dpgkk$mdb$[EMAIL PROTECTED]... Hi, I'm struggling to pass from 3 functions (and one of them have a html form POST) one simple variable called $login. Once in the function (that have form with POST) is calling a php3 without passing the $login (like: common.php3login='someone') and since the next function doesn't have any relation with this one (doesn't receive any value by return) but requires the same variable ($login). My question and great doubt is: How can I share $login in several functions... without use or change (because I don't have access) the PHP configuration environment... I believe that this could be solve with register_globals var but I don't know how to do it. Best Regards, Miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.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] still not friends with RegExps..
In article 00c301c0dd69$a64de040$6a45c5d5@jaguar, [EMAIL PROTECTED] (Gyozo Papp) wrote: There is a function quotemeta() which escapes all special regexp character such as: . \ + * ? [ ^ ] ( $ ) with a '\' except one the '|' pipe. Forget quotemeta(). Use preg_quote() instead. -- 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] This newsgroup
Paulo Rocha [EMAIL PROTECTED] wrote: I am also curious to know how much disk space is php.general taking. well i can say i have 35 MB mails in 2 months in around 10200 mails, so you can do the math yourself :) -- 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] still not friends with RegExps..
Ok, now it's time to get familiar with preg? If this stands, can you give me a link to a good tutorial with tons of examples beside the PHP manual? The most effective way to learn is to see how it works, I think. - Original Message - From: CC Zona [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 2001. május 15. 21:43 Subject: Re: [PHP] still not friends with RegExps.. In article 00c301c0dd69$a64de040$6a45c5d5@jaguar, [EMAIL PROTECTED] (Gyozo Papp) wrote: There is a function quotemeta() which escapes all special regexp character such as: . \ + * ? [ ^ ] ( $ ) with a '\' except one the '|' pipe. Forget quotemeta(). Use preg_quote() instead. -- 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] Receiving a text stream
web browsers can only request data (GET / HTTP/1.1) data can not be pushed to them (except Netscape, dont go there). you can send all the data you want to an IP but the browser only opens connections, it doesnt accept connections, the data will be rejected. if you were to write an app in VB or Delphi you could write that code to allow connections, then php could send it data. I dont know howto do that. -- Chris Lee [EMAIL PROTECTED] Todd Cary [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am not sure about this topic, so my question may refect this lack of knowledge. I have an application where I send a credit card request to a credit card processor. They return the information in a POST stream and I open a socket and read the information into a variable. This works very well. Now I want to switch positions. I would like to send a stream of text data to a surfer (e.g. their IP) and I would like to have them get the data when they are in a program like Delphi or Visual Basic so that they can use it within their program. How does on get the data when they are in a browser like EI or Netscape? Does it have to be written to a file first? Todd -- Todd Cary Ariste Software [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.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] Change 'key' names of an associative array.
Yes. But I want to change the name of the key, not the value. Plus I want to be able to do this without creating an extra key/value pair for each conversion I do. oktay -Original Message- From: Jack Dempsey [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 15, 2001 4:22 PM To: Altunergil, Oktay; [EMAIL PROTECTED] Subject: RE: [PHP] Change 'key' names of an associative array. have you tried http://www.php.net/manual/en/function.strtoupper.php -jack -Original Message- From: Altunergil, Oktay [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 15, 2001 4:15 PM To: [EMAIL PROTECTED] Subject: [PHP] Change 'key' names of an associative array. I have been trying to convert a MySQL application to Oracle. Oracle needs the field names to be upper case. For this reason even if I can fetch the result row, I can't access it by $row[name] because I have to do $row[NAME]. Is there a way to change the the key name to upper case, without making a copy.? (I mean without creating another array key with the same name in upper case) Thanks. Oktay Altunergil -- PHP General Mailing List (http://www.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] still not friends with RegExps..
I mean that it seems to me most of the mailers use preg funtions instead of simple ereg functions. Up to now I used only the latter ones. I still know where I can find documantation, I just go further and ask some link to learn more about PCRE functions. I'm sorry if you misunderstand it. - Original Message - From: CC Zona [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 2001. május 15. 22:19 Subject: Re: [PHP] still not friends with RegExps.. In article 025c01c0dd7a$3b75d320$6a45c5d5@jaguar, [EMAIL PROTECTED] (Gyozo Papp) wrote: There is a function quotemeta() which escapes all special regexp character such as: . \ + * ? [ ^ ] ( $ ) with a '\' except one the '|' pipe. Forget quotemeta(). Use preg quote() instead. Ok, now it's time to get familiar with preg? No, now it's time to get familiar with the online manual http://php.net/pgre-quote, where you would quickly discover that preg_quote can be used even by somone with zero knowledge of PCRE syntax. -- 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]
[PHP] Can't connect to mysql after applying MS Hotfix
Hello everybody, Lastnight, I was building a site. Multiple SQL queries were being made on every page. Everything worked nice and smooth. I downloaded and applied the patch for MS01-026 which effects IIS 4.0 and 5.0. I rebooted after applying the hotfix, and after that, NONE of my php scripts can connect to mysql. It's not a problem with mysql, because I can successfully connect to mysql through the client and can execute queries. Anybody know what's up with this? Also, while playing around lastnight...I wrote some weird code that kills inetinfo.exe on Win2k boxes. It's attached if anyone wants to look @ it (please do and see if you get the same results). -- PHP General Mailing List (http://www.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] WTF: mail() is not supported in this PHP build ???
I have never seen this problem (and this isn't my first install)... I am using: RedHat 7.1 php4.0.4pl1 qmail 1.03 I thought the problem was the fact that I didn't have sendmail installed at all (had the qmail sendmail wrapper in place though; ln -s /var/qmail/bin/sendmail /usr/[lib|sbin]/sendmail )... so I installed sendmail, recompiled php, still no luck... anyone have any ideas? I checked the archives and someone posted a similar question about this yesterday, but no response yet. Michael Geier CDM Sports Systems Administrator email: [EMAIL PROTECTED] phone: 314.991.1511 x 6505 -- PHP General Mailing List (http://www.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] WTF: mail() is not supported in this PHP build ???
Michael Geier wrote: RedHat 7.1 php4.0.4pl1 Installed from source? regards Wagner -- Some guy hit my fender, and I told him, 'Be fruitful and multiply,' but not in those words. - Woody Allen -- PHP General Mailing List (http://www.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] load balancing...
We are doing it here, although I am not involved in the server setup so I can't give you much help. I guess the main thing is setting up the session storage mechanism. If you use session files, then the load balancer needs to add a cookie so that requests in multi-page applications always go to the same server (so that the session file can be found). The alternative is to use a database for session storage. Other than that, it is working well for us. We are using an F5 load balancer with Apache/1.3.14, Linux, and PHP/4.0.4pl1. Kirk -Original Message- From: Juan Claudio Santana Saldaña [mailto:[EMAIL PROTECTED]] Sent: Monday, May 14, 2001 8:19 PM To: [EMAIL PROTECTED] Subject: [PHP] load balancing... Does anybody know how to do load balancing with php and apache ? can you recomend me any tutorial document or how to? Thank you. Claudio. -- PHP General Mailing List (http://www.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] Crypt is not supported in this build??? 4.0.5
Hello, I just installed 4.0.5 on IIS and it is telling me that crypt is not supported in this build. Does anyone know why? Thanks For Da Help Brandon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] How to check aBc different from abc ?
thx ^_^ -- PHP General Mailing List (http://www.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] nested functions
Is there no way to access the $x within the inner function: function outer() { $x = 50; function inner() { echo $x; } inner(); } Global in the inner function does not work. I do not want to have $x global for all. Hannes Schmiderer -- PHP General Mailing List (http://www.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!! ftp problems
Hi I'm having trouble using php to ftp a file from a form. I've scoured the lists and documentation but the answer elludes me. I put in a MAX_FILE_SIZE variable, looked in the php.ini at the tmp_dir (left blank to default to the system temp dir), chmod to 1777 of that temp dir. What am I not doing?? I get the error message: Warning: error opening [..'file'..] Here's my code: global $filename, $MAX_FILE_SIZE; $backstr = bra href=\javascript:history.back(-1)\Back/a; // An array with allowed file extensions $allExt = array(jpg,Jpg,JPG,gif,Gif,GIF); $fileSize = filesize($filename); $ftp_server=ServerNameHere; $ftp_user_name=UserNameHere; $ftp_user_pass=PasswordHere; if ($fileSize $MAX_FILE_SIZE) { die(File size exceeds $MAX_FILE_SIZE bytes.$backstr); } /* This is to isolate filename from path. Chosen separator / is for Mac and Unix-like operating systems. */ $chunk_file = explode(/, $filename); $numChunkFile = count($chunk_file); $dstFile = $chunk_file[$numChunkFile - 1]; // Now let's get file extension $ext = explode(.,$dstFile); $numChunkExt = count($ext); if (in_array($ext[$numChunkExt - 1],$allExt)) { $ftp_id = ftp_connect($ftp_server); $ftp_login = ftp_login($ftp_id,$ftp_user_name,$ftp_user_pass); if (! $ftp_login) { ftp_quit($ftp_id); die(Connection failed, check your login and password.$backstr); } $ftp_put_file = ftp_put($ftp_id,$dstFile,$filename,FTP_BINARY); if (! $ftp_put_file) { echo Upload failed.$backstr; } else { echo Upload $dstFile was successful.\n; } } else { echo ERROR - Allowed file extensions are:br\n; for ($i = 0; $i count($allExt); $i++) { echo b$allExt[$i]/bbr\n; } echo $backstr; } ftp_quit($ftp_id); } Any help would be greatly appreciated! Thanks, Grant -- PHP General Mailing List (http://www.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] Change 'key' names of an associative array.
reset($array); while(list($key,$value)=each($array)){ $array[strtoupper($key)]=$value; unset $array[$key]; } On Tue, 15 May 2001 16:19:41 -0400, Altunergil, Oktay ([EMAIL PROTECTED]) wrote: Yes. But I want to change the name of the key, not the value. Plus I want to be able to do this without creating an extra key/value pair for each conversion I do. oktay -Original Message- From: Jack Dempsey [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 15, 2001 4:22 PM To: Altunergil, Oktay; [EMAIL PROTECTED] Subject: RE: [PHP] Change 'key' names of an associative array. have you tried http://www.php.net/manual/en/function.strtoupper.php -jack -Original Message- From: Altunergil, Oktay [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 15, 2001 4:15 PM To: [EMAIL PROTECTED] Subject: [PHP] Change 'key' names of an associative array. I have been trying to convert a MySQL application to Oracle. Oracle needs the field names to be upper case. For this reason even if I can fetch the result row, I can't access it by $row[name] because I have to do $row[NAME]. Is there a way to change the the key name to upper case, without making a copy.? (I mean without creating another array key with the same name in upper case) Thanks. Oktay Altunergil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: php-list- [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: php-list- [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] PHP and GD on a Redhat linux box
i had compile problems for PHP + GD on a linux box. my best guess is that GD requires X11 support to work properly, and in turn blows up the PHP compile when GD cannot find the 'X11' library since the box is a server, bells and whistles like Xwindows are not installed figured i'd share with anyone, in case others are having the same problem compiling. -- PHP General Mailing List (http://www.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] nested functions
why don't you pass $x as an argument? - Original Message - From: Johannes Schmiderer [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 2001. május 15. 23:41 Subject: [PHP] nested functions Is there no way to access the $x within the inner function: function outer() { $x = 50; function inner() { echo $x; } inner(); } Global in the inner function does not work. I do not want to have $x global for all. Hannes Schmiderer -- PHP General Mailing List (http://www.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] PHP and GD on a Redhat linux box
I do not believe this is the reason that you are having problems. I have compiled GD on many Redhat machines without X11 Brandon -Original Message- From: scott [gts] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 15, 2001 2:44 PM To: php Subject: [PHP] PHP and GD on a Redhat linux box i had compile problems for PHP + GD on a linux box. my best guess is that GD requires X11 support to work properly, and in turn blows up the PHP compile when GD cannot find the 'X11' library since the box is a server, bells and whistles like Xwindows are not installed figured i'd share with anyone, in case others are having the same problem compiling. -- PHP General Mailing List (http://www.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] easy one
Just to add a couple details. On the first page request, PHP sets the constant SID as well as the cookie. If the user has cookies disabled, then SID is also set on all following page requests. If cookies are enabled, then the cookie PHPSESSID (if you stick with the default name) exists on all following page requests. Kirk -Original Message- From: Adaran (Marc E. Brinkmann) [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 15, 2001 7:52 AM To: Php-General Cc: Php-General Subject: Re: [PHP] easy one Hi Romulo, Romulo Hello! Romulo How do I check if a session exist before I call session_start()? check if the Cookie PHPSESSID has been set! --- EnjoY, Adaran ([EMAIL PROTECTED]) check http://www.adaran.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] PHP and GD on a Redhat linux box
when i checked the 'debug.log' file after it broke, it said : gcc -o conftest -g -O2 [...snip ] -lXpm -L/usr/X11R6/lib/ -lX11 15 /usr/bin/ld: cannot find -lX11 collect2: ld returned 1 exit status perhaps you had the X11 libraries even though you didnt have the actual server binaries. or do you think there's something else wrong? (either way, i'm dl'ing the X11 libs for the box right now, so in a few minutes, i'll know for certain) :) -Original Message- From: Brandon Orther [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 15, 2001 6:00 PM To: PHP User Group Subject: RE: [PHP] PHP and GD on a Redhat linux box I do not believe this is the reason that you are having problems. I have compiled GD on many Redhat machines without X11 Brandon -Original Message- From: scott [gts] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 15, 2001 2:44 PM To: php Subject: [PHP] PHP and GD on a Redhat linux box i had compile problems for PHP + GD on a linux box. my best guess is that GD requires X11 support to work properly, and in turn blows up the PHP compile when GD cannot find the 'X11' library since the box is a server, bells and whistles like Xwindows are not installed figured i'd share with anyone, in case others are having the same problem compiling. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] coding for 'no match found'
This is a simple yet fundamental programming question I am hoping somebody will have the patience to explain... I have a mysql database with the email field as the key. Before inserting an new record to it I want to check if there is already a record with that e-mail. This I can do fine. But this script needs to also handle delete requests, which I can also do fine, but I need to code for the instance that there is a delete request for an e-mail record that does not exist. How can I figure out if after my 'while' loop is finished checking the database it has not found a match (so i can inform the requester as such)? Here's the code I have so far... $email_check_query = SELECT email FROM $tablename WHERE email = '$email'; $email_check_result = mysql_query($email_check_query); while($email_query_data = mysql_fetch_array($email_check_result)) { $db_email = $email_query_data[email]; //if match, it's an update or delete if ($email==$db_email) { if ($op==delete) { $action=del; echo delete requestbr; } else { $action = upd; echo update requestbr; } } } //end while loop --- providing the finest in midget technology -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] coding for 'no match found'
See http://www.php.net/manual/en/function.mysql-num-rows.php Kirk -Original Message- From: midget2000x [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 15, 2001 3:00 PM To: [EMAIL PROTECTED] Subject: [PHP] coding for 'no match found' This is a simple yet fundamental programming question I am hoping somebody will have the patience to explain... I have a mysql database with the email field as the key. Before inserting an new record to it I want to check if there is already a record with that e-mail. This I can do fine. But this script needs to also handle delete requests, which I can also do fine, but I need to code for the instance that there is a delete request for an e-mail record that does not exist. How can I figure out if after my 'while' loop is finished checking the database it has not found a match (so i can inform the requester as such)? Here's the code I have so far... $email_check_query = SELECT email FROM $tablename WHERE email = '$email'; $email_check_result = mysql_query($email_check_query); while($email_query_data = mysql_fetch_array($email_check_result)) { $db_email = $email_query_data[email]; //if match, it's an update or delete if ($email==$db_email) { if ($op==delete) { $action=del; echo delete requestbr; } else { $action = upd; echo update requestbr; } } } //end while loop --- providing the finest in midget technology -- PHP General Mailing List (http://www.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] RE: it didn't upgrade to 4.0.5
What can I delete on my server to do a fresh install? I'm trying to upgrade php and it's not working. Joseph -- PHP General Mailing List (http://www.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] ANN:Visual PHP Studio 1.0 Field Test 1 B156 New release!
Hello: The next release of Visual PHP Studio is out!!!. I have reserved the domain visualphpstudio.com and I have moved the web site to a new host to avoid some problems with the old one. The most exciting feature on this release is the ability to work with HTML Forms, a new palette contains all the components you need to create HTML Forms. Even you don't like Visual PHP Studio to develop your pages, maybe you could use it to design your forms, because it's very easy and powerful. List of changes in Build 156 *04/07/2001 - Removed the useless properties from components *05/07/2001 - Inserted the pivots to resize the html form *05/08/2001 - Added Forms palette and basic form design components *05/08/2001 - Added JavaScript events to all form design components *05/09/2001 - Cut, Copy Paste implemented in Designer, Event Editor and Code Editor *05/12/2001 - Added Image Field, File Field and Hidden Field to Forms Palette *05/15/2001 - The HTML Editor has been improved, but it's not finished yet What is Visual PHP Studio? A tool that combines the component technology with the web design, JavaScript and PHP, bringing RAD development to PHP. You can download it for free at http://www.visualphpstudio.com in the downloads section. Feel free to vote on the survey and post your comments on the forums to let me know your opinion/ideas. Also download the readme.doc from the downloads section to know what works and what are the things are going to come. Best Regards Visual PHP Studio, RAD development with PHP http://www.visualphpstudio.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How to check aBc different from abc ?
$st1 = abc; $st2 = abc; strcmp($st1, $st2);// 0 if equal, -1 or 1 if not equal (depending on which one is larger) Bass¨Ð¦õªv [EMAIL PROTECTED] wrote in message 9ds76j$9mv$[EMAIL PROTECTED]">news:9ds76j$9mv$[EMAIL PROTECTED]... thx ^_^ -- PHP General Mailing List (http://www.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] Image problem
On Tue, 15 May 2001 10:23:39 -0700, Jerry Lake [EMAIL PROTECTED] wrote: This is how I fixed that same issue in the head of my page snip if (ereg (new, $PHP_SELF)) { $header = img src=location/of/header/image; $title = www.website.com - What's New; } elseif (ereg (products, $PHP_SELF)) { $header = img src=location/of/header/image; $title = www.website.com - Products; } else { $header = img src=location/of/header/image; $title = www.website.com; } /snip then call the header in in the appropriate place in your html ? echo $header; ? Thanks Jerry. This is what I ended up going with, (Thanks to Josh Hoover) and it works great! switch(true) { case (stristr($REQUEST_URI, /about/)): $headerImage = /images/hdr_txt_about.gif; $footerImage = /images/ftr_txt_about.gif; break; case (stristr($REQUEST_URI, /news/)): $headerImage = /images/hdr_txt_news.gif; $footerImage = /images/ftr_txt_news.gif; break; case (stristr($REQUEST_URI, /buying/)): $headerImage = /images/hdr_txt_buying.gif; $footerImage = /images/ftr_txt_buying.gif; break; case (stristr($REQUEST_URI, /selling/)): $headerImage = /images/hdr_txt_selling.gif; $footerImage = /images/ftr_txt_selling.gif; break; case (stristr($REQUEST_URI, /community/)): $headerImage = /images/hdr_txt_community.gif; $footerImage = /images/ftr_txt_community.gif; break; case (stristr($REQUEST_URI, /relocation/)): $headerImage = /images/hdr_txt_relocation.gif; $footerImage = /images/ftr_txt_relocation.gif; break; } Then, just called $headerImage, and $footerImage in the appropriate places. Thanks to all! 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 [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] SSL and CURL question --
CURL is realy cool, lets me do easy socket stuff, especially with ssl, which leads me to my question: How on God's green earth do I send more then simple requests to a SSL server? Here's my basic request... POST /apps.here/xml/Rate HTTP/1.1 Content-Type: application/xml Content-Length: 1074 ?xml version=1.0 encoding=UTF-8? xml stuff hereblah.../xml stuff here the CURL code (so far) $xml_req=this is the xml doc; $l=strlen($xml_req); $url=https://www.secureserver.com/apps.here/xml/Rate;; $tmp_out=time() . .tmp.xml.out; $fp = fopen (/public/nirvana/ . $tmp_out, w+); fwrite($fp, $xml_req, $l); $ch = curl_init (); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_SSLVERSION, 3); curl_setopt ($ch, CURLOPT_HEADER, 0); curl_setopt ($ch, CURLOPT_CUSTOMREQUEST, POST /apps.here/xml/Rate HTTP/1.1); curl_setopt ($ch, CURLOPT_HTTPHEADER, Content-Type: application/xml); curl_setopt ($ch, CURLOPT_INFILE, $fp); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); // curl_setopt ($ch, CURLOPT_VERBOSE, 1); // curl_setopt ($ch, CURLOPT_POST, 1); $results = curl_exec ($ch); fclose($fp); curl_close ($ch); the tmp xml file displays the correct stuff. I'm totally confused and there is basically NO curl ssl support docs anywhere. distraut in buffalo, dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]