[PHP] Installing mcrypt
I am installing mcrypt on a linux server. I first installed libmcrypt 2.5.7 and now am working on mcrypt 2.6.4. When I do a ./configure for mcrypt 2.6.4, it gives me this error: checking for libmcrypt - version = 2.5.0... *** 'libmcrypt-config --version' returned 2.5.7, but LIBMCRYPT (2.5.6) *** was found! If libmcrypt-config was correct, then it is best *** to remove the old version of LIBMCRYPT. You may also be able to fix the error *** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing *** /etc/ld.so.conf. Make sure you have run ldconfig if that is *** required on your system. *** If libmcrypt-config was wrong, set the environment variable LIBMCRYPT_CONFIG *** to point to the correct copy of libmcrypt-config, and remove the file config.cache *** before re-running configure configure: error: *** libmcrypt was not found There has only been one version of libmcrypt (new server), so I'm not sure why it thinks there is a 2.5.6 version on it. Where do I find the LD_LIBRARY_PATH enviroment variable to change it? Or is there another solution? Thanks! -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Changing the php.ini file
I changed a value for max uploads in my php.ini file (linux box); I restarted apache, then the whole server, to get the new value to come up and, generally, take affect. Neither of those things did it. Does anyone know what I need to do to get the ini file re-read by the OS, or system, so that the new value goes into effect? Thanks, -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Changing the php.ini file
I do have that in my form, it is set to 15 megs. I set the server (php.ini) to allow 15 megs. Still can't get anything past 2 megs to upload. :\ Thanks for help, -Mike -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 05, 2003 9:15 AM To: Mike At Spy; [EMAIL PROTECTED] Subject: RE: [PHP] Changing the php.ini file [snip] I changed a value for max uploads in my php.ini file (linux box); I restarted apache, then the whole server, to get the new value to come up and, generally, take affect. Neither of those things did it. Does anyone know what I need to do to get the ini file re-read by the OS, or system, so that the new value goes into effect? [/snip] In your upload dialog form do you have something similar to this input type=hidden name=MAX_FILE_SIZE value=3 if so, it may need changing. If not, it may need adding. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Changing the php.ini file
I'll go double check to make sure I am hitting the right php.ini, but I think that is the only one the server reported with a 'whereis'. I am taking the data and writing it to a file, so the db isn't an issue. I'll mess with some of other settings and see what happens. :) Thanks, -Mike Oh, yes, this is a big one, you must reset the whole state power grid. :) Simply restarting Apache should do it. Check if your problem doesn't come from somewhere else - how are you checking if the changes took effect? Also, are you sure you're editing the proper php.ini and not some older install's or a backup or something? Check by setting some self-evident setting in php.ini and restarting Apache. Also, if you're sending the data to a database, make sure it's not the database who's barfing due to its own config settings or limitations. HTH Bogdan Mike At Spy wrote: I changed a value for max uploads in my php.ini file (linux box); I restarted apache, then the whole server, to get the new value to come up and, generally, take affect. Neither of those things did it. Does anyone know what I need to do to get the ini file re-read by the OS, or system, so that the new value goes into effect? Thanks, -Mike -- 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
RE: [PHP] Changing the php.ini file
I re-checked the files - nothing I change in the php.ini files seems to take effect. How do I check apache? I saw the post_max_size thing and changed that to be equal to the upload_max_filesize. I'll make it a little higher. Outside of that, I have a cobalt raq4 I am working on with this, and the php.ini file is here: /usr/local/bin/php.ini Any other place an ini file might be? I've certainly learned not to depend on 'whereis' to list everything in the past. :) Thanks fot the help, -Mike -Original Message- From: John W. Holmes [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 05, 2003 9:25 AM To: Marek Kilimajer Cc: Mike At Spy; [EMAIL PROTECTED] Subject: Re: [PHP] Changing the php.ini file Marek Kilimajer wrote: post_max_size is another setting that has effect on uploads. It should be higher than upload_max_filesize. Make sure it isn't Apache doing the limiting, also. Some searching will tell you the setting, but Apache has a limit itself on the size of files it'll accept. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- 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
RE: [PHP] Changing the php.ini file
Bingo. I didn't even notice that the phpinfo was saying the ini file was in a different directory than the one I was looking at. So much for 'whereis' - again. :\ :) Thanks! -Mike -Original Message- From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 05, 2003 9:50 AM To: 'Mike At Spy' Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Changing the php.ini file On 05 November 2003 14:39, Mike At Spy contributed these pearls of wisdom: I re-checked the files - nothing I change in the php.ini files seems to take effect. How do I check apache? I saw the post_max_size thing and changed that to be equal to the upload_max_filesize. I'll make it a little higher. Outside of that, I have a cobalt raq4 I am working on with this, and the php.ini file is here: /usr/local/bin/php.ini That's all possibly irrelevant. Have you looked at your phpinfo() output to see where PHP is *expecting* to find the php.ini file? And is there a php.ini file there? Cheers! Mike -- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] fwrite, fopen, or fread limit?
Does anyone know if the commands for fwrite, fopen, or fread have memory limits in dealing with large files? I created a system for uploading files to a server. Small files work fine. Larger ones (around 7 megs) do not work at all. Thanks, -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] fwrite, fopen, or fread limit?
Yes, that was it. Thanks! :) -Mike -Original Message- From: Roger Spears [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 04, 2003 12:45 PM To: Mike At Spy Subject: Re: [PHP] fwrite, fopen, or fread limit? check the php.ini file, there may be a file upload limit placed there. I ran into a similar problem awhile backI think it's called max_file_upload or something like that... Thanks, Roger Mike At Spy wrote: Does anyone know if the commands for fwrite, fopen, or fread have memory limits in dealing with large files? I created a system for uploading files to a server. Small files work fine. Larger ones (around 7 megs) do not work at all. Thanks, -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] value field filled by mysql output
I am creating a form for editing records output from a mysql db (edit as an html form). I've done this many times, but have never run into this issue. I have code like this for the query: $edit_list = mysql_query(SELECT general_inventory.quantity FROM products_to_categories, general_inventory WHERE products_to_categories.categories_id = $cat AND products_to_categories.products_id = general_inventory.product_id ORDER BY general_inventory.name); And like this for getting the output, inside a while loop: $edit_details = mysql_fetch_array ($edit_list); $qty = $edit_details['quantity']; td align='center'input type=text name='qty$ed' value='$qty' size='3'/td Now, I get more than one column in a row, but I abbreviated it for here and for testing. Every column comes out and fills in the form properly except this one. The issue I am having is that the value of the input text box is being listed as '1', even if the database shows either a value of nothing (meaning, blank) or a value of zero. Anyone have any idea why this might be? Thanks, -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] jpeg libraries.
* Thus wrote Mike At Spy ([EMAIL PROTECTED]): It did install some jpeg stuff under /usr/local/bin, but I don't see anything added to /usr/local/lib. After that, I re-compiled php with: --with-jpeg But nothing changed. I re-compiled again with: --with-jpeg=/usr/local/bin try --with-jpeg=/usr/local Thanks - tried that, but it didn't work. i.e. jpeg is still not enabled in gd. :\ Does anyone know how to get jpeg enabled in gd? I'm using php 4.3.3. Thanks, -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] jpeg libraries.
Actually, I am using php 4.3.3 - which has gd 'bundled' in it. :) I couldn't actually re-compile it then, could I; meaning, is there some way of doing that separatly from php from the 'bundle'? :) Thanks, -Mike -Original Message- From: Tom Rogers [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2003 7:27 PM To: Mike At Spy Cc: [EMAIL PROTECTED] Subject: Re: [PHP] jpeg libraries. Hi, Friday, August 29, 2003, 6:39:16 AM, you wrote: MAS I got the jpeg libraries from: MAS http://freshmeat.net/projects/libjpeg/?topic_id=105%2C809 MAS And installed them; even did a make test to make sure everything was MAS correct. MAS It did install some jpeg stuff under /usr/local/bin, but I don't see MAS anything added to /usr/local/lib. MAS After that, I re-compiled php with: MAS --with-jpeg MAS But nothing changed. MAS I re-compiled again with: MAS --with-jpeg=/usr/local/bin MAS And nothing changed. MAS Anyone have any ideas as to what is going on? Or a suggestion as to what to MAS look for? MAS Thanks, MAS -Mike You may also need to recompile gd -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] imagejpeg function output
Just to make sure no one is lead astray - I still have an issue getting jpeg enabled on a server with gd and php. I am asking this question 'cause I am doing some work on a different server where jpeg is enabled. Anyway, I have this sort of setup: $src_img = imagecreatefromjpeg($rand_image); $dst_img = imagecreate($destWidth,$destHeight); imagecopyresized($dst_img, $src_img, 0, 0, 0, 0, $destWidth,$destHeight, $srcWidth, $srcHeight); imageJPEG($dst_img, $dest_file, 100); imagedestroy($src_img); print $dest_file; Now, from this I get a bunch of binary code like: ª¸âq¼Öa µ*'ì ªNp䤡 r«V ΦܿGà¾Çq¿å¼=©4±3u18º÷xj4ê%R£¥N¥Jj6ý8FMN½Z~Öt©}bµdøûvjZ`ð÷Á¿Þ.ø eg3%ïÄCágÃKYûNÕ Which I sort of expected. BUT; how do I show the picture ($dest_file) in the browser from here? Thanks, -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] jpeg libraries.
Does anyone know how to get jpeg enabled in gd? Yes. I'm using php 4.3.3. Unless dramatic changes were made in 4.3.3 then the procedure should be the same as the previous versions. Namely: --with-gd --with-jpeg-dir=/directory/where/jpeg/libs/are/installed manual Image functions Ok, now I did instal what I believe were the jpeg libraries, or at least were lead to believe they were. They came from this binary: jpegsrc.v6b.tar.gz Which I got from the jpeg libraries web site. This installed: [root jpeg-6b]# make -n install /usr/bin/install -c cjpeg /usr/local/bin/cjpeg /usr/bin/install -c djpeg /usr/local/bin/djpeg /usr/bin/install -c jpegtran /usr/local/bin/jpegtran /usr/bin/install -c rdjpgcom /usr/local/bin/rdjpgcom /usr/bin/install -c wrjpgcom /usr/local/bin/wrjpgcom /usr/bin/install -c -m 644 ./cjpeg.1 /usr/local/man/man1/cjpeg.1 /usr/bin/install -c -m 644 ./djpeg.1 /usr/local/man/man1/djpeg.1 /usr/bin/install -c -m 644 ./jpegtran.1 /usr/local/man/man1/jpegtran.1 /usr/bin/install -c -m 644 ./rdjpgcom.1 /usr/local/man/man1/rdjpgcom.1 /usr/bin/install -c -m 644 ./wrjpgcom.1 /usr/local/man/man1/wrjpgcom.1 None of which actually look like libraries to me (though just because nothing was sent to the lib directory..). :) I tried comiling php with three different 'switches'. Each time I wiped the directory and started from a freshly unpacked php tarball. I tried; --with-jpeg --with-jpeg=/usr/local/bin --with-jpeg=/usr/local None of which worked. Any suggestions?? :) Thanks! -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] imagejpeg function output
Hyeah, but since this is with a page, I keep getting the 'error, headers already sent' thing. How do I get past that? :) Thanks for your help! -Mike -Original Message- From: Marek Kilimajer [mailto:[EMAIL PROTECTED] Sent: Friday, August 29, 2003 12:51 PM To: Mike At Spy Cc: [EMAIL PROTECTED] Subject: Re: [PHP] imagejpeg function output You need to send the right header, in this case header('Content-type: image/jpg'); Mike At Spy wrote: Just to make sure no one is lead astray - I still have an issue getting jpeg enabled on a server with gd and php. I am asking this question 'cause I am doing some work on a different server where jpeg is enabled. Anyway, I have this sort of setup: $src_img = imagecreatefromjpeg($rand_image); $dst_img = imagecreate($destWidth,$destHeight); imagecopyresized($dst_img, $src_img, 0, 0, 0, 0, $destWidth,$destHeight, $srcWidth, $srcHeight); imageJPEG($dst_img, $dest_file, 100); imagedestroy($src_img); print $dest_file; Now, from this I get a bunch of binary code like: qa *' Np rV Gq=43u18xj4%RNJj68FMNZ~t}bdvjZ `?. eg3%??CgKYN Which I sort of expected. BUT; how do I show the picture ($dest_file) in the browser from here? Thanks, -Mike -- 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
RE: [PHP] jpeg libraries.
Jason et al; Thanks for all of your help up - I really appreciate it. However, I still have the issue that while the jpeg libraries were installed, the weren't. :\ This is what was installed through the only binary for jpeg libaries I can find on the net off hand: jpegsrc.v6b.tar.gz yields: [root jpeg-6b]# make -n install /usr/bin/install -c cjpeg /usr/local/bin/cjpeg /usr/bin/install -c djpeg /usr/local/bin/djpeg /usr/bin/install -c jpegtran /usr/local/bin/jpegtran /usr/bin/install -c rdjpgcom /usr/local/bin/rdjpgcom /usr/bin/install -c wrjpgcom /usr/local/bin/wrjpgcom /usr/bin/install -c -m 644 ./cjpeg.1 /usr/local/man/man1/cjpeg.1 /usr/bin/install -c -m 644 ./djpeg.1 /usr/local/man/man1/djpeg.1 /usr/bin/install -c -m 644 ./jpegtran.1 /usr/local/man/man1/jpegtran.1 /usr/bin/install -c -m 644 ./rdjpgcom.1 /usr/local/man/man1/rdjpgcom.1 /usr/bin/install -c -m 644 ./wrjpgcom.1 /usr/local/man/man1/wrjpgcom.1 None of which actually look like libraries to me (though just because nothing was sent to the lib directory..). :) Does anyone know anything about how I can get the jpeg libraries installed? Or where I can even get them - php keeps failing upon ./configure with: configure: error: libjpeg.(a|so) not found ? Thanks! -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] GD PHP
Is there anything special I have to do to enable GD when using PHP 4.3.2? I'm getting an error of: Fatal error: Call to undefined function: imagecreatefromjpeg() in /home/sites/site37/web/photos/functions.php on line 594 When I use the imagecreatefromjpeg() function. Is it not usable with gd? Should I be using imagecreatefromgd()? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] GD PHP
Cool - thanks. :) -Mike -Original Message- From: Javier Tacon [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2003 11:33 AM To: Mike At Spy; [EMAIL PROTECTED] Subject: RE: [PHP] GD PHP You need to compile PHP with the option --with-gd in the configure step. The function is imagecreatefromjpeg() -Mensaje original- De: Mike At Spy [mailto:[EMAIL PROTECTED] Enviado el: jueves, 28 de agosto de 2003 17:32 Para: [EMAIL PROTECTED] Asunto: [PHP] GD PHP Is there anything special I have to do to enable GD when using PHP 4.3.2? I'm getting an error of: Fatal error: Call to undefined function: imagecreatefromjpeg() in /home/sites/site37/web/photos/functions.php on line 594 When I use the imagecreatefromjpeg() function. Is it not usable with gd? Should I be using imagecreatefromgd()? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] GD PHP
I get an error about png libraries not found, though my configure line only adds --with-gd to it from my previous configure (pretty recent). Do I need png and/or some sort of jpeg libraries installed first? I don't mention png in my configure line: ./configure --prefix=/usr --with-apxs=/usr/sbin/apxs --with-gettext=/usr --e nable-safe-mode --with-config-file-path=/etc/httpd --with-exec-dir=/usr/bin --with-zlib --enable-magic-quotes --with-regex=system --with-ttf --with-dba --with-gdbm --enable-mbstring --enable-mbstr-enc-trans --enable-track-vars - -enable-wddx=shared --enable-mm=shared --enable-xml --enable-ftp --disable-d ebug --with-libdir=/usr/lib --with-db3 --with-interbase=shared --with-pgsql= shared --with-ldap --with-pdflib=shared --with-mcrypt --with-gd Thanks, -Mike -Original Message- From: Javier Tacon [mailto:[EMAIL PROTECTED] Sent: Thursday, August 28, 2003 11:33 AM To: Mike At Spy; [EMAIL PROTECTED] Subject: RE: [PHP] GD PHP You need to compile PHP with the option --with-gd in the configure step. The function is imagecreatefromjpeg() -Mensaje original- De: Mike At Spy [mailto:[EMAIL PROTECTED] Enviado el: jueves, 28 de agosto de 2003 17:32 Para: [EMAIL PROTECTED] Asunto: [PHP] GD PHP Is there anything special I have to do to enable GD when using PHP 4.3.2? I'm getting an error of: Fatal error: Call to undefined function: imagecreatefromjpeg() in /home/sites/site37/web/photos/functions.php on line 594 When I use the imagecreatefromjpeg() function. Is it not usable with gd? Should I be using imagecreatefromgd()? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] jpeg libraries.
I got the jpeg libraries from: http://freshmeat.net/projects/libjpeg/?topic_id=105%2C809 And installed them; even did a make test to make sure everything was correct. It did install some jpeg stuff under /usr/local/bin, but I don't see anything added to /usr/local/lib. After that, I re-compiled php with: --with-jpeg But nothing changed. I re-compiled again with: --with-jpeg=/usr/local/bin And nothing changed. Anyone have any ideas as to what is going on? Or a suggestion as to what to look for? Thanks, -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Image Magick
Anyone here familiar with the installation of Image Magick and what files it installs on your machine? I had an admin put it on, and then took it off - but took it off by removing what she thought were all of the files related to it. I just found some files I think that are. They are located in the usr/local/bin directory and are called: animate composite convert display identify mogrify montage The date/time of the files being put there seems to correspond with when the admin put the program on, and names of the files seem to imply it to me. And I just wanted to make sure I'm not going to screw up something else by removing them. :) Thanks! -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Bizarre SQl, if issue....
Hey, I've got a weird issue. I have some code, an MySQL statement, that returns an empty set, like this: $person = mysql_query(Some Statement Here); So, then I have an if/else statement: if (!$person || $person == 0 || $person == '' || $person == '0') { $result = 1; } else { $result = 4; } If the SQL statement returns an empty set, shouldn't $result be equal to 1? Instead, I'm getting $result = 4. Hence all of the 'OR' conditions. I would have have thought !$person would be enough. Thanks for any input! :) -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Bizarre SQl, if issue....
Here's the SQL - I tested it via command line and it comes back empty set. SELECT ID FROM tblItems WHERE number = $place Does that help? -Mike -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 29, 2003 1:31 PM To: Mike At Spy; [EMAIL PROTECTED] Subject: RE: [PHP] Bizarre SQl, if issue [snip] $person = mysql_query(Some Statement Here); if (!$person || $person == 0 || $person == '' || $person == '0') { $result = 1; } else { $result = 4; } If the SQL statement returns an empty set, shouldn't $result be equal to 1? Instead, I'm getting $result = 4. [/snip] Actually I think we need to see the query == Some Statement Here. $person in this case is either TRUE or FALSE -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Bizarre SQl, if issue....
I know. I first tested for !$person but got the TRUE result when I should have received FALSE (empty set). Why would that be? I added '0' and such just to see if I wasn't thinking straight. :\ -Mike -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 29, 2003 1:44 PM To: Jay Blanchard; Mike At Spy; [EMAIL PROTECTED] Subject: RE: [PHP] Bizarre SQl, if issue [snip] ...lots of stuff... [/snip] What I forgot to say is that basically you were testing for query execution, not the number of rows returned from the database. If you want to test the number of rows or some other result from the query you have to go further. HTH! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Bizarre SQl, if issue....
Off hand, I would agree. And that is what I would expect. However, the *exact* same setup on a different server gives me a result of 'FALSE' properly. The other server has php 4.3.3 on it - the one giving the improper response has php 4.1.2. Could this be the issue? -Mike -Original Message- From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 29, 2003 1:47 PM To: 'Mike At Spy'; [EMAIL PROTECTED] Subject: RE: [PHP] Bizarre SQl, if issue -Original Message- From: Mike At Spy [mailto:[EMAIL PROTECTED] Sent: 29 July 2003 18:37 $person = mysql_query(Some Statement Here); Please go back and read the manual page for mysql_query again (http://www.php.net/mysql_query). The above returns FALSE if the query is invalid, or a resource_id you can use to fetch the result (or information about it). So most likely $person is now a MySQL resource id that doesn't match any of the conditions in your if statement, and also (more importantly) doesn't tell you whether you have an empty set or not. I'd suggest mysql_num_rows() for that. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Bizarre SQl, if issue....
[snip] Off hand, I would agree. And that is what I would expect. However, the *exact* same setup on a different server gives me a result of 'FALSE' properly. The other server has php 4.3.3 on it - the one giving the improper response has php 4.1.2. $which_person = mysql_query(SELECT ID FROM tblItems WHERE number = $place); $vthere = mysql_num_rows($which_person); if ($vthere == '0') { True } else { False } What should this return? True or False? -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Bizarre SQl, if issue....
I did the var_dump and got: bool(false) While $vthere (from my previous post) returns 0 (zero) still. :\ But proceeds as if 0 were a false statement when asked if $vthere equals zero. :\ -Mike -Original Message- From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 29, 2003 2:07 PM To: 'Mike At Spy'; Ford, Mike [LSS]; [EMAIL PROTECTED] Subject: RE: [PHP] Bizarre SQl, if issue -Original Message- From: Mike At Spy [mailto:[EMAIL PROTECTED] Sent: 29 July 2003 19:01 Off hand, I would agree. And that is what I would expect. However, the *exact* same setup on a different server gives me a result of 'FALSE' properly. The other server has php 4.3.3 on it - the one giving the improper response has php 4.1.2. Hang on -- it's not clear to me which server is giving which response. Just to be clear, the proper response is to deliver a resource id if the query is valid, or FALSE if not. Could it be that one server is consistently giving you a resource ID of 0, and the other isn't? (I'm not even sure if a resource ID of zero is equivalent to a real zero, or what the result of doing an if ($resource_id) on it would be, but this might be a straw to clutch at!). To see *exactly* what's being returned into $person from your mysql_query(), try doing var_dump($person). Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- 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
RE: [PHP] Bizarre SQl, if issue....
Nothin' wrong with the SQL statement - it executes properly when I enter values that actually pull something from a table. When I enter values that are not present in the table, I go on to have the other issue of it looking like it is false, though it is not. :\ -Mike -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 29, 2003 2:24 PM To: Mike At Spy; Ford, Mike [LSS]; [EMAIL PROTECTED] Subject: RE: [PHP] Bizarre SQl, if issue [snip] I did the var_dump and got: bool(false) While $vthere (from my previous post) returns 0 (zero) still. :\ But proceeds as if 0 were a false statement when asked if $vthere equals zero. :\ -Mike [/snip] Is the query executing properly? Try this ... $sql = SELECT ID from tblItems WHERE number = ' . $place . ' ); if(!($person = mysql_query($sql, $connect_variable))){ print(mysql_error() . \n); exit(); } It is a verbose test -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Bizarre SQl, if issue....
[snip] Nothin' wrong with the SQL statement - it executes properly when I enter values that actually pull something from a table. When I enter values that are not present in the table, I go on to have the other issue of it looking like it is false, though it is not. :\ [/snip] But you are testing the query from the command line, I want to test it from within the confines of the PHP script. Humor me? No, I meant it works fine both at command line and in the script with values assigned to it. But I will humor you anyway. The SQL thing you asked me to do brings back an empty set (no result). :) -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Bizarre SQl, if issue....
-Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 29, 2003 2:41 PM To: Mike At Spy; [EMAIL PROTECTED] Subject: RE: [PHP] Bizarre SQl, if issue [snip] I still want to know what you need to do, test for query execution or value? It is pretty cut and dried after that. Value. If there is nothing found in the table that matches, do one thing. If there is, do another. :) [/snip] Then you must test for something returned, not whether or not the query executed. Use mysql_num_rows($person); I did! Look at this again: $which_person = mysql_query(SELECT ID FROM tblItems WHERE number = $place); $vthere = mysql_num_rows($which_person); if ($vthere == '0') { True } else { False } Yet it still returns as if this is FALSE (i.e. it executes the else {}. :\ :\ -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Bizarre SQl, if issue....
-Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 29, 2003 2:48 PM To: Mike At Spy; [EMAIL PROTECTED] Subject: RE: [PHP] Bizarre SQl, if issue [snip] I did! Look at this again: $which_person = mysql_query(SELECT ID FROM tblItems WHERE number = $place); $vthere = mysql_num_rows($which_person); if ($vthere == '0') { True } else { False } Yet it still returns as if this is FALSE (i.e. it executes the else {}. :\ [/snip] try if ($vthere == 0) { True } else { False } Same result (actually, that was the first statement I tried). :\ -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Bizarre SQl, if issue....
This is a reply to an e-mail that you wrote on Tue, 29 Jul 2003 at 19:46, lines prefixed by '' were originally written by you. I did! Look at this again: $which_person = mysql_query(SELECT ID FROM tblItems WHERE number = $place); $vthere = mysql_num_rows($which_person); if ($vthere == '0') { True } else { False } Yet it still returns as if this is FALSE (i.e. it executes the else {}. : As long as your query is returning 0 rows that code should work ok, but it is incorrect for correctness, if ($vthere == '0') should be if ($vthere == 0) As $vthere will contain an integer, not a string, but as you are using the == comparison operator instead of === PHP should convert them both to the same type before comparing. Can we see the snippet of the actual code that you are using? Actually, what you see is *exactly* the code being used. Nothing has changed about it. And whether the variable is regarded as a string or a number, it gives me the same stupid issue. Not recognizing it as a True statement. :\ Is there any way possible that this could be the client's server? I had to beg to get 'em to recompile to 4.1.2 from 4.0.3. There are using a version of Linux I don't recognize (it isn't redhat or mandrake), but it looks like their kernel is up to date. On my redhat server (with php 4.3.3), the same code responds properly (i.e. that $vthere ==0 is true). :\ -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Bizarre SQl, if issue....
[snip] if ($vthere == '0') { True } else { False } if ($vthere == 0) { True } else { False } Same result (actually, that was the first statement I tried). :\ [/snip] Then the query is failing. But the query returns no errors - both on my code I use to test errors and the one you sent to me! :\ And when I plug values into the query at command line - values that would return an empty set, it executes and returns an empty set. :) Thanks, -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Bizarre SQl, if issue....
Returns 0 (zero). -Mike -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 29, 2003 3:05 PM To: Mike At Spy; [EMAIL PROTECTED] Subject: RE: [PHP] Bizarre SQl, if issue [snip] And when I plug values into the query at command line - values that would return an empty set, it executes and returns an empty set. [/snip] If the query is returning an empty set the value of mysql_num_rows($person) == 0 so $person = mysql_query(The Query); $thecount = mysql_num_rows($person); echo $thecount \n; And tell us what $thecount is... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Bizarre SQl, if issue....
[snip] $person = mysql_query(The Query); $thecount = mysql_num_rows($person); echo $thecount \n; And tell us what $thecount is... Returns 0 (zero). [/snip] Then if($thecount == 0){ $whatever = 1; } else { $whatever = 4; } $whatever should be 1 But that is my point - and I think we are going in circles now. It just doesn't do that. It returns 4 (as per your example). :\ -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Compiling PHP
I went over what you commented on - thanks for the input. Most everything did indeed stay. This is what I get when going a make install now: Installing PHP CLI binary:/usr/local/bin/ Installing PHP CLI man page: /usr/local/man/man1/ Installing PHP SAPI module [activating module `php4' in /etc/httpd/conf/httpd.conf] cp libs/libphp4.so /usr/lib/apache/libphp4.so cp: cannot stat `libs/libphp4.so': No such file or directory apxs:Break: Command failed with rc=1 make: *** [install-sapi] Error 1 BTW, this all stems from another admin on the server wanting to upgrade apache to 1.3.27 - when that was done, my php written in my scripts started failing. It doesn't even work now. Whenever I have a script that passes a value (example: a link going to somewhere.php?w=4), it does not process at all (nothing happens - so w doesn't do anything). Everything worked fine until this started... My config file I am using is now: ./configure --with-apxs=/usr/sbin/apxs --with-gd --with-mysql --with-png --w ith-pear --with-config-file-path=/usr/local/apache --with-zlib --with-jpeg --with-ttf --with-regex=php --with-db --with-gdbm --enable-mbstring --enable -mm=shared --enable-xml --with-db3 --with-pgsql=shared --with-ldap Thanks for any help, -Mike -Original Message- From: Ralph Guzman [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 08, 2003 5:51 PM To: 'Mike At Spy'; [EMAIL PROTECTED] Subject: RE: [PHP] Compiling PHP The error you are providing here is because you do not have the required libraries installed. Some of these modules require that the programs or libraries be installed, php does not install them for you. This is an extensive config. Are you sure you need all these. I see that you are trying to enable pgsql, mySQL, interbase. Will you be running all these databases on you server? I've looked through your config, and below are some notes I made. Hope this helps. .. --prefix=/usr is there a reason why you must install php to /usr. The default directory is /usr/local/lib? --with-apxs=/usr/sbin/apxs is your apache compiled with mod_so for apxs support? http://httpd.apache.org/docs/programs/apxs.html --enable-safe-mode this may restrict some php functions --with-exec-dir=/usr/bin this will allow executables in your /usr/bin directory. This might be a security risk. Why not let it default to /usr/local/php/bin? --with-zlib I think this should be --with-zlib-dir=DIR http://www.php.net/zlib --with-regex=system PHP supports regular expressions by default. Why don't you use --with-regex=php http://www.php.net/regex --with-ttf do you have the FreeType libraries installed? http://www.php.net/image --with-db does your server support this type of database? http://www.php.net/manual/en/ref.dbm.php --with-gdbm does your server support this type of database? --with-mbstring do you need multi-byte character support? http://www.php.net/mbstring --with-mbstr-enc-trans not sure what this does. --with-libdir not sure what this does. --with-interbase=shared are you running Interbase on your server? http://www.php.net/manual/en/ref.ibase.php --with-pgsql=shared are you running PostgreSQL on your server? http://www.php.net/manual/en/ref.pgsql.php --with-ldap do you have LDAP libraries installed? http://www.php.net/manual/en/ref.ldap.php --with-imap-ssl I think this should be --with-imap-ssl=[DIR] http://www.php.net/imap --with-mysql are you running MySQL on your server? http://www.php.net/manual/en/ref.mysql.php --with-gd Do you have the GD library installed? http://www.php.net/manual/en/ref.image.php --with-png Do you have PNG library installed? http://www.php.net/manual/en/ref.image.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Going Back in PHP
I am trying to help one of our admins with a php config/setup issue on one of our servers; the admin re-compiled php, but did not include all of the correct settings. Outside of having the previous make and config files, is there any other files on the server that may hold the old settings so that we can gather them and return to the previous way we had php set up? Thanks, -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Compiling PHP
I am doing a new compile of PHP (4.3.3) - anyone know what this error is? configure: error: libgds or libib_util not found! Here is my configuration: ./configure --prefix=/usr --with-apxs=/usr/sbin/apxs --enable-safe-mode --wi th-config-file-path=/etc/httpd --with-exec-dir=/usr/bin --with-zlib --enable -magic-quotes --with-regex=system --with-ttf --with-db --with-gdbm --with-mb string --with-mbstr-enc-trans --enable-track-vars --enable-wddx=shared --ena ble-mm=shared --enable-xml --disable-debug --with-libdir --with-interbase=s hared --with-pgsql=shared --with-ldap --with-imap-ssl --with-mysql --disable -url-fopen-wrapper --with-gd --with-png --with-pear Thanks for any help! -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Compiling PHP
Actually, I think I found the issue. Now I am getting: configure: error: build test failed. And I changed my config to be: ./configure --prefix=/usr --with-apxs=/usr/sbin/apxs --with-gd --with-mysql --with-png --with-pear --with-gettext=/usr --enable-safe-mode --with-config- file-path=/etc/httpd --with-exec-dir=/usr/bin --with-zlib --enable-magic-quo tes --with-regex=system --with-ttf --with-db --with-gdbm --enable-mbstring - -enable-mbstr-enc-trans --enable-track-vars --enable-wddx=shared --enable-mm =shared --enable-xml --enable-ftp --disable-debug --with-libdir=/usr/local/l ib --with-db3 --with-interbase=shared --with-pgsql=shared --with-ldap --with -imap --with-pdflib=shared --with-kerberos Anyone have any ideas? I'm on linux redhat 7.3. Thanks, -Mike -Original Message- From: Mike At Spy [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 08, 2003 3:47 PM To: [EMAIL PROTECTED] Subject: [PHP] Compiling PHP I am doing a new compile of PHP (4.3.3) - anyone know what this error is? configure: error: libgds or libib_util not found! Here is my configuration: ./configure --prefix=/usr --with-apxs=/usr/sbin/apxs --enable-safe-mode --wi th-config-file-path=/etc/httpd --with-exec-dir=/usr/bin --with-zlib --enable -magic-quotes --with-regex=system --with-ttf --with-db --with-gdbm --with-mb string --with-mbstr-enc-trans --enable-track-vars --enable-wddx=shared --ena ble-mm=shared --enable-xml --disable-debug --with-libdir --with-interbase=s hared --with-pgsql=shared --with-ldap --with-imap-ssl --with-mysql --disable -url-fopen-wrapper --with-gd --with-png --with-pear Thanks for any help! -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail() function
Is anyone familiar with the mail function and how it works on the server? I can't get it to work on a client's server, and this error shows up in the error log: PHP Warning: U1Àå]Ãö¼': Unable to initialize module Module compiled with debug=144, thread-safety=135 module API=1119810252 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 PHP Warning: U1Àå]Ãö¼': Unable to initialize module Module compiled with debug=144, thread-safety=167 module API=1120015052 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 If anyone has any suggestions as to what to look for, I would appreciate it. I already tried 'pointing' php.ini directly to sendmail (which is in a traditional spot: /usr/sbin/sendmail). Thanks, -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mail() function
I can't tell what the version is, but I can tell you that the kernel is: 2.4.7-10 Maybe it has something to do with what identity php or sendmail is running under? Thanks, -Mike -Original Message- From: Adam Voigt [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 1:01 PM To: Mike At Spy Cc: [EMAIL PROTECTED] Subject: Re: [PHP] mail() function Yeah, umm, thats a weird error message. What server platform / OS? On Mon, 2003-07-07 at 12:58, Mike At Spy wrote: Is anyone familiar with the mail function and how it works on the server? I can't get it to work on a client's server, and this error shows up in the error log: PHP Warning: U1]': Unable to initialize module Module compiled with debug=144, thread-safety=135 module API=1119810252 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 PHP Warning: U1]': Unable to initialize module Module compiled with debug=144, thread-safety=167 module API=1120015052 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 If anyone has any suggestions as to what to look for, I would appreciate it. I already tried 'pointing' php.ini directly to sendmail (which is in a traditional spot: /usr/sbin/sendmail). Thanks, -Mike -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- 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
RE: [PHP] mail() function
Never really thought about that, but the perms are set at 644 for the script trying to do the actual function. I ran the command to find the version at command line, but the script that sends mail is part of a web site (so I am running it through my browser). -Mike -Original Message- From: Brian S. Drexler [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 2:06 PM To: 'Mike At Spy' Subject: RE: [PHP] mail() function I assume you are running this on the command line. Does the file have the correct permissions? -Original Message- From: Mike At Spy [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 1:57 PM To: [EMAIL PROTECTED]; Mike At Spy Cc: [EMAIL PROTECTED] Subject: RE: [PHP] mail() function I can't tell what the version is, but I can tell you that the kernel is: 2.4.7-10 Maybe it has something to do with what identity php or sendmail is running under? Thanks, -Mike -Original Message- From: Adam Voigt [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 1:01 PM To: Mike At Spy Cc: [EMAIL PROTECTED] Subject: Re: [PHP] mail() function Yeah, umm, thats a weird error message. What server platform / OS? On Mon, 2003-07-07 at 12:58, Mike At Spy wrote: Is anyone familiar with the mail function and how it works on the server? I can't get it to work on a client's server, and this error shows up in the error log: PHP Warning: U1]': Unable to initialize module Module compiled with debug=144, thread-safety=135 module API=1119810252 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 PHP Warning: U1]': Unable to initialize module Module compiled with debug=144, thread-safety=167 module API=1120015052 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 If anyone has any suggestions as to what to look for, I would appreciate it. I already tried 'pointing' php.ini directly to sendmail (which is in a traditional spot: /usr/sbin/sendmail). Thanks, -Mike -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mail() function
They have it set to Show all errors except for notices. -Mike -Original Message- From: Brian S. Drexler [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 2:18 PM To: 'Mike At Spy' Subject: RE: [PHP] mail() function Ok, so if it is a command line issue it's not the problem you are having with the mail script. Does it give you any sort of error from the browser or are the errors turned off in the php.ini? -Original Message- From: Mike At Spy [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 2:17 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: [PHP] mail() function Never really thought about that, but the perms are set at 644 for the script trying to do the actual function. I ran the command to find the version at command line, but the script that sends mail is part of a web site (so I am running it through my browser). -Mike -Original Message- From: Brian S. Drexler [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 2:06 PM To: 'Mike At Spy' Subject: RE: [PHP] mail() function I assume you are running this on the command line. Does the file have the correct permissions? -Original Message- From: Mike At Spy [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 1:57 PM To: [EMAIL PROTECTED]; Mike At Spy Cc: [EMAIL PROTECTED] Subject: RE: [PHP] mail() function I can't tell what the version is, but I can tell you that the kernel is: 2.4.7-10 Maybe it has something to do with what identity php or sendmail is running under? Thanks, -Mike -Original Message- From: Adam Voigt [mailto:[EMAIL PROTECTED] Sent: Monday, July 07, 2003 1:01 PM To: Mike At Spy Cc: [EMAIL PROTECTED] Subject: Re: [PHP] mail() function Yeah, umm, thats a weird error message. What server platform / OS? On Mon, 2003-07-07 at 12:58, Mike At Spy wrote: Is anyone familiar with the mail function and how it works on the server? I can't get it to work on a client's server, and this error shows up in the error log: PHP Warning: U1]': Unable to initialize module Module compiled with debug=144, thread-safety=135 module API=1119810252 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 PHP Warning: U1]': Unable to initialize module Module compiled with debug=144, thread-safety=167 module API=1120015052 PHP compiled with debug=0, thread-safety=0 module API=20010901 These options need to match in Unknown on line 0 If anyone has any suggestions as to what to look for, I would appreciate it. I already tried 'pointing' php.ini directly to sendmail (which is in a traditional spot: /usr/sbin/sendmail). Thanks, -Mike -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP and Apache
Recently, I had Apache upgraded on my linux redhat 7.3 server from 1.2.3 to 1.3.27. PHP stopped working when trying to process html files with php in them. In the httpd.conf file, I have AllowOverride set to All. In the Virtual Host settings I have 'AddType application/x-httpd-php .html'. HTML documents, which did process before the upgrade, no longer do. Does anyone know of any reason for this? I've been searching on the web, but most people go back to the ol' AllowOverride thing, which isn't the issue in this case. Thanks, -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] header() issues....
Does anyone know if there are issues with using the header() function inside frames? Is there extra stuff that needs to be added to it to get it to work correctly? Or if there were issues with header in php 4.06? Thanks, -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: header(); Issue
I'll give one of the suggestions a whirl (or both). I do have this same sort of thing on a different server with a more recent version of PHP - which is why I thought it might be a version issue. :) -Mike -Original Message- From: Esteban Fernandez [mailto:[EMAIL PROTECTED] Sent: Thursday, June 19, 2003 12:41 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: header(); Issue Try header(Location: .$Relative./outstanding.php?pdd=1pddid=.$poid.); EF. Spyproductions Support Team [EMAIL PROTECTED] escribió en el mensaje news:[EMAIL PROTECTED] I have this in a script: header(Location: $Relative/outstanding.php?pdd=1pddid=$poid); It works fine elsewhere in the script without the variables. Does anyone know if php 4.06 has issues with this? Or am I making a boneheaded mistake here? $Relative is from an include, and outputs fine. :) Thanks! :) -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Agh! Driving me crazy!
Anyone see anything wrong with this line of code? $fine = mysql_query(INSERT INTO tblPOItems(poID,poItemUPC,poItemNumber,poItemDescription,poItemInnerCasePkg, poInnerQuantity,poItemEstQuantity,poItemCostEach,poItemSuggestedSellPrice) values('$poID', '$place[0]', '$inmb', '$ides', '$iicp', '$cases', '$place[1]', '$iice', '$isgs'); I keep getting: Query failed: You have an error in your SQL syntax near '' at line 1 Query was: 1064 exiting. I checked the column count a number of times. Everything is fine there. Not that it would matter as much since i am specifying it. :\ Thanks, -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Agh! Driving me crazy!
Gah!!! :) Thanks! Thanks to all! :) -Mike -Original Message- From: Jennifer Goodie [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 18, 2003 3:05 PM To: Mike At Spy; [EMAIL PROTECTED] Subject: RE: [PHP] Agh! Driving me crazy! You are missing the closing ) around the values you are inserting. Anyone see anything wrong with this line of code? $fine = mysql_query(INSERT INTO tblPOItems(poID,poItemUPC,poItemNumber,poItemDescription,poItemInn erCasePkg, poInnerQuantity,poItemEstQuantity,poItemCostEach,poItemSuggestedSellPrice) values('$poID', '$place[0]', '$inmb', '$ides', '$iicp', '$cases', '$place[1]', '$iice', '$isgs'); I keep getting: Query failed: You have an error in your SQL syntax near '' at line 1 Query was: 1064 exiting. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] setlocale() changes?
I've been getting a warning on one of my scripts since I upgraded from 4.1.2 to the most recent version of PHP. The warning is: Warning: setlocale(): Passing locale category name as string is deprecated. Use the LC_* -constants instead The script at the line that is failing sez: setlocale (LC_TIME, $locale); This script isn't mine off hand - what do I look for? I'm not sure I understand the error message. :\ Thanks! -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] setlocale() changes?
Actually, I must apologize to you and the list. I checked the function on the php site *after* I asked and saw that was the issue immediately. :\ :) -Mike -Original Message- From: Neil Freeman [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 8:57 AM To: Mike At Spy Cc: [EMAIL PROTECTED] Subject: Re: [PHP] setlocale() changes? Try removing the double quotes around LC_TIME Neil Mike At Spy wrote: ** * This Message Was Virus Checked With : SAVI 3.69 May 2003 Last Updated/Checked 2nd June 2003 ** * I've been getting a warning on one of my scripts since I upgraded from 4.1.2 to the most recent version of PHP. The warning is: Warning: setlocale(): Passing locale category name as string is deprecated. Use the LC_* -constants instead The script at the line that is failing sez: setlocale (LC_TIME, $locale); This script isn't mine off hand - what do I look for? I'm not sure I understand the error message. :\ Thanks! -Mike -- -- www.curvedvision.com -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP vs. CGI
Sorry, yes. :) -Mike -Original Message- From: Leif K-Brooks [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 4:45 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] PHP vs. CGI CGI meaning perl? SpyProductions Support Team wrote: Does PHP use less system resources than CGI on a server? I have a bulletin board which is incredibly active, but there is a PHP sister to it. Thanks, -Mike -- 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. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Installation Configuration Question
Has anyone ever had an issue where PHP, for whatever reason, stopped .htaccess files from working? Thanks, -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP not working in html
PHP isn't working in my html docs - what changes do I need to make to get it to do so? Does it need to be recompiled? Can I do it without re-compiling? Thanks, -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP not working in html
There isn't any .htaccess file in the directory - I added one with the line you specified, and my directory comes up with a 'server misconfiguration error'. Any other ideas? :) Thanks! -Mike In your .htaccess file remove anything that looks like this: AddHandler server-parsed .html And add this line: AddType application/x-httpd-php .php .htm .html Do a search for parse html php for more help. -Kevin - Original Message - From: Mike At Spy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, November 07, 2002 2:16 PM Subject: [PHP] PHP not working in html PHP isn't working in my html docs - what changes do I need to make to get it to do so? Does it need to be recompiled? Can I do it without re-compiling? Thanks, -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Weird, weird, weird!
Anyone ever have the experience of working on a site, working with MySQL and then having something almost inexplicable happen? I was working on a script, and had this weird event. A very simple script with this: mysql_connect(localhost,user,pass); mysql_select_db(dbname) or die(Query Connection Database failed); $old=date(z)-1; mysql_query(DELETE FROM Users WHERE Date $old); $cartquery = mysql_query(SELECT CartItemsID,Date FROM CartItems) or die(Query failed); $cartnow = mysql_query($cartquery); $cr=0; $cartme = mysql_num_rows($cartnow); this is the line that is failing! while ($cr $cartme){ $cartrow=mysql_fetch_row($cartnow); $CII=$cartrow[0]; $CDa=$cartrow[1]; $pieces=explode(:,$CDa); $DCHK=$pieces[1]; if ($DCHK $old) { mysql_query(DELETE FROM CartItems WHERE CartItemsID = '$CII'); } } Started spitting this error at me: Warning: Supplied argument is not a valid MySQL result resource in (exact location snipped) This is the line containing mysql_num_rows that is getting this error. Someone please tell me I'm missing something obvious! Yes, the connects to MySQL database are fine. I can run the query right in phpMyAdmin with no issues. If mysql_num_rows returns 0, or empty, it shouldn't be complaining, should it? It would just skip the loop, correct? Thanks, -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Weird, weird, weird!
Damn! I should have seen that! Oh well, at least it was something obvious. ;-) Thanks to you Jason, and everyone who replied to point out the obvious to my tired brain (excuses, excuses!). -Mike -Original Message- From: Jason Young [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 08, 2002 4:15 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: Weird, weird, weird! You're doubling up on your mysql_query's .. the first one runs, and I don't know the ins and outs of PHP, but the second mysql_query causes the resource to not be available... had a similar problem recently. Take the mysql_query out of the $cartquery assignment. -Jason Mike At Spy wrote: Anyone ever have the experience of working on a site, working with MySQL and then having something almost inexplicable happen? I was working on a script, and had this weird event. A very simple script with this: mysql_connect(localhost,user,pass); mysql_select_db(dbname) or die(Query Connection Database failed); $old=date(z)-1; mysql_query(DELETE FROM Users WHERE Date $old); $cartquery = mysql_query(SELECT CartItemsID,Date FROM CartItems) or die(Query failed); $cartnow = mysql_query($cartquery); $cr=0; $cartme = mysql_num_rows($cartnow); this is the line that is failing! while ($cr $cartme){ $cartrow=mysql_fetch_row($cartnow); $CII=$cartrow[0]; $CDa=$cartrow[1]; $pieces=explode(:,$CDa); $DCHK=$pieces[1]; if ($DCHK $old) { mysql_query(DELETE FROM CartItems WHERE CartItemsID = '$CII'); } } Started spitting this error at me: Warning: Supplied argument is not a valid MySQL result resource in (exact location snipped) This is the line containing mysql_num_rows that is getting this error. Someone please tell me I'm missing something obvious! Yes, the connects to MySQL database are fine. I can run the query right in phpMyAdmin with no issues. If mysql_num_rows returns 0, or empty, it shouldn't be complaining, should it? It would just skip the loop, correct? Thanks, -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Populating Other People's Forms
I would like to write a script that would populate someone else's form on the net and get the results. Off hand, I imagine I would use fopen() to open up the web page and pass some variables to it. The problem I have is that the form I want to populate is a multi-step CGI. Is this possible? How do I continue to pass variables to a second or third step, sending variables passed on what the form says to do next (which is predictable)? This is considering I do not have the cooperation of the web site I am trying to fill out the form for step by step, and I would like to write this so it is done in a behind-the-scenes, automated way. For example: A customer registered with me could ask for a product. My 'agent' would go to the site where the product is sold, login, submit all of the appropriate information for purchase and shipment, and then come back with (hopefully) a success message (along with any pertinent information from the purchase). Anyone have any ideas, suggestions, or can point me in the right direction? Thanks, -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] random array sort
You could use array_rand() to take stuff out of the array at random and then stuff it all back into another array. -Mike -Original Message- From: ROBERT MCPEAK [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 10, 2002 10:22 AM To: [EMAIL PROTECTED] Subject: [PHP] random array sort Could someone show me a quick and simple way to randomly sort array elements? I can't seem to pinpoint the correct parameters in the docs. Thanks! -- 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
RE: [PHP] random array sort
From what I understand about array_rand() and the example in the manual, it does only pull one of each element of the array. You could easily set up a script to compare what it is pulling to what the array you putting it into currently has in it if it didn't. -Mike -Original Message- From: David Rice [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 10, 2002 10:49 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] random array sort But if array_rand() truly pulls out random keys, how do you guarantee that you are not randomly pulling out the same key as you iterate through the array? Perhaps you could set the number of keys to return, to the size of the array, and somehow, magically, all the keys would be included in the returned array of keys. i.e. array_rand ( array , array_size) I have no idea what this would produce... -David On Tuesday, September 10, 2002, at 10:33 AM, Mike At Spy wrote: You could use array_rand() to take stuff out of the array at random and then stuff it all back into another array. -Mike -Original Message- From: ROBERT MCPEAK [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 10, 2002 10:22 AM To: [EMAIL PROTECTED] Subject: [PHP] random array sort Could someone show me a quick and simple way to randomly sort array elements? I can't seem to pinpoint the correct parameters in the docs. Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP 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
RE: [PHP] Agh! trim (#$@#@^%!!!)
Get this - it didn't work! :( I tried decreasing the -1 to -2 and so on, but nothing on that either. :( -Mike -Original Message- From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 12:45 PM To: Mike At Spy Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Agh! trim (#$@#@^%!!!) Well, perhaps you have something after the . in that string? You can strip off the last char of a string very simply with: substr($str,0,-1) -Rasmus On Tue, 20 Aug 2002, Mike At Spy wrote: Hey! :) I have an issue with trim / triml. Whenever I put a string in to trimmed, it refuses to take the period at the end of the string off. I did put more things to trim first, but this is basically what I am doing: $single = The date is 20-Aug-2002. // This is an example - see below $trimmed = rtrim($date, .); Is there an issue with this? I've tried using trim() too. The source of $single is a reponse from a server. I should note that when I put this in as an experiment, it works fine. When I get the line from the server, it doesn't work! The only thing I can think of is the possibility that the . I am seeing at the end of the line isn't really one (it looks like a duck, copies like a duck, but...isn't a duck??!!). Is there a way to just strip the last character off regardless of what it is? Thanks, -Mike -- 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
RE: [PHP] Agh! trim (#$@#@^%!!!)
Here is the complete code - I have a lot of prints to watch things as they happen. $whois is the result of a WHOIS search. // beginning of my stuff function get_date ($whois){ trim ($whois); $whoisarray = explode (\n, $whois); print_r(array_values ($whoisarray)); $total_elements = count ($whoisarray); print pb$total_elements/b elements in this array; $ce = 0; while ($ce $total_elements){ $single_line = array_pop ($whoisarray); $expiration = strstr ($single_line,xpires); if ($expiration != '' || 0) { print pbThis is the line you want! Line $ce that sez: $single_line/bp; // $single_line = preg_replace (., , $single_line); $single_line = substr($single_line, 0, -2); // $single_line = rtrim ($single_line, \t\s\n\r); $getdatearray = explode ( , $single_line); print_r(array_values ($getdatearray)); $total_expire_elements = count ($getdatearray); print pbr.$total_expire_elements; $dc = 0; while ($dc $total_expire_elements){ $element = array_pop($getdatearray); $date_dash = strstr($element,-); if ($date_dash != '' || 0){ print pbrFirst Detection .$element; // $trimmed = rtrim ($element, \t.); print pbrLast print before date function .$element; month_replace ($element); print pbrResult after function .$element.pbr; $MySQLDate=date_validate($element); if (substr($MySQLDate, 0, 5)==Error) { // Insert Error Code if you want } else { // Insert Valid Date Code if you want } print pThe MySQL Formated date is $MySQLDate; } else {} $dc++; } } else {} $ce++; } } // end of my stuff Thanks, -Mike -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 21, 2002 8:53 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Agh! trim (#$@#@^%!!!) On Wednesday 21 August 2002 20:36, Mike At Spy wrote: Get this - it didn't work! :( I tried decreasing the -1 to -2 and so on, but nothing on that either. :( Post your exact code which didn't work. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* You can't go home again, unless you set $HOME. */ -- 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
RE: [PHP] Agh! trim (#$@#@^%!!!)
But isn't taking off characters or spaces considered modifying a string? I'll take another look at the manual, thanks. -Mike -Original Message- From: Darren Gamble [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 21, 2002 10:32 AM To: 'Mike At Spy'; [EMAIL PROTECTED] Subject: RE: [PHP] Agh! trim (#$@#@^%!!!) Good day, Well, for one, you are discarding the results of trim(). Check out the online manual page for trim(). The trim'ed string is returned. It does not say it modifies the string it is passed. Darren Gamble Planner, Regional Services Shaw Cablesystems GP 630 - 3rd Avenue SW Calgary, Alberta, Canada T2P 4L4 (403) 781-4948 -Original Message- From: Mike At Spy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 21, 2002 7:12 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] Agh! trim (#$@#@^%!!!) Here is the complete code - I have a lot of prints to watch things as they happen. $whois is the result of a WHOIS search. // beginning of my stuff function get_date ($whois){ trim ($whois); $whoisarray = explode (\n, $whois); print_r(array_values ($whoisarray)); $total_elements = count ($whoisarray); print pb$total_elements/b elements in this array; $ce = 0; while ($ce $total_elements){ $single_line = array_pop ($whoisarray); $expiration = strstr ($single_line,xpires); if ($expiration != '' || 0) { print pbThis is the line you want! Line $ce that sez: $single_line/bp; // $single_line = preg_replace (., , $single_line); $single_line = substr($single_line, 0, -2); // $single_line = rtrim ($single_line, \t\s\n\r); $getdatearray = explode ( , $single_line); print_r(array_values ($getdatearray)); $total_expire_elements = count ($getdatearray); print pbr.$total_expire_elements; $dc = 0; while ($dc $total_expire_elements){ $element = array_pop($getdatearray); $date_dash = strstr($element,-); if ($date_dash != '' || 0){ print pbrFirst Detection .$element; // $trimmed = rtrim ($element, \t.); print pbrLast print before date function .$element; month_replace ($element); print pbrResult after function .$element.pbr; $MySQLDate=date_validate($element); if (substr($MySQLDate, 0, 5)==Error) { // Insert Error Code if you want } else { // Insert Valid Date Code if you want } print pThe MySQL Formated date is $MySQLDate; } else {} $dc++; } } else {} $ce++; } } // end of my stuff Thanks, -Mike -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 21, 2002 8:53 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Agh! trim (#$@#@^%!!!) On Wednesday 21 August 2002 20:36, Mike At Spy wrote: Get this - it didn't work! :( I tried decreasing the -1 to -2 and so on, but nothing on that either. :( Post your exact code which didn't work. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* You can't go home again, unless you set $HOME. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Agh! trim (#$@#@^%!!!)
Hey! :) I have an issue with trim / triml. Whenever I put a string in to trimmed, it refuses to take the period at the end of the string off. I did put more things to trim first, but this is basically what I am doing: $single = The date is 20-Aug-2002. // This is an example - see below $trimmed = rtrim($date, .); Is there an issue with this? I've tried using trim() too. The source of $single is a reponse from a server. I should note that when I put this in as an experiment, it works fine. When I get the line from the server, it doesn't work! The only thing I can think of is the possibility that the . I am seeing at the end of the line isn't really one (it looks like a duck, copies like a duck, but...isn't a duck??!!). Is there a way to just strip the last character off regardless of what it is? Thanks, -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Agh! trim (#$@#@^%!!!)
Sorry, I mistyped - $date should be $single. Thanks for the suggestions and help to everyone! - I will pursue them. :) -Mike -Original Message- From: Justin French [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 12:50 PM To: Mike At Spy; [EMAIL PROTECTED] Subject: Re: [PHP] Agh! trim (#$@#@^%!!!) $single = The date is 20-Aug-2002. // This is an example - see below $trimmed = rtrim($date, .); Where is $date? I think your attempting to trim the wrong string. This worked for me: ? $single = The date is 20-Aug-2002.; $trimmed = rtrim($single, .); echo $trimmed; ? To slice off the last character of any string, you could use substr(): ? $single = The date is 20-Aug-2002.; $trimmed = substr($single, 0, -1); echo $trimmed; ? Justin French on 21/08/02 2:35 AM, Mike At Spy ([EMAIL PROTECTED]) wrote: Hey! :) I have an issue with trim / triml. Whenever I put a string in to trimmed, it refuses to take the period at the end of the string off. I did put more things to trim first, but this is basically what I am doing: $single = The date is 20-Aug-2002. // This is an example - see below $trimmed = rtrim($date, .); Is there an issue with this? I've tried using trim() too. The source of $single is a reponse from a server. I should note that when I put this in as an experiment, it works fine. When I get the line from the server, it doesn't work! The only thing I can think of is the possibility that the . I am seeing at the end of the line isn't really one (it looks like a duck, copies like a duck, but...isn't a duck??!!). Is there a way to just strip the last character off regardless of what it is? Thanks, -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Compile: IMAP enabled?
If IMAP is entered under Loaded Modules in the apache section of a phpinfo file, does that mean IMAP has been enabled? Thanks, -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Parse Error Suggestions?
Anyone have any suggestions for getting better reporting on a generic Parse Error? Code is falling to the end of the script, and I can't find a problem anywhere. I looked on the PHP site for error reporting functions, but apparently they do not handle Parse Errors. Thanks, -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Parse Error Suggestions?
On Mon, 18 Mar 2002, Mike At Spy wrote: Anyone have any suggestions for getting better reporting on a generic Parse Error? Code is falling to the end of the script, and I can't find a problem anywhere. I'd guess you left a curly brace open. Try opening the file in an editor that lets you balance your braces. I thought the same thing exactly - but I have gone over them a dozen times and I am getting nothing! In fact, shouldn't any script run before the error? i.e. - shouldn't a print or echo before any script runs produce something? Mine isn't! -Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php