Advice on PHP5 + MySQL4
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Advice on PHP5 + MySQL4
Advice on PHP5 + MySQL4
20-08-2008 9:48 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
1 - Convert those pesky mysqli_* function calls into something that will run on PHP4 in my PlusNet webspace
or
2 - Get a PHP5+MySQL4 setup running elsewhere (I have a bunch of PCs running XP, 2K, though no Servers, even a Vista Ultimate VMware virtual machine). I don't really want to spend any more cash on service providers...
Thanks for any suggestions,
David
Re: Advice on PHP5 + MySQL4
20-08-2008 10:27 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator

http://community.plus.net/forum/index.php/topic,67441.0.html
To argue with someone who has renounced the use of reason is like administering medicine to the dead - Thomas Paine
Re: Advice on PHP5 + MySQL4
20-08-2008 10:57 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
There are plenty of free host that offer the service if you want to try it on the web
Re: Advice on PHP5 + MySQL4
20-08-2008 11:06 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
This installs the Apache webserver, MySQL and PHP5 on your pc. You can then try your web site and php scripts on your own pc which saves uploading them to your webspace to try them. It also has the option to switch to PHP 4 if you want.
Re: Advice on PHP5 + MySQL4
21-08-2008 11:11 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I had thought about using a mysqli_* to mysql_* shim, but haven't found any of those yet. This approach would require continuous maintenance as I work through the sample code in the book, of course. On the other hand, looking through the notes on the mysql web site, it seems that the mysqli interface isn't included in PHP5 but is an optional extra, so a site offering PHP5 might not support it anyway.
I'm inclined to go for an option that doesn't require much setting up or running on my part. I find the thought of IIS a bit scary! Doesn't that require a Server machine?
Thanks again,
David
Re: Advice on PHP5 + MySQL4
21-08-2008 12:49 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
It does not use IIS, it uses Apache. It installs as a local server on your existing XP pc, no extra hardware or software is needed and no internet connection is needed if you only want to try the web pages and php scripts locally. If you want to access it from the internet or let other people access it then it can be set up as a webserver if you allow the correct port forwarding in your firewall, but it also needs more configuring to make it secure which is more complicated. As your original post seemed to imply that you only needed a way of testing your php scripts installing it for local use is a very quick and free way of achieving your aim.
Re: Advice on PHP5 + MySQL4
21-08-2008 1:27 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
David
Re: Advice on PHP5 + MySQL4
22-08-2008 1:25 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
XXAMP will do the job for most peoples needs,
But there is no harm in trying a manual Setup of Apache/IIS w/ PHP + Modules and MySQL.
Else, you'll become detached from the Setup Process to know what is good and bad Security Practice in the long run.
All the PHP Modules are Optional Extra DLL / SO Modules which extend the PHP Core.
The difference between MySQL and MySQLi is practially neglegable in everything I've needed to do with MySQL.
Learning to code for Compatability (aka: old hat) will widen your skills anyway.
MySQLi is just Class Oriented [and Uglier] version of the original MySQL Functions if you ask me.
I would peronsally only use MySQLi, if you really have a reason for utilising the Class Structures for new functionality.
As there is no new functionality of use, I see no reason (Personally) moving to Bloated Classes,
when you can utilise a perfectly good and working older set of Functions that do practially everything the same.
@IanQ:
Apache doesn't require Registry Entries anyway if you don;t use the installer,
it has configuration Files for most things it needs.
All paths can be done relative to the Location of Apache to allow PHP to Function anyway.
PHP just needs the configuration INI to be configured, Necessary Extensions
and any Binaries which you may require for Command Line usage...
As for MySQL, it's again just a case of modifying Configuration Files to work with the setup.
The way you worded your last post,
almost makes it sound as if IIS doesn't allow you to execute pages Locally.
(I know you don't mean it that way :))
But, as it happens that is practially true anyway,
it's 1000x slower than Apache,
even IIS is slow with it's more native ASP Language as well...
Just my 50 pence...
Jim,
Re: Advice on PHP5 + MySQL4
22-08-2008 1:03 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I don't have much experience with Apache, IIS, PHP or MySQL.
I just needed a quick way of testing websites locally and after searching for information on how to achieve it I tried using Apache and IIS.
IIS seemed very involved to get working, ran very slow and as it is Microsoft it probably has all sorts of issues, compatibility problems and security holes etc.

Apache was a nightmare to configure, probably just my lack of knowledge.

Then I found Xampp which had everything in one package ready to go and was simple to install and configure.
Xampp does warn you about security issues but as I was only using it locally it is not a problem for me. So far it does what I need without having to spend ages reading help files to configure it all. I am sure that there are disadvantages to it if used differently but it saved me a lot of time and effort.
Ian
Re: Advice on PHP5 + MySQL4
24-08-2008 5:01 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Thanks for the suggestions.
David
Re: Advice on PHP5 + MySQL4
26-08-2008 6:45 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Glad to hear that you found Xampp useful.
2 things that caught me out and that you may find helpful.
If you are using a rewrite rule in the.htacess file you need to modify the Apache\conf\httpd.conf file to load the rewrite module as by default it is commented out. If you have been used to using a hosted service this may not occur to you and the rewrite rule then does not work! It took me a while to realise why.

This also applies if you need to use any other modules that are not loaded by default. The ini file is fully commented to explain the settings.
Also if you follow the Xampp security tips and assign a password to the MySQL database you need to use the Xampp Control Panel, MySQL, Admin button to call up WinMySQLAdmin and then edit the ini and add your password.
Ian
Re: Advice on PHP5 + MySQL4
29-08-2008 6:20 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote If you are using a rewrite rule in the.htacess file you need to modify the Apache\conf\httpd.conf file to load the rewrite module as by default it is commented out.
Sorry, that's (almost) complete gobblydegook to me (at present). Hopefully it will mean something in the future!
Quote This also applies if you need to use any other modules that are not loaded by default.
That was the case with the mcrypt DLLs. I had a warning that mcrypt was not loading. I'm not using it yet, but with a bit of help from your message, I found (the correct version of) php.ini and made the necessary corrections.
I had to sort out some interference as that PC had FrontPage installed on it, so there were programs (services) using most of the ports (e.g. 21, 80) that XAMPP needed. I'm not using FrontPage, so I've sorted them out by changing those services from auto- to manual-start. I was able to get mail sending working, so one of the test programs, which sends e-mails to an HTML+PHP-maintained mailing list, actually works! That is a whole lot safer to have locally inside my firewall than outside, where a spammer might find it...
Thanks for the helpful suggestions.
David
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Advice on PHP5 + MySQL4