Author Topic: PHP Access Violation - Setting up RC and PHP extensions  (Read 10604 times)

Offline jharris3434

  • Jr. Member
  • **
  • Posts: 11
PHP Access Violation - Setting up RC and PHP extensions
« on: February 06, 2008, 05:17:39 PM »
I've spent a LOT of time trying to set up roundcube and it's finally time for me to ask for some help. I followed these guides for my setup:

for PHP:
http://www.peterguy.com/php/install_IIS6.html

for my overall setup:
http://www.hmailserver.com/forum/viewtopic.php?t=5591&postdays=0&postorder=asc&start=0&sid=d3ab7d2def3676a75a1645666990a67a

I'm running (trying to run) the newest RC release with PHP 5.2.5, IIS6, MySQL 5, and hMailServer on W2K3 Server.

I can run test PHP just fine. When I try to run RC I sometimes get to the login page, but almost always get the following error:
"PHP has encountered an Access Violation at [address]"
(I've never been able to successfully log in.)

I did some research on this. TommyBALL at vBulletin says that:
Quote
The Access Violation message comes from the PHP ISAPI module (php5isapi.dll) that is part of the PHP package. It is most likely triggered by resourcerelated bugs in one of its subcomponents (like php extensions etc).

Although PHP itself is coded in a threadsafe manner, many of the extensions are not. Running a non-threadsafe component in the threadbased ISAPI environment is unfortunately a recepie for disaster. This is why MicroSoft and Zend are working closely together to implement a FastCGI component for IIS (a new preview of that is coming this month). CGI/FastCGI works better with the non-threadsafe coding habits used with many Linux/Unix environments.

I'm running the ISAPI dll.
Here is my extension list as defined in php.ini:
Code: [Select]
extension=php_adt.dll
extension=php_amf.dll
;extension=php_apc.dll ; Alternative PHP Cache ([url]http://pecl.php.net/package/APC[/url]) - significantly increases CPU load
extension=php_apd.dll
extension=php_bcompiler.dll
extension=php_bitset.dll
;extension=php_blenc.dll ; if enabled, test page is blank. Transparent PHP Script Encryption using Blowfish ([url]http://pecl.php.net/package/BLENC[/url])
extension=php_bz2.dll
extension=php_bz2_filter.dll
extension=php_classkit.dll
extension=php_cpdf.dll
extension=php_crack.dll
extension=php_curl.dll
extension=php_cvsclient.dll
;extension=php_db.dll - deprecated. Use php_dba.dll instead.
extension=php_dba.dll
extension=php_dbase.dll
extension=php_dbx.dll
extension=php_dio.dll
extension=php_docblock.dll
;extension=php_domxml.dll ; threw a bunch of "PHP Notice: Constant XML_... already defined ..." errors.
extension=php_event.dll
extension=php_mbstring.dll ; mbstring must be defined before exif.
extension=php_exif.dll
extension=php_fdf.dll
extension=php_fileinfo.dll
extension=php_filepro.dll
extension=php_fribidi.dll
extension=php_gd2.dll ; gif draw - [url]http://www.boutell.com/gd[/url]
extension=php_gettext.dll
extension=php_gmp.dll
extension=php_gopher.dll
extension=php_haru.dll
extension=php_htscanner.dll
extension=php_http.dll
extension=php_hyperwave.dll
;extension=php_ibm_db2.dll ; IBM DB2 database
extension=php_id3.dll
;extension=php_ifx.dll ; Informix database.
;extension=php_iisfunc.dll ; Enable IIS and service management via PHP ([url]http://kromann.info/article.php?Id=11062861865960000[/url]) - significantly increases CPU load
;extension=php_imagick.dll ; ImageMagick ([url]http://pecl.php.net/package/imagick[/url]).
extension=php_imap.dll
;extension=php_ingres.dll ; Ingres database - complains about missing iilibapi.dll
extension=php_interbase.dll
extension=php_java.dll
extension=php_ldap.dll
extension=php_lzf.dll
extension=php_mailparse.dll ; requires php_mbstring.dll
;extension=php_maxdb.dll ; requires MySQL maxDB ([url]www.mysql.com/maxdb[/url])
extension=php_mcrypt.dll ; requires the mcrypt library (libmcrypt.dll - [url]http://mcrypt.sourceforge.net/[/url], [url]http://files.edin.dk/php/win32/mcrypt/[/url], [url]ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/attic/libmcrypt/old/win32/[/url])
extension=php_mcrypt_filter.dll
;extension=php_mcve.dll
;extension=php_memcache.dll
extension=php_mhash.dll
extension=php_mime_magic.dll
extension=php_ming.dll
;extension=php_msql.dll
;extension=php_mssql.dll
extension=php_mysql.dll
;extension=php_mysqli.dll
;extension=php_netools.dll ; requires lcrzo.dll ([url]http://www.icewalkers.com/Linux/Software/516050/lcrzo.html[/url])? Appears to be a very fragile project. PECL extension page: [url]http://pecl.php.net/package/netools[/url]
extension=php_ntuser.dll
;extension=php_oci8.dll ; OCI for ORacle databases
extension=php_oggvorbis.dll
extension=php_openssl.dll
extension=php_operator.dll
;extension=php_oracle.dll ; Oracle database
extension=php_parsekit.dll
extension=php_pdf.dll
extension=php_pdo.dll
extension=php_pdo_firebird.dll ; requires php_pdo.dll
;extension=php_pdo_ibm.dll
;extension=php_pdo_informix.dll ; more Informix ; requires php_pdo.dll
extension=php_pdo_mssql.dll ; requires php_pdo.dll
extension=php_pdo_mysql.dll ; requires php_pdo.dll
;extension=php_pdo_oci.dll ; more OCI ; requires php_pdo.dll
;extension=php_pdo_oci8.dll ; yet more OCI ; requires php_pdo.dll
extension=php_pdo_odbc.dll ; requires php_pdo.dll
extension=php_pdo_pgsql.dll ; requires php_pdo.dll
extension=php_pdo_sqlite.dll ; requires php_pdo.dll
;extension=php_pdo_sqlite_external.dll
extension=php_pgsql.dll
extension=php_phar.dll
extension=php_phpdoc.dll
extension=php_pop3.dll
;extension=php_printer.dll ; significantly increases CPU load
;extension=php_pspell.dll ; ASpell - [url]http://www.aspell.net/win32[/url]
extension=php_radius.dll
;extension=php_rar.dll
extension=php_runkit.dll
;extension=php_sam.dll
extension=php_sdo.dll
extension=php_shmop.dll
extension=php_smtp.dll
;extension=php_snmp.dll ; Throws a bunch of "Cannot find module" errors.
extension=php_soap.dll
extension=php_sockets.dll
extension=php_spl_types.dll
extension=php_sqlite.dll ; requires php_pdo.dll
extension=php_ssh2.dll
extension=php_stats.dll
extension=php_stem.dll
;extension=php_svn.dll ; requires intl3_svn.dll (Subversion Revision control system - [url]http://pecl.php.net/package/svn[/url])
extension=php_swish.dll
;extension=php_sybase_ct.dll ; sybase database
;extension=php_threads.dll ; significantly increases CPU load
;extension=php_tidy.dll ; significantly increases CPU load
extension=php_timezonedb.dll
extension=php_translit.dll
extension=php_uploadprogress.dll
extension=php_win32ps.dll
extension=php_win32scheduler.dll
extension=php_win32service.dll
extension=php_win32std.dll
extension=php_xmlrpc.dll
extension=php_xsl.dll
extension=php_zip.dll
extension=php_zlib_filter.dll

My question then is:
If I'm doing everything else right (that is certainly an if), then what PHP extensions are required for my setup? Which can I turn off? What would you do!?!?? HELP!!!!

 :stupid:

Offline LilNick

  • Newbie
  • *
  • Posts: 2
Re: PHP Access Violation - Setting up RC and PHP extensions
« Reply #1 on: February 08, 2008, 12:35:46 PM »
Snaparoony! I've just been through the same process as you and discovered the same issue, I'd be interested if you discover a fix as it's apretty generic error message.

I'm off to do a bit more googeling ;-)


Offline jharris3434

  • Jr. Member
  • **
  • Posts: 11
Re: PHP Access Violation - Setting up RC and PHP extensions
« Reply #2 on: February 08, 2008, 01:06:39 PM »
Stick with me brother, we'll get through!

Offline jharris3434

  • Jr. Member
  • **
  • Posts: 11
Re: PHP Access Violation - Setting up RC and PHP extensions
« Reply #3 on: February 12, 2008, 06:10:34 PM »
I've discovered the offending PHP module (operator.dll) and commented it out in php.ini. I no longer have this issue.

Offline LilNick

  • Newbie
  • *
  • Posts: 2
Re: PHP Access Violation - Setting up RC and PHP extensions
« Reply #4 on: February 25, 2008, 06:16:22 AM »
Quote from: jharris3434
I've discovered the offending PHP module (operator.dll) and commented it out in php.ini. I no longer have this issue.

Well well well!

Thank you very much, I have disabled this extention as well and fixed that problem, though I'mnow betteling another one lol!

Thanks :-)

Offline JabbaTek

  • Jr. Member
  • **
  • Posts: 20
PHP Access Violation - Setting up RC and PHP extensions
« Reply #5 on: November 09, 2008, 03:59:06 PM »
I had managed to solve my Access Violation with RoundCube issue another way.  I am running the following configuration.

Windows Server 2008 Standard
IIS 7
MSSQL Server 2005
PHP 5.2.5
HMail 5.0-b309 (beta)
RoundCube 0.2

I too discovered that the problem lied in the ISAPI dll.  However, not knowing a lot about PHP i didn't bother to check the PHP.ini to disable extensions.

I tried swithing the php processeor from the php5isapi.dll to php-cgi.exe.  This did work (no more access violations), however it was really slow.

So i did some searching and found a utility called ISAPI Fast CGI.  This basically layers an ISAPI interface onto the cgi component, i think.

Anyway followed the instructions found here Robust and High Performance PHP with IIS: Using FastCGI | PHP Everywhere.

The only change I had to make was the registry setting for the AppPath.  Should be pointing at php-cgi.exe and not php.exe.

After that, it work perfectly.  No errors and was nearly as fast as straight isapi.  I didn't have to disable any extensions, or lose any functionality.