Development server using Spreadsheet_Excel_Writer not working? - php

I'm running the latest PHP and pear on a windows machine with apache
2.4 (XAMPP), I have installed the latest versions of OLE, PEAR and
Spreadsheet_Excel_Writer. PEAR is installed and working.
However now instead of generating a download for the excel file on a
specific page (generateexcel.php) and redirecting to the previous page, the
page (generateexcel.php) is actually displayed (in the url with specific paramenters according to the date selected), it is blank. In the hosted
version it works perfectly and is on a linux based server with apache 2.0 with PHP 5.3.18.
So basically on my development version it is not working, it is
connecting to database and everything else on the site is working.
Is this a problem with the include_once and require_once for the
Writer.php and the relative paths being incorrect because of being on
windows.
Any assistance will be appreciated. Even if I could get some kind of error reporting it would be very useful. I will try: PEAR::isError() in the meantime.

Make sure the version of Spreadsheet_Excel_Writer and OLE are consistent with the code.
ie. Uninstall and use previous versions, the same versions used on the server or when initial coding went down.

Related

cannot run the localhost with upgraded php version and mysql version

My localhost was running on wampserver 2.0 ( with php5.3.0 , mysql5.1.16 , Apache 2.2.11). I needed to upgrade php and mysql, so i downloaded php 5.6.16. and extracted in to directory "wamp/bin/php/php5.6.16" with 3 mandatory files ( php configuration file, phpForApache configuration file and wampserver.conf file) from existing php5.3.0 folder.
Then I got a mysql from my friend's (mysql5.6.12 64bit) wamp directory. didn't do any configurartion. I put it into my wamp/bin/mysql. then i exited from wamp and restart it again.
Then php and mysql versions look like this.
mysql version is not displayed here. and the existing version name is not selected. with these changes I executed the localhost on browser.
wamp server home page is displayed on the browser.
Then I could see this.
In above image, the updated Mysql version is displayed, but not displayed in wamp tray menu mentioned before.
After I tried to view phpmyadmin page. the page was not loaded.
When I'm trying to select mysql version5.1.36 from wamp tray menu, following error was occurred.
Special: after this error occurred, the wamp go offline and cannot open localhost.
And also when I select php version 5.6.16 from wamp tray menu and start localhost, but it goes for " unable to connect" page.
Then I removed the new mysql 5.6.12 folder from the wamp/bin/mysql directory. then restart services and try again.
Nothing changes happened. when start the localhost I could see mysql version again as before.(MySQL Version :
5.6.12 ). But I already removed it from the directory.
I explained everything that i faced.
I need to know what is going on here and how to fix these problems. and How do I install php and mysql versions in this wampserver 2.0.
A working WAMP install should come with included MySQL and PHP versions. That's the whole point of using a package such as WAMP instead of installing your own; you get a whole working stack with one installation instead of having to install each application individually and then configure them manually to work together. Therefore, I have no idea why you would want to copy a friend's MySQL application to your computer. Aside from the fact that you probably didn't copy all the system files (DLLs, library files, etc), you're probably introducing conflicts with the library files that PHP and WAMP use to access MySQL since it's expecting a particular version and now you're providing a different version.
Frankly, at this point it sounds like things are messed up enough that probably the only proper solution is to remove what you have and reinstall the WAMP package (or each individual component). Make sure you back up any relevant changes you've made (configuration, web files, and databases) first!
First of all take back up of all local website in WWW directory found in wamp folder.. This is a time consuming time as it has to back up and copy all files, so sit aside and be patient.
Now, the only solution for this error is to uninstall wamp from control panel and than get tne new version of wamp according to your needs wither from archive or directly the latest version with your preferred php, mysql and apache versions. Follow this steps for backing up and recovering your old projects.:-
Before uninstalling the crashed server copy the full folder as backup of all previous data. (Example: Take backup of "C:\wamp" folder)
Uninstall the Crashed server and install the new one.
Make sure your new server running and has no error.
If server is running make it Stop and Offline then close it.
Go to C:\wamp\bin\mysql\mysql5.0.45\data\
Its better to take a backup copy of this data folder.
Replace the files and folders with your previous server data.
Add your Previous Projects to the Root folder. (Example: "C:\wamp\www")
Restart the server and check whether your previous tables and data are reflecting in the new server. (Example: Check it Out here http://localhost/phpmyadmin/)
Enjoy with your Old Projects at new server.
Source:- mysql.com
From:- http://infinium-tech.com

Apache service refuse to start on wamp 2.5

This is my issue and it has given me sleepless night.
I have been working on the wamp 2.1 server environment for the past 3 years and now i want to upgrade. I finally installed wamp 2.5 and would be willing to keep my previous wamp 2.1 version. everything looks good, because after installation, i did the following after:
Copied ?:\wamp_old\bin\apache to ?:\wamp\bin
Copied ?:\wamp_old\bin\mysql to ?:\wamp\bin
Copied ?:\wamp_old\bin\php to ?:\wamp\bin
Now, the issue is this:
Whenever i start the wamp server with the latest version, it works and the icon turns green. but whenever i try changing/switching back to the old version, all the services starts except the Apache. the icon stays orange and never turns green. whenever i click test port, it tells me your port 80 is not actually used. when i click on install service, i get this message: your port 80 is available, install will proceed. when i select remove service, it removes immediately. when i click start/resume service, nothing happens and it never starts.
What I want to achieve is this:
Some old joomla site were developed on the former wamp 2.1 and each time i tried accessing them via the new wamp 2.5, i see some deprecated functions and it display some chunks of codes. meanwhile, i have two projects that refuse to run on the old wamp 2.1, so i decided to run the 2.5. Presently, the system has wamp 2.5 running.
For 5 days now, i have been cracking my head and i have been stucked.. someone out there should please help me with a solution to run wamp 2.1 and wamp 2.5 together so i can switch version easily. or a probably solution will be appreciated.
Kind Regards !
You were on the right track copying the old Apache MySQL and PHP folders into the new 2.5 version.
Unfortunately switching to very old versions from the new ones is now a bit more hassle than it used to be because of the changes made in the version of compiler used to compile Apache and PHP.
Your old versions of Apache and PHP were compiled with MSVC6 and the new versions with MSVC11 and the 2 are not compatible i.e. an Apache compiled with VC11 wont run with a PHP compiled with VC6 etc.
So try this :-
Switch from Apache 2.4.9 to your old version, it wont start because the PHP version will still be 5.5.12.
Ignore the problem.
Now switch to an old version of PHP, thats compatible with the old Apache.
With luck it will now work.
Check you have the correct version by looking at phpinfo
If it does not come up re-do the switch to the old apache and then again to the old PHP by just re-clicking the version numbers on the relevant switch menu.
To be honest I don't know if it would be possible to restore everything to work fine. I had once similar problems - I had Wampserver and installed new PHP version for WAMP and switched to new PHP version and eveything stopped to work. I tried to change PHP version to the previous one but I had info it's not compatible with Apache and I couldn't change PHP version because of chosen PHP version.
Now I moved to easyPHP and it's much more easier, you can have many PHP versions, there's no problem with changing them.
Probably in your case the problem was not WAMP itself but PHP versions. That's why when you launched your older code you have many warnings. You should simple select older PHP version to do that or you simple have to turn off warning (maybe for other PHP version you had turned off displaying warnings by default?).
If I were you, I would move to easyPHP, dump your databases (if any) and move everything to easyPHP. Probably you won't make your installation of WAMPserver work so the other option is backup everything, dump your databases and reinstall WAMPserver but you can be almost sure similar problem occurs sooner or later when you will be switching between PHP versions.
After alot of brainstorming, I finally resolved the issue all by myself.
Though it may not look wise, but i believe it could go a long way to help others who are stucked in situations like this.
First, I started the wamp 2.5, changed all the versions to the latest ones, which is Apache, Mysql and Php... when the icon turned green, I decided to stop all services, uninstalled the services one after the other. (Apache and mysql) and exit the application by right clicking.
Secondly, I renamed the wamp which encapsulates the 2.5 version to wamp_2.5old and renamed the 2.1 folder back to wamp. i launched the wamp and installed the services back again..this time, it was a lower version. both php and apache had just one version while my sql had two. I made sure the right version of sql was selected and i installed it. I restarted all the services, the icon turned green and all my old website worked.
I tried the method vice-versa and all my latest projects worked. it might look challenging but thats my own way of discovering running multiple version of wamp.
Lastly, thanks to Özgür Eroğlu and Marcin Nabiałek.. they have been of helped.
Pleas help me flag this as useful for research..
vielen gluck.. good luck guys !

Pages not loading on PHP 5.4.4 w/ APC - Apache 2.4.2

I'm hoping someone can help me with this, as I've kinda hit a wall. Here's the situation:
I'm currently setting up a knowledge base using MediaWiki. I'm using XAMPP to aggregate my tools. The site itself is working fine, and coming along nicely.
I'm now trying to set up a cache to speed things up. I've opted to use PHP APC, as it is recommended for MediaWiki. The troubles started here.
Current versions are:
PHP: 5.4.4
Apache: 2.4.2 (apache2handler)
SQL: 5.5.25a
XAMPP: 1.8.0
MediaWiki 1.19.1
I am currently using Windows, so the first issue I had was finding the correct php_apc.dll file for my PHP. I tried numerous versions unsuccessfully (with log errors stating the .dll cannot be found). I eventually was able to secure a version which seems to work, APC 3.1.14 for PHP 5.4, downloaded from http://dev.freshsite.pl/php-accelerators/apc.html. It is the TS version, as this option is enabled on my PHP.
Now, with this presumably correct version of APC, Apache is now able to start fine. phpinfo() also shows the APC extension as available. The problem is now that no pages on the wiki will load. Precise situation is that:
All pages on the Wiki do not load (IP/mediawiki/*)
Pages on XMAPP itself do seem to load correclt (IP/XAMPP/*).
Other utilities are not able to load either, (e.g. phpMyAdmin).
No error messages seem to be created either in apache logs or php logs. Now, I am by no means an expert on this.
I have confirmed that environment variables in Windows TMP and TEMP both point to the same folder (C:\WINNT\TEMP), on which I gave "everyone" full access rights.
Here is an image showing the phpinfo() for APC that I can see:
http://i.stack.imgur.com/hYHwP.png
Any ideas?
edit: I forgot to mention: there actually are 0kb sized files that seem to be related to APC being created under c:\winnt\temp. For instance, one of them is called ".apc.a02684".
This has come up previously on the MediaWiki Support Desk. MediaWiki apparently doesn't run under Apache 2.4.

Version problem in php

I upgraded my system from Windows xp to windows 7. When i was in win xp i used the wamp server with php version 5.0 now i installed the wamp server with the version 5.3. But now it's making problem. The old projects are not running. Even-though they are created in php version 5. How i can solve this problem?
New versions of WAMP use apache 2.2.x and lovest php version supported for that is 5.2. That beeing said you can downgrade your php version of wamp installation by downloading a php addon http://www.wampserver.com/en/addons_php.php from here. Or you can ultimately downgrade WAMP apache installation from 2.2 to 2.0 http://www.wampserver.com/en/addons_apache.php . If your project don't work with 5.2 or 5.3 you need to debug and update your code with the latest changes in php http://php.net/migration53
There are some (but not many) backward-incompatible changes between PHP 5.0 and 5.3. But they're fairly obscure and not generally going to cause major issues. You can find the full details here: http://uk.php.net/manual/en/migration53.incompatible.php
However my guess is that it's more likely that you've installed the new version missing one or more extensions which your code is relying on.
For example, if you are using the pdo_xx() functions, you would need the PDO extension. Most PHP programs will use functionality from several extensions, and not all of them may be included in the default installation, so you need to ensure you have installed with all the ones you need.
The other possibility is that there's an issue with the installation (either PHP itself or the web server, etc) that is preventing PHP from running at all.
But this is all really a guess, because you haven't actually told us anything about what exactly the problem is. You need to look and see in what way it's failing. If you're not getting error messages in the browser, check the server error logs. This is the quickest way to diagnose the problem. It should give you some good clues (if it doesn't help you understand what's happening, paste the relevant log entries here, because they'll definitely make sense to someone)

Values not showing up during debugging in eclipse PDT

I am trying to debug this simplepie.inc (called from index.php )which is dumping me with error during parsing one of the feed.
After stepping through the line $utf8_data = 'UTF-8'; which I hardcoded in to test things out, the value of the variable remains <Uninitialized> as shown in the screenshot below.
Why is that so?
Variables and values are showing up nicely if I am stepping through the debug in index.php thou.
alt text http://a.imageshack.us/img713/486/14jul10105825pm.jpg
There is an existing bug in the 2.0.x branch of XDebug with PHP 5.3 which prevents local variables from being visible. I would recommend updating/building either the latest version from SVN, or using a recent 2.1.x release, even if in RC/Beta status.
More information available here: http://www.eclipse.org/forums/index.php?t=tree&th=158396
This issue has bugged me for almost a year. Actually we had to set up virtual machines with ubuntu because we did not get xdebug to work on windows.
I just downloaded XAMPP 1.7.7 from www.apachefriends.org and it seams that this bug has been fixed now.
ActiveState provides precompiled versions of Xdebug for most operating systems. Package can be downloaded from this page;
http://code.activestate.com/komodo/remotedebugging/
Look for "PHP Remote Debugging Client" and download for your OS.
If you choose this option, take the xdebug.so from the appropriate PHP version directory and use it.
If you're updating a XAMMP for Mac install, it's in the XAMMP folder.
xamppfiles/lib/php/php-5.3.1/extensions/no-debug-non-zts-20090626/xdebug.so
Snagged from here:
http://kubyshkin.ru/posts/installing-php-xdebug-extension-on-mac-os-x-10-7-lion.html

Categories