Reply to topic
asp.net/mysql same as php/mysql ?
malik


Joined: 06 Jan 2007
Posts: 32
Reply with quote
I want to move to windows (vps) but i am not in anyway familiar with asp.net.

More familiar with linux I have php scripts which query my mysql database.

Can i safely assume i should be able to do the exact same queries with asp.net without too much trouble???

TIA

PS. Not sure if i am allowed to ask this here - but assuming the above is true are there any asp.net coders around here looking for extra cash who would write some basic query code for me to test with?
Jason101
Forum Regular

Joined: 14 Mar 2006
Posts: 570
Location: Harrisburg, PA
Reply with quote
Whats to say you can't just install PHP and MySQL on your Windows VPS and move your scripts over without no extra effort at all?

I have PHP 5, MySQL 5, MSSQLServer, and Coldfusion running on my VPS and it is solid.

If you need more info, let me know and I'd be happy to help Very Happy
malik


Joined: 06 Jan 2007
Posts: 32
Reply with quote
Thanks Jason ill try this.

Any recommendations on how to secure my search.php page ?. I currently using apache's http authentication so need to find a new secure alterative.
Jason101
Forum Regular

Joined: 14 Mar 2006
Posts: 570
Location: Harrisburg, PA
Reply with quote
Well, We really don't code in PHP anymore, Just Coldfusion. SO I can't help you on the php security part. But IIS has HTTP authentication methods as well.

You might want to take a look at this article:

"Using Apache-Style HTTP Authentication on IIS"
http://www.15seconds.com/issue/060119.htm

OR, You can just not use IIS, and just install Apache for windows. Remember, the Windows VPS's are not restricted in any way as far as permissions go, so you can install whatever you need
malik


Joined: 06 Jan 2007
Posts: 32
Reply with quote
Jason

I installed php using the windows installer version, but testing with
<?
phpinfo();
?>

I get page cannot be found. Any ideas?
tia
Jason101
Forum Regular

Joined: 14 Mar 2006
Posts: 570
Location: Harrisburg, PA
Reply with quote
malik wrote:
Jason

I installed php using the windows installer version, but testing with
<?
phpinfo();
?>

I get page cannot be found. Any ideas?
tia


You can't use the windows installer. It will only install the CGI version. You need to manually install to get it to work.

Grab yourself the Windows ZIP version, and extract it to C:\PHP

Then, head to this url which is an excellent walk through of how to install it:

http://www.peterguy.com/php/install_IIS6.html

We have used the procedure in the above URL several times without a hitch.

If you run into a problem, or need any other help, please let me know.
malik


Joined: 06 Jan 2007
Posts: 32
Reply with quote
Jason
Thanks for info/link, php installed.
Rather than installing mysql I note the server is configured with sql server express?.
Any reason not to use this instead?.

TIA

PS. I opened it up expecting/hoping to see options for creating users/database/tables etc but couldn't see anything like that - yes i was hoping it would be that easy! Smile
Jason101
Forum Regular

Joined: 14 Mar 2006
Posts: 570
Location: Harrisburg, PA
Reply with quote
You could in fact use it. But the only way I know of to get PHP to communicate with SQL Server is to use a script called PHAkt from (the former) interakt (now owned by adobe). Since the acquisition, they have discontinued the script, and removed it from their site. If you need it, let me know and I can email it to you. It comes as a dreamweaver extension to set the script up.

Maybe someone else can clarify connectivity between each. The last time I used PHAkt was probably 4 years ago, so maybe there has been an advancement since then.

You could also purchase a MySQL database from HMS and use it on their servers. I think it's only like 5 bucks a month.
malik


Joined: 06 Jan 2007
Posts: 32
Reply with quote
I'll try the mysql install.
Dont suppose you know of another recommended step by step tutorial for this?
Jason101
Forum Regular

Joined: 14 Mar 2006
Posts: 570
Location: Harrisburg, PA
Reply with quote
malik wrote:
I'll try the mysql install.
Dont suppose you know of another recommended step by step tutorial for this?


Believe it or not, it's easy as running the install. The install will walk you though setting it all up (and securing the installation)

You'll have to modify your PHP.ini yourself to enable mysql (not sure if it's enabled by default)

You can get the MySQL 5 download from here:

http://dev.mysql.com/downloads/mysql/5.0.html#win32

Get the "Windows ZIP/Setup.EXE (x86)"

You can also grab the tools (administrator and Query Browser) if you feel so inclined. These come in handy as well.

http://www.mysql.com/products/tools/
malik


Joined: 06 Jan 2007
Posts: 32
Reply with quote
he page cannot be displayed
You have attempted to execute a CGI, ISAPI, or other executable program from a directory that does not allow programs to be executed.

Please try the following:

* Contact the Web site administrator if you believe this directory should allow execute access.

HTTP Error 403.1 - Forbidden: Execute access is denied.
Internet Information Services (IIS)

==========================================

Jason

I have begun transferring some of my php/mysql over but when i open page: data.php i get the above. I have script source access enabled in iis for the domain so I am not sure what would cause this. Any ideas? tia
Jason101
Forum Regular

Joined: 14 Mar 2006
Posts: 570
Location: Harrisburg, PA
Reply with quote
hmm... Assuming you following the tutorial correctly everytying should work correctly.

But try this..

When you created the website, you might not have the execute permissions set correctly. Make sure "Scripts Only" are selected under execute permissions.




Also, make sure you have the .php extension installed properlly in the website:




Just a little hint, if you setup PHP (or change any setting for that matter) at the top of the "Websites" tree, it will carry down to every website you create there after therefor eliminating the need to setup php in every website individually. (Personal Preference)

php connections to mysql
malik


Joined: 06 Jan 2007
Posts: 32
Reply with quote
Jason

If you're still around can you check something for me.

When you run:

<?php
phpinfo();
?>

Do you find any reference to mysql in there?.

Reason i ask - In mine although mysql is installed and working i cannot get php to talk to mysql and mysql is not showing in my phpinfo but i am sure it should do.
Jason101
Forum Regular

Joined: 14 Mar 2006
Posts: 570
Location: Harrisburg, PA
Reply with quote
Malik,

Make sure the following is uncommented in PHP.ini.
Code:

extension=php_mysql.dll
extension=php_mysqli.dll

Then, check the settings in the MySQL Section (SEE BELOW)



Code:

[MySQL]
; Allow or prevent persistent links.
mysql.allow_persistent = On

; Maximum number of persistent links.  -1 means no limit.
mysql.max_persistent = -1

; Maximum number of links (persistent + non-persistent).  -1 means no limit.
mysql.max_links = -1

; Default port number for mysql_connect().  If unset, mysql_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order).  Win32 will only look
; at MYSQL_PORT.
mysql.default_port = 3306

; Default socket name for local MySQL connects.  If empty, uses the built-in
; MySQL defaults.
mysql.default_socket =

; Default host for mysql_connect() (doesn't apply in safe mode).
mysql.default_host =

; Default user for mysql_connect() (doesn't apply in safe mode).
mysql.default_user =

; Default password for mysql_connect() (doesn't apply in safe mode).
; Note that this is generally a *bad* idea to store passwords in this file.
; *Any* user with PHP access can run 'echo get_cfg_var("mysql.default_password")
; and reveal this password!  And of course, any users with read access to this
; file will be able to reveal the password as well.
mysql.default_password =

; Maximum time (in secondes) for connect timeout. -1 means no limit
mysql.connect_timeout = 60

; Trace mode. When trace_mode is active (=On), warnings for table/index scans and
; SQL-Errors will be displayed.
mysql.trace_mode = Off


Reboot your server, Or restart IIS. Let me know how you make out.
malik


Joined: 06 Jan 2007
Posts: 32
Reply with quote
Sorted thanks jason
asp.net/mysql same as php/mysql ?
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic