News:

SMF 2.1.6 has been released! Take it for a spin! Read more.

Main Menu

upgrading to PHP5 on windows = no output

Started by NoRad, August 30, 2004, 10:42:20 AM

Previous topic - Next topic

NoRad

#20
cli\php gives me:

C:\PHP>cli\php
PHP Warning:  Unknown(): (null): Unable to initialize module
Module compiled with module API=20040412, debug=0, thread-safety=1
PHP    compiled with module API=20020429, debug=0, thread-safety=1
These options need to match
in Unknown on line 0
PHP Warning:  Unknown(): (null): Unable to initialize module
Module compiled with module API=20040412, debug=0, thread-safety=1
PHP    compiled with module API=20020429, debug=0, thread-safety=1
These options need to match
in Unknown on line 0
PHP Warning:  Unknown(): (null): Unable to initialize module
Module compiled with module API=20040412, debug=0, thread-safety=1
PHP    compiled with module API=20020429, debug=0, thread-safety=1
These options need to match
in Unknown on line 0
Invalid access to memory location.Invalid access to memory location.

NoRad

I did some searches on the internet and it looks like I may have 1 or more modules compiled for an older version? I think I might still be using an old mySQL file. Where can I get the latest files for 5.0.1 ?

[Unknown]

Quote from: Radianation on September 16, 2004, 10:32:05 PM
I did some searches on the internet and it looks like I may have 1 or more modules compiled for an older version? I think I might still be using an old mySQL file. Where can I get the latest files for 5.0.1 ?

Yes, indeed, that could quite possibly be the problem.

Did you use the installer?  You may wish to use the zip file, as well as the additional (pecl) modules.  They're all good ;).  Links here:
http://www.php.net/get/php-5.0.1-Win32.zip/from/a/mirror (zip)
http://www.php.net/get/pecl-5.0.1-Win32.zip/from/a/mirror (pecl)

To my recollection, the MySQL dll does *not* come with the installer.

-[Unknown]

NoRad

I used the zip file. I may have an old version of the PECL. Trying that now. Thanks

[Unknown]

Quote from: Radianation on September 17, 2004, 12:32:32 AM
I used the zip file. I may have an old version of the PECL. Trying that now. Thanks

Looks like it really is in the zip file - perhaps you could try clearing out the "ext" directory entirely and then refilling it with both archives' extensions? (in case something was in use last time?)

-[Unknown]

NoRad

Still getting: Invalid access to memory location.

I put everything in C:\PHP to the C:\PHP\BACKUP folder.

Then I unzipped the w32 binary archive to C:\PHP
I unzipped the PECL archive to C:\PHP\EXT
(set permissions for PHP folder -> IUSR)

Then I copied my php.ini, php5isapi.dll, libmysql.dll, and libmhash.dll to c:\WINNT (set permissions on those files for IUSR)

... Same problem?

BTW - I no longer have a cli\php version, but when I run the php.exe I get no errors. I think that I was running the cli\php and that was for php4 (and I had a php5 install). It was just messy before, but still same problemo.

[Unknown]

Quote from: Radianation on September 17, 2004, 12:51:44 AM
Still getting: Invalid access to memory location.

I put everything in C:\PHP to the C:\PHP\BACKUP folder.

Then I unzipped the w32 binary archive to C:\PHP
I unzipped the PECL archive to C:\PHP\EXT
(set permissions for PHP folder -> IUSR)

Then I copied my php.ini, php5isapi.dll, libmysql.dll, and libmhash.dll to c:\WINNT (set permissions on those files for IUSR)

... Same problem?

BTW - I no longer have a cli\php version, but when I run the php.exe I get no errors. I think that I was running the cli\php and that was for php4 (and I had a php5 install). It was just messy before, but still same problemo.

Hmm.  Does this output anything useful?

php -i > phpinfo.txt

Do you have a php-cli?  Does that work at all?

Can you try copying php5ts.dll over to c:\WINNT and making sure there are no files in system32 with "php" in them?

-[Unknown]

NoRad

#27
Ok, there was a php5isapi.dll in c:\winnt\system32 - I deleted it.
I copied the php5ts.dll to c:\winnt and set permissions.
php -i > phpinfo.txt puts the standard phpinfo.php stuff in the text file.

My installation of PHP works fine presuming that I use php-cgi.exe instead of php5isapi.dll (and phpinfo.php will work accordingly).

Last time I managed to get the isapi version to work by making it use the file out of c:\winnt\ ... This time that doesn't work. I have noticed that my isapi filter is working (or at least IIS says it is).

Quote
phpinfo()
PHP Version => 5.0.1

System => Windows NT MEGALOMANIA 5.0 build 2195
Build Date => Aug 12 2004 23:30:01
Configure Command => cscript /nologo configure.js  "--with-gd=shared" "--enable-snapshot-build"
Server API => Command Line Interface
Virtual Directory Support => enabled
Configuration File (php.ini) Path => C:\PHP\php.ini
PHP API => 20031224
PHP Extension => 20040412
Zend Extension => 220040412
Debug Build => no
Thread Safety => enabled
IPv6 Support => enabled
Registered PHP Streams => php, file, http, ftp, compress.zlib 
Registered Stream Socket Transports => tcp, udp

[Unknown]

Wait.  Are you using the "isapi" filter in the ISAPI Filters tab (I think that's the name..) or in the same place as the cgi?  It should be in the same place as CGI - it's not the type of ISAPI filter that goes in the list where it says working/not working, low priority/high priority, etc.

-[Unknown]

NoRad

I'm setting it correctly in both places. The isapi filter is for HTTP Authentication using PHP. I wanted this when running in ISAPI mode. When I run in cgi mode I leave this blank. Earlier I couldn't even get that to load (it would show up as a red arrow and unloaded). Now that is working, so I think we've made progress...



I also change the .php extension handling (in the home directory / configuration panel) from php-cgi.exe to php5isapi.dll (tried both c:\php and c:\winnt\ folders for this).

I've notice a difference when using c:\php\php5isapi.dll it doesn't even load anything. When I use c:\winnt\ I get the access violation error.

NoRad

#30
QuoteI eliminated (or seem to have reduced) my Access Violation errors by
using the CGI version (php-cgi.exe) of PHP5 RC1 with IIS. I was using
the ISAPI version before. I also never got any errors using the CLI
version of PHP.

Incidentally, I never seemed to get an Access Violation (with the ISAPI
version) on the first PHP request in each webserving session. (Perhaps
it's running out of memory or something - I'm guessing the ISAPI
version uses a global memory pool whereas CGI/CLI creates new memory
each request?)

From a newsgroup posting. That seems right... I got the Access Violation after rebooting my server? Perhaps changing the resource from pooled to something more unique might help? Changing it from Med to Low / High didn't make any difference.

[Unknown]

Well, it's possible.  I would recommend trying to change IIS to work in compatibility mode, but then you're using IIS 5 aren't you? (sorry, I've been spoilt by 6...)

-[Unknown]

NoRad

Yeah, I don't know how to do compatability mode.

NoRad

I just installed the latest snaps and still the same problem. I wonder if there are any other files that the isapi mode can't get to?

[Unknown]

Try deleting or renaming php.ini, temporarily, to see if it is something defined in there causing problems - such as an extension.

-[Unknown]

NoRad

Ok, that solved it. My old php.ini was doing something odd, which it shouldn't have been... I think it had the mysql.dll uncommented and it didn't need to be. Simple stupid stuff causing headaches. Thanks man.

Advertisement: