Php Version Differences? Or Not? - between the trap and XAMPP???
jlhaslip
Feb 20 2006, 01:27 AM
The Trap uses php version 4.4.1 and I have downloaded and installed the XAMPP php Local Server configuration which includes php version 5.1.1 and mysql and perl etc, but this question relates to the php because that is where I am currently having difficulties.
Both places have the same identical files, code and data. Both are folders in the root directory. I have used phpinfo function to confirm the server root is what it should be (public_html and htdocs) on each of them. It isn't doing the 'explode' on the data. Is there any difference between the new line seperators? That is what I use to 'explode' the file data.
It seems that there are some pretty major differences beteen the versions. Does anyone know where I can start to figure this out?
There aren't that many differences between PHP4 and PHP5. Mostly, PHP5 just has new functions and features added, as well as bug fixes and enhancements to the language; to my knowledge, the fundamental usage of any existing functions has not been changed (in order to keep it backward-compatible). It would be quite dangerous for them to do so.
As such, I'm going to suggest that it's either a problem with the script or the data being used. About 99.9% of scripts created for PHP4 should work on PHP5. I've only very quickly looked over the script, but there does seem to be a few enhancements that could be made.
Spectre, Thanks for the reply. I got it working, but does this make sense to you? Seems that the local version needs "\r" as the new-line seperator and Trap17 needs "\n". (Windows98se) So first I found that problem and then there must have been something dropped in the download, because after re-downloading and making that small fix as noted , the logic worked? (the file opens were giving warnings and failing, so the read and close were also issuing warnings) I have no confirmation that the download was bad because (Oops!) I overwrote the first copy. And, yes, there are some enhancments to make in that script (like error checking) and tuning. As I learn some more php functions, I'll get them looked after. A spare time project and a learning / practise script.
Windows uses \r\n (CRLF) as the new-line delimiter, and UNIX-like systems just use \n (I think Mac uses just \r, but I don't know).
As a quick fix, trying replacing:
CODE
$fp = fopen($folder_file,'r'); // open flat file for reading if (!$fp) {print 'ERROR: Unable to open file'; echo '<br />';echo $folder_file;echo '<br />';exit;}// error if no handle found for flat file $line= fread($fp,1024); // increase this length if required $f_array=explode("\n",$line);
I've never had any trouble at all with using newlines (\n) using XAMPP, or any other method of using PHP on Windows. PHP just needs the \n even on Mac, which does use \r. You may have some sort of configuration set that requires that, but I'm not for sure. That's all that I would be able to tell you, so sorry I'm not that much help.
That should work for all cases: Unix, Windows and Mac.
Hamtaro: I have the Default version of XAMPP. I haven't altered the config or settings at all.
Just to clear this matterup, I might have an explanation for the variance. I have two computers. One Windows and one Mac. I may have created one data file with the Mac. Not certain, but possible. At any rate, both versions work on the appropriate machines. I'll have to remember to only make the data files with one or the other machines from now on.
I am trying to work out how to get subdomains working in xampp. I have tried all of the tutorials
on the net but I still cant work it out. Any Ideas? Thanks Rob....
I need a script that compares 2 variables, and looks for a difference between them. It will then
highlight the words that are different, as shown in the image below: So in the left cell, the
yellow text is the text that has been removed OR replaced. In the right cell, the green text is the
text that has replaced some text in the left cell, OR new text. This script will be used to
compare 2 versions of a document stored in the database, to see the difference between each change
(all revisions are stored in the database). I know that it's possible with PHP, beca....
here is a very old version of my wap chat script, its not very advanced but has privates, smileys
etc. I will post some further versions (with owner, admin, mod status and profiles) when i have time
to write the readme/install instructions for them. You will find instructions inside the zip. If you
have any problems post here but i know it don't work on all servers for some reason but it does
work on the trap server so will be cool ok /tongue.gif" style="vertical-align:middle" emoid=":P"
border="0" alt="tongue.gif" /> ....
On my Trap17 account here, I have an .htaccess file with the following declaration which (I think)
forces all html files to be parsed by the PHP Parsing engine and therefore I can insert snippets of
php scripts into html files. CODE AddType application/x-httpd-php .html .htm However, when I
add an .htaccess file to the local directory of the version of XAMPP on my local machine, it fails.
I have tried to add the .htaccess file to the htdocs folder and elsewhere, but it still doesn't
work to parse html through the php parser. Any ideas on how to get these htm....
Hello all, I have finaly released my first final version of the Nexus site engine that I have been
developing. This version is open to the public and I encourage that you try it out and give me some
feedback. You may download the script HERE . *NOTE: I have written permmission from
snscripts.com and from myphp.ws to use there selected software as a stand-alone in my software for
re-distribution. Anyway you can check out the MadPHP forums at:
http://madphp.geohosting.info/forums for more updates and information about the engine and any
other of my scripts and p....
Beta and Alpha versions of phpBB, available for download! Go to http://area51.phpbb.com
Enjoy! Tell Admin about this. /tongue.gif' border='0' style='vertical-align:middle'
alt='tongue.gif' /> /biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /> ....
Looking for php, version, differences, trap, xampp
Searching Video's for php, version, differences, trap, xampp
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE
forum, Create your own topics, Ask Questions, track topics, setup
subscriptions & notifications and Get a Free Website w/ Email and FTP.