extension enabled in CLI but not in PHPinfo
I'm trying to enable extenion oci8
I uncommented its line in php.ini and added the required files for it ( oracle instant client).
Now from CMD, when I type: php --ri oci8, it shows :
oci8
OCI8 Support => enabled OCI8 DTrace Support => disabled OCI8 Version
=> 2.1.8 Revision => $Id: 4543974aab26d8a3d85257ab18d0dca4503ff9e7 $ Oracle Run-time Client Library Version => 12.1.0.2.0 Oracle
Compile-time Instant Client Version => 12.1
Directive => Local Value => Master Value oci8.max_persistent => -1 =>
-1 oci8.persistent_timeout => -1 => -1 oci8.ping_interval => 60 => 60 oci8.privileged_connect => Off => Off oci8.statement_cache_size => 20
=> 20 oci8.default_prefetch => 100 => 100 oci8.old_oci_close_semantics => Off => Off oci8.connection_class => no value => no value oci8.events => Off => Off
Statistics => Active Persistent Connections => 0 Active Connections =>
0
So it should working fine.
But when I try to connect to oracle from php I get error :
Call to undefined function YajraPdooci_connect()
I opened to PHPINFO page, searched for oci8, the block that must be present to show it's enabled is not present.
What may be the problem?
I'm using xampp 7.2 on windows 10
php
add a comment |
I'm trying to enable extenion oci8
I uncommented its line in php.ini and added the required files for it ( oracle instant client).
Now from CMD, when I type: php --ri oci8, it shows :
oci8
OCI8 Support => enabled OCI8 DTrace Support => disabled OCI8 Version
=> 2.1.8 Revision => $Id: 4543974aab26d8a3d85257ab18d0dca4503ff9e7 $ Oracle Run-time Client Library Version => 12.1.0.2.0 Oracle
Compile-time Instant Client Version => 12.1
Directive => Local Value => Master Value oci8.max_persistent => -1 =>
-1 oci8.persistent_timeout => -1 => -1 oci8.ping_interval => 60 => 60 oci8.privileged_connect => Off => Off oci8.statement_cache_size => 20
=> 20 oci8.default_prefetch => 100 => 100 oci8.old_oci_close_semantics => Off => Off oci8.connection_class => no value => no value oci8.events => Off => Off
Statistics => Active Persistent Connections => 0 Active Connections =>
0
So it should working fine.
But when I try to connect to oracle from php I get error :
Call to undefined function YajraPdooci_connect()
I opened to PHPINFO page, searched for oci8, the block that must be present to show it's enabled is not present.
What may be the problem?
I'm using xampp 7.2 on windows 10
php
1
Quick note - there are sometimes differentphp.inifiles for cli and web. Since you're using XAMPP, I'd imagine that this is more likely again. I'm not familiar with XAMPP, but check if there's a config editor that allows you inspect thephp.inifor that environment.
– Darragh Enright
Nov 21 '18 at 11:11
1
Related: How to locate the php.ini file (xampp)
– Darragh Enright
Nov 21 '18 at 11:13
Use echo phpinfo() from web, and look at this params "Configuration File (php.ini) Path", "Loaded Configuration File", "Scan this dir for additional .ini files", "Additional .ini files parsed", them can help you to know where .ini files are located
– Francesco Simeoli
Nov 21 '18 at 11:18
add a comment |
I'm trying to enable extenion oci8
I uncommented its line in php.ini and added the required files for it ( oracle instant client).
Now from CMD, when I type: php --ri oci8, it shows :
oci8
OCI8 Support => enabled OCI8 DTrace Support => disabled OCI8 Version
=> 2.1.8 Revision => $Id: 4543974aab26d8a3d85257ab18d0dca4503ff9e7 $ Oracle Run-time Client Library Version => 12.1.0.2.0 Oracle
Compile-time Instant Client Version => 12.1
Directive => Local Value => Master Value oci8.max_persistent => -1 =>
-1 oci8.persistent_timeout => -1 => -1 oci8.ping_interval => 60 => 60 oci8.privileged_connect => Off => Off oci8.statement_cache_size => 20
=> 20 oci8.default_prefetch => 100 => 100 oci8.old_oci_close_semantics => Off => Off oci8.connection_class => no value => no value oci8.events => Off => Off
Statistics => Active Persistent Connections => 0 Active Connections =>
0
So it should working fine.
But when I try to connect to oracle from php I get error :
Call to undefined function YajraPdooci_connect()
I opened to PHPINFO page, searched for oci8, the block that must be present to show it's enabled is not present.
What may be the problem?
I'm using xampp 7.2 on windows 10
php
I'm trying to enable extenion oci8
I uncommented its line in php.ini and added the required files for it ( oracle instant client).
Now from CMD, when I type: php --ri oci8, it shows :
oci8
OCI8 Support => enabled OCI8 DTrace Support => disabled OCI8 Version
=> 2.1.8 Revision => $Id: 4543974aab26d8a3d85257ab18d0dca4503ff9e7 $ Oracle Run-time Client Library Version => 12.1.0.2.0 Oracle
Compile-time Instant Client Version => 12.1
Directive => Local Value => Master Value oci8.max_persistent => -1 =>
-1 oci8.persistent_timeout => -1 => -1 oci8.ping_interval => 60 => 60 oci8.privileged_connect => Off => Off oci8.statement_cache_size => 20
=> 20 oci8.default_prefetch => 100 => 100 oci8.old_oci_close_semantics => Off => Off oci8.connection_class => no value => no value oci8.events => Off => Off
Statistics => Active Persistent Connections => 0 Active Connections =>
0
So it should working fine.
But when I try to connect to oracle from php I get error :
Call to undefined function YajraPdooci_connect()
I opened to PHPINFO page, searched for oci8, the block that must be present to show it's enabled is not present.
What may be the problem?
I'm using xampp 7.2 on windows 10
php
php
asked Nov 21 '18 at 11:08
Moustafa EgyptMoustafa Egypt
135
135
1
Quick note - there are sometimes differentphp.inifiles for cli and web. Since you're using XAMPP, I'd imagine that this is more likely again. I'm not familiar with XAMPP, but check if there's a config editor that allows you inspect thephp.inifor that environment.
– Darragh Enright
Nov 21 '18 at 11:11
1
Related: How to locate the php.ini file (xampp)
– Darragh Enright
Nov 21 '18 at 11:13
Use echo phpinfo() from web, and look at this params "Configuration File (php.ini) Path", "Loaded Configuration File", "Scan this dir for additional .ini files", "Additional .ini files parsed", them can help you to know where .ini files are located
– Francesco Simeoli
Nov 21 '18 at 11:18
add a comment |
1
Quick note - there are sometimes differentphp.inifiles for cli and web. Since you're using XAMPP, I'd imagine that this is more likely again. I'm not familiar with XAMPP, but check if there's a config editor that allows you inspect thephp.inifor that environment.
– Darragh Enright
Nov 21 '18 at 11:11
1
Related: How to locate the php.ini file (xampp)
– Darragh Enright
Nov 21 '18 at 11:13
Use echo phpinfo() from web, and look at this params "Configuration File (php.ini) Path", "Loaded Configuration File", "Scan this dir for additional .ini files", "Additional .ini files parsed", them can help you to know where .ini files are located
– Francesco Simeoli
Nov 21 '18 at 11:18
1
1
Quick note - there are sometimes different
php.ini files for cli and web. Since you're using XAMPP, I'd imagine that this is more likely again. I'm not familiar with XAMPP, but check if there's a config editor that allows you inspect the php.ini for that environment.– Darragh Enright
Nov 21 '18 at 11:11
Quick note - there are sometimes different
php.ini files for cli and web. Since you're using XAMPP, I'd imagine that this is more likely again. I'm not familiar with XAMPP, but check if there's a config editor that allows you inspect the php.ini for that environment.– Darragh Enright
Nov 21 '18 at 11:11
1
1
Related: How to locate the php.ini file (xampp)
– Darragh Enright
Nov 21 '18 at 11:13
Related: How to locate the php.ini file (xampp)
– Darragh Enright
Nov 21 '18 at 11:13
Use echo phpinfo() from web, and look at this params "Configuration File (php.ini) Path", "Loaded Configuration File", "Scan this dir for additional .ini files", "Additional .ini files parsed", them can help you to know where .ini files are located
– Francesco Simeoli
Nov 21 '18 at 11:18
Use echo phpinfo() from web, and look at this params "Configuration File (php.ini) Path", "Loaded Configuration File", "Scan this dir for additional .ini files", "Additional .ini files parsed", them can help you to know where .ini files are located
– Francesco Simeoli
Nov 21 '18 at 11:18
add a comment |
2 Answers
2
active
oldest
votes
You must edit the php.ini file which is shown in phpinfo ("Loaded Configuration File ") option and apache restart is also required for it to work.
In phpinfo, I see: ( Configuration File (php.ini) Path C:Windows -- Loaded Configuration File D:xamppphpphp.ini) I searched in c:\ windows, and didn't find php.ini inside it. The other file that is said to be loaded is the file I already made the modifications in it. and I have restarted apache.
– Moustafa Egypt
Nov 21 '18 at 11:29
add a comment |
Solved.
It was that my PC required restart not just Apache for PHP web to load the new enviroment variables, which is important in locating oracle instant client, which is needed by the PHP extension OCI8.
The strange thing is that PHP CLI loaded the new enviroment variables, but the PHP web didn't load it although Apache is restarted.
I noticed that from PHPinfo page, which displays the loaded envirmonment variables showing the old ones before adding oracle.
So just restated my PC and everything is now OK.
Thanks for your advice.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53410805%2fextension-enabled-in-cli-but-not-in-phpinfo%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You must edit the php.ini file which is shown in phpinfo ("Loaded Configuration File ") option and apache restart is also required for it to work.
In phpinfo, I see: ( Configuration File (php.ini) Path C:Windows -- Loaded Configuration File D:xamppphpphp.ini) I searched in c:\ windows, and didn't find php.ini inside it. The other file that is said to be loaded is the file I already made the modifications in it. and I have restarted apache.
– Moustafa Egypt
Nov 21 '18 at 11:29
add a comment |
You must edit the php.ini file which is shown in phpinfo ("Loaded Configuration File ") option and apache restart is also required for it to work.
In phpinfo, I see: ( Configuration File (php.ini) Path C:Windows -- Loaded Configuration File D:xamppphpphp.ini) I searched in c:\ windows, and didn't find php.ini inside it. The other file that is said to be loaded is the file I already made the modifications in it. and I have restarted apache.
– Moustafa Egypt
Nov 21 '18 at 11:29
add a comment |
You must edit the php.ini file which is shown in phpinfo ("Loaded Configuration File ") option and apache restart is also required for it to work.
You must edit the php.ini file which is shown in phpinfo ("Loaded Configuration File ") option and apache restart is also required for it to work.
answered Nov 21 '18 at 11:22
AJYAJY
113
113
In phpinfo, I see: ( Configuration File (php.ini) Path C:Windows -- Loaded Configuration File D:xamppphpphp.ini) I searched in c:\ windows, and didn't find php.ini inside it. The other file that is said to be loaded is the file I already made the modifications in it. and I have restarted apache.
– Moustafa Egypt
Nov 21 '18 at 11:29
add a comment |
In phpinfo, I see: ( Configuration File (php.ini) Path C:Windows -- Loaded Configuration File D:xamppphpphp.ini) I searched in c:\ windows, and didn't find php.ini inside it. The other file that is said to be loaded is the file I already made the modifications in it. and I have restarted apache.
– Moustafa Egypt
Nov 21 '18 at 11:29
In phpinfo, I see: ( Configuration File (php.ini) Path C:Windows -- Loaded Configuration File D:xamppphpphp.ini) I searched in c:\ windows, and didn't find php.ini inside it. The other file that is said to be loaded is the file I already made the modifications in it. and I have restarted apache.
– Moustafa Egypt
Nov 21 '18 at 11:29
In phpinfo, I see: ( Configuration File (php.ini) Path C:Windows -- Loaded Configuration File D:xamppphpphp.ini) I searched in c:\ windows, and didn't find php.ini inside it. The other file that is said to be loaded is the file I already made the modifications in it. and I have restarted apache.
– Moustafa Egypt
Nov 21 '18 at 11:29
add a comment |
Solved.
It was that my PC required restart not just Apache for PHP web to load the new enviroment variables, which is important in locating oracle instant client, which is needed by the PHP extension OCI8.
The strange thing is that PHP CLI loaded the new enviroment variables, but the PHP web didn't load it although Apache is restarted.
I noticed that from PHPinfo page, which displays the loaded envirmonment variables showing the old ones before adding oracle.
So just restated my PC and everything is now OK.
Thanks for your advice.
add a comment |
Solved.
It was that my PC required restart not just Apache for PHP web to load the new enviroment variables, which is important in locating oracle instant client, which is needed by the PHP extension OCI8.
The strange thing is that PHP CLI loaded the new enviroment variables, but the PHP web didn't load it although Apache is restarted.
I noticed that from PHPinfo page, which displays the loaded envirmonment variables showing the old ones before adding oracle.
So just restated my PC and everything is now OK.
Thanks for your advice.
add a comment |
Solved.
It was that my PC required restart not just Apache for PHP web to load the new enviroment variables, which is important in locating oracle instant client, which is needed by the PHP extension OCI8.
The strange thing is that PHP CLI loaded the new enviroment variables, but the PHP web didn't load it although Apache is restarted.
I noticed that from PHPinfo page, which displays the loaded envirmonment variables showing the old ones before adding oracle.
So just restated my PC and everything is now OK.
Thanks for your advice.
Solved.
It was that my PC required restart not just Apache for PHP web to load the new enviroment variables, which is important in locating oracle instant client, which is needed by the PHP extension OCI8.
The strange thing is that PHP CLI loaded the new enviroment variables, but the PHP web didn't load it although Apache is restarted.
I noticed that from PHPinfo page, which displays the loaded envirmonment variables showing the old ones before adding oracle.
So just restated my PC and everything is now OK.
Thanks for your advice.
answered Nov 22 '18 at 8:57
Moustafa EgyptMoustafa Egypt
135
135
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53410805%2fextension-enabled-in-cli-but-not-in-phpinfo%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Quick note - there are sometimes different
php.inifiles for cli and web. Since you're using XAMPP, I'd imagine that this is more likely again. I'm not familiar with XAMPP, but check if there's a config editor that allows you inspect thephp.inifor that environment.– Darragh Enright
Nov 21 '18 at 11:11
1
Related: How to locate the php.ini file (xampp)
– Darragh Enright
Nov 21 '18 at 11:13
Use echo phpinfo() from web, and look at this params "Configuration File (php.ini) Path", "Loaded Configuration File", "Scan this dir for additional .ini files", "Additional .ini files parsed", them can help you to know where .ini files are located
– Francesco Simeoli
Nov 21 '18 at 11:18