[PHP] Re: textarea new line
Adi wrote: i want to add in textarea a string with new line tag in it. how to do that? my try: $string="-line1n\ -line2 n\-line3"; echo "$string"; but i see a single line instead of: -line1 -line2 -line3 tx in advance for any help Hello For a new line in a text area you cant use html 's You need to use either \n OR \r\n Thanks Neil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Removing the #!/usr... from cgi output?
Colin McDonald wrote: Did you try it without that line at all? I'm pretty sure you can setup apache (you are using apache right?) to use /usr/.../bin/php for all files with the extension .php colin David Brannlund wrote: Example: #!/usr/local/bin/php becomes #!/usr/local/bin/php foo Hi there yes , the shebang ( the #!/usr/local/bin/php ) is not needed for use with dynamic webpages wether they be perl , php or whatever Shebangs are used only with shell based scripts. Your webserver should be configured to know what to do with the file by extension, e.g. .php files should be processed by php in apache This link describes how to configure a webserver to do this http://www.php.net/manual/en/install.unix.php ( a unix server , but its nearly the same for windows ) Thanks Neil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: File upload problem
John M wrote: Hello, I have the code below. It's a simple file upload. But it doesn't work. Before the line if(isset( $Submit )) is an echo which can I read. But after choosing a file and press a submit nothing happens. Why is if(isset( $Submit )) always false? Maybe my apache or php config is wrong? I use WinXp Prof, Apache 2.0.43, PHP 4.2.3, safe_mode is on , upload_tmp_dir is "c:\tmp\" and upload_max_filesize is 2M in PHP config file. try a double \\ in windows paths Thanks! Untitled Document you will need to put a form action url in above line , like action="http://www.domain-name.com/script.php"; \n"; if(isset( $Submit )) { echo "After submit \n"; if ($_FILES['imagefile']['type'] == "image/gif"){ copy ($_FILES['imagefile']['tmp_name'], "files/".$_FILES['imagefile']['name']) or die ("Could not copy"); echo "Name: ".$_FILES['imagefile']['name'].""; } else { echo ""; echo "Could Not Copy, Wrong Filetype (".$_FILES['imagefile']['name'].")"; } } ?> Thanks Neil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Empty session directory
IVáN DíAz wrote: Hi everyone! I would like to know if I need to empty from time to time the directory where the session files are stored. I'm running windows nt4.0 and Apache. Thanks in advance. Hi Ivan That would probably be a good idea yes. On linux and unix based OS's sessions are usually stored in /tmp which gets periodically cleaned of old junk files. Depending on how your windows machine is set up, you might need to clean the dir every now and again, i dont remember anything that did this in the NT4 OS, but its been a long time since I used it. That said if you have allot of space it could probably go without cleaning for years :) Cheers Neil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] problems compiling php-4.2.1 / solaris 2.6
problems compiling php-4.2.1 / solaris 2.6 -- [root@sunnsr02] 240 /tmp > cd /export/php-4.2.1 [root@sunnsr02] 241 /export/php-4.2.1 > make Making all in Zend /bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../main-D_POSIX_PTHREAD_SEMANTICS -I../TSRM -g -O2 -prefer-non-pic -static -c -o zend_language_parser.lo `test -f zend_language_parser.c || echo './'`zend_language_parser.c In file included from zend_compile.h:24, from zend_language_parser.c:147: zend.h:55: unix.h: No such file or directory *** Error code 1 make: Fatal error: Command failed for target `zend_language_parser.lo' Current working directory /export/php-4.2.1/Zend *** Error code 1 make: Fatal error: Command failed for target `all-recursive' Any comments suggestions appreciated Neil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: problems compiling php-4.2.1 / solaris 2.6
Neil M wrote: > problems compiling php-4.2.1 / solaris 2.6 > -- > > [root@sunnsr02] 240 /tmp > cd /export/php-4.2.1 > [root@sunnsr02] 241 /export/php-4.2.1 > make > Making all in Zend > /bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I. > -I../main-D_POSIX_PTHREAD_SEMANTICS -I../TSRM -g -O2 > -prefer-non-pic -static -c -o zend_language_parser.lo `test -f > zend_language_parser.c || echo './'`zend_language_parser.c > In file included from zend_compile.h:24, > from zend_language_parser.c:147: > zend.h:55: unix.h: No such file or directory > *** Error code 1 > make: Fatal error: Command failed for target `zend_language_parser.lo' > Current working directory /export/php-4.2.1/Zend > *** Error code 1 > make: Fatal error: Command failed for target `all-recursive' > > Any comments suggestions appreciated > > Neil > I did not get a solution , except for downgrading php to 4.1.2 Cheers neil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] problem finding out original filename while using php to upload.
I am using php to upload image files. heres my code .. 1024000 ) { print (" ERROR - File is too big ! File uploads should be below 1024 k ( 1mb ) "); exit ; } move_uploaded_file($photo_file, "$upload_path$check_nick->nickname"); } else { echo " ERROR : File upload was not successfull , please try again !"; } ?> -- the problem is that when i look for the original filename ( e.g. myphoto.gif ) , $photo_file contains a random file name like 383hr93php As i mentioned , its image files i am uploading , how do i know what type of image the file was ? like .jpg , .png etc. Any help appreciatted , i am really stuck on this ;0) Thanks Neil M -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]