php-general Digest 1 Aug 2006 11:15:52 -0000 Issue 4268
Topics (messages 239929 through 239942):
Issues with PHP 5.1.4 / GD FreeType / Linux
239929 by: Vedanta Barooah
239930 by: Vedanta Barooah
link problem
239931 by: Ross
239935 by: Drew Butler
239939 by: Jochem Maas
dynamically generated rotating gif
239932 by: Paul Nowosielski
239937 by: Chris
Retrieving response headers from an off-site page
239933 by: John Gunther
239934 by: Ray Hauge
239936 by: Andrew Kreps
Re: Error Loading php module
239938 by: Chris
LDAP function to add objectClass
239940 by: Roger Thomas
239941 by: Sameer N Ingole
All active variables?
239942 by: Peter Lauri
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
hello all,
i am trying to compile freetype support for php 5.1.4, on linux ... looks
like i have set all the compile options correct ... but some how freetype
support does not get included. any pointers will be of great help!
thanks,
vedanta
## configure options
# './configure' '--with-apxs2=/soa/srv/httpd/bin/apxs'
'--prefix=/soa/srv/php514' '--with-config-file-path=/soa/srv/php514/conf'
'--enable-soap' '--enable-exif' '--with-gd' '--with-jpeg-dir=/usr/lib'
'--with-zlib-dir=/usr/lib' '--with-png-dir=/usr/lib'
'--enable-gd-native-ttf' '--with-ttf' '--with-freetype-dir=/usr/lib'
-- snip --
configure: warning: You will need re2c 0.9.11 or later if you want to
regenerate PHP parsers.
configure: warning: bison versions supported for regeneration of the
Zend/PHP parsers: 1.28 1.35 1.75 1.875 2.0 2.1 (found: none).
checking for FreeType 1.x support... yes
checking for FreeType 2... /usr/lib
checking for FreeType 1 support... no - FreeType 2.x is to be used instead
configure: warning: lemon versions supported for regeneration of libsqlite
parsers: 1.0 (found: none).
configure: warning: bison versions supported for regeneration of the
Zend/PHP parsers: 1.28 1.35 1.75 1.875 2.0 2.1 (found: none).
-- snip --
### <? print_r(gd_info()); ?>
Array
(
[GD Version] => bundled (2.0.28 compatible)
[FreeType Support] =>
[T1Lib Support] =>
[GIF Read Support] => 1
[GIF Create Support] => 1
[JPG Support] => 1
[PNG Support] => 1
[WBMP Support] => 1
[XPM Support] =>
[XBM Support] => 1
[JIS-mapped Japanese Font Support] =>
)
--- End Message ---
--- Begin Message ---
*solved*
you will need to run a make clean, and then rebuild the whole src tree
On 7/31/06, Vedanta Barooah <[EMAIL PROTECTED]> wrote:
hello all,
i am trying to compile freetype support for php 5.1.4, on linux ... looks
like i have set all the compile options correct ... but some how freetype
support does not get included. any pointers will be of great help!
thanks,
vedanta
## configure options
# './configure' '--with-apxs2=/soa/srv/httpd/bin/apxs'
'--prefix=/soa/srv/php514' '--with-config-file-path=/soa/srv/php514/conf'
'--enable-soap' '--enable-exif' '--with-gd' '--with-jpeg-dir=/usr/lib'
'--with-zlib-dir=/usr/lib' '--with-png-dir=/usr/lib'
'--enable-gd-native-ttf' '--with-ttf' '--with-freetype-dir=/usr/lib'
-- snip --
configure: warning: You will need re2c 0.9.11 or later if you want to
regenerate PHP parsers.
configure: warning: bison versions supported for regeneration of the
Zend/PHP parsers: 1.28 1.35 1.75 1.875 2.0 2.1 (found: none).
checking for FreeType 1.x support... yes
checking for FreeType 2... /usr/lib
checking for FreeType 1 support... no - FreeType 2.x is to be used instead
configure: warning: lemon versions supported for regeneration of libsqlite
parsers: 1.0 (found: none).
configure: warning: bison versions supported for regeneration of the
Zend/PHP parsers: 1.28 1.35 1.75 1.875 2.0 2.1 (found: none).
-- snip --
### <? print_r(gd_info()); ?>
Array
(
[GD Version] => bundled (2.0.28 compatible)
[FreeType Support] =>
[T1Lib Support] =>
[GIF Read Support] => 1
[GIF Create Support] => 1
[JPG Support] => 1
[PNG Support] => 1
[WBMP Support] => 1
[XPM Support] =>
[XBM Support] => 1
[JIS-mapped Japanese Font Support] =>
)
--
--- End Message ---
--- Begin Message ---
I have lots of folders and files some are in the main public_html folder and
some are in their own foder. I need to find a way to make all the links
relative to the public_html folder
For example if I am in the 'gallery' folder, the main index file is located
at ../index, however if I om in the contact page which is in the same
directory as index the link is just index.php.
I want to have one menu and make all the links work without having to enter
a full http://www.mydomain/myfolder/myfile.php.
I tried $_SERVER['doc_root']; but this gives the full server root. I am sure
I have see a way to define directorries using define() or something.
Ta.
--- End Message ---
--- Begin Message ---
Try something like
realpath( dirname(__FILE__)."../" );
__FILE__ should give you the full path of the file being run,
dirname() will break the directory path from it and ../ will drop it
down one dir ... real path will give you a solid final path.
~Drew
On 7/31/06, Ross <[EMAIL PROTECTED]> wrote:
I have lots of folders and files some are in the main public_html folder and
some are in their own foder. I need to find a way to make all the links
relative to the public_html folder
For example if I am in the 'gallery' folder, the main index file is located
at ../index, however if I om in the contact page which is in the same
directory as index the link is just index.php.
I want to have one menu and make all the links work without having to enter
a full http://www.mydomain/myfolder/myfile.php.
I tried $_SERVER['doc_root']; but this gives the full server root. I am sure
I have see a way to define directorries using define() or something.
Ta.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Ross wrote:
> I have lots of folders and files some are in the main public_html folder and
> some are in their own foder. I need to find a way to make all the links
> relative to the public_html folder
>
> For example if I am in the 'gallery' folder, the main index file is located
> at ../index, however if I om in the contact page which is in the same
> directory as index the link is just index.php.
>
> I want to have one menu and make all the links work without having to enter
> a full http://www.mydomain/myfolder/myfile.php.
>
> I tried $_SERVER['doc_root']; but this gives the full server root. I am sure
> I have see a way to define directorries using define() or something.
// think about these 3 imaginary paths:
$docroot = '/var/www/public';
$galleryfile = '/var/www/public/gallery/index.html';
$baseurl = 'http://bla.com';
// imagine you do something *like* (str_replace() is possibly not the right
choice
here) this:
echo '<a href=",$baseurl,str_replace($docroot,'',$galleryfile),">your link</a>';
/*
now you only have to figure out how to get a complete list of files
that exist in your webroot (you'll probably also need to figure out how to
get a relevant text for each link but that's another story), read these pages,
including the user notes:
http://php.net/glob
http://php.net/scandir
http://php.net/filesystem
http://php.net/dir
*/
>
> Ta.
>
--- End Message ---
--- Begin Message ---
Dear All,
I'm trying to create a dynamically generated rotating gif.
I want to add layers of text from a database to the image.
Is this possible? If so , can someone give me some pointers or a link to a good
class or tutorial please?
Thank you,
--
Paul Nowosielski
Webmaster
--- End Message ---
--- Begin Message ---
Paul Nowosielski wrote:
Dear All,
I'm trying to create a dynamically generated rotating gif.
I want to add layers of text from a database to the image.
Please clarify.. do you want the image to be randomly rotated?
http://www.php.net/imagerotate
or do you want it to be an animated gif that automatically rotates?
AFAIK php can't generate animated gif's.
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
I'm trying to programatically retrieve a sales tax lookup page using
file_get_contents() but the page doesn't return data unless a session id
is first retrieved and then supplied.
You can see how it works as follows:
The first time I send the following request:
http://www7.nystax.gov/STLR/stlrHome?street=48%20central%20ave&zip=12472&B1=Lookup%20Address
I get an empty form back, and one of the response headers is Set-Cookie
with a value of, say,
JSESSIONID=0001WQEmZF6tI-yClq4S9_7a8ii:10amela49;Path=/
If I then reload the same URL, the resulting page includes the desired
info, probably because the second time one of the request headers is
Cookie with a value of JSESSIONID=0001WQEmZF6tI-yClq4S9_7a8ii:10amela49
I want to get the second version of the page, the one with data, using
file_get_contents(), but it appears I first have to get the page to
return a sessionid and then I have to send it in a Cookie header the
second time.
Reading the first GET's response headers and sending the needed request
header on the second GET - in combination with file_get_contents() - is
just beyond me. Can anyone enlighten me?
John Gunther
--- End Message ---
--- Begin Message ---
On Monday 31 July 2006 17:36, John Gunther wrote:
> I'm trying to programatically retrieve a sales tax lookup page using
> file_get_contents() but the page doesn't return data unless a session id
> is first retrieved and then supplied.
>
> You can see how it works as follows:
>
> The first time I send the following request:
> http://www7.nystax.gov/STLR/stlrHome?street=48%20central%20ave&zip=12472&B1
>=Lookup%20Address I get an empty form back, and one of the response headers
> is Set-Cookie with a value of, say,
> JSESSIONID=0001WQEmZF6tI-yClq4S9_7a8ii:10amela49;Path=/
>
> If I then reload the same URL, the resulting page includes the desired
> info, probably because the second time one of the request headers is
> Cookie with a value of JSESSIONID=0001WQEmZF6tI-yClq4S9_7a8ii:10amela49
>
> I want to get the second version of the page, the one with data, using
> file_get_contents(), but it appears I first have to get the page to
> return a sessionid and then I have to send it in a Cookie header the
> second time.
>
> Reading the first GET's response headers and sending the needed request
> header on the second GET - in combination with file_get_contents() - is
> just beyond me. Can anyone enlighten me?
>
> John Gunther
I deal with screen-scraping a lot at work. I would suggest using cURL to
store the cookie data, and then subsequently get the data you need.
check out
http://us3.php.net/manual/en/ref.curl.php
and the curl man page for more info.
or, you can use your own HTTP implementation ;)
HTH
--
Ray Hauge
Programmer/Systems Administrator
American Student Loan Services
www.americanstudentloan.com
1.800.575.1099
--- End Message ---
--- Begin Message ---
On 7/31/06, Ray Hauge <[EMAIL PROTECTED]> wrote:
On Monday 31 July 2006 17:36, John Gunther wrote:
> I'm trying to programatically retrieve a sales tax lookup page using
> file_get_contents() but the page doesn't return data unless a session id
> is first retrieved and then supplied.
>
I deal with screen-scraping a lot at work. I would suggest using cURL to
store the cookie data, and then subsequently get the data you need.
I can also recommend wget, a GNU utility. It doesn't have a PHP
interface like cURL, but it's great for standalone http GETs with
cookies and form data.
--- End Message ---
--- Begin Message ---
Brad Bonkoski wrote:
Any insights or tips into this?
httpd: Syntax error on line 232 of /home/www/conf/httpd.conf: Cannot
load /home/www/modules/libphp5.so into server:
/home/www/modules/libphp5.so: undefined symbol: _pcre_ucp_findprop
The pcre reference would point to this: http://www.php.net/pcre
Did you copy this .so file from another machine onto this one? I suspect
the compiled version has pcre support built into it, but the machine
you're trying to run it on doesn't have the necessary libraries.
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
I have an already working LDAP server. One of my user's ldif looks like:
...
...
sn: Roger Thomas
givenName: Roger Thomas
objectClass: top
objectClass: person
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: qmailUser
objectClass: hordePerson
o: example.com
ou: people
...
...
I have around 9000 user records. And I would like to add a new objectClass
(radiusprofile) to each user record like:
...
...
objectClass: qmailUser
objectClass: hordePerson
objectClass: radiusprofile
...
...
Question: which LDAP function do I need to use to achive this ?
---------------------------------------------------
Sign Up for free Email at http://ureg.home.net.my/
---------------------------------------------------
--- End Message ---
--- Begin Message ---
Roger Thomas wrote:
I have an already working LDAP server. One of my user's ldif looks like:
...
...
sn: Roger Thomas
givenName: Roger Thomas
objectClass: top
objectClass: person
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: qmailUser
objectClass: hordePerson
o: example.com
ou: people
...
...
I have around 9000 user records. And I would like to add a new objectClass
(radiusprofile) to each user record like:
...
...
objectClass: qmailUser
objectClass: hordePerson
objectClass: radiusprofile
...
...
Question: which LDAP function do I need to use to achive this ?
http://php.net/ldap_mod_add
But this function need the DN as parameter, so I guess you will have to
find a way to iterate through all the entries and pass DN of each entry
to the function.
**
--
Sameer N. Ingole
http://weblogic.noroot.org/
---
Better to light one candle than to curse the darkness.
--- End Message ---
--- Begin Message ---
Hi,
Is it possible to print out all variables that are active within a script
without doing it manually? This is what I would like to do:
$a = 12;
$b = 'Peter';
$c = 'Lauri';
echo '<pre>';
print_r( get_all_variables() );
echo '</pre>';
Best regards,
Peter Lauri
--- End Message ---