RE: [PHP] Secure transfer between servers
For the more complex functions where it is necessary to redirect them to another server, local to them, I have a problem. If these machines are on a LAN together I would suggest you use database sessions. I.e. a table with records containing active sessions. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] site last updated
last modified ?php echo date(D d-m-Y H:i:s, filectime(__FILE__)); ? ^ I put that on the bottom of every page on some sites I make. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Asian fonts
Any idea how to use (install) asian fonts on an english version of RH? I need them in the gd library, to generate an image with chinese/japanese text. Configure php with the following: --with-gd=/tmp/www/gd-2.0.1 --with-freetype-dir=/usr/local/include/freetype2 --enable-gd-imgstrttf Then just obtain some chinese/japanese true type fonts and use the following script below and substitute arial.ttf for the asian font: ?php ### draw an image for the header and print some stuff on it. ### ## tell the browser what it is header(Content-type: image/jpeg); ## draw a new image $width = 600; $height = 100; $image = imagecreate($width, $height); ##make the background same as page $backg = imagecolorallocate($image, 0, 51, 102); ##make the text white $text = imagecolorallocate($image, 255, 255, 255); imagefilledrectangle($image, 0, 0, $width, $height, $backg); ## now let's print some text to the image imagettftext($image, 40, 0, 60, 75, $text,/home/www/htdocs/arial.ttf, some guy); ## off it goes imagejpeg($image); ## cleanup imagedestroy($image); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] \n's
quick problem... I don't seem to be able to strip \n's out of a string of text: str_replace(\n, , $line); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] lesson in NOT how to run your php website ...
I teach law at a university .. I also run the website here ... Thankfully Tasmania is not considered part of Australia. :) *troll bait away* -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: [PHP-DB] PHP Getting Variables from String
$string=These are some words I want it to turn into $var1=These, $var2=are, $var3=some, $var4=some $search_entities = explode( , $string); if (count($search_entities) 0) { $criteria = ; for ($i = 0; $i count($search_entities); $i++) { if ($i == (count($search_entities) - 1)) { $criteria .= name = '$search_entities[$i]'; } else { $criteria .= name = '$search_entities[$i]' OR ; } } } $query = select name from countries where $criteria; I don't like this though, anyone have a better solution? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Trouble with php generated images
The text printed on this image looks sloppy and grainy. (This image is being generated on a linux server RH 7.1, Apache 1.3.19, with GD 1.8) It looks fine on GD 2.0.1 using arial.ttf. Maybe you could try another font? My question is this, is there a way to generate a quality image or improve the quality of this image, or am I stuck? As a side note, images that don't contain text seem to generate very cleanly. Would it be possible to make the background transparent, like a transparent gif? As I said above, it could be your font it looks nice for me with arial. Not sure about a transparent image, I think you would have to use png though because jpeg doesn't allow a transparent background. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] HELP: Still Learning
Still learning! But need syntax help. This works: Notice something? :) Yep, you forgot to paste the error message into the email. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Create images jpeg
ImageJpeg: No JPG support in this PHP build in No jpeg support. Isn't it obvious? Recompile php --with-jpeg-dir=/usr/local For more information: http://database.sourceforge.net/documentation/installing_apache_with_gd_zlib_png_jpg_tiff_pdf_support.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Breaking a string
I was looking to take a string like Dan or Dan is great and return it like D a n... http://www.php.net/manual/en/function.wordwrap.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] enable truetype string function in gd
Does anyone know what it's going to take to get access to the function imagettftext() in PHP 4.0.6?! My eyes are bloodshot right about now. http://database.sourceforge.net/documentation/installing_apache_with_gd_zlib_png_jpg_tiff_pdf_support.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Delivering NAMED pdf files
Thanks for the suggestion but it didn't change anything. It won't. Put them in a web accessible directory and don't use custom header calls because they do not work reliably. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How to set the time for session??
i want to expire the session if user sits 15 minutes idle without doing anything. On each page view, you could write a variable to the session file, so the last modified time is updated. Then run the session deletion script from: http://database.sourceforge.net/scripts/session.sh every minute. This is very reliable. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Get the row number in php-script?
Does anybody know how to get hold of the rownumber of the current row in a php-script? (Rownumber in the actual file.) echo __LINE__; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP vs. PERL (Functional Comparison)??
ie. don't necessarily use 1 file per block, create functions that are defined in a single file and call those instead of including a new file. How do you echo your html, do you put the html in your functions and escape the double quotes? There is some extra load there echoing all the html? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: echo/printing html within a function - best method
How do you echo your html, do you put the html in your functions and escape the double quotes? There is some extra load there echoing all the html? echo HTML? I do this: ? php stuff..? HTML stuff ? more php stuff ? I drop out of PHP mode to display raw HTML. If I have a lot of HTML with a lot of PHP variables tossed in, I do: ? $test = 'test'; $one = 'one'; echo EOF This is a $test. And here is another $one. EOF; ..more php code... ? I meant to say, in your functions, do you use the same as above echo EOF ... Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Invalid MySQL result resource
Supplied argument is not a valid MySQL result resource in . on line 52 Line 52 is the line where I fetch the row from the second query. Don't keep doing a mysql_connect on each loop. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP 4.0.6 + GD
As far as I can tell, it's a bug. I posted it on here and the only reply I got was from someone having the same problem. I logged it as a bug and then wasn't able to add more information as I hadn't set a password when I first entered the bug. Then I emailed trying to be able to change it and heard nothing back :) --with-png-dir=../libpng-1.0.12 Forgetting that? http://database.sourceforge.net/Installing_apache_with_gd_zlib_png_jpg_tiff_pdf_support.html ^ Give that a shot. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] GD picture quality
Take a look at this picture... http://www.sayimhot.com/images/mycurrentscore.jpg ... now take a look at it while text is added to it... http://www.sayimhot.com/myscore.php What happens to the picture quality? How can it be improved? (code below) You mean the font quality? The picture looks the same. Try using: ImageTTFText(); Also when you create the jpg at the end set quality to maximum: imagejpeg($img, '', 100); ^^^ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] newbie : how to access functions in seperate files???
What do people do with required files? I have a file called config.php which contains all my functions. It is 329526 bytes. Should I split this up into other files? I don't think so, but what do others think? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Serious Fopen Problems - not newbie :)
I'm sure http://www.php.net exists. :) No, what my sentence meant was you're trying to do some operations on a mis-typed file descripter? $fp = fopen... fputs($fp2... ^- There should be no 2. Possibly something like that? with fopen(). Everytime I try to use fopen, I get some weird error messages. If I do fopen(http://www.php.net;, r) - I get this error message: Undefined error: If I try doing fopen(http://www.somehost.com/~myname/somefile.php?var=value;, r) - I get this message: Bad file descriptor You're trying to do operations on a file descripter that doesn't exist? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Serious Fopen Problems - not newbie :)
with fopen(). Everytime I try to use fopen, I get some weird error messages. If I do fopen(http://www.php.net;, r) - I get this error message: Undefined error: If I try doing fopen(http://www.somehost.com/~myname/somefile.php?var=value;, r) - I get this message: Bad file descriptor You're trying to do operations on a file descripter that doesn't exist? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] time
hi. how do I can wrk with time: 11:56:23 - 10:00:45 = Don't ask this again. Date: Mon, 20 Aug 2001 19:14:41 +1000 (EST) From: speedboy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: [PHP] time in php hi. how I compare two times with php? 12:23:50 - 13:12:00 = ??? Convert them to timestamps (unix timestamps) and subtract the two. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] transfer tables to another database?
hi. I want to transfer tables to another database. how?? Have you read the documentation on backing up and restoring databases/tables in postgresql? http://www.ca.postgresql.org/users-lounge/docs/7.1/admin/backup.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Countries and ip addresses
How can I find out from witch country user is based on user ip address? I need this from php script. You can't. You can try with their hostname. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] hope someone can help !
so why when I try ImageTTFText do I get call to unknown function php must be compiled with ttf ?? Try this first: http://database.sourceforge.net/Installing_apache_with_gd_zlib_png_jpg_tiff_pdf_support.html Possibly also try configuring without somany options initially. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] time in php
hi. how I compare two times with php? 12:23:50 - 13:12:00 = ??? Convert them to timestamps (unix timestamps) and subtract the two. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] mail from
Hello all. Does anyone know how i can set up the from and Return Address fields in the mail functions in php? mail([EMAIL PROTECTED], subject., body., From: php@$SERVER_NAME\n); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: header function
header(Location:index.php); header(Location: login.php); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] session timeouts
I'm writing a web survey in php and trying to set session timeouts. I have a main script that starts the session and displays the pages. Is there a way I can make the session timeout if they idle for too long? Check the php.ini file, it has some settings to set the session timeout. Other than that, on each page view I write a variable to a session file so that I know which sessions truely are active. I use the session deletion script from http://database.sf.net to make sure any sessions older than X seconds are removed by the script run through crontab. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php and flash
STOP asking this question again and again. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Directory Listing in an Array
Just something I havent been able to sort out in the archives, but what im wanting to do it this. Do a listing of all files in a directory, and load up an array with each returned filename. $files_dir = /tmp; chdir($files_dir); $dir_handle = @opendir($files_dir) or die(Unable to open $files_dir); $files = array(); while ($file = readdir($dir_handle)) { array_push($files, $file); } closedir($dir_handle); sort($files); reset($files); for ($i = 0; $i count($files); $i++) { echo $files[$i] br; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: do not mean to be harsh but I though this is supposed to benicer community
Getting Started with PHP/Ming http://www.phpbuilder.com/columns/suyoto20010809.php3 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: HTTPS oddity
Try throwing a ?php phpinfo();? on each port and see what else you are getting... This has worked for ages - but sometime last night the behaviour of my/our server changed and now over an non-SSL connection, $HTTPS = ON and over a SSL connection $HTTPS = on (note the change in case). This is odd - and I can't find the source. I can't remember what I did, but this happened to me as well. I have a check https function. I restarted apache and I think it worked. phpinfo still showed the $HTTPS variable but I could not use it inside a function even though I had it set as a global variable. Try restarting... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] session security issue
You need to check against a value that was registered as a session variable. There is no use in checking if some SSL variable is set. Here's a simplified version of my check_session function that I run at the top of every page that requires a session to be established. I also write to the session file on every click. This lets me know howmany sessions are actually active. I have a session deletion script that runs every minute to check the date of the session file, if it's older than a defined time it will remove the session file. The session deletion script is available at http://database.sf.net/ Any other ideas to make a session more secure? function check_session() { session_start(); if (session_is_registered(user_id)) { return TRUE; } else { header(Location: login.php); exit; } } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Question about sessions
There's a session deletion script based on the last time a session file was written to. You can set the duration a session is allowed to stay on the file system for. http://database.sf.net/ - Down the bottom. On Tue, 14 Aug 2001, Chris Kay wrote: I have a mysql/php db/website that uses session, (i am new to sessions). My question is that the session works and all but i notice that it writes alot of sess_*** files in the /tmp directory. Do i need to purge these weekly so it wont use tooo much room or are these spose to delete them selves.? Maybe someone has come accross this before and fixed it? Chris Kay - Tech Support - IDEAL Internet email: [EMAIL PROTECTED] phone: +61 2 4628 fax: +61 2 4628 8890 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Postgresql large objects.
Does using pg_loread or any other php functions for postgresql large objects modify the size of the file? I'm seeing a size increase in a few bytes when I receive the file back to my hard drive. The file still seems to run ok, but I'm wondering what is doing this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP + GD 2.0.1 problem.
Hello I am trying to install PHP 4.0.6 with GD 2+ support and I am receiving an error at `make` time. Can anyone suggest something to try and fix this problem? Thankyou :) I have installed the following with no path changes to the defaults: freetype-2.0.4.tar.gz gd-2.0.1.tar.gz jpegsrc.v6b.tar.gz* libpng-1.0.12.tar.gz pdflib-4.0.1.tar.gz zlib-1.1.3.tar.gz My configure string is: ./configure --with-apache=../apache_1.3.20 --enable-trans-sid --with-jpeg-dir=/usr/local --with-gd=/usr --with-png-dir=../libpng-1.0.12 --with-zlib-dir=../zlib-1.1.3 --with-pdflib --with-pgsql --enable-static-pdflib --enable-ftp --enable-gd-native-ttf --with-freetype-dir=/usr/local/include/freetype2 This is the error at `make` time for PHP: Making all in gd make[2]: Entering directory `/tmp/www/php-4.0.6/ext/gd' make[3]: Entering directory `/tmp/www/php-4.0.6/ext/gd' gcc -I. -I/tmp/www/php-4.0.6/ext/gd -I/tmp/www/php-4.0.6/main -I/tmp/www/php-4.0.6 -I/tmp/www/apache_1.3.20/src/include -I/tmp/www/apache_1.3.20/src/os/unix -I/tmp/www/php-4.0.6/Zend -I/usr/local/include -I/usr/local/include/freetype2/freetype -I/tmp/www/php-4.0.6/ext/mysql/libmysql -I/tmp/www/php-4.0.6/ext/xml/expat/xmltok -I/tmp/www/php-4.0.6/ext/xml/expat/xmlparse -I/tmp/www/php-4.0.6/TSRM -DSUPPORT_UTF8 -DXML_BYTE_ORDER=12 -g -O2 -c gd.c touch gd.lo gd.c: In function `php_minit_gd': gd.c:296: `gdPie' undeclared (first use in this function) gd.c:296: (Each undeclared identifier is reported only once gd.c:296: for each function it appears in.) gd.c:297: `gdChord' undeclared (first use in this function) gd.c:298: `gdNoFill' undeclared (first use in this function) gd.c:299: `gdEdged' undeclared (first use in this function) gd.c: In function `php_if_imagecreatetruecolor': gd.c:577: warning: assignment makes pointer from integer without a cast make[3]: *** [gd.lo] Error 1 make[3]: Leaving directory `/tmp/www/php-4.0.6/ext/gd' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/tmp/www/php-4.0.6/ext/gd' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/tmp/www/php-4.0.6/ext' make: *** [all-recursive] Error 1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Postgresql + Sessions + Large objects.
I am having trouble with the following function working _with_ sessions. If I turn off my session checking function it enables you to download the file flawlessly, if sessions are turned on then Internet Explorer displays an error: Internet Explorer cannot download ...URL Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later. Is there a way I can download large objects from postgresql _with_ sessions? Thankyou. function retrieve_file($id) { global $dbconn1; $result1 = pg_exec ($dbconn1, select data, file_name from files where id='$id';); $image_oid = pg_result($result1 ,0, 'data'); $file_name = pg_result($result1 ,0, 'file_name'); header (Content-disposition: filename=\$file_name\); header(Content-type: application/download); pg_exec ($dbconn1, begin transaction;); $image_handle = pg_loopen ($dbconn1, $image_oid, 'r'); pg_loreadall ($image_handle); pg_loclose ($image_handle); pg_exec ($dbconn1, commit transaction;); } } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP + GD 2.0.1
Has anyone got PHP successfully compiled and using GD 2.0.1? If so what was your configure line please and any other changes you had to make in order to get PHP to compile. Thanks. Build gd-2.0.1 with these two lines in your GD2 Makefile: CFLAGS=-g -DHAVE_LIBPNG -DHAVE_LIBJPEG -DHAVE_LIBFREETYPE CFLAGS=-g -DHAVE_LIBPNG -DHAVE_LIBJPEG -DHAVE_LIBFREETYPE Same as mine. LIBS=libgd.a -lpng -lz -ljpeg -lfreetype -lm LIBS=libgd.a -lpng -lz -ljpeg -lfreetype -lm Same as mine. Don't install the lib anywhere, just leave them in the gd-2.0.1 directory. [root@b gd-2.0.1] ~ make test gcc -I. -I/usr/include/freetype2 -I/usr/include/X11 -I/usr/X11R6/include/X11 -I/usr/local/include gdtest.o -o gdtest -L/usr/local/lib -L/usr/lib/X11 -L/usr/X11R6/lib libgd.a -lpng -lz -ljpeg -lfreetype -lm gcc: libgd.a: No such file or directory make: *** [gdtest] Error 1 [root@b gd-2.0.1] ~ It's obviously a simple error but I have no idea about C. Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP + GD 2.0.1
Build gd-2.0.1 with these two lines in your GD2 Makefile: CFLAGS=-g -DHAVE_LIBPNG -DHAVE_LIBJPEG -DHAVE_LIBFREETYPE CFLAGS=-g -DHAVE_LIBPNG -DHAVE_LIBJPEG -DHAVE_LIBFREETYPE Same as mine. LIBS=libgd.a -lpng -lz -ljpeg -lfreetype -lm LIBS=libgd.a -lpng -lz -ljpeg -lfreetype -lm Same as mine. Don't install the lib anywhere, just leave them in the gd-2.0.1 directory. [root@b gd-2.0.1] ~ make test gcc -I. -I/usr/include/freetype2 -I/usr/include/X11 -I/usr/X11R6/include/X11 -I/usr/local/include gdtest.o -o gdtest -L/usr/local/lib -L/usr/lib/X11 -L/usr/X11R6/lib libgd.a -lpng -lz -ljpeg -lfreetype -lm gcc: libgd.a: No such file or directory make: *** [gdtest] Error 1 [root@b gd-2.0.1] ~ It's obviously a simple error but I have no idea about C. You left out your PHP configure line I was trying to make gd-2.0.1, are you saying don't make GD at all, just go straight to configuring php? In that case here's my php configure line: ./configure --with-apache=../apache_1.3.20 --enable-trans-sid --with-jpeg-dir=/usr/local --with-gd=/tmp/www/gd-2.0.1 --with-tiff-dir=../tiffv3.5.6-beta --with-png-dir=../libpng-1.0.12 --with-zlib-dir=../zlib-1.1.3 --with-pdflib --with-pgsql --enable-static-pdflib --enable-ftp --enable-gd-native-tt --enable-gd-imgstrttf --with-freetype-dir=/usr/local/include/freetype2 checking for freetype(2)... yes checking whether to include include FreeType 1.x support... no checking whether to include T1lib support... no configure: error: Unable to find libgd.(a|so) anywhere under /usr/local/include/freetype2 [root@b php-4.0.6] ~ Thankyou. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP + GD 2.0.1
It's obviously a simple error but I have no idea about C. You left out your PHP configure line I was trying to make gd-2.0.1, are you saying don't make GD at all, just go straight to configuring php? Ah, no, type: make libgd.a in your gd dir. Ok, making libgd.a worked and php configure worked. Make php failed: Making all in gd make[2]: Entering directory `/tmp/www/php-4.0.6/ext/gd' make[3]: Entering directory `/tmp/www/php-4.0.6/ext/gd' gcc -I. -I/tmp/www/php-4.0.6/ext/gd -I/tmp/www/php-4.0.6/main -I/tmp/www/php-4.0.6 -I/tmp/www/apache_1.3.20/src/include -I/tmp/www/apache_1.3.20/src/os/unix -I/tmp/www/php-4.0.6/Zend -I/usr/local/include -I/usr/local/include/freetype2/freetype -I/tmp/www/gd-2.0.1/ -I/tmp/www/php-4.0.6/ext/mysql/libmysql -I/tmp/www/php-4.0.6/ext/xml/expat/xmltok -I/tmp/www/php-4.0.6/ext/xml/expat/xmlparse -I/tmp/www/php-4.0.6/TSRM -DSUPPORT_UTF8 -DXML_BYTE_ORDER=12 -g -O2 -c gd.c touch gd.lo gd.c: In function `php_minit_gd': gd.c:296: `gdPie' undeclared (first use in this function) gd.c:296: (Each undeclared identifier is reported only once gd.c:296: for each function it appears in.) gd.c:297: `gdChord' undeclared (first use in this function) gd.c:298: `gdNoFill' undeclared (first use in this function) gd.c:299: `gdEdged' undeclared (first use in this function) gd.c: In function `php_if_imagecreatetruecolor': gd.c:577: warning: assignment makes pointer from integer without a cast make[3]: *** [gd.lo] Error 1 make[3]: Leaving directory `/tmp/www/php-4.0.6/ext/gd' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/tmp/www/php-4.0.6/ext/gd' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/tmp/www/php-4.0.6/ext' make: *** [all-recursive] Error 1 [root@b php-4.0.6] ~ Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Compiling PHP + GD 2.0.1 Documentation
Make php failed: Make sure you don't have gd-1.x header files in /usr/local/include Excellent! That worked. For everyone else, my documentation for installing: Apache with GD, zlib, png, jpg, tiff, pdf support is at: http://database.sourceforge.net/Installing_apache_with_gd_zlib_png_jpg_tiff_pdf_support.html Thankyou. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] newest PHP compile won't see pg_connect()
On linux 6.1, I've installed fresh builds of postgres 6.0.4, apache 1.3.20, php 4.0.6. Get postgresql 7.1.2, make and install. Configure php --with-pgsql ./configure --help Will show you all available configure options. -- 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]