[PHP] GD 1.8.4
I have spent most of the day trying to get gd 1.8.4, freetype2, libpng, zlib, and jpeg-6b to work with PHP 4.0.6 running on Solaris 7. I am not to yet to point of configuring this with PHP. I can't get 'make' to run on gd 1.8.4: gdft.c:36: freetype/freetype.h: No such file or directory gdft.c:37: freetype/ftglyph.h: No such file or directory make: *** [gdft.o] Error 1 I modified gdft.c to use absolute paths: /usr/local/include/freetype2/freetype/freetype.h and /usr/local/include/freetype2/freetype/ftglyph.h but this resulted in further errors as well. Anybody experience this or have a suggestion for a resolution? Thanks. Zach -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] GD 1.8.4
OK. I ran 'make install' for GD 2.0.1 and that seemed to go smoothly. Thanks. Zach -Original Message- From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 27, 2002 2:42 PM To: Zach Curtis Cc: [EMAIL PROTECTED] Subject: Re: [PHP] GD 1.8.4 GD1 uses Freetype 1 and you appear to have Freetype2. Grab GD2 instead. On Tue, 27 Aug 2002, Zach Curtis wrote: > I have spent most of the day trying to get gd 1.8.4, freetype2, libpng, > zlib, and jpeg-6b to work with PHP 4.0.6 running on Solaris 7. I am not to > yet to point of configuring this with PHP. I can't get 'make' to run on gd > 1.8.4: > > gdft.c:36: freetype/freetype.h: No such file or directory > gdft.c:37: freetype/ftglyph.h: No such file or directory > make: *** [gdft.o] Error 1 > > I modified gdft.c to use absolute paths: > /usr/local/include/freetype2/freetype/freetype.h and > /usr/local/include/freetype2/freetype/ftglyph.h but this resulted in further > errors as well. > > Anybody experience this or have a suggestion for a resolution? > > Thanks. > > > Zach > > > > -- > 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] Reconfigure PHP
I have installed GD, libpng, zlib, jpeg-6b, and FreeType 2. I now need to reconfigure PHP 'with' these additions. I don't understand how to determine what directories to point to for each of these 'with' statements. In Windows, I would just look for an exe, but under UNIX (Solaris 7) I not sure what the comparable file extensions are. I used 'pkgadd' command for these install programs: /usr/local/jpeg-6b-sol7-sparc-local /usr/local/libpng-1.2.0-sol7-sparc-local /usr/local/zlib-1.1.4-/sol7-sparc-local used 'make' in: /usr/local/src/freetype-2.1.2 and used 'make install' in: /usr/local/src/gd-2.0.1 I didn't specify any special installation instructions for these programs/libraries. How can I determine what directories to point the 'with' statements to? Thanks much. Zach Curtis POPULUS -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Configure 'with' PHP
I am proceeding with adding support for gd-2.0.1, libpng-1.2.0, jpeg-6b, zlib-1.1.4, and freetype-2.1.2. The configure script is ending with an error. Here is my configure command as well. I am using PHP 4.0.6. ./configure \ --with-apxs=/usr/local/apache/bin/apxs \ --with-mysql=/usr/local/mysql \ --with-gd=/usr/local/src/gd-2.0.1 \ --with-png-dir=/usr/local/lib \ --with-zlib-dir=/usr/local/include \ --with-jpeg-dir=/usr/local/lib \ --with-freetype-dir=/usr/local/include/freetype2 "configure: error: Unable to find libgd.(a|so) anywhere under /usr/local/include/freetype2". I search for libgd.so which is located in /usr/lib. What am doing wrong? Am I pointing to the correct gd location and/or freetype location? Regards, Zach Curtis POPULUS -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Running a PHP Script from UNIX Command Line?
UNIX gurus: How can I get a PHP script to run or execute from a UNIX command line and echo the stdout back to the terminal window? For example, > execute/run??? file.php What I really want to do is create a cron job (which I do know how to create) for the script. The script doesn't really echo any results back, but logs its results. The script it too time consuming to be run by having someone running the script through a web browser and waiting for it to complete. Thank you very much. _____ Zach Curtis Programmer Analyst POPULUS www.populus.com _ Confidentiality Statement: This e-mail message and any attachment(s) are confidential and may contain proprietary information that may not be disclosed without express permission. If you have received this message in error or are not the intended recipient, please immediately notify the sender by replying to this message and then please delete this message and any attachment(s). Any use, dissemination, distribution, or reproduction by unintended recipients is not authorized. Thank you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Reg Exp Help
I am trying to code a regular expression that will match at the beginning of the string the contents of $password, followed by 0 or more occurrences of white space, followed by the contents of $int_id. The match should be case insensitive. Here are some examples of the strings: This one has a 6 character $password, followed by two white spaces, followed by a single character $int_id 9a9b9c z This one has a 8 character $password, followed by zero white spaces, followed by a single character $int_id 7d2ad345b This one has a 5 character $password, followed by three white spaces, followed by a four character $int_id d22ad bbaw Here is the regular expression I am trying to use that does not find the match and produces "Warning: REG_BADRPT". (eregi("^\$password+[[:space:]]*+\$int_id", $file_array[$i])) Any corrections? Thanks in advance. Zach Curtis POPULUS -- 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] Reg Exp Help
The password and int_id begin and end in fixed positions. password begins in position 13 and can occupy up to 8 characters int_id begins in position 21 and can occupy up to 4 characters Sometimes a password (or int_id) may occupy all of those fixed position or only some of the fixed positions, it's variable. Zach -Original Message- From: Edward van Bilderbeek - Bean IT [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 9:58 AM To: Zach Curtis Subject: Re: [PHP] Reg Exp Help how can I see that it isn't a 6 char $password with a 3 char $int_id ?? > This one has a 8 character $password, followed by zero white spaces, > followed by a single character $int_id > 7d2ad345b Edward - Original Message - From: "Zach Curtis" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 25, 2002 5:51 PM Subject: [PHP] Reg Exp Help > I am trying to code a regular expression that will match at the beginning of > the string the contents of $password, followed by 0 or more occurrences of > white space, followed by the contents of $int_id. The match should be case > insensitive. > > Here are some examples of the strings: > > This one has a 6 character $password, followed by two white spaces, followed > by a single character $int_id > 9a9b9c z > > This one has a 8 character $password, followed by zero white spaces, > followed by a single character $int_id > 7d2ad345b > > This one has a 5 character $password, followed by three white spaces, > followed by a four character $int_id > d22ad bbaw > > > Here is the regular expression I am trying to use that does not find the > match and produces "Warning: REG_BADRPT". > > (eregi("^\$password+[[:space:]]*+\$int_id", $file_array[$i])) > > Any corrections? Thanks in advance. > > > Zach Curtis > POPULUS > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Reg Exp Help
Hmmm. I am searching thru a flat file that has been loaded into an array ($file_array[$i]). As each iteration of the array is loaded (each row of the flat file) , I was trying to search for this unique combination. The $password is not unique. And $int_id is not unique enough (e.g., "a", "b", "c", etc.) to be searched for on its own. However, $password and $int_id joined together is unique. Also, the $password and $int_id are in a fixed position in each header row, however, not every row in the flat file is a header row (no...I didn't create a flat file in this way!). I am confident the correct regular expression would resolve this. I will keep thinking about substr() and trim(), but I don't see how to use those to resolve this issue. Zach -Original Message- From: Edward van Bilderbeek - Bean IT [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 10:29 AM To: Zach Curtis Subject: Re: [PHP] Reg Exp Help but if the positions as fixed, why don't you use the substr, and then trim th result? Edward ----- Original Message - From: "Zach Curtis" <[EMAIL PROTECTED]> To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, January 25, 2002 6:12 PM Subject: RE: [PHP] Reg Exp Help > The password and int_id begin and end in fixed positions. > > password begins in position 13 and can occupy up to 8 characters > int_id begins in position 21 and can occupy up to 4 characters > > Sometimes a password (or int_id) may occupy all of those fixed position or > only some of the fixed positions, it's variable. > > > Zach > > -Original Message- > From: Edward van Bilderbeek - Bean IT [mailto:[EMAIL PROTECTED]] > Sent: Friday, January 25, 2002 9:58 AM > To: Zach Curtis > Subject: Re: [PHP] Reg Exp Help > > > how can I see that it isn't a 6 char $password with a 3 char $int_id ?? > > > This one has a 8 character $password, followed by zero white spaces, > > followed by a single character $int_id > > 7d2ad345b > > Edward > > > - Original Message - > From: "Zach Curtis" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, January 25, 2002 5:51 PM > Subject: [PHP] Reg Exp Help > > > > I am trying to code a regular expression that will match at the beginning > of > > the string the contents of $password, followed by 0 or more occurrences of > > white space, followed by the contents of $int_id. The match should be case > > insensitive. > > > > Here are some examples of the strings: > > > > This one has a 6 character $password, followed by two white spaces, > followed > > by a single character $int_id > > 9a9b9c z > > > > This one has a 8 character $password, followed by zero white spaces, > > followed by a single character $int_id > > 7d2ad345b > > > > This one has a 5 character $password, followed by three white spaces, > > followed by a four character $int_id > > d22ad bbaw > > > > > > Here is the regular expression I am trying to use that does not find the > > match and produces "Warning: REG_BADRPT". > > > > (eregi("^\$password+[[:space:]]*+\$int_id", $file_array[$i])) > > > > Any corrections? Thanks in advance. > > > > > > Zach Curtis > > POPULUS > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Reg Exp Help
Here is part of my actual code, if that makes any difference. $password // this var was retrieved from db $int_id // this var was retrieved from db $file_array = file("$DOCUMENT_ROOT/dir/file.dat"); $count = count($file_array); if ($count == 0) echo "No records found in .dat file."; for ($i = 0; $i < $count; $i++) { if (eregi("^\$password+[[:space:]]*+\$int_id", $file_array[$i])) { // do stuff } } Zach -Original Message- From: Edward van Bilderbeek - Bean IT [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 10:29 AM To: Zach Curtis Subject: Re: [PHP] Reg Exp Help but if the positions as fixed, why don't you use the substr, and then trim th result? Edward ----- Original Message - From: "Zach Curtis" <[EMAIL PROTECTED]> To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, January 25, 2002 6:12 PM Subject: RE: [PHP] Reg Exp Help > The password and int_id begin and end in fixed positions. > > password begins in position 13 and can occupy up to 8 characters > int_id begins in position 21 and can occupy up to 4 characters > > Sometimes a password (or int_id) may occupy all of those fixed position or > only some of the fixed positions, it's variable. > > > Zach > > -Original Message----- > From: Edward van Bilderbeek - Bean IT [mailto:[EMAIL PROTECTED]] > Sent: Friday, January 25, 2002 9:58 AM > To: Zach Curtis > Subject: Re: [PHP] Reg Exp Help > > > how can I see that it isn't a 6 char $password with a 3 char $int_id ?? > > > This one has a 8 character $password, followed by zero white spaces, > > followed by a single character $int_id > > 7d2ad345b > > Edward > > > - Original Message - > From: "Zach Curtis" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, January 25, 2002 5:51 PM > Subject: [PHP] Reg Exp Help > > > > I am trying to code a regular expression that will match at the beginning > of > > the string the contents of $password, followed by 0 or more occurrences of > > white space, followed by the contents of $int_id. The match should be case > > insensitive. > > > > Here are some examples of the strings: > > > > This one has a 6 character $password, followed by two white spaces, > followed > > by a single character $int_id > > 9a9b9c z > > > > This one has a 8 character $password, followed by zero white spaces, > > followed by a single character $int_id > > 7d2ad345b > > > > This one has a 5 character $password, followed by three white spaces, > > followed by a four character $int_id > > d22ad bbaw > > > > > > Here is the regular expression I am trying to use that does not find the > > match and produces "Warning: REG_BADRPT". > > > > (eregi("^\$password+[[:space:]]*+\$int_id", $file_array[$i])) > > > > Any corrections? Thanks in advance. > > > > > > Zach Curtis > > POPULUS > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Reg Exp Help
YES! I was working that out as well. One correction though, this line should read: $temp_int_id = trim(substr($file_array[$i], 21, 4)); I guess the lesson learned is to use substr() when the length of the $string is fixed. Since I have to use substr() and trim() twice, I wonder if this has more or less overhead than a single regular expression? Thank you. Zach -Original Message- From: Edward van Bilderbeek - Bean IT [mailto:[EMAIL PROTECTED]] Sent: Friday, January 25, 2002 11:36 AM To: Zach Curtis Subject: Re: [PHP] Reg Exp Help You said: > The password and int_id begin and end in fixed positions. > > password begins in position 13 and can occupy up to 8 characters > int_id begins in position 21 and can occupy up to 4 characters > > Sometimes a password (or int_id) may occupy all of those fixed position or > only some of the fixed positions, it's variable. so that would make the code like this: > Here is part of my actual code, if that makes any difference. > > $password // this var was retrieved from db > $int_id // this var was retrieved from db > > $file_array = file("$DOCUMENT_ROOT/dir/file.dat"); > $count = count($file_array); > if ($count == 0) > echo "No records found in .dat file."; > > for ($i = 0; $i < $count; $i++) > { $temp_pass = trim(substr($file_array[$i], 13, 8)); $temp_int_id = trim(substr, $file_array[$i], 21, 4)); if ($temp_pass == $password && $temp_int_id == $int_id) > { > // do stuff > } > } > > > Zach > > -Original Message- > From: Edward van Bilderbeek - Bean IT [mailto:[EMAIL PROTECTED]] > Sent: Friday, January 25, 2002 10:29 AM > To: Zach Curtis > Subject: Re: [PHP] Reg Exp Help > > > but if the positions as fixed, why don't you use the substr, and then trim > th result? > > Edward > > - Original Message - > From: "Zach Curtis" <[EMAIL PROTECTED]> > To: "Edward van Bilderbeek - Bean IT" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Friday, January 25, 2002 6:12 PM > Subject: RE: [PHP] Reg Exp Help > > > > The password and int_id begin and end in fixed positions. > > > > password begins in position 13 and can occupy up to 8 characters > > int_id begins in position 21 and can occupy up to 4 characters > > > > Sometimes a password (or int_id) may occupy all of those fixed position or > > only some of the fixed positions, it's variable. > > > > > > Zach > > > > -Original Message- > > From: Edward van Bilderbeek - Bean IT [mailto:[EMAIL PROTECTED]] > > Sent: Friday, January 25, 2002 9:58 AM > > To: Zach Curtis > > Subject: Re: [PHP] Reg Exp Help > > > > > > how can I see that it isn't a 6 char $password with a 3 char $int_id ?? > > > > > This one has a 8 character $password, followed by zero white spaces, > > > followed by a single character $int_id > > > 7d2ad345b > > > > Edward > > > > > > - Original Message - > > From: "Zach Curtis" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Friday, January 25, 2002 5:51 PM > > Subject: [PHP] Reg Exp Help > > > > > > > I am trying to code a regular expression that will match at the > beginning > > of > > > the string the contents of $password, followed by 0 or more occurrences > of > > > white space, followed by the contents of $int_id. The match should be > case > > > insensitive. > > > > > > Here are some examples of the strings: > > > > > > This one has a 6 character $password, followed by two white spaces, > > followed > > > by a single character $int_id > > > 9a9b9c z > > > > > > This one has a 8 character $password, followed by zero white spaces, > > > followed by a single character $int_id > > > 7d2ad345b > > > > > > This one has a 5 character $password, followed by three white spaces, > > > followed by a four character $int_id > > > d22ad bbaw > > > > > > > > > Here is the regular expression I am trying to use that does not find the > > > match and produces "Warning: REG_BADRPT". > > > > > > (eregi("^\$password+[[:space:]]*+\$int_id", $file_array[$i])) > > > > > > Any corrections? Thanks in advance. > > > > > > > > > Zach Curtis > > > POPULUS > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Array() Limit
Is there a limit to the number of key=value pairs that can be stored in an array? Or is this more a function of RAM limits? Thanks. Zach Curtis POPULUS -- 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] Executing a time intensive script
I have three scripts login.php, auth_user.php, and function.php. The login.php script does user authentication and routes the user to auth_user.php. The function.php script, which contains process_function(), does some very intensive data processing and may take from 30 seconds to 3 minutes to run. Here's what I have tried to do: // login.php script require("function.php"); ... ... do some authentication stuff ... process_function(); // makes user wait too long to get to the authenticated area include("auth_user.php"); // takes user to authenticated area If I try to run the process_function() from the login.php script, the script takes too long to run. How can I get this function to run so it does not interfere with user logging in? Is there a way to get the function to execute and let it run on its own within login.php and let the user continue on to the authenticated area without that delay? Another thought I had was to get the function.php script that contains the function to execute on its own based on time (e.g., run every hour on the hour). Is there a way to do that? Thank you. _ Zach Curtis Programmer Analyst POPULUS www.populus.com _ Confidentiality Statement: This e-mail message and any attachment(s) are confidential and may contain proprietary information that may not be disclosed without express permission. If you have received this message in error or are not the intended recipient, please immediately notify the sender by replying to this message and then please delete this message and any attachment(s). Any use, dissemination, distribution, or reproduction by unintended recipients is not authorized. Thank you. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Cookie Name=Value Pairs
What is the syntax to set multiple name=value pairs in a cookie? Thanks. Zach Curtis POPULUS -- 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]