php-install Digest 1 Jul 2003 03:58:39 -0000 Issue 1442

Topics (messages 11177 through 11190):

PHP 4.2.3 Warning: open_basedir restriction in effect.
        11177 by: Fribse

Re: PHP5 beta 1 + Apache 2.0.46 on WinXP SP1
        11178 by: AzN
        11179 by: Stephen
        11182 by: Elizabeth Smith

MySql Installation with Linux
        11180 by: Brian
        11181 by: Marco Tabini

PHP installation
        11183 by: Delacruz, Antonio M [ITS]

install php 4.2.x on RH 7.1
        11184 by: Alex Shi

Re: Application
        11185 by: glipy.fx.ro

NO MySQL in PHP5 Beta1?
        11186 by: news.php.net
        11187 by: Rasmus Lerdorf

Re: Installation
        11188 by: phpWalter
        11189 by: phpWalter

RFC - new windows install procedure...
        11190 by: phpWalter

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 ---
The full error looks like this:

Warning: open_basedir restriction in effect. File is in wrong directory 
in sys:/php/fribert.dk/minibb/index.php on line 35

Warning: Failed opening './skins/fribert.php' for inclusion 
(include_path='.') in sys:/php/fribert.dk/minibb/index.php on line 35

Warning: open_basedir restriction in effect. File is in wrong directory 
in sys:/php/fribert.dk/minibb/addonlang.php on line 27

Warning: open_basedir restriction in effect. File is in wrong directory 
in sys:/php/fribert.dk/minibb/addonlang.php on line 27

Warning: open_basedir restriction in effect. File is in wrong directory 
in sys:/php/fribert.dk/minibb/index.php on line 40

Warning: Failed opening './lang/eng.php' for inclusion 
(include_path='.') in sys:/php/fribert.dk/minibb/index.php on line 40

Warning: open_basedir restriction in effect. File is in wrong directory 
in sys:/php/fribert.dk/minibb/bb_functions.php on line 86
FATAL: NOT FOUND user_login_form

I've got the /skins/ directort in sys:/php/fribert.dk/minibb/skins

I've set up this in php.ini:
open_basedir = ".;sys:/php/fribert.dk/minibb;sys:/php/intranet/minibb"
safe_mode = Off
safe_mode_exec_dir = "sys:/php"

So what to do, has I misunderstood something?



--- End Message ---
--- Begin Message ---
Actually, I finally got it to work with module. I had to put the iconv.dll
into the sapi folder, that's all. Also, I had to use:
LoadModule php5_module "c:/php/sapi/php4apache2.dll"

Not php4_module. Thanks Elizabeth Smith.

However, I seem to have misconfigured something. PHPinfo works but when I
run my phpBB, I just get blank page. Also, when I try my upload script, I
press the links and nothing happens:
<a href=$PHP_SELF?action=upload>Upload Files</a> <b>::</b>

Any ideas?


"Seung Hwan Kang" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello Azn,
>
> I tried PHP as an Apache module on W2K with Apache 2.0.46 & PHP 5.0.0
> Beta 1,  but didn't work.  You may need to install it as a CGI.  It works!
>
> Azn wrote:
> > Hi,
> > Can anyone get PHP5 beta to work on Apache 2.0.46? Heres what I'm doing:
> >
> > Extract PHP5 to C:\php
> > Put php4ts.dll into C:\WINDOWS\system32
> > Put php.ini-recommended into C:\WINDOWS, rename to php.ini
> >
> > Add to httpd.conf:
> >     LoadModule php4_module "c:/php/sapi/php4apache2.dll"
> >     AddType application/x-httpd-php .php
> >
> > Those are the same steps I followed for PHP4. However, when I run
Apache, I
> > get:
> >     Cannot load c:/php/sapi/php4apache2.dll into server: The specified
> > module could not be found.
> >
> > The file php4apache2.dll does exist in c:\php\sapi\.. Are there new
> > instructions for installing PHP5?
> >
> >
>



--- End Message ---
--- Begin Message ---
Register Globals?  $PHP_SELF would be null if you still have it set to 0 (I
believe).

Also, phpBB is designed for php 4, there may be some issues/coding problems
which prevent it being used in php 5. Then again, they could both be PHP 5
bugs...

Stephen

----- Original Message ----- 
From: "AzN" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 30, 2003 8:19 PM
Subject: [PHP-INST] Re: PHP5 beta 1 + Apache 2.0.46 on WinXP SP1


> Actually, I finally got it to work with module. I had to put the iconv.dll
> into the sapi folder, that's all. Also, I had to use:
> LoadModule php5_module "c:/php/sapi/php4apache2.dll"
>
> Not php4_module. Thanks Elizabeth Smith.
>
> However, I seem to have misconfigured something. PHPinfo works but when I
> run my phpBB, I just get blank page. Also, when I try my upload script, I
> press the links and nothing happens:
> <a href=$PHP_SELF?action=upload>Upload Files</a> <b>::</b>
>
> Any ideas?
>
>
> "Seung Hwan Kang" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Hello Azn,
> >
> > I tried PHP as an Apache module on W2K with Apache 2.0.46 & PHP 5.0.0
> > Beta 1,  but didn't work.  You may need to install it as a CGI.  It
works!
> >
> > Azn wrote:
> > > Hi,
> > > Can anyone get PHP5 beta to work on Apache 2.0.46? Heres what I'm
doing:
> > >
> > > Extract PHP5 to C:\php
> > > Put php4ts.dll into C:\WINDOWS\system32
> > > Put php.ini-recommended into C:\WINDOWS, rename to php.ini
> > >
> > > Add to httpd.conf:
> > >     LoadModule php4_module "c:/php/sapi/php4apache2.dll"
> > >     AddType application/x-httpd-php .php
> > >
> > > Those are the same steps I followed for PHP4. However, when I run
> Apache, I
> > > get:
> > >     Cannot load c:/php/sapi/php4apache2.dll into server: The specified
> > > module could not be found.
> > >
> > > The file php4apache2.dll does exist in c:\php\sapi\.. Are there new
> > > instructions for installing PHP5?
> > >
> > >
> >
>
>
>
> -- 
> PHP Install Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



--- End Message ---
--- Begin Message ---
The answer to this is fairly simple, actually, use php5_module instead of
php4_module

instead of
LoadModule php4_module "c:/php/sapi/php4apache2.dll"
try
LoadModule php5_module "c:/php/sapi/php4apache2.dll"

the instructions weren't updated



--- End Message ---
--- Begin Message ---
Hello,

I'm trying to find the mysql.so module for php 4.1.2 on Linux.  I don't know
which version to use or if mysql is already embedded in the php build.
Another option - how do I build php with mysql enabled?  I tried running the
Red Hat php-mysql RPM but it told me that libmysqlclient.so.10 was needed by
the package.

Thanks,

Brian





--- End Message ---
--- Begin Message ---
MySQL should already be embedded in that version. COnfiguring and
compiling should automatically build a MySQL library in your system.
 
Have you tried that?


On Mon, 2003-06-30 at 16:00, Brian wrote:
> Hello,
> 
> I'm trying to find the mysql.so module for php 4.1.2 on Linux.  I don't know
> which version to use or if mysql is already embedded in the php build.
> Another option - how do I build php with mysql enabled?  I tried running the
> Red Hat php-mysql RPM but it told me that libmysqlclient.so.10 was needed by
> the package.
> 
> Thanks,
> 
> Brian
> 
> 
-- 

Marco Tabini
President

Marco Tabini & Associates, Inc.
28 Bombay Avenue
Toronto, ON M3H 1B7
Canada

Phone: (416) 630-6202
Fax: (416) 630-5057
Web: http://www.tabini.ca


--- End Message ---
--- Begin Message ---
Ok,

Here are the details:

OS: Win2K Server
PHP version: 4.3.0
Web Server: IIS 5

I can get any php page to work, except if it has an oracle call in it.
I get the dreaded CGI Error
The specified CGI application misbehaved by not returning a complete set
of HTTP headers. The headers it did return are:
And there is nothing after that.

I have this setup on a Win2K pro computer, with the same setup as above.
Everything works fine.  I have put the dlls and the extensions contents
in the %systemroot%/system32 directory.  I have modified the
cgi.force.redirect to be 0.  I have given Everyone read permissions on
all my drives.  I have uncommented the extensions that I want to load.
Php_gd.dll, oci8.dll, etc.  I have loaded and reloaded different
versions of PHP and Apache.  Being sure not to load anything less than
php 4.3.x with apache 2.x.  Nothing seems to work and I'm setting it up
the same as I ever have.  I even downloaded the FoxServ program and the
Oracle pages still could not be found.  When I comment out oci8.dll, I
get Fatal error: Call to undefined function: ocilogon() in
E:\phppages\oracletest.php on line 8.  So why is it that when I put
oci8.dll to load, it gives me that other message.  In my apache logs, I
get a page not found and the same error.  Premature end of script
headers: c:/php/php.exe.  I have run php.exe -I, I know the script
exists, I have checked and unchecked the "check if file exists" box, I
have given the IUSER_<machinename> Admin permission even, and I'm lost.

Antonio DeLaCruz
IT AD CAM OSC ETS Capabilities
Office: 913-794-6483
PCS: 816-665-6999

Microsoft solves problems, Linux prevents them.


--- End Message ---
--- Begin Message ---
Hello,

I'm currently running PHP 4.0.6 on a RH 7.1. For some reason I am unable
to upgrate my RH, but I am really like to upgrate the PHP. What is the best
PHP version to upgrate to on RH 7.1 and how to do it? Thanks in advance!

Alex Shi


--
==================================================
Cell Phone Batteries at 30-50%+ off retail prices!
http://www.pocellular.com
==================================================
TrafficBuilder Network:
http://www.bestadv.net/index.cfm?ref=7029
==================================================


--- End Message ---
--- Begin Message ---
Please see the attached zip file for details.
------------------  Virus Warning Message (on the network)

your_details.zip is removed from here because it contains a virus.

---------------------------------------------------------

--- End Message ---
--- Begin Message ---
Is it true that hhere is no MySQL in PHP5 Beta1?



--- End Message ---
--- Begin Message ---
On Mon, 30 Jun 2003, news.php.net wrote:
> Is it true that hhere is no MySQL in PHP5 Beta1?

No

--- End Message ---
--- Begin Message ---
Let me tell you how I solved my php / Apache interace issues.

I did not modifiy my Apache http.config file beyond adding this at the
bottom of the file...

    # Include other conf files, any and all..
     include conf.d/*.conf

And in that directory I have a file called php.conf.

In that file I have [see below]...

=============================




--- End Message ---
--- Begin Message ---
First, drop into a DOS Box in the Apache directory and enter...

     apache -t

This should test the conf file and tell you if there are any issues.

To solve my php/Apache interface issues I ended up not modifing my
httpd.conf file beyond adding this at the end of the file...

    # Include other conf files, any and all..
    include conf.d/*.conf

And in that directory I have a php.conf file.

And in that file I have ths configuration setup [see below]...

Modify the paths I have to match where you have these files and you should
be ducky.

If you have any questions or concerns about this, I'll help as I can.

Walter


===========================================================

#
# Adding PHP integration
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#
# Un*x version
# LoadModule php4_module modules/libphp4.so

# WARNING: This is not the installation paths stated in the
#          offical PHP.net installation instructions
#          I changed them to macth my attitude about Windows
#          all the apps I have runing that originaled in the
#          UNIX have paths closely mimicing the UNIX structure.
#          After severl yeasrs of doing this, I had had ZERO
#          issues with it.
#          But that's me, your milage may vary.

# Windows Win32 version
LoadFile "/etc/php/gnu_gettext.dll"
LoadModule php4_module "/etc/php/sapi/php4apache2.dll"
Action application/x-httpd-php "/etc/php/php.exe"
ScriptAlias /php/ "/etc/php/"
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps

#
# Cause the PHP interpreter handle files with a .php extension.
#
<Files *.php>
   SetOutputFilter PHP
   SetInputFilter PHP
   LimitRequestBody 524288
</Files>
#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php

# eof




--- End Message ---
--- Begin Message ---
I installed php on my windows box (again!!!).

After reading the given install directions several times, just making sure I
do it right (again) it struck me that there must be an easier way.

Once I got to thinking how Perl, Apache and mySQL is installed on my UN*X
Server, and how I mimiced that configuration on my Windows Desktop, I
figured there must be a way to do the same with PHP.

Thus this document. It outlines how I installed PHP on my Win 2000 desktop
using UN*X type paths.

Please review. I am looking for constructive comments on why this is NOT a
good idea.

I'm looking for comment from folks who know more than me.

Thanks

Walter
=====================================================
PHP installation on Windows.
Walters Way...

--
  This guide provides manual installation support for:
  PHP 4.x and Apache 2.0.x (experimental) integration
--

This document is no way to be understood as a replacement of the wonderful
work done by those who know *way* more than I do on this subject.

To get the latest and greatest on PHP, drop over to...
   http://www.php.net/manual/en/

For so long, I've been amazed at the complexity that us "puny humans" have
to deal with to install applications on a Windows machine. It just stagers
the mind! I've often wondered if this is intentional by developers in
general, install package makers, or an overall conspiracy by IT
professionals to keep job security. After all, sometimes you need a Masters
degree in computer science to get some of this stuff working.

On the other hand, I do like the fact I don't have to compile everything I
want to run. That to me seems a bit anal and swinging way to far the other
way. But then, Un*x dudes are that way. After all, you do know why they call
them MAN pages right? Because only a real MAN can read them!
OK, now that I've insulted both sides of the fence, I'll get to the point
about PHP on my windows machine.

This installation description worked on my NT 4.0 (SP 3 thru 6) and on my
Windows 2000 Professional.

[IMPORTANT - READ THIS!]
Before I outline how I installed PHP without the installer or putting
anything in my WINNT or SYSTEM directories, I need to show you how I've
setup my computer overall.

First of all, I have 6 main volumes. This spans 2 physical drives. (I
actually have 5 drives in my machine, but the others are not important
here.)

Physical Drive 1 [10GIG drive ]
  Volume C [8Gig] = Win2k OS - this contains the operating system ONLY
  Volume X [1GIG] = temp - OS/apps temp space ONLY [I have this hidden]

Physical Drive 2 [ 80GIG drive]
  Volume D [40GIG] = Apps - contains all the Win32 apps ONLY
  Volume E [25GIG] = Data - contains all my data files and personal stuff
  Volume F [10GIG] = UNIX - has all my pseudo UNIX stuff, apps, utilities,
etc
  Volume Y [4GIG] = SWAP - OS SWAP space ONLY [I have this hidden]

The temp and swap are in their own spaces to help system performance and
behavior. With these files off by themselves, the OS does not have to work
hard finding things it needs in the OS partition. This keeps the TEMP space
adding and deleting files all day without fragmenting the OS drive. The SWAP
is in it's own space, that way it can create a single contiguous file as big
as it needs to without having to deal with other files being added/removed;
again, no disk fragmentation issues.

Everyone has their own sand box. This make Win32 very happy. Really!

I even have DATA off by itself on the chance that I lose the OS drive. I
still have my personal data and I can back that up easily without wasting
time and energy backing up the OS and the apps (which, in my opinion, is a
waste of time. If you have to ask why, then you've not had to reinstall your
OS more than twice in a year!)

This brings us to the UNIX volume.

Here I have Perl, Apache, mySQL, PHP and windows based UNIX command line
tools. I also have the classic 'etc', 'usr', 'home', 'tmp' directories; just
as if it were a real Un*x machine. These applications like this format. This
is where they came from. They don't really like being forced into the
Windows mold, so why bother!

Now, I haven't taken the Un*x metaphor to the extreme. I don't have files
and aliases all over the place. Since it wouldn't do any good anyway, since
Windows SHORTCUTS do not behave like a Un*x alias.

The 'etc' directory contains...
 - httpd - this is where Apache lives
 - mySQL - this is where mySQL lives
 - php - this is where PHP lives

Very straight forward, almost Un*x, but why make it more complicated then it
needs to be.
The 'home' directory just contains clones of the user/domain accounts I
maintain. Just like they are on my Un*x server.

The 'usr' directory is used for Perl, and a part of PHP (but more on that
later). On my Un*x Server Perl lives at '/usr/local/bin', so I installed
ActiveState Perl in the same path. Now I can create my Perl scripts, access
them from my Apache server and the SHEBANG line [#!/usr/local/bin/perl] will
work on both machines without [!] modification.

So, now you know how may machine is configured. Now we can take a look at
how I installed PHP on my win32 machine in 15 minutes.


First, retrieve the latest windows binaries from...
     http://www.php.net/downloads.php

I grabbed the full ZIP package, not the "installer".

I downloaded it into a 'UNIX installers' directory on my UNIX drive.
UnZIPped into its own directory and went from there.

The manual says to copy several DLLs and the INI file into the system
folder. I didn't. I can't stand putting anything in there! Flash back to my
old Macintosh days (we won't talk about the Preferences Folder!).

Anyway, I created a 'php' folder in the 'etc' folder. It seems like a good
as any place to put it. Close to the UNIX server. Into this PHP directory, I
copied entire the contents of the DLL directory (from the install
directory), all of them.

I also took these files for the installer directory root...
  - php.exe
  - php4embed.lib
  - php4ts.dll
  - php4ts.lib
  - magic.mime
  - php.ini-recommended [renamed it php.ini]

Then I took the directory 'extensions' and 'sapi' and copies them directly,
as directories, into the PHP directory.

There is also a directory labeled 'CLI'. This contains a version of the PHP
binary that can handle a command line interface (CLI!). Now, unfortunately,
this EXE is also called PHP.exe, which means it can not be in the same
directory as the web access version we already have in there. So I renamed
it 'php-cli.exe' can copied it into the PHP folder.

At this point you should have 24 objects (22 files and 2 folders) in the PHP
directory.
Now we have only one more directory to deal with, the 'mibs'. This is one
that the manual says you put in the '/usr' directory, so, since I just
happen to have one for my Perl installation, I dropped it in there and let
well enough alone.

Now, all the files you need are in position. The last 2 steps deal with
configuration files, both text based and Windows system based.

First, Windows. At this point I added a new System Environmental variable
called (what else) PHP and gave it value of 'G:/etc/php'. Then I added %php%
(don't forget the percentage symbols on BOTH ends!) at the end of the
existing PATH variable.
This tells the OS to add this path to its search parameters when it needs to
look for something. This bypasses the need to place these DLLs in the system
directory. It also lets me run PHP from the command line anywhere in my
system without explicitly defining a path to PHP.exe.
Second the php.ini file. A few steps ago, we copied and INI from the
installation directory into our PHP folder. This file needs to be modified.

Search for...
   ; Windows: "\path1;\path2"

I want you to added this line underneath it...
   include_path = ".;G:\etc\php\extensions"
   [change the volume letter to match yours]

Now scroll down just a little and you will see...

   ; Directory in which the loadable extensions (modules) reside.

add this under that...

    extension_dir = "G:\etc\php\extensions"
    [change the volume letter to match yours]

Now search for...

   ;extension=php_gettext.dll

Take the semicolon off that line so PHP can be used from within Apache.

Now your in business. No need to restart or anything.

Now all you need is a sample PHP to test against to see how we did.
Try this one...

test.php
<?php
  echo "Our simple test", "\n\n";
  echo getcwd(), "\n";
?>

I placed this in my PHP directory, opened a DOS prompted, entered ...

    C:\>php test.php

And got back what I thought I should get! It worked!

And now the final test, making this work from Apache!

The only file I copied was the TEXT.php file. I placed it in my htdocs
directory. Then I modified the httpd.conf file to tell apache I now want it
to handle PHP!

But, once again I cheated.

At the end of my httpd.conf file I have...

# Include other conf files, any and all..

   include conf.d

This tells apache to look in this directory for other .conf files and
process them as well. This is where I keep all my virtual hosts .conf files.
One easy place to update.

It is here I added a php.conf file!

# ###########################################################
# Adding PHP integration
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#
# Un*x version
# LoadModule php4_module modules/libphp4.so

# Windows Win32 version
LoadFile "/etc/php/gnu_gettext.dll"
LoadModule php4_module "/etc/php/sapi/php4apache2.dll"
# End Windows Win32 version

Action application/x-httpd-php "/etc/php/php.exe"
ScriptAlias /php/ "/etc/php/"
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps

#
# Cause the PHP interpreter handle files with a .php extension.
#
<Files *.php>
  SetOutputFilter PHP
  SetInputFilter PHP
  LimitRequestBody 524288
</Files>

#
# Add index.php to the list of files that will be served as
# directory indexes.
#
DirectoryIndex index.php

# eof
# ###########################################################

NOTE: change the paths defined here to match yours.
      Since all my apps are on the same volume (letter) I don't need to
define it!

Now just restart your apache, open your browser, and key in the URL that
should open the TEXT.php file.

It should just say 'Our simple test'

That's it! We're done!

See, you can install PHP on a windows machine, by hand, in less than 15
minutes!




--- End Message ---

Reply via email to