php-install Digest 28 Sep 2002 07:56:06 -0000 Issue 1043
Topics (messages 8587 through 8598):
Re: PHP showing as Plain text in browser- PHP-Apache-Red Hat
8587 by: Jens Rosenthal
8590 by: Trevor Smith
8591 by: Wilfredo I. Pachón López
8592 by: Moraes, Fabio
8594 by: Jens Rosenthal
8596 by: Trevor Smith
Setting up a web server wit Redhat 7.3
8588 by: Peter Goggin
8589 by: Moraes, Fabio
8593 by: Chris Hewitt
CGI install of php-4.2.3
8595 by: Brenden Brassard
PHP, apache and windows xp installation problem
8597 by: Anna Wagg
Solaris8/intel PHP binaries .. PLEASE !!
8598 by: PHPio
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 ---
Hi,
do you have a line "LoadModule php4 ..." and "AddModule mod_php4.c" in your
httpd.conf?
Most likely you didn't activate the module so the fragment below doesn't do
anything..
Otherwise did you compile the php4 module into apache?
Jens
-----Ursprüngliche Nachricht-----
Von: Trevor Smith [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 27. September 2002 14:59
An: [EMAIL PROTECTED]
Betreff: [PHP-INST] PHP showing as Plain text in browser- PHP-Apache-Red
Hat
As the subject says I have apache running on redhat and anything using
php simply shows the Plain text code when I view it through a web browser.
My AddType's from httpd.conf:
<IfModule mod_php4.c>
AddType application/x-httpd-php .php .php4 .php3 .phtml
AddType application/x-httpd-php-source .phps
</IfModule>
<IfModule mod_php3.c>
AddType application/x-httpd-php3 .php3
AddType application/x-httpd-php3-source .phps
</IfModule>
<IfModule mod_php.c>
AddType application/x-httpd-php .phtml
</IfModule>
I think I have apache support enabled in php.ini currently this file is
located in /etc, should it be somewhere else?
; Enable the PHP scripting language engine under Apache.
engine = On
any ideas would be appreciated
--
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I think the LoadModule and AddModule are correct.
<IfDefine HAVE_PHP4>
LoadModule php4_module modules/libphp4.so
</IfDefine>
<IfDefine HAVE_PHP4>
AddModule mod_php4.c
</IfDefine>
and I installed from an rpm binary not source. Guess I will have to go
back and do it from source.
Jens Rosenthal wrote:
>Hi,
>
>do you have a line "LoadModule php4 ..." and "AddModule mod_php4.c" in your
>httpd.conf?
>Most likely you didn't activate the module so the fragment below doesn't do
>anything..
>
>Otherwise did you compile the php4 module into apache?
>
>Jens
>-----Ursprüngliche Nachricht-----
>Von: Trevor Smith [mailto:[EMAIL PROTECTED]]
>Gesendet: Freitag, 27. September 2002 14:59
>An: [EMAIL PROTECTED]
>Betreff: [PHP-INST] PHP showing as Plain text in browser- PHP-Apache-Red
>Hat
>
>
> As the subject says I have apache running on redhat and anything using
>php simply shows the Plain text code when I view it through a web browser.
>
>
>My AddType's from httpd.conf:
>
><IfModule mod_php4.c>
> AddType application/x-httpd-php .php .php4 .php3 .phtml
> AddType application/x-httpd-php-source .phps
> </IfModule>
> <IfModule mod_php3.c>
> AddType application/x-httpd-php3 .php3
> AddType application/x-httpd-php3-source .phps
> </IfModule>
> <IfModule mod_php.c>
> AddType application/x-httpd-php .phtml
> </IfModule>
>
>I think I have apache support enabled in php.ini currently this file is
>located in /etc, should it be somewhere else?
>
>; Enable the PHP scripting language engine under Apache.
>engine = On
>
>any ideas would be appreciated
>
>
>--
>PHP Install Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
>
--- End Message ---
--- Begin Message ---
You needd to add the lines:
AddType application/x-httpd-php .php .php4 .php3 .phtml
AddType application/x-httpd-php-source .phps
Att:
, ,
/ \
((__-^^-,-^^-__)) .-.
`-_---' `---_-' Wilfredo I. Pachón López /v\
`--|o` 'o|--' GNU/Linux registered user // \\
\ ` / #175316 /( )\
): :( ^^-^^
:o_o:
"-"
>No a los adjuntos de Word(http://www.gnu.org/philosophy/no-word-
attachments.es.html)
--
Visita nuestro portal web www.canapro.org.co
--- End Message ---
--- Begin Message ---
1 - try using absolute path to libphp4.so instead of relative
2 - use slackware, this solution never fails ! ;D
regards,
---
Fabio Moraes
[EMAIL PROTECTED]
+55 21 3088 9548
> -----Original Message-----
> From: Trevor Smith [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 27, 2002 11:21 AM
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-INST] PHP showing as Plain text in browser-
> PHP-Apache-Red Hat
>
>
> I think the LoadModule and AddModule are correct.
>
> <IfDefine HAVE_PHP4>
> LoadModule php4_module modules/libphp4.so
> </IfDefine>
>
> <IfDefine HAVE_PHP4>
> AddModule mod_php4.c
> </IfDefine>
>
> and I installed from an rpm binary not source. Guess I will
> have to go
> back and do it from source.
>
> Jens Rosenthal wrote:
>
> >Hi,
> >
> >do you have a line "LoadModule php4 ..." and "AddModule
> mod_php4.c" in your
> >httpd.conf?
> >Most likely you didn't activate the module so the fragment
> below doesn't do
> >anything..
> >
> >Otherwise did you compile the php4 module into apache?
> >
> >Jens
> >-----Ursprüngliche Nachricht-----
> >Von: Trevor Smith [mailto:[EMAIL PROTECTED]]
> >Gesendet: Freitag, 27. September 2002 14:59
> >An: [EMAIL PROTECTED]
> >Betreff: [PHP-INST] PHP showing as Plain text in browser-
> PHP-Apache-Red
> >Hat
> >
> >
> > As the subject says I have apache running on redhat and
> anything using
> >php simply shows the Plain text code when I view it through
> a web browser.
> >
> >
> >My AddType's from httpd.conf:
> >
> ><IfModule mod_php4.c>
> > AddType application/x-httpd-php .php .php4 .php3 .phtml
> > AddType application/x-httpd-php-source .phps
> > </IfModule>
> > <IfModule mod_php3.c>
> > AddType application/x-httpd-php3 .php3
> > AddType application/x-httpd-php3-source .phps
> > </IfModule>
> > <IfModule mod_php.c>
> > AddType application/x-httpd-php .phtml
> > </IfModule>
> >
> >I think I have apache support enabled in php.ini currently
> this file is
> >located in /etc, should it be somewhere else?
> >
> >; Enable the PHP scripting language engine under Apache.
> >engine = On
> >
> >any ideas would be appreciated
> >
> >
> >--
> >PHP Install Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
> >
> >
>
>
>
> --
> PHP Install Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Not necessarily...
Does your Apache startscript start apache with "-DHAVE_PHP4"?
Simple workaround for this would be to strip the lines "<IfDefine
HAVE_PHP4>" and "</IfDefine>" from the file.
Without these lines the PHP module is loaded (if it exists in the right
directory) even with a slightly cracked startscript.
-----Ursprüngliche Nachricht-----
Von: Trevor Smith [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 27. September 2002 16:21
Cc: [EMAIL PROTECTED]
Betreff: Re: [PHP-INST] PHP showing as Plain text in browser-
PHP-Apache-Red Hat
I think the LoadModule and AddModule are correct.
<IfDefine HAVE_PHP4>
LoadModule php4_module modules/libphp4.so
</IfDefine>
<IfDefine HAVE_PHP4>
AddModule mod_php4.c
</IfDefine>
and I installed from an rpm binary not source. Guess I will have to go
back and do it from source.
Jens Rosenthal wrote:
>Hi,
>
>do you have a line "LoadModule php4 ..." and "AddModule mod_php4.c" in your
>httpd.conf?
>Most likely you didn't activate the module so the fragment below doesn't do
>anything..
>
>Otherwise did you compile the php4 module into apache?
>
>Jens
>-----Ursprüngliche Nachricht-----
>Von: Trevor Smith [mailto:[EMAIL PROTECTED]]
>Gesendet: Freitag, 27. September 2002 14:59
>An: [EMAIL PROTECTED]
>Betreff: [PHP-INST] PHP showing as Plain text in browser- PHP-Apache-Red
>Hat
>
>
> As the subject says I have apache running on redhat and anything using
>php simply shows the Plain text code when I view it through a web browser.
>
>
>My AddType's from httpd.conf:
>
><IfModule mod_php4.c>
> AddType application/x-httpd-php .php .php4 .php3 .phtml
> AddType application/x-httpd-php-source .phps
> </IfModule>
> <IfModule mod_php3.c>
> AddType application/x-httpd-php3 .php3
> AddType application/x-httpd-php3-source .phps
> </IfModule>
> <IfModule mod_php.c>
> AddType application/x-httpd-php .phtml
> </IfModule>
>
>I think I have apache support enabled in php.ini currently this file is
>located in /etc, should it be somewhere else?
>
>; Enable the PHP scripting language engine under Apache.
>engine = On
>
>any ideas would be appreciated
>
>
>--
>PHP Install Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
>
--
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Very nice, that fixed it.
Thanks everyone for all the help.
Miguel Carvalho wrote:
>I,
>
>
>>I think the LoadModule and AddModule are correct.
>>
>><IfDefine HAVE_PHP4>
>>LoadModule php4_module modules/libphp4.so
>></IfDefine>
>>
>><IfDefine HAVE_PHP4>
>>AddModule mod_php4.c
>></IfDefine>
>>
>>
>>
>
>Seams right to me.
>
>
>
>>and I installed from an rpm binary not source. Guess I will have to go
>> back and do it from source.
>>
>>
>>
>
>Do a ps | grep "HAVE_PHP4"
>If you dont get any result, it means that apache is not defining the
>"HAVE_PHP4" and so it hasnt PHP support enabled.
>Kill all httpd process's.
>Try running the comand: <path_to_apache>/bin/httpd -DHAVE_PHP4
>
>This command will instruct Apache to load it self and activate PHP support.
>
>If that works, you may want to disable the <IfDefine> directives in the
>httpd.conf file, and restart Apache.
>Miguel
>
>
>
>
--- End Message ---
--- Begin Message ---
I dont know if this is the right list.
I have set up redhat 7.3, apache, mysql and php.
I can connect to my mysql users from the command line. I am now trying to
get the connections via web pages to work properly. .
There is however error which I do not undertand.
Warning: No MySQL-Link resource supplied in
/usr/local/www/vantweststamps/databaselogin.php on line 15
Connected successfully
,Line 15 is
mysql_close();
If I then go on to use a page which requires the database connection I get:
Warning: Supplied argument is not a valid MySQL result resource in
/usr/local/www/vantweststamps/stampconditionlist.php on line 39
Line 39 is:
if ($row= mysql_fetch_array($result))
These pages all work without error on my win98 machine with apache, mysql
and php.
Is there any documentation which lists all of these error conditions and
suggests ways of solving them?
Regards
Peter Goggin
--- End Message ---
--- Begin Message ---
1 - this is not the right list :)
but ...
mysql_close() needs an argument. this argument is the result of
mysql_connect().
mysql_fetch_array() needs the result of funcstions like mysql_query(),
mysql_db_query() etc.
these functions execute something and return the "result", handle it to a
variable and pass it as argument to mysql_fetch_array().
$sql = mysql_connect( host, user, pass );
mysql_select_db( database );
$result = mysql_query("select * from users" );
while ( $row = mysql_fetch_array($result) )
{
...
}
bye,
---
Fabio Moraes
[EMAIL PROTECTED]
+55 21 3088 9548
> -----Original Message-----
> From: Peter Goggin [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 27, 2002 11:10 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-INST] Setting up a web server wit Redhat 7.3
>
>
> I dont know if this is the right list.
> I have set up redhat 7.3, apache, mysql and php.
> I can connect to my mysql users from the command line. I am
> now trying to
> get the connections via web pages to work properly. .
> There is however error which I do not undertand.
>
> Warning: No MySQL-Link resource supplied in
> /usr/local/www/vantweststamps/databaselogin.php on line 15
> Connected successfully
> ,Line 15 is
> mysql_close();
>
>
> If I then go on to use a page which requires the database
> connection I get:
> Warning: Supplied argument is not a valid MySQL result resource in
> /usr/local/www/vantweststamps/stampconditionlist.php on line 39
> Line 39 is:
> if ($row= mysql_fetch_array($result))
>
> These pages all work without error on my win98 machine with
> apache, mysql
> and php.
>
> Is there any documentation which lists all of these error
> conditions and
> suggests ways of solving them?
>
> Regards
>
> Peter Goggin
>
>
>
>
>
>
>
> --
> PHP Install Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Peter Goggin wrote:
>I dont know if this is the right list.
>I have set up redhat 7.3, apache, mysql and php.
>I can connect to my mysql users from the command line. I am now trying to
>get the connections via web pages to work properly. .
>There is however error which I do not undertand.
>
>Warning: No MySQL-Link resource supplied in
>/usr/local/www/vantweststamps/databaselogin.php on line 15
>Connected successfully
>,Line 15 is
>mysql_close();
>
The script databaselogin.php does not know what the last link opened
was. Do you open the link in this script? I suspect not, in which case
are you passing the link successfully from one page to another (try
printing it out)? It could be something as simple as register_globals on
in your win98 set up but not on the linux box.
HTH
Chris
--- End Message ---
--- Begin Message ---
I have compiled php-4.2.3 with the following paramaters:
./configure --with-mssql=/usr/local/ftds --with-sybase=/usr/local/ftds
--with-mysql
When trying to run a php script from the command line I get "PHP Warning:
Function registration failed - duplicate name - mysql_connect in Unknown on
line 0" followed by an error for each of the mysql functions. The only info
I could find was a bug report (#15907) which said it had been repaird in
CVS. Is there something else I'm doing wrong? Please help.
Thanks,
Brenden
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
--- End Message ---
--- Begin Message ---
Hi all,
My name is Anna. Could anyone help me to get working apache with php. I got
the apache server working with no problems. However when I try to configure
PHP as a module in Apache, I cannot start the apache server again. I am
getting the following message:
“The requested operation has failed!”
I spent a lot of time trying to make different changes but nothing has
worked. Below I list the steps that I took. I think they were the most
correct attempts of getting working the apache with PHP.
PLEASE HELP ME!!!
1)Operating system: Windows XP
2)Service Pack 1 installed
3)Server Version: Apache 2.0.40
a. Apache htdocs folder directory:
C:\Program Files\Apache Group\Apache2\htdocs
4)PHP Windows Manual installation from zip binary distribution
a.apache_2.0.40-win32-x86-no_ssl.exe
5)PHP 4, 06 Sep 2002, Version 4.2.3
a)PHP installation directory:
C:\Program Files\php 4.2.3
6)PHP is run as a server module.
7)System directory:
a.C:\WINDOWS\system32
8)The content (dlls and phpsrvlt.jar, pws-php4cgi.reg, pws-php4isapi.reg) of
the sapi folder ( “C:\Program Files\php 4.2.3\sapi” ) was copied and passed
to the system directory ( “C:\WINDOWS\system32” )
9)php4ts.dll was copied to “C:\WINDOWS\system32”
10)File: php.ini-dist was copied to
“C:\WINDOWS\system32” and renamed to “php.ini”.
11)The following line was commented out:
a. ;extension_dir = ./
12)extension_dir was set as below :
a. extension_dir = C:\Program Files\php 4.2.3\extensions
13)doc_root was set as follows:
a.doc_root = C:\Program Files\Apache Group\Apache2\htdocs
14)usr folder was created in:
a.C:\Program Files\php 4.2.3\
15)mibs folder was copied (not moved !) to:
a.C:\Program Files\php 4.2.3\usr\mibs
16)Server was stopped and the httpd.conf was modified (lines below were
added):
a. LoadModule php4_module c:/Program Files/php 4.2.3/sapi/php4apache.dll
b. AddModule mod_php4.c
c. AddType application/x-httpd-php .php
17)I was also trying to change php4apache.dll to php4apache2.dll, but it did
not help to get server running.
18)PHP was configured as a module in Apache.
19)When I add above four lines to httpd.conf file the apache server can be
stopped, however I cannot start it again. When those lines are commented
out, the apache server works with no problems.
Could anyone tell me what I am doing wrong.
Yours,
Anna.
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
--- End Message ---
--- Begin Message ---
hi guys..
i've really seached alot for Soalris8/intel PHP binaries with no result..
i've tried also to do the compiling but every tme thier is a lots of
errors..
so my only solution now is to find any pre-made binaries for Solaris8/i386
platforme
my question is : does it exist ?
thanx alot
--- End Message ---