Click to See Complete Forum and Search --> : PHP Startup errors


leviatan1
02-08-2012, 10:01 AM
Greetings to all:
I started with PHP by my own, and after one month, i managed to run an Apache server 2.4 on windows XP and PHP 5.3.9
When i reboot my pc i get the following errors TWICE:

PHP startup: Unable to load dynamic library C:/php539\ext/FILE.dll
FILES ARE: php_pdo_firebird.dll
php_pdo_mssql.dll
php_pdo_oci.dll
Unable to load specified module.

so questions:
1-In the message one slash is reverted. Why is that if in php.ini I have the extension path with forward slashs? of course i dont have errors in php.ini or at php startup about "that slash".
2-I tried to download those php*****.dll files and set them into the ext file and nothing changes.
3- When i click Accept on the error message the windows open TWICE for every file in the sequence 1st 2nd 3rd 1st 2nd 3rd
4- this one is just asçking, i did not install MYSQL yet, would be some problem with this?

Please i hope you can help me with this in the most easy way, like if i were idiot, cause i dont know nothing about this, so please take your time.

bradgrafelman
02-08-2012, 10:38 AM
EDIT: Welcome to PHPBuilder!

1-In the message one slash is reverted. Why is that if in php.ini I have the extension path with forward slashs?Er... you're asking us why your configuration is a certain way? Er... isn't that a bit like me demanding you explain to me why my favorite color is green?

The only other answer I can offer as to why the slash is inverted is: Because you haven't fixed it yet. (Although PHP/Windows is generally intelligent enough to interpret the forward slash when it's being used as a directory separator in a file path, although I might be a bit concerned when you mix the two.)

of course i dont have errors in php.ini or at php startup about "that slash".How do you know this for sure? The error message didn't say "Unable to load dynamic library <invalid_path>, but I think it was because of <foo> and not that wonky slash you've got in the path."

2-I tried to download those php*****.dll files and set them into the ext file and nothing changes.This statement makes me question a few things:
Why did you try to download those extension files? Did you not already have them somewhere in your main PHP installation directory?

If you didn't... just how incomplete of an installation do you have? What else is missing?
How/where did you download them? Did you make sure that the versions of those files that you downloaded matched the version of PHP you have installed?
"ext" should be a folder within the main PHP installation directory (not a "file"). I'm guessing this was just a misspeak?

3- When i click Accept on the error message the windows open TWICE for every file in the sequence 1st 2nd 3rd 1st 2nd 3rdYeah, I don't think that's unusual (as unusual as that may seem). You'd want to make sure, though, that you don't have duplicate "extension=" lines in your php.ini file - that could be bad.

4- this one is just asçking, i did not install MYSQL yet, would be some problem with this?The manual page pdo.drivers explains the dependencies that each DBMS-specific PDO driver extension has, but to answer your question: No, none of the PHP extensions you listed (or any that I can think of, really) require MySQL to be installed.

Now for some auxiliary questions of my own:
You mentioned MySQL; is that the only DB you're going to be working with? If so, is it really that important that you can't load PDO drivers for other DBMSs? In other words, might it be sufficient if you simply disable those three extensions?
Has your base PHP installation directory been added to your system's PATH environment variable? See this (http://www.php.net/manual/en/faq.installation.php#faq.installation.addtopath) FAQ entry in the PHP manual to learn how to add it (and/or check to see if it's already been added before doing so).

leviatan1
02-08-2012, 11:33 AM
Er... you're asking us why your configuration is a certain way? Er... isn't that a bit like me demanding you explain to me why my favorite color is green?
No i'm just asking if that slash means that something is wrong.
this is my extension directory lines in php.ini

; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
extension_dir = "C:/php539/ext"
; On windows:
extension_dir = "C:/php539/ext"

is this what you refer to double extension dir line? should i delete one of those?

The only other answer I can offer as to why the slash is inverted is: Because you haven't fixed it yet. (Although PHP/Windows is generally intelligent enough to interpret the forward slash when it's being used as a directory separator in a file path, although I might be a bit concerned when you mix the two.)

How do you know this for sure? The error message didn't say "Unable to load dynamic library <invalid_path>, but I think it was because of <foo> and not that wonky slash you've got in the path."



This statement makes me question a few things:
Why did you try to download those extension files? Did you not already have them somewhere in your main PHP installation directory?
Exactly some .dlls werent there. Altough firebird is something that isn't installed in my SO.

If you didn't... just how incomplete of an installation do you have? What else is missing?

I instaled by "step by step tutorial" and runing apache and php seems to work i even tried some php basics pages and they worked

How/where did you download them? Did you make sure that the versions of those files that you downloaded matched the version of PHP you have installed?

Yes Sir I cheked every file downloaded from alldll website

"ext" should be a folder within the main PHP installation directory (not a "file"). I'm guessing this was just a misspeak?

yes it is a misspeak

Yeah, I don't think that's unusual (as unusual as that may seem). You'd want to make sure, though, that you don't have duplicate "extension=" lines in your php.ini file - that could be bad.

i think that i have this problem if you chek my php.ini exetension_dir paragraph
; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
extension_dir = "C:/php539/ext"
; On windows:
extension_dir = "C:/php539/ext"

The manual page pdo.drivers explains the dependencies that each DBMS-specific PDO driver extension has, but to answer your question: No, none of the PHP extensions you listed (or any that I can think of, really) require MySQL to be installed.

Now for some auxiliary questions of my own:
You mentioned MySQL; is that the only DB you're going to be working with? If so, is it really that important that you can't load PDO drivers for other DBMSs? In other words, might it be sufficient if you simply disable those three extensions?
YES. i will only use mysql cause im new at all this, and i would apreciate if you tell me how i disable them!

Has your base PHP installation directory been added to your system's PATH environment variable? See this (http://www.php.net/manual/en/faq.installation.php#faq.installation.addtopath) FAQ entry in the PHP manual to learn how to add it (and/or check to see if it's already been added before doing so).
YES it has and i had to chek it several times to make my apache php work properly

bradgrafelman
02-08-2012, 01:00 PM
; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
extension_dir = "C:/php539/ext"
; On windows:
extension_dir = "C:/php539/ext"

is this what you refer to double extension dir line? should i delete one of those?One of my comments referred to duplicate "extension=" lines, e.g. where you're telling PHP to load a given extension multiple times. That is something you'd probably want to avoid (although it may not have any effect if the extensions were written in such a way that PHP can check if one has already been loaded).

The multiple extension_dir lines is probably just redundant in that PHP will simply be overwriting the value taken from previous lines. For simplicity's sake, however, it would make more sense to remove one of them; the comments in the .ini file were offering two different version for you to select from based upon which O/S you were using.

I instaled by "step by step tutorial" and runing apache and php seems to work i even tried some php basics pages and they workedThat's because extensions are not required by the PHP interpreter, thus the errors it encountered are simply preventing it from loading/enabling those extensions - it'll still function just fine otherwise (assuming, of course, you don't try to use the functionality provided by one of those extensions).

Yes Sir I cheked every file downloaded from alldll websiteNot sure what this "alldll" website is, but IMHO there is only one website (excluding trusted package repositories) that a person should consider when downloading PHP-related files: http://www.php.net

[B]i think that i have this problem if you chek my php.ini exetension_dir paragraph
; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
extension_dir = "C:/php539/ext"
; On windows:
extension_dir = "C:/php539/ext"Again, I wasn't referring to the "extension_dir" directive at all - I was referring to the "extension=" lines in the .ini that tell PHP which extensions you want to load from that directory.

YES. i will only use mysql cause im new at all this, and i would apreciate if you tell me how i disable them!Well you can disable any extension by commenting out its corresponding "extension=" line in your php.ini file, but note that the mysql extension is outdated and has been superseded by the MySQLi extension, thus it would be wise to use this extension (or PDO) for new projects (and to start thinking about updating old ones).

leviatan1
02-08-2012, 01:16 PM
Ok. First Thanks you very much i just comented ( ; ) the extension with thos names and the problem disapeared.

By the way as a last question tell me if you recommend enable/disable some extensions from my php.ini

ill let here that part of the php.ini
Please feel free to suggest anything else. For ULTRANOOB at php guys of course.

(PHP 5)
; extension folders as well as the separate PECL DLL download (PHP 5).
; Be sure to appropriately set the extension_dir directive.
;
;extension=php_bz2.dll
extension=php_curl.dll
;extension=php_fileinfo.dll
extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_gmp.dll
;extension=php_intl.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
extension=php_mbstring.dll
;extension=php_exif.dll ; Must be after mbstring as it depends on it
extension=php_mysql.dll
extension=php_mysqli.dll
;extension=php_oci8.dll ; Use with Oracle 10gR2 Instant Client
;extension=php_oci8_11g.dll ; Use with Oracle 11gR2 Instant Client
;extension=php_openssl.dll
;extension=php_pdo_firebird.dll
;extension=php_pdo_mssql.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
extension=php_pdo_odbc.dll
extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
;extension=php_pspell.dll
;extension=php_shmop.dll

; The MIBS data available in the PHP distribution must be installed.
; See http://www.php.net/manual/en/snmp.installation.php
;extension=php_snmp.dll

;extension=php_soap.dll
;extension=php_sockets.dll
;extension=php_sqlite.dll
;extension=php_sqlite3.dll
;extension=php_sybase_ct.dll
;extension=php_tidy.dll
extension=php_xmlrpc.dll
;extension=php_xsl.dll
;extension=php_zip.dll

bradgrafelman
02-08-2012, 01:19 PM
My only recommendation would be to enable the extensions that you need or think you will need and to disable others. Only you can decide what you "need or think you will need."