nathj 938
Recognized Expert Contributor
Hi,
I am just abut to use PHP and MySQL together, I have used PHP previously but never with MySQL.
At present I am working on a test site which is not visible outside the localhost but I'll try to explain as best I can.
System Info:
OS: Vista Business
Web Server: IIS 7
PHP: 5.2.2
MySQL: 5.0
I have a test page with the code:
[PHP]
<?php
$lvConnection = mysql_connect(" localhost:3306" , "root", $password);
if(!$lvConnecti on)
{
die('Could not connect: ' .mysql_error()) ;
}
?>
[/PHP]
This however gives me the message:
Fatal error: Call to undefined function mysql_connect()
SO after some Googling around I found that there were a few steps I needed to take that I hadn't taken. Here's what I did:
1) loaded the c:\php\php.ini-recommended file into TextPad
2) changed the extension_dir to "c:\php\ext "
3) enabled the php_mysql.dll
4) Saved this as c:\Windows\php. ini
5) loaded libmysql.dll into the system32 directory and registered it.
All of that went well, or so I thought. I then ran another test page:
[PHP]<?php phpinfo() ?>[/PHP]
This shows that the correct ini file is being read, however it still lists the extension_dir as ./
I am really baffled by this and so I tried changing other settings in the file to see if they would show as I'd set them when ran my test page. It appears that nothing I change makes any difference to the results of phpinfo() and still get the fatal error when issuing mysql_connect() .
If anyone can shed any light on this for me that would be great. I've been pulling my hair out for 2 days now,
Many thanks
Nathan
20 2373 Purple 404
Recognized Expert Contributor
Hi nathj,
can you post the PHP Core and Envronment sections of your phpinfo into this thread and we will take a look.
Purple
hope you checked mySQL as your db while installing the php
then the phpinfo.php page will be having the details of mysql along with other specifications
if you are not able to find it there
re install the php carefully
shoonya
nathj 938
Recognized Expert Contributor
Hi,
Here is the core section: -
<table border="0" cellpadding="3" width="600">
-
<tbody><tr class="h"><th>Directive</th><th>Local Value</th><th>Master Value</th></tr>
-
<tr><td class="e">allow_call_time_pass_reference</td><td class="v">On</td><td class="v">On</td></tr>
-
-
<tr><td class="e">allow_url_fopen</td><td class="v">On</td><td class="v">On</td></tr>
-
<tr><td class="e">allow_url_include</td><td class="v">Off</td><td class="v">Off</td></tr>
-
<tr><td class="e">always_populate_raw_post_data</td><td class="v">Off</td><td class="v">Off</td></tr>
-
<tr><td class="e">arg_separator.input</td><td class="v">&</td><td class="v">&</td></tr>
-
<tr><td class="e">arg_separator.output</td><td class="v">&</td><td class="v">&</td></tr>
-
<tr><td class="e">asp_tags</td><td class="v">Off</td><td class="v">Off</td></tr>
-
-
<tr><td class="e">auto_append_file</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
-
<tr><td class="e">auto_globals_jit</td><td class="v">On</td><td class="v">On</td></tr>
-
<tr><td class="e">auto_prepend_file</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
-
<tr><td class="e">browscap</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
-
<tr><td class="e">default_charset</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
-
-
<tr><td class="e">default_mimetype</td><td class="v">text/html</td><td class="v">text/html</td></tr>
-
<tr><td class="e">define_syslog_variables</td><td class="v">Off</td><td class="v">Off</td></tr>
-
<tr><td class="e">disable_classes</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
-
<tr><td class="e">disable_functions</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
-
<tr><td class="e">display_errors</td><td class="v">On</td><td class="v">On</td></tr>
-
-
<tr><td class="e">display_startup_errors</td><td class="v">Off</td><td class="v">Off</td></tr>
-
<tr><td class="e">doc_root</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
-
<tr><td class="e">docref_ext</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
-
<tr><td class="e">docref_root</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
-
<tr><td class="e">enable_dl</td><td class="v">On</td><td class="v">On</td></tr>
-
-
<tr><td class="e">error_append_string</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
-
<tr><td class="e">error_log</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
-
<tr><td class="e">error_prepend_string</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
-
<tr><td class="e">error_reporting</td><td class="v">6135</td><td class="v">6135</td></tr>
-
<tr><td class="e">expose_php</td><td class="v">On</td><td class="v">On</td></tr>
-
-
<tr><td class="e">extension_dir</td><td class="v">./</td><td class="v">./</td></tr>
-
<tr><td class="e">file_uploads</td><td class="v">On</td><td class="v">On</td></tr>
-
<tr><td class="e">highlight.bg</td><td class="v"><font style="color: rgb(255, 255, 255);">#FFFFFF</font></td><td class="v"><font style="color: rgb(255, 255, 255);">#FFFFFF</font></td></tr>
-
<tr><td class="e">highlight.comment</td><td class="v"><font style="color: rgb(255, 128, 0);">#FF8000</font></td><td class="v"><font style="color: rgb(255, 128, 0);">#FF8000</font></td></tr>
-
<tr><td class="e">highlight.default</td><td class="v"><font style="color: rgb(0, 0, 187);">#0000BB</font></td><td class="v"><font style="color: rgb(0, 0, 187);">#0000BB</font></td></tr>
-
-
<tr><td class="e">highlight.html</td><td class="v"><font style="color: rgb(0, 0, 0);">#000000</font></td><td class="v"><font style="color: rgb(0, 0, 0);">#000000</font></td></tr>
-
<tr><td class="e">highlight.keyword</td><td class="v"><font style="color: rgb(0, 119, 0);">#007700</font></td><td class="v"><font style="color: rgb(0, 119, 0);">#007700</font></td></tr>
-
<tr><td class="e">highlight.string</td><td class="v"><font style="color: rgb(221, 0, 0);">#DD0000</font></td><td class="v"><font style="color: rgb(221, 0, 0);">#DD0000</font></td></tr>
-
<tr><td class="e">html_errors</td><td class="v">On</td><td class="v">On</td></tr>
-
<tr><td class="e">ignore_repeated_errors</td><td class="v">Off</td><td class="v">Off</td></tr>
-
-
<tr><td class="e">ignore_repeated_source</td><td class="v">Off</td><td class="v">Off</td></tr>
-
<tr><td class="e">ignore_user_abort</td><td class="v">Off</td><td class="v">Off</td></tr>
-
<tr><td class="e">implicit_flush</td><td class="v">Off</td><td class="v">Off</td></tr>
-
<tr><td class="e">include_path</td><td class="v">.;C:\php5\pear</td><td class="v">.;C:\php5\pear</td></tr>
-
<tr><td class="e">log_errors</td><td class="v">Off</td><td class="v">Off</td></tr>
-
-
<tr><td class="e">log_errors_max_len</td><td class="v">1024</td><td class="v">1024</td></tr>
-
<tr><td class="e">magic_quotes_gpc</td><td class="v">On</td><td class="v">On</td></tr>
-
<tr><td class="e">magic_quotes_runtime</td><td class="v">Off</td><td class="v">Off</td></tr>
-
<tr><td class="e">magic_quotes_sybase</td><td class="v">Off</td><td class="v">Off</td></tr>
-
<tr><td class="e">mail.force_extra_parameters</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
-
-
<tr><td class="e">max_execution_time</td><td class="v">30</td><td class="v">30</td></tr>
-
<tr><td class="e">max_input_nesting_level</td><td class="v">64</td><td class="v">64</td></tr>
-
<tr><td class="e">max_input_time</td><td class="v">60</td><td class="v">60</td></tr>
-
<tr><td class="e">memory_limit</td><td class="v">128M</td><td class="v">128M</td></tr>
-
<tr><td class="e">open_basedir</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
-
-
<tr><td class="e">output_buffering</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
-
<tr><td class="e">output_handler</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
-
<tr><td class="e">post_max_size</td><td class="v">8M</td><td class="v">8M</td></tr>
-
<tr><td class="e">precision</td><td class="v">12</td><td class="v">12</td></tr>
-
<tr><td class="e">realpath_cache_size</td><td class="v">16K</td><td class="v">16K</td></tr>
-
-
<tr><td class="e">realpath_cache_ttl</td><td class="v">120</td><td class="v">120</td></tr>
-
<tr><td class="e">register_argc_argv</td><td class="v">On</td><td class="v">On</td></tr>
-
<tr><td class="e">register_globals</td><td class="v">Off</td><td class="v">Off</td></tr>
-
<tr><td class="e">register_long_arrays</td><td class="v">On</td><td class="v">On</td></tr>
-
<tr><td class="e">report_memleaks</td><td class="v">On</td><td class="v">On</td></tr>
-
-
<tr><td class="e">report_zend_debug</td><td class="v">On</td><td class="v">On</td></tr>
-
<tr><td class="e">safe_mode</td><td class="v">Off</td><td class="v">Off</td></tr>
-
<tr><td class="e">safe_mode_exec_dir</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
-
<tr><td class="e">safe_mode_gid</td><td class="v">Off</td><td class="v">Off</td></tr>
-
<tr><td class="e">safe_mode_include_dir</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
-
-
<tr><td class="e">sendmail_from</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
-
<tr><td class="e">sendmail_path</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
-
<tr><td class="e">serialize_precision</td><td class="v">100</td><td class="v">100</td></tr>
-
<tr><td class="e">short_open_tag</td><td class="v">On</td><td class="v">On</td></tr>
-
<tr><td class="e">SMTP</td><td class="v">localhost</td><td class="v">localhost</td></tr>
-
-
<tr><td class="e">smtp_port</td><td class="v">25</td><td class="v">25</td></tr>
-
<tr><td class="e">sql.safe_mode</td><td class="v">Off</td><td class="v">Off</td></tr>
-
<tr><td class="e">track_errors</td><td class="v">Off</td><td class="v">Off</td></tr>
-
<tr><td class="e">unserialize_callback_func</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
-
<tr><td class="e">upload_max_filesize</td><td class="v">2M</td><td class="v">2M</td></tr>
-
-
<tr><td class="e">upload_tmp_dir</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
-
<tr><td class="e">user_dir</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
-
<tr><td class="e">variables_order</td><td class="v">EGPCS</td><td class="v">EGPCS</td></tr>
-
<tr><td class="e">xmlrpc_error_number</td><td class="v">0</td><td class="v">0</td></tr>
-
<tr><td class="e">xmlrpc_errors</td><td class="v">Off</td><td class="v">Off</td></tr>
-
-
<tr><td class="e">y2k_compliance</td><td class="v">On</td><td class="v">On</td></tr>
-
<tr><td class="e">zend.ze1_compatibility_mode</td><td class="v">Off</td><td class="v">Off</td></tr>
-
</tbody></table><br>
-
And the environment settings: -
<h2>Environment</h2>
-
<table border="0" cellpadding="3" width="600">
-
<tbody><tr class="h"><th>Variable</th><th>Value</th></tr>
-
-
<tr><td class="e">ALLUSERSPROFILE </td><td class="v">C:\ProgramData </td></tr>
-
<tr><td class="e">APPDATA </td><td class="v">C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming </td></tr>
-
<tr><td class="e">CLASSPATH </td><td class="v">.;C:\Program Files\Java\jre1.6.0\lib\ext\QTJava.zip </td></tr>
-
<tr><td class="e">CommonProgramFiles </td><td class="v">C:\Program Files\Common Files </td></tr>
-
<tr><td class="e">COMPUTERNAME </td><td class="v">HP3 </td></tr>
-
<tr><td class="e">ComSpec </td><td class="v">C:\Windows\system32\cmd.exe </td></tr>
-
-
<tr><td class="e">FP_NO_HOST_CHECK </td><td class="v">NO </td></tr>
-
<tr><td class="e">LOCALAPPDATA </td><td class="v">C:\Windows\ServiceProfiles\NetworkService\AppData\Local </td></tr>
-
<tr><td class="e">NUMBER_OF_PROCESSORS </td><td class="v">2 </td></tr>
-
<tr><td class="e">OnlineServices </td><td class="v">Online Services </td></tr>
-
<tr><td class="e">OS </td><td class="v">Windows_NT </td></tr>
-
<tr><td class="e">Path </td><td class="v">C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;c:\Program Files\Common Files\Roxio Shared\DLLShared\;c:\Program Files\Common Files\Roxio Shared\DLLShared\;c:\Program Files\Common Files\Roxio Shared\9.0\DLLShared\;c:\Program Files\Hewlett-Packard\IAM\bin;C:\Program Files\QuickTime\QTSystem\ </td></tr>
-
-
<tr><td class="e">PATHEXT </td><td class="v">.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC </td></tr>
-
<tr><td class="e">PLATFORM </td><td class="v">BNB </td></tr>
-
<tr><td class="e">PROCESSOR_ARCHITECTURE </td><td class="v">x86 </td></tr>
-
<tr><td class="e">PROCESSOR_IDENTIFIER </td><td class="v">x86 Family 6 Model 15 Stepping 6, GenuineIntel </td></tr>
-
<tr><td class="e">PROCESSOR_LEVEL </td><td class="v">6 </td></tr>
-
<tr><td class="e">PROCESSOR_REVISION </td><td class="v">0f06 </td></tr>
-
-
<tr><td class="e">ProgramData </td><td class="v">C:\ProgramData </td></tr>
-
<tr><td class="e">ProgramFiles </td><td class="v">C:\Program Files </td></tr>
-
<tr><td class="e">PUBLIC </td><td class="v">C:\Users\Public </td></tr>
-
<tr><td class="e">QTJAVA </td><td class="v">C:\Program Files\Java\jre1.6.0\lib\ext\QTJava.zip </td></tr>
-
<tr><td class="e">RoxioCentral </td><td class="v">c:\Program Files\Common Files\Roxio Shared\9.0\Roxio Central33\ </td></tr>
-
<tr><td class="e">SystemDrive </td><td class="v">C: </td></tr>
-
-
<tr><td class="e">SystemRoot </td><td class="v">C:\Windows </td></tr>
-
<tr><td class="e">TEMP </td><td class="v">C:\Windows\SERVIC~2\NETWOR~1\AppData\Local\Temp </td></tr>
-
<tr><td class="e">TMP </td><td class="v">C:\Windows\SERVIC~2\NETWOR~1\AppData\Local\Temp </td></tr>
-
<tr><td class="e">USERDOMAIN </td><td class="v">WORKGROUP </td></tr>
-
<tr><td class="e">USERNAME </td><td class="v">HP3$ </td></tr>
-
<tr><td class="e">USERPROFILE </td><td class="v">C:\Windows\ServiceProfiles\NetworkService </td></tr>
-
-
<tr><td class="e">windir </td><td class="v">C:\Windows </td></tr>
-
</tbody></table><br>
-
I will also try a reinstall of PHP as I can't remember what was set.
I'll let you know if there is any progress. Thank you for your help
Nathan
nathj 938
Recognized Expert Contributor
Hi,
I tried to load the contesnts in a file attachment but that was too large, I tried to display them in the message but that wouldn't display.
I have now added them to a page on another site that will hopefully give you the info you are after. The address: www.ne1online.org/demo.html
This is table output that I get from running phpinfo() - a simple copy of the source.
In the mean time I will try to re-install php ensuring to select MySQL as the database.
Many thanks
Nathan
there you are
the page is showing no db
jo just reinstall care fully this time
cheers
shoonya
nathj 938
Recognized Expert Contributor
there you are
the page is showing no db
jo just reinstall care fully this time
cheers
shoonya
I am trying to re-install, but that all went horribly wrong. I then uninstalled php from my machine and installed php5.2.3 and ensured that IIS knew where the php5isapi.dll file was. Unfortunately this is now not working at all. No php pages display. So I removed IIS and reinstalled it and now I can't get any pages to display at all. I don't get errors I just don't get anything, it's all highly frustrating.
When in installed php I configured it for IIS isapi and ensured the MySQL side of things was selected. This process was very different from the previous attempt, I think previously I must of just downloaded the zip file and not the msi. This time I have downloaded the msi, installed it and then loaded the zip file contents over the top, but nothing. It's like I'm step further back than before.
I would really appreciate some advice on the best way forward from here. I am open to the idea of using other web servers, pretty much anything is a possibility. However, I know precious little about this systems side of things, and that's more than anyone else in the organisation, so I really need some help and advice.
Many thanks
Nathan
go step wise then
considering that your IIS is working fine (though i have never wrkd on it)
type [HTML]php -v[/HTML] on command promp nd check whether your php is installed well or not
nathj 938
Recognized Expert Contributor
go step wise then
considering that your IIS is working fine (though i have never wrkd on it)
type [HTML]php -v[/HTML] on command promp nd check whether your php is installed well or not
The result of this is:
PHP 5.2.3 (cli) (built May 31 200709:37:32)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright 1998-2007Zend Technologies
Error in my_thread_globa l_end(): 2 threads didn't exist
I must admit this means nothing to me at all. I really appreciate your help with this.
Nathan
why don't u try apache ??
frankly speakin
for me also it's the same thng :)
can u look for any error in th confg file
shoonya
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Markus Breuer |
last post by:
I have a question about oracle commit and transactions. Following scenario:
Process A performs a single sql-INSERT into a table and commits the
transaction. Then he informs process B (ipc) to read the new date. So
process B starts "select ..." but does not get the previously inserted
row. The timespan between commit and select is very short.
(NOTE: two different sessions are used)
Questions:
1.) Does commit when returning from call...
|
by: Steven T. Hatton |
last post by:
I know of a least one person who believes std::ifstream::read() and
std::ofstream::write() are "mistakes". They seem to do the job I want
done. What's wrong with them. This is the code I currently have as a test
for using std::ifstream::read(). Is there anything wrong with the way I'm
getting the file?
#include <vector>
#include <iomanip>
#include <fstream>
#include <iostream>
|
by: BBM |
last post by:
I have an object that has a fairly complex construction sequence, so I have
written a dedicated "factory" class that invokes the constructor of my object
class (which does nothing but instantiate the object and set default
blank/null values), and then does all the Db access and number crunching to
populate the new object. The factory returns the fully populated object to
the caller. All the fields in the object are private, but have...
|
by: Jose Reckoner |
last post by:
I'm running python 2.3 on Windows XP. Anyone have a quick small script
to convert .DT1 and .DEM data to ASCII or some other format? I don't
need a viewer.
Thanks!
|
by: phplasma |
last post by:
Hey,
I am currently attempting to implement a multi-threaded C# socket,
using SSL (.pem file/certification/private key combo) server using
Visual Studio C# Express.
I have successfully made the client application establish a connection,
and send data, which appears in plain, de-crypted text on the server -
this works.
| |
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |