We use MySQL in our department in our small company. I am new to PHP to some degree, so I may ask questions which may not be smart questions.
For minor testing, I would like to use IIS which is already installed on my laptop. We have a couple Linux boxes for our website, one for testing and one for production, which are already set up with Apache 1 for the active web server and Apache 2 for a test web server. We also have a real TEST Web server that is also using Apache 1.
However, just for small PHP testing, I'd like to use the already-installed IIS. In other words, I do NOT want to install Apache on my Windows desktop. I recently installed MySQL from http://dev.mysql.com/downloads/windows/ ... r/5.6.html. However, none of it would work, and unfortunately, I did not write down my password. Yeah, I know, typical novice. So, I just uninstalled MySQL. Now, if I want to install only the MySQL Server (and Workbench) and the PHP Server, do I need to install these separately, or can I go to either XAMPP or WAMP and pick what I want? Or, must I go to http://www.PHP.net for PHP and http://dev.mysql.com for MySQL and install these separately?
Cecil
Setting up for use of MySQL and PHP
Moderator: General Moderators
-
cecilchampenois
- Forum Commoner
- Posts: 47
- Joined: Thu Nov 06, 2014 10:29 am
- Location: Gilbert, Arizona
- Contact:
Setting up for use of MySQL and PHP
Cecil Champenois
Re: Setting up for use of MySQL and PHP
Honestly, just don't. Use XAMPP, use Vagrant, but don't subject yourself to the headaches of IIS.cecilchampenois wrote:For minor testing, I would like to use IIS which is already installed on my laptop.
Re: Setting up for use of MySQL and PHP
Please confirm this. Apache 1.x is very old and there are important differences between 1.x and 2.xWe have a couple Linux boxes for our website, one for testing and one for production, which are already set up with Apache 1
-
cecilchampenois
- Forum Commoner
- Posts: 47
- Joined: Thu Nov 06, 2014 10:29 am
- Location: Gilbert, Arizona
- Contact:
Re: Setting up for use of MySQL and PHP
Yes, our main web server is Apache 1.xx. We also have a TEST WEB SERVER that is 1.xx. Both are on Ubuntu server, I believe Version 10.xx. Then I installed Ubuntu 14.04.1 on another machine just to get used to installing Linux. i also installed MySQL and Apache. The install was Apache 2. So, when we placed our files over on the new Apache 2 server just for testing, nothing worked initially. We then proceeded to move some of the files over to /var/www/html/ and a lot of the PHP web pages working, bit it is still a mystery to me as to why Apache moved the files over to /var/www/html from /var/www. We are not sure what to do, but to place the files into the HTML folder, otherwise, it just won't work.Celauran wrote:Please confirm this. Apache 1.x is very old and there are important differences between 1.x and 2.xWe have a couple Linux boxes for our website, one for testing and one for production, which are already set up with Apache 1
So, we have the following:
Main Web Server - Apache 1.xx
Test Web Server - Also Apache 1.xx
New Test Web Server - Apache 2.xx
This has been a painful process just to get anything to work, but some and maybe most of it is now working. We had to modify some of the paths in the code. So, here's the problem. When we want to test something on this latest Apache 2 server, we have to modify the code and then if it works, we have to remove the modified paths in the code to go back to what is in Apache 1 which is /var/www. No one really wants to move over to Apache 2, as everything is going along just fine, yet I think we should move to Apache 2 at some point.
Cecil Champenois
Re: Setting up for use of MySQL and PHP
/var/www or /var/www/html shouldn't matter at all. You shouldn't have either of those paths anywhere in your code.
Re: Setting up for use of MySQL and PHP
for testing and development in your laptop you don't even need to install a web server... just use the PHP built-in webserver (assuming that you are using a up to date PHP version)... manually install PHP and Mysql are in general simple tasks and could contribute to your knowledge.
Regarding to your servers... well as Celauran already told you... Apache 1.x is really old... you will be better having an up-to-date version too.
Now, for a more professional development setup using Composer, VirtualBox (or similar), GIT, Vagrant, and a good IDE (editor) are more or least the standards
Regarding to your servers... well as Celauran already told you... Apache 1.x is really old... you will be better having an up-to-date version too.
Now, for a more professional development setup using Composer, VirtualBox (or similar), GIT, Vagrant, and a good IDE (editor) are more or least the standards
-
cecilchampenois
- Forum Commoner
- Posts: 47
- Joined: Thu Nov 06, 2014 10:29 am
- Location: Gilbert, Arizona
- Contact:
Re: Setting up for use of MySQL and PHP
I understand, but the previous developer put paths into the code. You are correct about not needing the paths but i think there was something pointing to images "/claims/". In order to get it to work on Apache 2, we went from a path of "claims/" to "../Claims/".Celauran wrote:/var/www or /var/www/html shouldn't matter at all. You shouldn't have either of those paths anywhere in your code.
Code: Select all
$_SESSION['claim_img'] = '../claims/' . createRandomFilename() . '.pdf';
$_SESSION['doc_img'] = '../claims/' . createRandomFilename() . '.pdf';
$_SESSION['notes_img'] = '../claims/' . createRandomFilename() . '.pdf';
$_SESSION['corr_img'] = '../claims/' . createRandomFilename() . '.pdf';
$_SESSION['claim_xls'] = '../claims/' . createRandomFilename() . '.xls';
$lcImgLinks = '';
// Set up temporary PDF files and hyperlinks
$lcClaimImg = '../claims/' . $_SESSION['audit_no'] . '/' . strtolower($_SESSION['claim_no']) . 'a.pdf';
$lcDocImg = '../claims/' . $_SESSION['audit_no'] . '/' . strtolower($_SESSION['claim_no']) . 'b.pdf';
$lcNotesImg = '../claims/' . $_SESSION['audit_no'] . '/' . strtolower($_SESSION['claim_no']) . 'c.pdf';
$lcCorrImg = '../claims/' . $_SESSION['audit_no'] . '/' . strtolower($_SESSION['claim_no']) . 'd.pdf';
$lcClaimxls = '../claims/' . $_SESSION['audit_no'] . '/' . strtolower($_SESSION['claim_no']) . '.xls';Code: Select all
$_SESSION['claim_img'] = 'claims/' . createRandomFilename() . '.pdf';
$_SESSION['doc_img'] = 'claims/' . createRandomFilename() . '.pdf';
$_SESSION['notes_img'] = 'claims/' . createRandomFilename() . '.pdf';
$_SESSION['corr_img'] = 'claims/' . createRandomFilename() . '.pdf';
$_SESSION['claim_xls'] = 'claims/' . createRandomFilename() . '.xls';
$lcImgLinks = '';
// Set up temporary PDF files and hyperlinks
$lcClaimImg = 'claims/' . $_SESSION['audit_no'] . '/' . strtolower($_SESSION['claim_no']) . 'a.pdf';
$lcDocImg = 'claims/' . $_SESSION['audit_no'] . '/' . strtolower($_SESSION['claim_no']) . 'b.pdf';
$lcNotesImg = 'claims/' . $_SESSION['audit_no'] . '/' . strtolower($_SESSION['claim_no']) . 'c.pdf';
$lcCorrImg = 'claims/' . $_SESSION['audit_no'] . '/' . strtolower($_SESSION['claim_no']) . 'd.pdf';
$lcClaimxls = 'claims/' . $_SESSION['audit_no'] . '/' . strtolower($_SESSION['claim_no']) . '.xls';IS:
/var/www/claims/
SHOULD BE:
/var/www/html/claims
THIS HAS BEEN RESOLVED.
Cecil Champenois