php-install Digest 2 Dec 2001 23:45:24 -0000 Issue 583
Topics (messages 5162 through 5169):
Re: PHP, MySQL, * Mandrake 8.1
5162 by: Joe
5163 by: Joe
5164 by: Rasmus Lerdorf
5166 by: Joe
5168 by: Fred
Strange problem with mime-type
5165 by: Veronica Yuill
include_path error or bug
5167 by: Lubos Jerabek
Apache Unable To Locate PHP Script Files
5169 by: Washburn Family
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 ---
Ultimately, I am trying to use PHP from Apache. You've almost definitely
hit on my problem because I am not sure how to answer your question. If I
call a script from the web server, I get the same error about undefined
function. Is this a case of not giving the right switch to the PHP
configuration script? Is there a library file I can simply move? I would
like to use a module in the end.
jce
Fred wrote:
> Are you installing php as cgi or as an apache module? What happens when
> you call a script via the web server?
>
> Fred
>
> Joe <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>> Good Call. I installed the development packages and php configured,
>> compiled and installed properly. I am now left with what seems like a
>> simple problem, which I have not successfully tackled. If I run my
>> program by typing: php test.php, it does not work. If I do: ./php
>> test.php it does work. I am assuming the "make install" didn't do what I
>> expected, but I haven't found the problem yet. Any ideas?
>>
>> (Still getting the same error: Undefined function as described below. I
>> checked for copies all over the filesystem and compared them using
>> md5sum. All appear to be the same. I am puzzled.)
>>
>> jce
>>
>>
>> Fred wrote:
>>
>> > I would venture to guess that mysql is installed as a binary
> distribution.
>> > PHP needs the sources in order to compile with mysql support. Try
>> > installing mysql from source or installing the source rpm.
>> >
>> > Fred
>> >
>> > Joe <[EMAIL PROTECTED]> wrote in message
>> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>> >> Hi All,
>> >>
>> >> I am trying to use MySQL from PHP. I get the error message:
> call
>> > to
>> >> undefined function: mysql_connect()
>> >>
>> >> Based on what I've read, I need to compile PHP with the
>> >> --use-mysql=/path/to/mysql option. This was not enough information to
> get
>> >> the compile to work. (I tried every directory that had *any* mysql
> files
>> > in
>> >> it.) So I ended up compiling just using --use-mysql. This seemed to
> work,
>> >> php -v gives me 4.0.6. However, the error still exists: undefined
>> > function:
>> >> mysql_connect() (MySQL is definitely installed. I have used the client
> to
>> >> build a small database which I can query against.)
>> >>
>> >> Could someone please give me a hand here?
>> >>
>> >> jce
>>
--- End Message ---
--- Begin Message ---
Additionally, I just noticed that although I installed the dev packages for
both Apache and MySQL, I was not giving the MySQL path. If I attempt to
give a path, the configuration still fails. The header files are in
/usr/include/mysql. I've tried that path as well as /usr/include. Am I
still missing a package?
jce
Joe wrote:
> Ultimately, I am trying to use PHP from Apache. You've almost definitely
> hit on my problem because I am not sure how to answer your question. If I
> call a script from the web server, I get the same error about undefined
> function. Is this a case of not giving the right switch to the PHP
> configuration script? Is there a library file I can simply move? I would
> like to use a module in the end.
>
> jce
>
>
>
> Fred wrote:
>
>> Are you installing php as cgi or as an apache module? What happens when
>> you call a script via the web server?
>>
>> Fred
>>
>> Joe <[EMAIL PROTECTED]> wrote in message
>> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>>> Good Call. I installed the development packages and php configured,
>>> compiled and installed properly. I am now left with what seems like a
>>> simple problem, which I have not successfully tackled. If I run my
>>> program by typing: php test.php, it does not work. If I do: ./php
>>> test.php it does work. I am assuming the "make install" didn't do what I
>>> expected, but I haven't found the problem yet. Any ideas?
>>>
>>> (Still getting the same error: Undefined function as described below. I
>>> checked for copies all over the filesystem and compared them using
>>> md5sum. All appear to be the same. I am puzzled.)
>>>
>>> jce
>>>
>>>
>>> Fred wrote:
>>>
>>> > I would venture to guess that mysql is installed as a binary
>> distribution.
>>> > PHP needs the sources in order to compile with mysql support. Try
>>> > installing mysql from source or installing the source rpm.
>>> >
>>> > Fred
>>> >
>>> > Joe <[EMAIL PROTECTED]> wrote in message
>>> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>>> >> Hi All,
>>> >>
>>> >> I am trying to use MySQL from PHP. I get the error message:
>> call
>>> > to
>>> >> undefined function: mysql_connect()
>>> >>
>>> >> Based on what I've read, I need to compile PHP with the
>>> >> --use-mysql=/path/to/mysql option. This was not enough information to
>> get
>>> >> the compile to work. (I tried every directory that had *any* mysql
>> files
>>> > in
>>> >> it.) So I ended up compiling just using --use-mysql. This seemed to
>> work,
>>> >> php -v gives me 4.0.6. However, the error still exists: undefined
>>> > function:
>>> >> mysql_connect() (MySQL is definitely installed. I have used the
>>> >> client
>> to
>>> >> build a small database which I can query against.)
>>> >>
>>> >> Could someone please give me a hand here?
>>> >>
>>> >> jce
>>>
--- End Message ---
--- Begin Message ---
No, but as per the INSTALL docs, you should be using --with-mysql=/usr
PHP needs to find both the library and the header files and there are no
library files anywhere under /usr/include
On Sun, 2 Dec 2001, Joe wrote:
> Additionally, I just noticed that although I installed the dev packages for
> both Apache and MySQL, I was not giving the MySQL path. If I attempt to
> give a path, the configuration still fails. The header files are in
> /usr/include/mysql. I've tried that path as well as /usr/include. Am I
> still missing a package?
>
> jce
>
> Joe wrote:
>
> > Ultimately, I am trying to use PHP from Apache. You've almost definitely
> > hit on my problem because I am not sure how to answer your question. If I
> > call a script from the web server, I get the same error about undefined
> > function. Is this a case of not giving the right switch to the PHP
> > configuration script? Is there a library file I can simply move? I would
> > like to use a module in the end.
> >
> > jce
> >
> >
> >
> > Fred wrote:
> >
> >> Are you installing php as cgi or as an apache module? What happens when
> >> you call a script via the web server?
> >>
> >> Fred
> >>
> >> Joe <[EMAIL PROTECTED]> wrote in message
> >> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >>> Good Call. I installed the development packages and php configured,
> >>> compiled and installed properly. I am now left with what seems like a
> >>> simple problem, which I have not successfully tackled. If I run my
> >>> program by typing: php test.php, it does not work. If I do: ./php
> >>> test.php it does work. I am assuming the "make install" didn't do what I
> >>> expected, but I haven't found the problem yet. Any ideas?
> >>>
> >>> (Still getting the same error: Undefined function as described below. I
> >>> checked for copies all over the filesystem and compared them using
> >>> md5sum. All appear to be the same. I am puzzled.)
> >>>
> >>> jce
> >>>
> >>>
> >>> Fred wrote:
> >>>
> >>> > I would venture to guess that mysql is installed as a binary
> >> distribution.
> >>> > PHP needs the sources in order to compile with mysql support. Try
> >>> > installing mysql from source or installing the source rpm.
> >>> >
> >>> > Fred
> >>> >
> >>> > Joe <[EMAIL PROTECTED]> wrote in message
> >>> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >>> >> Hi All,
> >>> >>
> >>> >> I am trying to use MySQL from PHP. I get the error message:
> >> call
> >>> > to
> >>> >> undefined function: mysql_connect()
> >>> >>
> >>> >> Based on what I've read, I need to compile PHP with the
> >>> >> --use-mysql=/path/to/mysql option. This was not enough information to
> >> get
> >>> >> the compile to work. (I tried every directory that had *any* mysql
> >> files
> >>> > in
> >>> >> it.) So I ended up compiling just using --use-mysql. This seemed to
> >> work,
> >>> >> php -v gives me 4.0.6. However, the error still exists: undefined
> >>> > function:
> >>> >> mysql_connect() (MySQL is definitely installed. I have used the
> >>> >> client
> >> to
> >>> >> build a small database which I can query against.)
> >>> >>
> >>> >> Could someone please give me a hand here?
> >>> >>
> >>> >> jce
> >>>
>
>
>
--- End Message ---
--- Begin Message ---
Thanks Rasmus. I think at this point I would like to start with a clean
slate. I just tried to make the dynamic module by explicitly following the
INSTALL file (after a make clean). That still did not clear up the problem.
What is the best way to wipe the slate clean and start over?
jce
Rasmus Lerdorf wrote:
> No, but as per the INSTALL docs, you should be using --with-mysql=/usr
> PHP needs to find both the library and the header files and there are no
> library files anywhere under /usr/include
>
> On Sun, 2 Dec 2001, Joe wrote:
>
>> Additionally, I just noticed that although I installed the dev packages
>> for both Apache and MySQL, I was not giving the MySQL path. If I attempt
>> to give a path, the configuration still fails. The header files are in
>> /usr/include/mysql. I've tried that path as well as /usr/include. Am I
>> still missing a package?
>>
>> jce
>>
>> Joe wrote:
>>
>> > Ultimately, I am trying to use PHP from Apache. You've almost
>> > definitely hit on my problem because I am not sure how to answer your
>> > question. If I call a script from the web server, I get the same error
>> > about undefined function. Is this a case of not giving the right switch
>> > to the PHP configuration script? Is there a library file I can simply
>> > move? I would like to use a module in the end.
>> >
>> > jce
>> >
>> >
>> >
>> > Fred wrote:
>> >
>> >> Are you installing php as cgi or as an apache module? What happens
>> >> when you call a script via the web server?
>> >>
>> >> Fred
>> >>
>> >> Joe <[EMAIL PROTECTED]> wrote in message
>> >> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>> >>> Good Call. I installed the development packages and php configured,
>> >>> compiled and installed properly. I am now left with what seems like a
>> >>> simple problem, which I have not successfully tackled. If I run my
>> >>> program by typing: php test.php, it does not work. If I do: ./php
>> >>> test.php it does work. I am assuming the "make install" didn't do
>> >>> what I expected, but I haven't found the problem yet. Any ideas?
>> >>>
>> >>> (Still getting the same error: Undefined function as described below.
>> >>> I checked for copies all over the filesystem and compared them using
>> >>> md5sum. All appear to be the same. I am puzzled.)
>> >>>
>> >>> jce
>> >>>
>> >>>
>> >>> Fred wrote:
>> >>>
>> >>> > I would venture to guess that mysql is installed as a binary
>> >> distribution.
>> >>> > PHP needs the sources in order to compile with mysql support. Try
>> >>> > installing mysql from source or installing the source rpm.
>> >>> >
>> >>> > Fred
>> >>> >
>> >>> > Joe <[EMAIL PROTECTED]> wrote in message
>> >>> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>> >>> >> Hi All,
>> >>> >>
>> >>> >> I am trying to use MySQL from PHP. I get the error
>> >>> >> message:
>> >> call
>> >>> > to
>> >>> >> undefined function: mysql_connect()
>> >>> >>
>> >>> >> Based on what I've read, I need to compile PHP with the
>> >>> >> --use-mysql=/path/to/mysql option. This was not enough information
>> >>> >> to
>> >> get
>> >>> >> the compile to work. (I tried every directory that had *any* mysql
>> >> files
>> >>> > in
>> >>> >> it.) So I ended up compiling just using --use-mysql. This seemed
>> >>> >> to
>> >> work,
>> >>> >> php -v gives me 4.0.6. However, the error still exists: undefined
>> >>> > function:
>> >>> >> mysql_connect() (MySQL is definitely installed. I have used the
>> >>> >> client
>> >> to
>> >>> >> build a small database which I can query against.)
>> >>> >>
>> >>> >> Could someone please give me a hand here?
>> >>> >>
>> >>> >> jce
>> >>>
>>
>>
>>
--- End Message ---
--- Begin Message ---
The reason I asked about whether you were using PHP as a cgi or apache
module is because you were reporting problems calling php scripts from the
command line. This is not possible with the apache module version and could
explain your difficulties.
As for your continued problems with installation, doing a make clean should
give you a clean enough slate to work with.
Your problem, however, may not be as clear cut as it first seems. It occurs
to me that you still suffer from an undefined function error when compiling
with --with-mysql, which should not happen because PHP uses its built in
mysql libraries and headers. I'm wondering if you installed PHP from RPM
initially and whether you are using the source files contained in the PHP
development RPM to compile from source?
Personally, I prefer not to use RPMs for this type of install because I do
not have control over everything and cannot be sure (without much
investigating) whether things were done as I wanted them to be.
On the other hand, the people who put these RPMs together are certainly
aware that mysql, php and apache are commonly installed to work together.
If you want to give the RPMs one more chance I would suggest removing all of
the associated RPMs and installing the binary RPMs in this order:
MySQL
Apache
PHP
and check to see if your mysql functions work without further intervention.
If they do not, I would recommend removing all of the RPMs and downloading
and compiling the latest stable releases of MySQL, Apache and PHP from
source. I would not recommend compiling from the RPM development sources.
If you choose to go this path, there is a good tutorial for getting these
packages to work together at:
http://www.devshed.com/Server_Side/PHP/SoothinglySeamless/page1.html
To be sure, there is almost certainly some way to make your system work with
what you are currently using, but it would not neccessarily be easier to do
it that way. IMHO it is always best, even for a begginer, to use the
approach in the above article for two reasons:
It gives you total control over the installation and configuration process,
and
It allows you to learn everything that is required to make these programs
work correclty together.
Good Luck
Fred
Joe <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Thanks Rasmus. I think at this point I would like to start with a clean
> slate. I just tried to make the dynamic module by explicitly following the
> INSTALL file (after a make clean). That still did not clear up the
problem.
> What is the best way to wipe the slate clean and start over?
>
> jce
>
> Rasmus Lerdorf wrote:
>
> > No, but as per the INSTALL docs, you should be using --with-mysql=/usr
> > PHP needs to find both the library and the header files and there are no
> > library files anywhere under /usr/include
> >
> > On Sun, 2 Dec 2001, Joe wrote:
> >
> >> Additionally, I just noticed that although I installed the dev packages
> >> for both Apache and MySQL, I was not giving the MySQL path. If I
attempt
> >> to give a path, the configuration still fails. The header files are in
> >> /usr/include/mysql. I've tried that path as well as /usr/include. Am I
> >> still missing a package?
> >>
> >> jce
> >>
> >> Joe wrote:
> >>
> >> > Ultimately, I am trying to use PHP from Apache. You've almost
> >> > definitely hit on my problem because I am not sure how to answer your
> >> > question. If I call a script from the web server, I get the same
error
> >> > about undefined function. Is this a case of not giving the right
switch
> >> > to the PHP configuration script? Is there a library file I can simply
> >> > move? I would like to use a module in the end.
> >> >
> >> > jce
> >> >
> >> >
> >> >
> >> > Fred wrote:
> >> >
> >> >> Are you installing php as cgi or as an apache module? What happens
> >> >> when you call a script via the web server?
> >> >>
> >> >> Fred
> >> >>
> >> >> Joe <[EMAIL PROTECTED]> wrote in message
> >> >> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >> >>> Good Call. I installed the development packages and php configured,
> >> >>> compiled and installed properly. I am now left with what seems like
a
> >> >>> simple problem, which I have not successfully tackled. If I run my
> >> >>> program by typing: php test.php, it does not work. If I do: ./php
> >> >>> test.php it does work. I am assuming the "make install" didn't do
> >> >>> what I expected, but I haven't found the problem yet. Any ideas?
> >> >>>
> >> >>> (Still getting the same error: Undefined function as described
below.
> >> >>> I checked for copies all over the filesystem and compared them
using
> >> >>> md5sum. All appear to be the same. I am puzzled.)
> >> >>>
> >> >>> jce
> >> >>>
> >> >>>
> >> >>> Fred wrote:
> >> >>>
> >> >>> > I would venture to guess that mysql is installed as a binary
> >> >> distribution.
> >> >>> > PHP needs the sources in order to compile with mysql support.
Try
> >> >>> > installing mysql from source or installing the source rpm.
> >> >>> >
> >> >>> > Fred
> >> >>> >
> >> >>> > Joe <[EMAIL PROTECTED]> wrote in message
> >> >>> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >> >>> >> Hi All,
> >> >>> >>
> >> >>> >> I am trying to use MySQL from PHP. I get the error
> >> >>> >> message:
> >> >> call
> >> >>> > to
> >> >>> >> undefined function: mysql_connect()
> >> >>> >>
> >> >>> >> Based on what I've read, I need to compile PHP with the
> >> >>> >> --use-mysql=/path/to/mysql option. This was not enough
information
> >> >>> >> to
> >> >> get
> >> >>> >> the compile to work. (I tried every directory that had *any*
mysql
> >> >> files
> >> >>> > in
> >> >>> >> it.) So I ended up compiling just using --use-mysql. This seemed
> >> >>> >> to
> >> >> work,
> >> >>> >> php -v gives me 4.0.6. However, the error still exists:
undefined
> >> >>> > function:
> >> >>> >> mysql_connect() (MySQL is definitely installed. I have used the
> >> >>> >> client
> >> >> to
> >> >>> >> build a small database which I can query against.)
> >> >>> >>
> >> >>> >> Could someone please give me a hand here?
> >> >>> >>
> >> >>> >> jce
> >> >>>
> >>
> >>
> >>
>
--- End Message ---
--- Begin Message ---
Hi
I am using PHP on a remotely-hosted server so don't have access to the
httpd.conf file. The host has installed both PHP3 and PHP4 and instructed us
to use .php extensions for PHP3 files, and .php4 extensions for PHP 4. This
is fine, but I have encountered a weird problem. If the home page in a
particular directory is called index.html I can access it fine using
http://www.mydomain.com/directoryname/. But if the index file is called
index.php or index.php4, and I use the above syntax (i.e. not specifying the
filename), instead of the page displaying I am prompted to download a file
of type x-httpd-php. Yet, if I instead go to
http://www.mydomain.com/directoryname/index.php the page is correctly
interpreted and displayed as it should be. Tech support have been no help at
all, and I'm no Apache expert. Can anyone suggest what I should do to fix
this problem??
Thanks!
Veronica
--- End Message ---
--- Begin Message ---
I install Apache server 1.3.22 on windows 2000 profesional and install php
4.0.6 or 4.0.5 from binary zip package. Apache an PHP runnig OK, but when i
change parameter include_path (example: include_path = "/web/inc/pear") and
open page with include, require or phpinfo() PHP, page reporting Warning:
Failed opening '/web/htdocs/phpinfo.php' for inclusion
(include_path='/web/inc/pear') in Unknown on line 0 on screen and
[02-Dec-2001 18:27:29] PHP Warning: Failed opening
'/web/htdocs/phpinfo.php' for inclusion (include_path='/web/inc/pear') in
Unknown on line 0 in log.
where is problem ?
Lubos
--- End Message ---
--- Begin Message ---
Appreciate any assistance. Just installed PHP v4.x with Apache and apache
error log reports the following:
[Sat Dec 01 21:33:15 2001] [error] [client 10.6.144.27] script not found or
unable to stat: C:/Program Files/php/admin.php
[Sat Dec 01 21:33:16 2001] [error] [client 10.6.144.27] script not found or
unable to stat: C:/Program Files/php/admin.php
[Sat Dec 01 21:36:07 2001] [error] [client 10.6.144.27] script not found or
unable to stat: C:/Program Files/php/admin.php
In the php.ini, verified "doc root" parameter pointing to same as apache
"doc root", but some reason what's to pull from php installation directory
instead of "c:/website/portal"
Thanks
--- End Message ---