Re: [PHP] (ANNOUNCE) New PHP mailing list *searchable* archives
- Edwin - wrote: Sort of a PHP-AI eh? :) Hmm... I don't think that's a bad idea at all, but... I wonder how you'd deal with new messages/posts/questions which: 1. Real people don't even understand, and 2. Real posters don't even understand what they're asking. Well, that's, of course, a problem. In the best case scenario, the search engine will recognize the patterns and provide meaningful suggestions. In the worst case scenario, it won't return anything useful. Still, it might be worth a try. The system could send only the top ten search results. The problem is that the results should be mailed to the list so that others could tell whether they satisfy the question, but I'm afraid that would become annoying. The truth, however, is that there is a lot of repetition in the questions that are asked here and a simple search through the archives would answer many questions directly--keeping the list a bit cleaner and easier to follow, IMO. However, the only issue with that is that many users do not search the archives, faqs, or internet for the answers before posting to the list. This always seems the case. Many users are unaware of the ethics around mailing lists. Sometimes it is a result of the lack of knowledge that a user has in searching. And sometimes, even for myself, a lack of will to search for the answer. -- Ray -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] (ANNOUNCE) New PHP mailing list *searchable* archives
Robert Cummings wrote: I think this is great but have one bit of hopefully constructive criticism... the horizontal real estate is too small, or the font is too large, I find the content wraps terribly :/ Cheers, Rob. Hi Rob-- True. Alas, it has to fit in our design, so one of the possibilities we're experimenting with is using either floating frames for the threading, or reducing the font size--the problem with the latter being that we *do* want people to be able to read the messages ;-) the user also has the ability to change the fonts. -- Ray -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] making php and perl talk to each other...
If you are running them as commandline apps you can just pipe | the output to another program i.e. phpapp.php | perlapp.pl That should work as long as you deal with the arguments properly... On Tue, 2002-11-19 at 09:50, Kelly Meeks wrote: Is there any way to get a php script to grap the output from a perl script? Can you reverse that and have a perl script grab the output from a php script? Kelly -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Header Location not working
What browsers are having the problems? On Tue, 2002-11-19 at 15:36, Baumann Reto wrote: Hi all Does somebody know if there is a potential problem with Header(Location: ); not working properly? I have a redirection, but it seems that on some browser, this doesn't work. Instead of the redirection, the same page is requested again! I'm also using sessions and html-post request to get to this page (probably they are messing things up). On most browser, the setup is working very well... Thanks for the help reto -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Post Problem
That is what you should be getting right? When you have a select statement that has a value as the first one then that is what you will get when you post or get the form. if you want a blank one then do option/option and that should not pass anything in the post or get... On Mon, 2002-11-18 at 17:30, Dave J. Hala Jr. wrote: I'm running php-4.2.2-8.0.5 on Redhat 8.0 Lately I've noticed that when doing a form, listbox variables have funky values in certain situations. Unfortunately, I haven't been to determined what the certain situation is. Here's an example. Here is the listbox in the form: select NAME=SQN option VALUE=44/option option VALUE=66/option option VALUE=/option /select After clicking submit, when I echo the variable in the post script,I get the following results: SQN=4 I should get the value 4 Doing an echo $_POST[SQN] BR; yields the same results. I didn't start seeing this until this week. I don't know what changed, but it only happens with certain variables on certain posts. Anyone else seen this type of behavior? :) Dave -- ...Unix, MS-DOS and Windows NT (also known as the Good, the Bad, and the Ugly) OSIS Dave J. Hala Jr. 641.485.1606 -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] explicit dot in open_basedir
The explicit dot is to tell the system that you want the current working directory. So by saying ./tmp you want the tmp (directory or file) that is located in the current working directory. If i understand what you are saying is that ./tmp is a directory in the current working directory. If there is a file in that directory that you can open then yes you should be able to open a file in that directory. just remember that ./ means that you want the current working directory. Also, ../ means that you want to move up one in the directory structure. On Mon, 2002-11-18 at 14:58, Marc Delisle wrote: Hi, I am using PHP 4.2.2 and would like to know what is the expected behavior when I don't put an explicit dot in the open_basedir path. Should I be able to open a file in ./tmp ? Another question: let's say my document root is /www and I put a /www in open_basedir, then should I be able to open a file in ./tmp, which is a subdir under /www/marc? Thanks, Marc Delisle -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] echoing date of first and last day of current week.
Probably the best way is to convert the times all into seconds and then do the math to get the last day of the week. Should be relatively easy... HTH On Mon, 2002-11-18 at 05:57, Noodle Snacks wrote: I want to get the unix timestamps of the first and last days of this week... Currently I have this: echo 'Words for the week from '.date('jS F Y',strtotime(last sunday)).' to '.date('jS F Y',strtotime (next saturday)).'.br'; on saturday this showed the 10th to 23rd... Is there a good way to do this mathematically (for speed) or can someone think of a better string to parse? -- JJ Harrison [EMAIL PROTECTED] -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Post Problem
What does the entire form look like? On Mon, 2002-11-18 at 17:43, Dave J. Hala Jr. wrote: I selected the option that would have the value 4, what I get is 4SQN=4 I should get just the value 4 On Mon, 2002-11-18 at 04:33, BigDog wrote: That is what you should be getting right? When you have a select statement that has a value as the first one then that is what you will get when you post or get the form. if you want a blank one then do option/option and that should not pass anything in the post or get... On Mon, 2002-11-18 at 17:30, Dave J. Hala Jr. wrote: I'm running php-4.2.2-8.0.5 on Redhat 8.0 Lately I've noticed that when doing a form, listbox variables have funky values in certain situations. Unfortunately, I haven't been to determined what the certain situation is. Here's an example. Here is the listbox in the form: select NAME=SQN option VALUE=44/option option VALUE=66/option option VALUE=/option /select After clicking submit, when I echo the variable in the post script,I get the following results: SQN=4 I should get the value 4 Doing an echo $_POST[SQN] BR; yields the same results. I didn't start seeing this until this week. I don't know what changed, but it only happens with certain variables on certain posts. Anyone else seen this type of behavior? :) Dave -- ...Unix, MS-DOS and Windows NT (also known as the Good, the Bad, and the Ugly) OSIS Dave J. Hala Jr. 641.485.1606 -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- ...Unix, MS-DOS and Windows NT (also known as the Good, the Bad, and the Ugly) OSIS Dave J. Hala Jr. 641.485.1606 -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Post Problem
but where is the form that you created... That was i can see what you have set up inside of the form tag... On Mon, 2002-11-18 at 17:51, Dave J. Hala Jr. wrote: SQN: 4SQN=4 brSQN: 4SQN=4br html head title Nifcap - Export Checks/title table WIDTH=100% tr td WIDTH=5% bgcolor=#CCfont face= arial size =3 Export Checks/font/td /tr /table br body bgcolor=f0 text=00 font face= font_type size =3 a HREF=https://122.192.204.199/payment/tmp/checks_4SQN=4.zip;checks_4SQN=4.zip/abrbrtable WIDTH= 100% tr td WIDTH=11% bgcolor=66 font face= arial size =3a HREF=https://122.192.204.199/payment/pay_menu.php;Liheap Processing Menu/a/td/font td WIDTH=11% bgcolor=66 font face= arial size =3a HREF=https://122.192.204.199/main.php;Main Menu/a/td/font td WIDTH=11% bgcolor=66 font face= arial size =3a HREF=https://122.192.204.199/logout.php;Logout/a/td/font /tr /table br /font /body /html On Mon, 2002-11-18 at 04:44, BigDog wrote: What does the entire form look like? On Mon, 2002-11-18 at 17:43, Dave J. Hala Jr. wrote: I selected the option that would have the value 4, what I get is 4SQN=4 I should get just the value 4 On Mon, 2002-11-18 at 04:33, BigDog wrote: That is what you should be getting right? When you have a select statement that has a value as the first one then that is what you will get when you post or get the form. if you want a blank one then do option/option and that should not pass anything in the post or get... On Mon, 2002-11-18 at 17:30, Dave J. Hala Jr. wrote: I'm running php-4.2.2-8.0.5 on Redhat 8.0 Lately I've noticed that when doing a form, listbox variables have funky values in certain situations. Unfortunately, I haven't been to determined what the certain situation is. Here's an example. Here is the listbox in the form: select NAME=SQN option VALUE=44/option option VALUE=66/option option VALUE=/option /select After clicking submit, when I echo the variable in the post script,I get the following results: SQN=4 I should get the value 4 Doing an echo $_POST[SQN] BR; yields the same results. I didn't start seeing this until this week. I don't know what changed, but it only happens with certain variables on certain posts. Anyone else seen this type of behavior? :) Dave -- ...Unix, MS-DOS and Windows NT (also known as the Good, the Bad, and the Ugly) OSIS Dave J. Hala Jr. 641.485.1606 -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- ...Unix, MS-DOS and Windows NT (also known as the Good, the Bad, and the Ugly) OSIS Dave J. Hala Jr. 641.485.1606 -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- ...Unix, MS-DOS and Windows NT (also known as the Good, the Bad, and the Ugly) OSIS Dave J. Hala Jr. 641.485.1606 -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is this not possible?
No... Javascript need to send that data back to the server and how are you going to do that? You will have to use a form or a link or some method to send it to the server. Now you can use php to write your javascript code that can be used to link to a php file that can be run on the client side which will then access the server... but you are really talking about to things here server-side (php) and client-side (javascript)... On Mon, 2002-11-18 at 14:39, Jeff Bluemel wrote: I'm been ignored on this question for 4-5 days now. even if it is not possible could somebody please verify this? is it possible to pass a variable from javascript directly to php WITHOUT using either a link, or a form submit to pass the variables? I've gotten a work around to call an image that's actually a php file, but run my script, and then return an image file. is this the only way? -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Display cell if dates are between 2 dates - help
This is how i deal with dates... $date = date in the database. $today = strtotime( gmdate( Y-m-d ) ); $spd= 60 * 60 * 24; // seconds per day $fdate = strtotime( substr( $date, 0, 10 ) ); $future = ( $fdate - $today ) / $spd; do the comparision with $future and it should work for yeah... Basically, I convert it all to seconds and do the math... On Sat, 2002-11-16 at 20:10, Ray Healy (Data Net Services) wrote: Dear all I'm trying to create a search function that can check the current day in a calendar against a mysql database where there is a startdate and enddate and if the date is there then colour code the cell in the calendar. I have tried to use the following command $eventQuery = SELECT title FROM prestigecal WHERE '$sql_currentday' BETWEEN startdate AND enddate;; The database has an ID - title - startdate - enddate This seems to work BUT if the date in the database is a single number i.e. 0 to 9 it cannot dispaly it and also if the startdate or endate is a 10, 20 or 30 it also thinks that it is a 1, 2or 3 Just in case it helps the full codede for this section is as follows : /snip $sql_currentday = $year-$month-$zz; $eventQuery = SELECT title FROM prestigecal WHERE '$sql_currentday' BETWEEN startdate AND enddate;; $eventExec = mysql_query($eventQuery); while($row = mysql_fetch_array($eventExec)) { if (strlen($row[title]) 0) { echo td bgcolor=\red\ valign=\middle\ align=\center\font size=\1px\ face=\Verdana\$zz/font/td\n; $result_found = 1; /snip Thanks for any advice. Ray -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Register_globals = off-compliant form class?
try using pear... On Sat, 2002-11-16 at 22:53, Leif K-Brooks wrote: I'm looking for a good class for forms that will work with register_globals off. I was planning to modify Manuel Lemos's class, but it turned out to be too big of a task. Any ideas? -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Javascript + PHP
http://groups.google.com/groups?hl=enlr=ie=UTF-8group=comp.lang.javascript On Fri, 2002-11-15 at 23:07, SED wrote: I need to finish a project using PHP and JavaScript but the references for JavaScript I'm using is rather old. I'm looking for a JavaScript postlist similar to this but without any luck. I have tried Google but it finds every site containing JavaScript where a postlist is mentioned. Since there are many pros on this list, maybe someone can point me to a JavaScript postlist similar to this. Thanks, Sumarlidi E. Dadason SED - Graphic Design _ Tel: 896-0376, 461-5501 E-mail: [EMAIL PROTECTED] website: www.sed.is -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] LDAP specific?
Why can u not do a page that displays the images as img src? That should work for ya...instead of sending the headers. Are u saving the image in the ldap server? On Thu, 2002-11-14 at 09:27, Tony Earnshaw wrote: People, I'm trying to produce a book of mugs (a 'mug' is a 'face') for people at work to be able to manage and change, as far as they are allowed to, their own personal details in the org's directory database. It's based on PHP 4.2.3/Apache and Openldap 2.1.8 and above and/or Novell eDirectory NLDAP 8.0 or above. One of the things I have to do, is show and change jpeg photos from the user's browser. Browsers are the latest IE, Netscape or Mozilla. No problem with that, only a problem with the following (Code sample below): I can show a jpeg using a href with a target, either in a new page or a frame. To do this, PHP needs to be fed 'header(Content-type: image/jpeg)'. This can be put more or less anywhere in the very short script used for showing the jpeg and works. However, if I try to put any more html code into the script, i.e. 'print html';, print 'body'; etc, *anywhere*, I get a headers already sent error. So I can't include code for changing the BGCOLOR, sizing the image or anything like that. Anybody know a workaround? I've cheesed as much code as i can from the recoginized tools, such as LDAPExplorer, John Hallam's magnificent yet not widely known contrib. and the Wrox books, but none of them even attempts to address what I want. Best, Tony P.s., thanks for what is probably the most *patient minded* and catholic mailing list on the Internet, and all the good advice. ?php // Code to show a jpeg from an attribute sent on a previous page // $headers = getallheaders(); // foreach ($headers as $name = $content) { //echo headers[$name] = $contentbr\n; // } $ds=ldap_connect($Host, $Port); if ($ds) { @$r=ldap_bind($ds); if ($r) { @$these_attrs = array($Attribute); @$result = ldap_search($ds, $BaseDN, $target, $these_attrs); if ($result) { @$result_id = ldap_first_entry($ds, $result); if ($result_id) { @$foto=ldap_get_values_len($ds, $result_id, $Attribute); header(Content-type:image/jpeg); print $foto[0]; } } } } ? -- Tony Earnshaw Cricketers are strange people. They wake up in October, only to find that their wives had left them in May. e-post: [EMAIL PROTECTED] www: http://www.billy.demon.nl -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] LDAP specific?
This is how I do it. I create a php page that gets the image and sends the correct header. Then in my other php page that displays the details about a user i call img src=showperson.php?name=$fullname. Then in showperson i send the correct image headers and the image is displayed properly. HTH... On Thu, 2002-11-14 at 10:50, Krzysztof Dziekiewicz wrote: I can show a jpeg using a href with a target, either in a new page or a frame. To do this, PHP needs to be fed 'header(Content-type: image/jpeg)'. This can be put more or less anywhere in the very short script used for showing the jpeg and works. However, if I try to put any more html code into the script, i.e. 'print html';, print 'body'; etc, *anywhere*, I get a headers already sent error. You can not put any html code with image code. If you send some html you mean to send header(Content-Type: text/html) with header(Content-type: image/jpeg) Where do you want go to ? You can do so: There is on the page http://xxx/user.html?name=smith some html code where a user can act. Among the html code you insert img src=http://xxx/userfoto.html?name=smith; On http://xxx/userfoto.html you send header(Content-type: image/jpeg) and the image content and no html code. -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to generate ms-word files
You might want to do a search on google and see if someone has written a class on creating word documents. I am almost certain that someone has created on. This will save you much time... On Thu, 2002-11-14 at 12:34, michael wrote: hello I'm trying to generate ms-word files with php. Until now, I can create a document and even insert page-breaks. Is there any tutorials going further (boxes, mergedocuments etc...)? this is my code so far: ?php header ('Content-type: application/msword '); header ('Content-Description: PHP Generated Data'); header ('Content-Disposition: inline; filename=test.doc'); ? html head title/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /head body Text before PagBreak br clear=all style='page-break-before:always' Text after PagBreak/body /html Thank you for any help. michael -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] passing multiple variables in a url
Does this not work... a href=contactus.php?email=directorsubject=job enquiry On Thu, 2002-11-14 at 14:11, CJ wrote: I have a contact us php script on my site that allows users to email direct from the webiste. I want to be able to pass the to address and subject line to the script so I can call teh web page from elsewhere on the site and have it automatically choose the correct email address and subject line. EG instad of using a href=mailto:joe;bloggs.mail.com which requires them to have an email client set up on the machine I want to link to a href=contactus.php?email=director subject=job enquiry The script already handles the email=director by setting a default entry in a drop down form but I can't get it to separate the first and second variables in the URL. Also is this a big security risk as I will be echoing the 2nd variable as the contents of a form field. Would it be possible for someone to type in the URL with HTML/php in it that would make a mess of everything? How can I protect against this? Would it be sufficient to just pase the 2nd variable for non alphabetic characters and remove them? -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Auth with Apache
Ed, When you do auth with mysql and they succeed then u can set the $_SERVER['PHP_AUTH_USER'] and in theory that should allow you to connect to the directory because that should be set for apache http authentication. You might have to play with it, but i am sure you can get it to work. On Thu, 2002-11-14 at 16:42, [EMAIL PROTECTED] wrote: I'm now understanding how you can get PHP to present you with a username and password promt just like APache would do if you had a .htaccess file in the directory you were trying to enter. Great idea but it seems that it would be easier to just use the .htaccess file in the directory. What I've been trying to find out is how to pass through a .htaccess file if someone has already passed an database authentication lookup in PHP. I have an area on my site Special Publications where users login and their username and password is checked against a MySQL database. One field in their user records is the URL to their directory on our server. Each one of these directories is protected via .htaccess. What I would really like to do is have them redirected to their URL if they pass authentication and not have them enter their username and password again. Is their a way to do this? Thanks, Ed On Wed, 13 Nov 2002, Ewout de Boer wrote: in httpd.conf Directory /scriptdir AllowOverride AuthConfig /Directory More info at http://httpd.apache.org/docs/mod/core.html#allowoverride regards, Ewout - Original Message - From: Alexander Bemme [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, November 13, 2002 12:02 PM Subject: [PHP] PHP Auth with Apache Hi, i got a little problem (i hope so) I have installed Apache 1.3.26 and PHP 4.2.3 as module. I used the example from www.php.net to do a PHP authentication, but it didn't work, the pop appears but i can't login. In PHPManual is someting about AuthType but nothing about how to fix it. Can someone help out? Thanks --Alex -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Auth with Apache
You should use sessions for this...however, i would not store the password in the session... And verify it that way...i would probably use all sessions for this... Check sessions first and see...if not then do the mysql or apache auth... When you do sessions you can save the page they are trying to access, then have them login (authenticate), then redirect to the page that they wanted... If you are unfamiliar about sesssions: 1. php.net 2. phpbeginner.com 3. phpbuilder.com 4. php.net archives 5. google On Thu, 2002-11-14 at 18:09, [EMAIL PROTECTED] wrote: I can set the $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW'] easily enough but how would you pass that information along with the redirect so apach doesn't prompt you for username and password? I have tried the header(Location http://usernam:password;URL) method and it always prompts as well. Thanks, Ed On 14 Nov 2002, BigDog wrote: Ed, When you do auth with mysql and they succeed then u can set the $_SERVER['PHP_AUTH_USER'] and in theory that should allow you to connect to the directory because that should be set for apache http authentication. You might have to play with it, but i am sure you can get it to work. On Thu, 2002-11-14 at 16:42, [EMAIL PROTECTED] wrote: I'm now understanding how you can get PHP to present you with a username and password promt just like APache would do if you had a .htaccess file in the directory you were trying to enter. Great idea but it seems that it would be easier to just use the .htaccess file in the directory. What I've been trying to find out is how to pass through a .htaccess file if someone has already passed an database authentication lookup in PHP. I have an area on my site Special Publications where users login and their username and password is checked against a MySQL database. One field in their user records is the URL to their directory on our server. Each one of these directories is protected via .htaccess. What I would really like to do is have them redirected to their URL if they pass authentication and not have them enter their username and password again. Is their a way to do this? Thanks, Ed On Wed, 13 Nov 2002, Ewout de Boer wrote: in httpd.conf Directory /scriptdir AllowOverride AuthConfig /Directory More info at http://httpd.apache.org/docs/mod/core.html#allowoverride regards, Ewout - Original Message - From: Alexander Bemme [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, November 13, 2002 12:02 PM Subject: [PHP] PHP Auth with Apache Hi, i got a little problem (i hope so) I have installed Apache 1.3.26 and PHP 4.2.3 as module. I used the example from www.php.net to do a PHP authentication, but it didn't work, the pop appears but i can't login. In PHPManual is someting about AuthType but nothing about how to fix it. Can someone help out? Thanks --Alex -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP apache module question
When you compile php + apachemany people have php as a DSO. So there is no actual binary file in a bin directory that is called. You can also have php as a module that is in the apache core, where it is loaded automatically in apache (not a DSO). You can run php as a cgi which uses the binary...however that is really slow compared to the module. If you need the binary php then you can reconfigure php without apache (leave everything else), make, make install. I also like to add the config option of --bindir=/usr/local/bin to mine so that i get it all in where all users can use the php binary... HTH On Thu, 2002-11-14 at 19:25, Mike D wrote: I am trying to execute a php script from the command line but came to realize that I can't locate any php binary file. I thought there had to be a php bin file in order for php to work or am i missing something? NOTE: i have looked in /usr/bin/, /usr/local/bin/ and ran locates but found nothing. Msytified, Mike D -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] STDIN question
You would have to pass it through the get method... You can only pass stdin to the binary... On Thu, 2002-11-14 at 20:05, Mike D wrote: Is it possible to pass STDIN data to a php script via wget or lynx (cuz Apache is not installed in CGI mode, so I don't have a binary to call)?? I am trying to create a setup where, a certain email address when sent, takes the message data and passes it to a php script to insert into a DB for a ticketing system. Thanks Mike D -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] STDIN question
There sys admins just do not want to deal with it... On my box i have about 2-3 versions of php and 2 version of apache at any given moment... but it can get confusing sometimes... :) On Thu, 2002-11-14 at 20:27, Mike D wrote: Thanks for the feedback BigDog and Jason Wong (you guys rock!) That's what I thought as far as the STDIN goes... My host has told me that it would screw up our current DSO version of PHP if we installed a second CGI version of PHP, is that a crock or what? On Thursday, November 14, 2002, at 05:18 AM, BigDog wrote: You would have to pass it through the get method... You can only pass stdin to the binary... On Thu, 2002-11-14 at 20:05, Mike D wrote: Is it possible to pass STDIN data to a php script via wget or lynx (cuz Apache is not installed in CGI mode, so I don't have a binary to call)?? I am trying to create a setup where, a certain email address when sent, takes the message data and passes it to a php script to insert into a DB for a ticketing system. Thanks Mike D -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error uploading a file
Are you sure that the size is specified correctly? I remember that i have but down 32 for mb when really it takes bytes as the number so i had 32 bytes which sucked for me... On Thu, 2002-11-14 at 20:36, Emiliano Marmonti wrote: Hello all, when I try to upload a file I receive the following error: Warning: Max file size of 2 bytes exceeded - file [Archivo] not saved in Unknown on line I've looked into php.ini and it has the limit set to 2Mb. Have looked using phpinfo and everything looks OK. I'm sure this code was working, I'm using PHP v 4.01pl2 Anu help? Thanks a lot Emiliano Marmonti - This mail sent through IMP: http://horde.org/imp/ -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Auth with Apache
You are sending the header information to the browser before the session stuff begins... make sure that you call session_start(); right after your ?php start tag... On Thu, 2002-11-14 at 21:50, Ysrael Guzmán wrote: I have a problem, i'm new in PHP It is the problem in my browsegive me the solution please Warning: Cannot send session cache limiter - headers already sent (output started at c:\foxserv\www\t-demo1\pedidos\prod_oficina.php:5) in c:\foxserv\www\t-demo1\pedidos\prod_oficina.php on line 6 HELP MEEE!!1 Sos ygm -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Authentication with PHP and HTTP
Just never do it period...that is the best habit to have... That is poor coding on the programmers part... On Fri, 2002-11-15 at 00:59, Maxim Maletsky wrote: using this method for a production environment is incredibly vulnerable. Just think of having a link on that page to some other site (or even having a third-party banner displayed) on which there is a hit counter (and on 90% there are) those can simply read the link in their logs. Never ever use it if security is of a minimum importance or you're completely sure you know what you do. -- Maxim Maletsky [EMAIL PROTECTED] On Tue, 5 Nov 2002 02:04:52 +0100 silver [EMAIL PROTECTED] wrote: hi - I'm not quite sure if this will help you, but lets give it a try: you could use this URL syntax: http://user:password;www.site.com to automatically log your user in to the htaccess protected area. the bad thing about it is that user / password show up in the URL, but you could hide this information with using frames... are PHP/MySQL usernames + passwords the same like in Apache/HTTP? greets, _andi Phillip Erskine [EMAIL PROTECTED] schrieb im Newsbeitrag news:F13i7M4BAyxJMXehYSo4e46;hotmail.com... I have a site that uses PHP/MySQL authentication for one section and Apache/HTTP authentication for another. Eventually I would like to use only PHP and MySQL for authenticating users, but in the meantime, I have to use both. First, users will log in to the main section of the site and I will use PHP session variables to maintain state for that section. What I would like to be able to do is allow users to click a link that would redirect them to the other section of the site and automatically log them in. The section of the site that users will be redirected to uses .htaccess and .htpassword files to enforce HTTP authentication. Is this possible? If so, how? = http://www.pverskine.com/ _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Unsetting Array Element
In theory the memory should be free and the array should be smaller... On Wed, 2002-11-13 at 07:11, Monty wrote: Does unsetting an array element make the array smaller? For example, if I have two elements in an array... $array = (title = Title of Document, content = Ten paragraphs of text in here... ); ...then issue this command... unset ($array['content']); ...will this make $array smaller and more efficient if I then pass it on to a function for processing? Thanks! -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Installation on Redhat 8 - General Questions
What you need to do is go into your apache_1.3.26/src/modules/php4 directory and and clean out the libphp files. 1. Stop apache. 2. Remove lib files from apache_1.3.26/src/modules/php4 3. Do a make clean in apaches top dir. 4. Do a make clean in php top dir. 5. Remove config.cache in php dir. 6. Then recompile php - make - make install 7. Then recompile apache - make - make install 8. Restart apache 9. View phpinfo() Should work now.. On Wed, 2002-11-13 at 16:43, Lee P. Reilly wrote: Hi there, I wonder if someone could answer a few questions for me? First of all, excuse my ignorance as I'm somewhat of a Linux newbie. I have installed PHP, Apache, Mysql, etc. on Windows numerous times, but have found the Linux installation to be more troublesome due in part (more likely in whole) to my lack of Linux experience. Following the instructions for setting up on PHP 4.x for Apache 1.x.x on the URL, http://www.e-gineer.com/instructions/install-php4x-for-apache1xx-on-linux.phtml I installed PHP as a module under Apache. I am using JPGraph which requires the GD graphics library, so after installing PHP with the basic options, I decided to reinstall it with GD support. Here is what I did to accomplish this: In my PHP directory, I removed the config.cache file, did a 'make clean' and recompiled as follows: -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ./configure \ --with-config-file-path=/www/conf \ --with-apache=../apache_1.3.27 \ --with-png-dir=/usr/local \ --with-gd=/usr/local \ --with-zlib \ --enable-track-vars -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= This seemed to be successful! In the Apache directory, I did a 'make clean' and and recompiled as follows: -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ./configure \ --with-layout=Apache \ --prefix=/usr/local/httpd \ --sysconfdir=/www/conf \ --enable-module=rewrite \ --enable-module=status \ --activate-module=src/modules/php4/libphp4.a -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Typed 'make' Stopped Apache Typed 'make install' Started Apache This also seemed to be successful. However, phpinfo() generates information from the previous install. The configure command generated by phpinfo() is -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= './configure' '--with-config-file-path=/www/conf' '--with-apache=../apache_1.3.27' '--enable-track-vars' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= And the build date show the time/date when I built it yesterday. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Can anyone suggest a reason for this? Is there something I am doing wrong? Thanks very much in advance for your help! - Best regards, Lee Reilly -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP include dir
yeah, include_path =path this allows you to put scripts in other places out side the web document tree. For example: lets say you have configuration files that contain all your database passwords...you can put the document in a directory like /usr/local/php/config_scripts and add that directory to your include_path like so: include_path=.:/usr/local/php/config_scripts And now you can access those scripts from your php scripts in your web document directory HTH On Wed, 2002-11-13 at 19:48, Mike D wrote: How do I find the PHP include dir? I looked in the .ini file but it appears that the include dir directive is commented out, here it is: ; UNIX: /path1:/path2 ;include_path = .:/php/includes Do I need to uncomment this? Thanks Mike Mike Dunlop Webmaster - AWN, Inc. [E] [EMAIL PROTECTED] [P] 323.606.4237 [F] 323.466.6619 -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Open Source Presentation Tool
Did all this really have to be sent to the list? On Wed, 2002-11-13 at 22:28, Rasmus Lerdorf wrote: If you don't care that I (or anybody else) can evaluate the presentations generated by your tool why did you bother to follow up my message in the thread when I exposed my evaluation of presentation tools comparing your tool with Prestimel? Because you compared the wrong damn tool. And I already explained why it isn't online anywhere. We lost our VA server and are in the process of rebuilding things on a new server. -Rasmus -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Query problem
In your php.ini file you can turn on all the errors have have them displayed... I would suggest doing that and you should see some errors if there are any. Have you verified that dates in the database via mysql command line or gui application. On Tue, 2002-11-12 at 21:27, Cesar Aracena wrote: Hi all, I came back from vacations and forgot some things about queries... can anyone tell me what is wrong with this? of all the error messages I set up in the script, none comes back on the page but the record is not saved... ? $db = mysql_connect(www.icaam.com.ar, icaam, ); if (!$db) { die(No se pudo abrir la base de datos); } $ok = mysql_select_db(icaam); if(!$ok) { die(No se pudo acceder a la base de datos); } $borndate = $bornd . $bornm . $borny; $phonenumber = $phone; $query = INSERT INTO mararegistro (visitorid, fname, lname, borndate, address, city, country, phone, how) VALUES (null, 'c', 'c', 12, 'c', 'c', 'c', 12, 'c'); $result = mysql_query($query) or die (mysql_errno()); if (mysql_affected_rows() != 1) { die(Fallo al guardar datos); } echo Gracias por administrarnos su información.; ? Any thiughts? Thanks in advance, Cesar -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ldap strong authentication
What type of strong authentication does it want? Do you need to connect via ssh or something... On Tue, 2002-11-12 at 22:13, Karim Jafarmadar wrote: hello I want to connect to a local NDS via LDAP, but when i try to bind i get the error: Unable to bind: Strong authentication required after i search in google and php.net manual i wonder if it is possible do connect with strong authentication any further suggenstions would be great tia karim jafarmadar -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mcrypt Under IIS 5 / Win32?
Can u not get it from php.net...the zip file that contains all the extensions and dlls...not the installer... That should have the one that you need. I am still thinking it is an issue with the path...it took me about a week to get it all working... On Tue, 2002-11-12 at 23:08, Nick Richardson wrote: Still having problems getting mcrypt to work under Windows. But I think I have narrowed it down to me not having the correct version of php_mcrypt.dll. I downloaded the source for PHP and attempted to compile this myself, but can not get it to work. If anyone has any information about where I can get a current php_mcrypt.dll or how I can compile it from the php source (and donÿt say google, because I've been there already), please let me know. I'm about to lose my mind!! Thanks! //Nick -Original Message- From: Nick Richardson [mailto:esoteric.web;gte.net] Sent: Tuesday, November 12, 2002 12:18 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] Mcrypt Under IIS 5 / Win32? I'm trying to load it via php.ini w/ extension=php_mcrypt.dll and php_mcrypt.dll is in the extension_dir - When php_mcrypt.dll is not in the right place, it tells me it can't load the dll. Is there something other than the cygwin1.dll and php_mcrypt.dll that I have to install on the system - all the documentation (what little there is that I have found) has said that I don't need anything other than these 2 files. -Original Message- From: Ray Hunter [mailto:rhunter;venticon.com] Sent: Monday, November 11, 2002 12:48 PM To: Nick Richardson Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Mcrypt Under IIS 5 / Win32? Basically, Are you loading the dll via the file or php? Make sure that the directory(s) where the dlls are located are in your windows path. If that doesnt work then you can always put the dll in your systems dll directory... On Mon, 2002-11-11 at 19:58, Nick Richardson wrote: Ok, another question if you can help. I have (I think) all the components I need (cygwin1.dll, php_mcrypt.dll, etc...). Php_mcrypt.dll is in the PHP dir, everything else is in %windir%. When I try to use any of the mcrypt stuff now, I get: PHP Warning: Unable to load dynamic library './php_mcrypt.dll' - The specified procedure could not be found. in Unknown on line 0 You have any idea what I might be doing wrong? //Nick -Original Message- From: .: B i g D o g :. [mailto:bigdog;venticon.com] Sent: Monday, November 11, 2002 4:50 AM To: Nick Richardson Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Mcrypt Under IIS 5 / Win32? You need to uncomment the dll in the php.ini file...do a search for it and then uncomment it or add it to the php.ini file... That will load it... *Note: i would add that directory to your path that contains the mcrypt dll or all dlls for php and the extension directory to... On Mon, 2002-11-11 at 19:42, Nick Richardson wrote: Yes, there is a DLL for it, but getting PHP to know it is there is where I'm having the problem - I don?t know how to get PHP to under windows to do the equivalent of --with-mcrypt in configure under linux. - maybe I havn't registered the mcrypt dll's correctly or something like that... But I just can't get it to work. Everytime I try to do it I get 'call to undefined function . ' //Nick -Original Message- From: .: B i g D o g :. [mailto:bigdog;venticon.com] Sent: Monday, November 11, 2002 4:37 AM To: Nick Richardson Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] Mcrypt Under IIS 5 / Win32? is there not a dll for mcrypt? On Mon, 2002-11-11 at 19:34, Nick Richardson wrote: I asked this before, but didn't get a response. Anyone out there have any experience a/o know where I can find information on getting the mcrypt functionality to work under Win32 - I have found a port of mcrypt for Win32, and also learned that you can compile it using cygwin - but I don?t know how to register mcrypt w/ PHP and 'turn on' the mcrypt* functions. If anyone has any information or urls / how-tos it would be greatly appreciated! Thanks! //Nick Richardson // [EMAIL PROTECTED] --- Outgoing mail is certified Virus Free. Can McAfee do that? - Hell NO! Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002 -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- Outgoing mail is certified Virus Free. Can McAfee do that? - Hell NO! Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002 -- PHP General Mailing
Re: [PHP] ldap strong authentication
You have two problems it seems. 1. Wrong connection security...now you are using ldaps 2. Now you have the incorrect rdn. when you tried it with ldap you could not even pass the rdn because the encryption was not sufficient. Now you have the encryption down and now it seems that the rdn is wrong. Try fixing that and see what happens... On Wed, 2002-11-13 at 00:30, Karim Jafarmadar wrote: On 12 Nov 2002 17:24:38 + Ray Hunter [EMAIL PROTECTED] wrote: So you are connecting via ldaps://host in the ldap_connect function right? then when you bind make sure you are using the appropriate rdn for that ldap server. do i have to use another rdn, than when connecting via ldap://? i mean, i give the same parameters to the bind function in both methodes (ldap, ldaps), but get those different error messages. That is probably why u are getting a No such Object error. On Wed, 2002-11-13 at 00:19, Karim Jafarmadar wrote: thanks for your reply the whole error message is Warning: LDAP: Unable to bind to server: Strong authentication required and when i connect via SSH its something like that Warning: LDAP: Unable to bind to server: No such Object in ... i am running this thing on a debian box with php4 and openldap-tls installed bye karim jafarmadar On 12 Nov 2002 17:13:17 + BigDog [EMAIL PROTECTED] wrote: What type of strong authentication does it want? Do you need to connect via ssh or something... On Tue, 2002-11-12 at 22:13, Karim Jafarmadar wrote: hello I want to connect to a local NDS via LDAP, but when i try to bind i get the error: Unable to bind: Strong authentication required after i search in google and php.net manual i wonder if it is possible do connect with strong authentication any further suggenstions would be great tia karim jafarmadar -- .: B i g D o g :. -- Thank you, Ray Hunter -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ldap strong authentication
Check the documentation on the openldap and see what you need to use for the rdn.. if you are running gnome you might want to test it out with gq. That is what i use to test out my connection and stuff with... On Wed, 2002-11-13 at 00:44, Karim Jafarmadar wrote: On 12 Nov 2002 17:33:35 + BigDog [EMAIL PROTECTED] wrote: You have two problems it seems. 1. Wrong connection security...now you are using ldaps 2. Now you have the incorrect rdn. Oh .. i get it you mean the second error is due to a ldap/nds problem but i got the connection right when you tried it with ldap you could not even pass the rdn because the encryption was not sufficient. Now you have the encryption down and now it seems that the rdn is wrong. Try fixing that and see what happens... ok .. that was the problem i now get an operations error .. but since i am already connected, i hope i can figure it out by myself thank you !! karim jafarmadar On Wed, 2002-11-13 at 00:30, Karim Jafarmadar wrote: On 12 Nov 2002 17:24:38 + Ray Hunter [EMAIL PROTECTED] wrote: So you are connecting via ldaps://host in the ldap_connect function right? then when you bind make sure you are using the appropriate rdn for that ldap server. do i have to use another rdn, than when connecting via ldap://? i mean, i give the same parameters to the bind function in both methodes (ldap, ldaps), but get those different error messages. That is probably why u are getting a No such Object error. On Wed, 2002-11-13 at 00:19, Karim Jafarmadar wrote: thanks for your reply the whole error message is Warning: LDAP: Unable to bind to server: Strong authentication required and when i connect via SSH its something like that Warning: LDAP: Unable to bind to server: No such Object in ... i am running this thing on a debian box with php4 and openldap-tls installed bye karim jafarmadar On 12 Nov 2002 17:13:17 + BigDog [EMAIL PROTECTED] wrote: What type of strong authentication does it want? Do you need to connect via ssh or something... On Tue, 2002-11-12 at 22:13, Karim Jafarmadar wrote: hello I want to connect to a local NDS via LDAP, but when i try to bind i get the error: Unable to bind: Strong authentication required after i search in google and php.net manual i wonder if it is possible do connect with strong authentication any further suggenstions would be great tia karim jafarmadar -- .: B i g D o g :. -- Thank you, Ray Hunter -- .: B i g D o g :. -- .: B i g D o g :. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: snmp_set_quick_print or snmpwalkoid issue ?
Basically you are not going to get the value type of the snmp, ie OID, timeticks, integers, etc.. Ray Hunter Razvan Cosma [EMAIL PROTECTED] wrote in message Pine.LNX.4.44.0205011203110.32753-10@mach2">news:Pine.LNX.4.44.0205011203110.32753-10@mach2... First of all, gretings to everyone (I'm new here). And the problem: #!/usr/local/bin/php -q ? snmp_set_quick_print(0); $test=snmpwalkoid(1.1.1.1,public,.1.3.6.1.2.1.2.2.1.16); for (reset($test); $i = key($test); next($test)) { echo $i:\n$test[$i]\n; } ? results in: interfaces.ifTable.ifEntry.ifOutOctets.1: interfaces.ifTable.ifEntry.ifOutOctets.1 = Counter32: 137600220 interfaces.ifTable.ifEntry.ifOutOctets.2: interfaces.ifTable.ifEntry.ifOutOctets.2 = Counter32: 25026545 and with snmp_set_quick_print(1): interfaces.ifTable.ifEntry.ifOutOctets.1: interfaces.ifTable.ifEntry.ifOutOctets.1 137600606 interfaces.ifTable.ifEntry.ifOutOctets.2: interfaces.ifTable.ifEntry.ifOutOctets.2 25031056 Shouldn't I get only the last field with the actual value ?? Details: php-4.1.2 ucd-snmp-4.2.4 both from tarballs. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] CURL Users
Has anyone every used curl to do something similar to wget on linux? BigDog -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php