I've installed the dbase php extension in my ubuntu server. And I see the dbase_open(...) doesn't show any error but though I provide an existing .dbf file path with mode (0 or 2) it can't open the file. No error but the returned link pointer is false. Can anyone tellme what will be the possible causes of not opening the .dbf file?
I've installed the dbase extension using this command:
[pecl install channel://pecl.php.net/get/dbase]
I've added the dbase.so extension in php.ini, restarted the server and I can see the dbase information in phpinfo().
Here are few basic information:
PHP Version 5.3.10-1
ubuntu3.10
Apache 2.0
Handler dbase extension version: 5.1.0
Any help will be appreciated.
Was *.dbf file created from visual foxpro? If so, try the following:
COPY TO filename.dbf TYPE FOX2X
I was having similar problem with you and then I tried to read dbase_open function documentation again, I found notes from jmertic at ncscredit dot com that emphasized about that thing.
As additional information related with FOX2X. FOX2X format creates a new table that can be opened in earlier versions of FoxPro (versions 2.0, 2.5, and 2.6). Other than that, you should consider differences between latest version visual foxpro field type and foxpro 2.x field type. You may read this documentation.
Related
I am just trying to set up a Oracle instant client 19 database connection using PHP and XAMPP.
I have followed several Youtube videos, other stack posts and it still does not show the oci8 module on phpinfo.php. I also recieve the error Call to undefined function oci_connect()
What I have done:
Installed XAMPP with PHP enabled.
Downloaded Version 19.9.0.0.0 Basic x64 from - https://www.oracle.com/uk/database/technologies/instant-client/winx64-64-downloads.html and extracted to C:\ named instantclient_19_9
Set up my environment path = C:\instantclient_19_9
Restarted PC
Downloaded oci.dll from - http://pecl.php.net/package/oci8/2.0.8/windows
Selected 5.5 Safe thread x64
Extracted into C:/xampp/php/ext
Went into php.ini and removed semi-colon from extension=oci8_19
Restarted Apache
Looking in XAMPP/php/ext, there is php_oci8.dll and php_oci8_19.dll extensions there.
Went onto phpinfo.php and nothing is displaying for oci8
Not sure what else I need to do, at this point, all walkthroughs show their phpinfo pages and they all show the oci extension. I tried uninstalling XAMPP and removing all files then trying again but each time it doesn't work so I must be missing something. I have done this for SQLITE and MYSQL and they worked just fine, just oracle.
For extra measures, I have also tried an answer someone suggested in a post and it also hasn't worked:
Add oci.dll, oraociei19.dll, and oraons.dll from C:\instantclient_19_9 to xampp/apache/bin folder. Replace the existing ones.
Restart the Apache
I have an application based on Sybase database. The application is running on a Windows Server 2003. I tried to fetch the database from the php and it is showing a number of dll files are missing including the php sybase extension. I checked the php extension dir and found that the file exists on the path where it is showing the errors.
Here i would like to mention that i installed xampp 1.8.0 on the windows server and enabled the sybase extension form the php.ini.
I used the following code to connect as mentioned on the php doc
<?php
$link = sybase_connect('SYBASE', '', '')
or die("Could not connect !");
echo "Connected successfully";
sybase_close($link);
?>
== Update ==
It was showing that the following dll files were missing and i downloaded and added them manually.
libcs.dll
libintl.dll
iconv.dll
Now i am getting the following error,
The procedure entry point iconv_open could not be located in the dynamic link library iconv.dll
This error is present from the beginning of enabling the Sybase PHP extension.
PHP Startup: unable to load dynamic library 'C:\xampp\php\ext\php_sybase_ct.dll' - the specified procedure could not be found
When I've seen unable to load dynamic library 'C:\xampp\php\ext\php_sybase_ct.dll' the issue has come down to a) having an old/outdated set of libs or b) using an application that references the 'old' Sybase lib names (with ASE 15, Sybase changed the names of their libs and some apps haven't picked up on this).
For the first issue the obvious (?) resolution would be to download the appropriate set of Sybase libs (which is going to depend on your application code/version as well as the ASE version). [Not enough info in your post to know if this explains your scenario.]
For the second issue there's a relatively easy solution (the following is based on a PHP app that has a Sybase-specific sub-directory containing the Sybase client-side libs):
in a Windows cmd window ..
source the *.bat file for your application [load your app's env]
cd to the Sybase sub-directory named ...\OCS*\scripts
run copylibs.bat
try starting your PHP app again and ...
if the issue is fixed then the php_sybase_ct.dll error message should go away
I am facing some issue while starting Apache server via XAMPP. I have installed XAMPP Version 5.6.3.
When I start the Apache server from xampp control panel, an error message is displayed as shown below:
On clicking 'OK' button, another dialog box is displayed as shown:
The thing is I wanted to use OCI instead of mysql. so I have commented out the mysql extensions and uncommented the OCI extension in php.ini file.
The php_oci8_12c.dll file is the only file available in the extensions (ext) folder of php in xampp. Hence I included the line in the php.ini as shown in the above image.
Since then I am getting this error.
I have installed instant client 12.1 as well but no luck. I also tried copying the OCI.dll from instantclient_12_1 and pasting it in c:/xampp/php and c:/xampp/apache/bin. The error still persists.
Need help..
UPDATE: I removed other oracle paths in PATH of environment variables, keeping only the instantclient path. Now I am getting this error..
Well, I've installed XAMPP 1.8.2, PHP 5.4 and Apache 2.0, and I use php_oci8_11g.dll and works fine.
You are trying use php_oci8_12g.dll, I recommend you read this link http://www.oracle.com/technetwork/articles/dsl/technote-php-instant-12c-2088811.html with especifications for run oci12g.
I solved the issue after stuck 2-3 days .
Before follow steps Some things to remmember .
1- I am using win 8.1 64 bit .
2- Using Xampp 5.6.31 32 bit .
3- Using instaclient 12.2.0.1 64 bit (Because my win 8.1 is 64 Bit ) .
Now steps are below -
Step 1 - Download xampp 5.6.31 32 bit and install it .
Step 2 - Download and install oracle 11g R2
Step 3 - Download and install OTN (oracle instaclient 12.2.0.1 )
Extract all files in any drive in my case i have extract in C:\oracle\instaclient12.2.0.1
Add (C:\oracle\instaclient12.2.0.1 ) it to the path variables of the system. and also add new variable under variable of system with name TNS_ADMIN and put same path (C:\oracle\instaclient12.2.0.1 ) in its value .
Its time to set PHP.INI here uncomment following (see image below)
PHP.ini setup
Copy 3 files from C:\oracle\instaclient12.2.0.1 oci.dll,oraociei12.dll and oraons.dll to xampp apache\bin . by this step Unable to load dynamic library issue has been resolved .
Unable to load dynamic library issue solution
Now restart Apache on xampp and check info.php on browser . OCI8 module will appear there enable .
Enjoy !!!.
I solved the issue. The problem was that I was trying to use a 64 bit DLL(php_oci8_12g.dll) in a 32 bit PHP. I downloaded a 32 bit instantClient and it works now! :-)
instantclient-basic-nt-12.1.0.2.0.zip
I had a problem related to OCI8 and XAMPP for days in a row, the problem was shown as:
Fatal error: Call to undefined function oci_connect()
I was able to correct it using the php that comes by default with XAMPP. I'm using windows 10 64 bits as well, but used xampp-win32-7.3.2-0-VC15 (php 7.3.2). To summarize, I was able to get a correct configuration by doing everything with 32 bits versions (except the o.s). The full story and how I've done it:
If you go to your xampp/php directory through cmd, in my case it was "C:\xampp\php", and start the php by the simple command "php" it will probably show what dlls are not being found in the etc folder or which of those are not Win 32 compatible. If you get this problem, you will not be able to see the OCI8 page when opening a phpinfo() page:
If that's the case, with win 32 compatibility problems or not finding the dlls that you are certain are there, you should unistall XAMPP and reinstall it using a x32 version. The phpinfo page will show x86 Architecture. Remember to remove in the path variables any source that miss locate your php in use, the point here is to use the one given by default in XAMPP. If you need by any reason to use another php installation, remember to use x86 architecture.
If you need an updated OCI8 dll you can download it on https://pecl.php.net/package/oci8 , but remember to check the Thread Safety compatibility, you can find it on your phpinfo page as well. In my case it was enough to use the one provided by XAMPP.
After this, you have to enable the extension:
extension=oci8_12c
in the php.ini configuration file. It was enough for me to enable only this one, although some people suggests to also enable extension=pdo_oci. My suggestion is to try this only if you failed to install with the path here shown. It's also good to check if you are set in the correct path regarding the extensions, in my case:
extension_dir="C:\xampp\php\ext"
After this, you have to download the Oracle Instant Client. Since you are using x86 architecture (you must use this one), you need to find a 32-bit version of the OIC, but is also important to check which one is compatible with the extension you uncommented. In my case, of oci8_12c, it was instantclient-basic-nt-12.2.
The final step is to unzip it to a folder, like "C:\instantclient_12_2" and add it to the path variables of the system.
Reload apache and check if the OCI8 is shown correcly.
I have had a problem trying to establish a connection to a MSSQL database I created in Microsoft SQL Server Manager 2008 R2 using php 5.5.19 in XAMPP.
In the php.ino configuration file under extensions, there is commented out a ';extension=php_mssql.dll'. I removed the comment and ran apache in the xampp control panel.
Naturally an error occurred stating ''PHP Startup: Unable to load dynamic library '..\ext\php_mssql.dll cannot be found'. I looked in the ext directory and sure enough it wasn't there. I added the mssql.dll file from
www.dll-files.com/dllindex/dll-files.shtml?php_mssql
,but then I got an Entry Point not found error stating 'The procedure entry point php_body_write could not be located in the dll php5ts.dll'.
After further research, I discovered that mssql_connect was not working since PHP version 5.3: http://php.net/manual/en/intro.mssql.php
I instead tried to use the 'sqlsrv_connect'' function, but I had to install the new drivers from https://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx
After reading the readme, I saw that I needed the libraries php_sqlsrv_55_ts.dll and php_pdo_sqlsrv_55_ts.dll to work with xampp's php5ts.dll in the php folder.
I added the libraries in the php\ext folder and added corresponding extensions to the new dll's and restarted Apache.
I then got an system error 'The program can't start because MCVCP110.dll is missing from your computer. Try reinstalling the program to fix this problem.' Obviously reinstalling isn't an option as I will lose my new dll's so I verified that MCVCP110.dll is in the php folder, which it was.
Please help, I really need to find a way to load the libraries with the 'sqlsrv_connect' function properly so I can connect to a MSSQL database.
I am configuring a server IIS7 to work with php and mssql in php.ini and when I try to call the "extension = php_mssql.dll" appears to me an error when I refresh the site.
"500 - Internal server error.
There is a problem with the resource you are looking for, and it can not be displayed. "
Thanks
The php_mssql.dll is missing the latest 5.3 releases because support for this extension has been dropped. Version 5.3.1 stills has a version which you can also use in 5.3.5. Just copy it to the ext dir.
You don't mention your PHP version, but here's a relevant article that suggests two DLLs that may be missing:
http://forums.iis.net/t/1164387.aspx
But note that the key message of the article is that php_mssql.dll depends on an old MSSQL driver that's no longer supported, so moving to the new Microsoft PHP MSSQL driver seems to be a good idea.