Apologies if this is being posted in the wrong section. But, amongst other things it covers both php and MySql, so i would of had to duplicate the post in either of those forums. they are usually combined in most places as they are closely entwined with each other.
I'm not placing blame on WHUK, indeed, i'll soon be scribbling a very favourable review of my dealings and experiences as a newcomer to their services and products.
I've transferred my site from Lycos's servers to WHUK Windows hosting package. Aspects such as the transfer of the email went instantly without a hitch.
However, i am aware of several glitches that i am going to have to laboriously address page by page on my site. Unfortunately, some of them i can't remedy until i figure out what the problem is. I would be grateful if anyone can give some pointers as to where problems are likely to lie.
I'll give 4 examples.
(1.)
I'm mystified as to why certain things are happening. One example where i have to wade through my site script by script making a single alteration is as follows. On each page i have a small script from an external company that provides an excellent free stats service. The script worked perfectly for years on the lycos servers. A couple of lines read similar to;
HTML Code:
<!-- ENDADDFREESTATS.COM NORMAL CODE V3 -->
however, when the page fails to display correctly (or at all) and i go to check the coding of the page that has been uploaded to the WHUK server it reads
HTML Code:
<!-- ENDADDFREESTATS.COM NORMAL CODE V3 -->
Spot the difference? ok, there is an extra white space inserted at towards the end of the comment. Some of the pages have up to three lines altered in this way.
Once i've corrected them and reloaded them to the WHUK server the page renders perfectly. No matter how many times i altered a web page on Lycos i never had this white space added.
Additionally, i notice that within some pages, other types of code that needs to be written in one line is either split up or has an added white space into it causing it not to function.
Is this likely because of a difference in the type of server??? or could it be to do with the FTP interface i use. Maybe the fact that 'Notepad' (which i use to hold and edit the text) is like most other Windows applications in that it opens up full window or any range of sized window totally dependent on how it was last used.
By that i mean, if i typed a script in containing code that has to be precisely spaced out and i did that in a full window, however, when i go to edit it another time it opens up in a far smaller sized window would this affect the exact spacing of the original?. Only thing is, i'm pretty sure in the past i've had Lycos editing windows opening up in all sizes without detriment.
(2.)
My main index page has a live time and date facility that, i think is php based and/or contained in an 'i frame'. Most of the other pages (a lot of them in number to recode lol) uses a most basic SSI snippet of
HTML Code:
Today's Date Is <!--#echo var="DATE_GMT" -->~~~If this is not today's date, refresh page for updated version.
Again a very basic thing that has always worked. Unfortunately, on every single page now it is hosted with WHUK it displays only the following on the actual viewable web page
HTML Code:
Today's Date Is~~~If this is not today's date, refresh page for updated version.
I have checked to see that Server Side Includes is supported in my package and it is. What on earth can be the problem here?
(3.)
Wow! toil to come regarding the transferring of countless PHP MySql database scripts. If only for the connection code to be altered. However, i dabbled with altering one page to connect it to one of my WHUK tables. As far as i am aware it is the same php and MySql version as Lycos used.
I use a form on a web page to search a database. The first part of the scripting is very basic
PHP Code:
<?php
$conn=@mysql_connect("localhost", "usename", "password") or die("could not connect");
$rs=@mysql_select_db("database_name", $conn) or die("could not connect to database");
$sql=stripslashes ("select * from table where $x like '%$y%' order by $z");
$rs=mysql_query($sql, $conn) or die("could not execute query because ".mysql_error());
it goes on to output a formatted list
However i receive the following error message;
HTML Code:
'could not execute query because You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'like '%%' order by' at line 1'
Can anyone possibly tell just from that info if it means i must recode every single line because of different versions of php MySql or not at all?.
(4.)
This last concern i'm just loosely mentioning as the prospect of getting my head around it or having to recode hundreds of more lines horrifies me lol.
I had a quick glance at the DB interface within Plesk where you can run inquires away from a web page form input. As with Lycos upon returning a result of a search it displays the query with the result.
GULP! never ever have i witnessed such lengthy gobbledegook lol. What on earth were the references to Latin and other things i saw. I haven't got the time right now to go back and generate and paste it, but presumably users on here know what i am referring to.
The Lycos output and every other example i've seen in text books and in web tutorials never mentions half the syntax that was thrown in. My fear is that i have to add loads of words to every single database query embedded in my php scripts.
If anyone knows what i refer to, can you plese let me know if it is just an anomaly of the Plesk interface and one does not have to actually add such baggage to a query?.
Many sincere thanks to any assistance on the above questions.