[PHP] PHP + SQL..
I am storing a lot of text into my mssql database. Are there any special characters I should watch out for? I think so far I've got ' covered. Also, when I retrieved the string later on... The ' is printed out with a \ in the front. How do I get rid of the \? When I try to get a really long string and print it out on a website, it tends to stop in the middle of the string. Is this some sort of a limitation that I can change? Thank you!
[PHP] Magic Quotes
I've got all three Magic Quote directives turned off... When I use sql query to grab any string from a database, it still spits out the \ in front of the special characters.. Any ideas? thanks
[PHP] Size Limit PHP + MSSQL
Is there size limit for select queries in php? I am trying to grab a very long string that exists in the database. When I do a select and print it out, php keep truncating the string - only outputing the first half or so when the string is too long. I have checked the actual database and the string is complete. I havent gone as far as checking the actual length of the string and the length that is being printed.. Any ideas why php keep truncating my data? I've tested it with asp and it successfully outputs the complete data... Thank you!
[PHP] Recompiling PHP with mssql
Hi, I am trying to install Microsoft SQL server functions to PHP 4.3.9 on redhat. When PHP was first installed, it was not configured to include the MSSQL functions. I would like to only add these functions and not touch what is already there... How do I proceed? Any help would be greatly appreciated. Thank you, LK
[PHP] [mssql_connect] Interfaces File?
Hello, I am trying to connect to a mssql server from php 4.3.9. mssql_connect('IP_ADDRESS:PORT_#',LOGIN,PASSWORD) or die("Could not connect to the mssql server"); is failing... after doing a little bit of research, I found this on php.net *"mssql_connect()* establishes a connection to a MS SQL server. The servername argument has to be a valid servername that is defined in the 'interfaces' file." What is an interfaces file? Where is it? How do I define my server name?? Thank you so much for your help, LK
[PHP] [mssql_connect error] Changed database context to..
Did anyone else run into this problem? PHP fails to connect to MSSQL7 with mssql_connect with the message: Changed database context to ''. I've been searching around but did not find a good solution for PHP. I did find this link: http://support.microsoft.com/default.aspx?scid=KB;EN-US;197459 But is not too helpful.. I've tried: setting the severity value higher with mssql_min_error_severity(4); mssql_min_message_severity(4); but these did not work either.. Any ideas? Thank you!!! LK
[PHP] Regular expressions
I am trying to do a password match with php.. It needs to be at least 6 characters, contains 2 alphabets and at least 1 number or a special character... if (!preg_match("/^.*(?=.{6,})((?=.*\d)|(?=.*[,[EMAIL PROTECTED]"\/'+\*\?\.\[\]\^$\(\){}\|\\&:;'<>~`#%_-]))([a-zA-Z]{2,}).*$/", $pw1)) {error message} is failing to pass "e1w2qw" as a good password although it follows the instructions... I cannot figure out why.. Please help! Thank you,
[PHP] php_mssql.so
We have a set of PHP files which uses "dl()" to load the extension "php_mssql.so" at runtime. These were running on a server with PHP 4.3.9 and have been recently moved to a new server with PHP 5.1.6 (both RedHat). I have tried to simply copy the file "php_mssql.so" file to the directory of PHP modules, however it seems to be not compatible with the new version. We dont have permissions to recompile PHP on the server but can copy files on the modules/extensions directory area. I believe we just need to get the updated "php_mssql.so" file onto the server. Any idea where I could download or how to create one? Thank you, LK
Re: [PHP] php_mssql.so
Maybe I could just compile it on a test machine and copy the .so file over to the working server. Would there be any incompatibility issues there? Where could I download PHP 5.1.6? I am only able to see 5.2.5 and 4.4.8 on php.net... Thank you! On Thu, Mar 27, 2008 at 4:36 PM, Chris <[EMAIL PROTECTED]> wrote: > Liz Kim wrote: > > We have a set of PHP files which uses "dl()" to load the extension > > "php_mssql.so" at runtime. > > These were running on a server with PHP 4.3.9 and have been recently > moved > > to a new server with PHP 5.1.6 (both RedHat). > > I have tried to simply copy the file "php_mssql.so" file to the > directory of > > PHP modules, however it seems to be not compatible with the new version. > > Right. PHP4 is different to PHP5 internally so the extension files will > be different too. > > > We dont have permissions to recompile PHP on the server but can copy > files > > on the modules/extensions directory area. > > I believe we just need to get the updated "php_mssql.so" file onto the > > server. > > Any idea where I could download or how to create one? > > Ideally just get the host to install the appropriate RPM's. > > The only other way would be to get the same hardware (i386 compared to > amd64 for example), same version of redhat, same gcc, same php and > compile it all yourself. > > -- > Postgresql & php tutorials > http://www.designmagick.com/ >
[PHP] SQL outer join problem
have a very simple script which connects to a database, execute a query then displays the result. This script uses odbc_connect and functions. There are two identical Apache web servers and one MS SQL database server. When the script is ran on web server #1, all the results are returned correctly. Ran on server #2, however, some entries are missing. Same script, different result.. I am using left outer join in the SQL query and the missing items are the ones that should be canceled out from this join. I directly ran the query on the database and made sure it is not causing and problems. I checked the odbc setting on php.ini and odbc.ini on both servers. No difference. No permission problems either as I am logging in as the same user... Any ideas???
Re: [PHP] SQL outer join problem
I've tried using the same php.ini file and phpinfo() shows the same info for both servers. I think I've narrowed the problem down a little bit though. After looking into the Driver Manager's log and I found that SQLExtendedFetch is being called on server 2 (incomplete result) and SQLFetch on server 1 (correct result). Can someone please tell me when PHP calls SQLExtendedFetch in stead of SQLFetch? How can I configure PHP to use SQLFetch instead? Thanks! On Tue, Sep 16, 2008 at 4:25 PM, Micah Gersten <[EMAIL PROTECTED]> wrote: > Compare phpinfo() on both servers. > > Thank you, > Micah Gersten > onShore Networks > Internal Developer > http://www.onshore.com > > > > Liz Kim wrote: > > have a very simple script which connects to a database, execute a query > > then displays the result. > > This script uses odbc_connect and functions. > > > > There are two identical Apache web servers and one MS SQL database > server. > > When the script is ran on web server #1, all the results are returned > > correctly. > > Ran on server #2, however, some entries are missing. > > Same script, different result.. > > > > I am using left outer join in the SQL query and the missing items are the > > ones that should be canceled out from this join. > > I directly ran the query on the database and made sure it is not causing > and > > problems. > > I checked the odbc setting on php.ini and odbc.ini on both servers. No > > difference. > > No permission problems either as I am logging in as the same user... > > > > Any ideas??? > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
[PHP] SQLExtendedFetch
I've posted this already but I thought a new subject might help.. I have a script which connects to a MS SQL database, executes a query then displays the result. There are two identical Apache web servers and one MS SQL database server. When the script is ran on web server #1, all the results are returned correctly. Ran on server #2, however, some entries are missing. Same script, different result.. After looking into the Driver Manager's log and I found that SQLExtendedFetch is being called on server 2 (incomplete result) and SQLFetch on server 1 (correct result). Can someone please tell me when PHP calls SQLExtendedFetch in stead of SQLFetch? How can I configure PHP to use SQLFetch instead? Thanks a lot!
Re: [PHP] SQLExtendedFetch
thanks for all your input. unfortunately, i cannot set up a new database as it is being used by other applications/websites. the versions of odbc, php and apache are all the same... please do let me know if you have any other suggestions! thanks On Wed, Sep 17, 2008 at 5:48 PM, Chris <[EMAIL PROTECTED]> wrote: > > If you have Apache on IIS, why not go MySQL. It's a fair bit faster I've >> found, and a darn site easier to work with; >> > > because changing a web server is a lot easier than rewriting an app to use > another database ;) > > -- > Postgresql & php tutorials > http://www.designmagick.com/ > >
[PHP] Plotting Tool
Hi, Anyone have any suggestions on a plotting package for PHP? Nothing too crazy and fancy - just easy to read plots/graphs. We were using PHPlot on our old server but it's requiring too many lib's/util's to install on a new server. TIA.