php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25176 CLI Crashes with entry point not found in php4ts.dll
Submitted: 2003-08-20 07:48 UTC Modified: 2003-08-20 19:10 UTC
From: davey@php.net Assigned: zeev (profile)
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5CVS-2003-08-20 (dev) OS: WinXP Pro SP1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: davey@php.net
New email:
PHP Version: OS:

 

 [2003-08-20 07:48 UTC] davey@php.net
Description:
------------
Running the CLI (with or without flags or input) always brings up the error:

The procedure entry point _zend_hash_init could not be located in the dynamic link library php4ts.dll.

- Davey

Reproduce code:
---------------
C:\web\test>c:\php5\cli\php.exe -v [enter]
[error]
C:\web\test>

Expected result:
----------------
C:\web\test>c:\php5\cli\php.exe -v [enter]
PHP 5.0.0b2-dev (cli) (built: Aug 20 2003 12:10:03)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v2.0.0-dev, Copyright (c) 1998-2003 Zend Technologies

C:\web\test>

Actual result:
--------------
Error message pops up with error "The procedure entry point _zend_hash_init could not be located in the dynamic link library php4ts.dll."

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-20 07:59 UTC] edink@php.net
You mixed up .dlls from sever releases. Not a bug.
 [2003-08-20 16:21 UTC] davey@php.net
Uhm... php4ts.dll is what is in the win32 PHP5 zip file, with a version of 5.0.0


- Davey
 [2003-08-20 16:31 UTC] andrew@php.net
I too also experienced this error in the php/php-cli dists.  I also must note that the internal socket support throws a starnge error in the newer snaps as well.

~ Andrew
 [2003-08-20 17:55 UTC] sniper@php.net
Zeev, you touched that stuff on 18th of August..

 [2003-08-20 18:12 UTC] zeev@php.net
edink hit it on the head - it's not a bug, you're mixing binaries from different builds.
In Windows there's a simple rule - if it builds, there are no missing symbols, they just can't exist.  If there are missing symbols - the build would fail.

The only situation where you can get missing symbols is if you mix different successfully-built binaries.
 [2003-08-20 18:50 UTC] davey@php.net
Then there is something else at play here.

I keep my PHP installs in seperate folders like this:

c:\php4\
c:\php5\

I do not move php4ts.dll to system32 or anything, it should use the php4ts.dll in the c:\php*\ folder depending on which binary I run (PHP4 or PHP5). It appears that php5 is *not* using the php4ts.dll in c:\php5 (note the cli binary is in c:\php5\cli\php.exe) and indeed when I remove all other php4ts.dll's from my system I get: 

"This application has failed to start because php4ts.dll was not found. Re-installing the application may fix this problem."

I am now going to check which php4ts.dll it is detecting (I have quite a few ;) and perhaps I can see why (i.e. if its the one from ZDE its most likely that that .dll is registered with the OS and the one with php5 is not, however PHP4 doesn't suffer from this, so something can be done to fix this)

- Davey
 [2003-08-20 18:55 UTC] davey@php.net
OK, it seems that it finds my ZDE php4ts.dll in c:\program files\zend\bin is the one its finding (note that it didn't find the one in c:\program files\zend\bin)

It errors with: 

"The procedure entry point zend_uv could not be located in the dynamic link library php4ts.dll" - presumably because that php4ts.dll is from 4.2.2 (IIRC).

If I then restore my c:\php4\php4ts.dll is seems to find that one instead because the error goes back to the original one reported. 

Could this be %PATH% related? Or is PHP5 looking for php4ts.dll differently to PHP4? Note that PHP4 *also* finds the ZDE one (and errors with the same error) if c:\php4\php4ts.dll is not there.

Something is going on here.

- Davey
 [2003-08-20 18:56 UTC] davey@php.net
Note that this *only* happens with the CLI for me. So is there some difference in how this binary detects php4ts.dll to how the cgi one does?

- Davey
 [2003-08-20 19:10 UTC] davey@php.net
Worked this one out...

The reason is that the cgi binary has the php4ts.dll for PHP5 in its PWD, and when it requests the dll, thats where windows looks first and tells it that its there.
The CLI binary does NOT have a php4ts.dll for PHP5 in its PWD, so windows traverses the %PATH%, where it finds the PHP4 php4ts.dll and tells the binary thats where it was found.

Solution: Put a copy of php4ts.dll in c:\php5\cli if you need to run PHP5 and PHP4 simultaneously (testing), otherwise put c:\php5 in your path(note that when running the PHP4 binaries, they will find the PHP5 php4ts.dll, the problem is reversed).

- Davey
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 03:01:29 2024 UTC