PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WEBDEV 2024 → How to Deploy PHP/MySQL Application
How to Deploy PHP/MySQL Application
Iniciado por Temi, 30,jun. 2010 00:58 - 7 respuestas
Publicado el 30,junio 2010 - 00:58
Exactly how do I deploy a PHP/MySQL application built with WebDev? Its working perfectly on my localhost now I need to move it to production.

I have used the WDeploy tool but that doesnt handle the database. I have also tried to replicate the database with its settings on my server but the app cant see any queries. Please help, its urgent. Thanks!
Publicado el 30,junio 2010 - 11:27
Maybe this can help:

1. Use MyPHPAdmin on your localhost to export all your tables to a sql epxort query
2. Use MyPHPAdmin on the internet site and import the query

This should work with all your data in the tables or without.

HTH
Sebastian
Publicado el 02,julio 2010 - 08:55
Thanks Sebastian. I have already done this. Exported from local, and imported on remote. The problem is how to change the db settings to the remote settings. I found MYSITE.xdd.php which is where I think the database connection settings are but the password is given some weird encoding and looks something like this: ÓÑœ·—ǹ. If it was plain I would just change it to the remote database setting but I cant replicate the encoding
Publicado el 02,julio 2010 - 12:18
Temi,

I would never change something outside of WebDev in PHP (I guess this is what you tried to do). You never know how and when this is going to be changed from WebDev.

Maybe this can help you:

MyProvider is Connection

// Parameters of the connection
MyProvider..Provider = hNativeAccessMySQL
MyProvider..User = "dbuser"
MyProvider..Password = "thepassword"
MyProvider..Server = "server.url"
MyProvider..Database = "dbname"
MyProvider..Access = hOReadWrite

// Opening the connection
HOpenConnection(MyProvider)
HChangeConnection("*",MyProvider)
Publicado el 02,julio 2010 - 12:18
I forgot to say, put this code in the 'Initialization of <your first page> (PHP server)'
Publicado el 05,julio 2010 - 10:37
Wow thanks a lot. I saw that in the help but was lazy of assigning the connection to all of my tables, didnt know I could use (*).

I'll try this in my project initialization code. Thanks a lot!
Publicado el 05,julio 2010 - 10:38
Nope, it didn't work.

This type of variable not allowed in PHP.

It looks like I've got a way to get the correct database settings - by changing my local connection settings to match the deployment server settings, just before deploying. Of course I had to change it back after deploying so my app could run locally.

Anyways now I get this error: http://ecobiz.antigravitysites.com/UK/

Error running the index.php page.
The <QRY_Select_LastFiveDemands> query is not initialized.

Once again, this app works fine locally. Before I was getting a database error on the production server but I found a way around that. What query initialization is required again?
Publicado el 02,junio 2015 - 16:36
Hi Sebastian,

please let me a question about the connection.
I have a WB19 PHP project with a connection defined into the analysis.
Also, I put the code you say for connect to the DB.
The question iS:

- when I test my project from WB tool, its works fine.
- when I deploy the project into a PC with no WB installed (with Apache, MySql and PHP), the project tries to connect to server and DB defined in the analysis.
Must I delete the connection defined in the analysis in order to use the connection via text file?

Thanks in advance.
Jordi