PHPExcel Erroring After Server Upgrade? - php

I'm a little lost here and didn't know where else to go so I thought best place to ask would be here... So, I recently upgraded my site's server from shared to VPS after which I attempted to download an Excel report from my DB like I usually would do regularly. However, since the upgrade after I download it, I get an error when opening the documents; it gives me the option to still open it but it is clearly corrupt or something. I have attempted to debug this issue but I am most definitely struggling with this one. I've also made sure I'm using the most recent version of PHPExcel but sadly this didn't resolve it. The error I'm experiencing is as follows:
The file format and extension of "myReportName.xls" does not match.
If anyone can shed a little light on what might be going on here I'd really appreciate it, and thanks in advance!
UPDATE: I don't think this would affect it, but I thought I'd add I also had a bug with my DB after the upgrade where nothing would insert due to fields not having a default value. They worked fine on the shared server but on the VPS I had to edit all my columns to have a default value of null. Also in case someone asks I didn't think it was necessary to post my code as it was working fine before the server upgrade so I thought the bug wasn't there, but if I'm wrong feel free to let me know.

Related

MediaWiki Main_Page not shown

I've messed up a little bit with my php cms insallation and now I've problems loading the mediawiki Main_Page and I don't exactly know why. The error thrown by the server is a simple 404, so it doesn't explain that much to me. The only thing that could help me find out the solution is that I changed the virtual host configuration a couple of times in the server (Apache 2.4).
I'm guessing the problem is there but I don't have any further clue about how to solve it.
Has anyone experienced something like this?
I've to add that this is not a short URL problem, as i'm not trying to redirect the articles pages to a specific url, so this shouldn't be useful in my case.
From the information you provided, i guess you got some error in your pathing.
Have you tried running it locally via e.g. Mamp ?
Play around with you local_settings especially $wgScriptPath and $wgStylePath.
The error can usually be found in there, and fixed in there. I have been working with MediaWiki the last couple of weeks. If you provide some more info, i might be able to help you some more.

Joomla 3 mysql error SQL Error = 0?

im using joomla3 for my new site , i used 3.2.2 and currently update to 3.2.3. but its always giving me mysql errors form several tables when browsing ste also saving values from backe end
Error displaying the error page: SQL=SHOW FULL COLUMNS FROM sltdb_template_styles: SQL=SHOW FULL COLUMNS FROM sltdb_template_styles
How to overcome this .. please advice ?
It looks like database connectivity
Try to access the database from the application server using the command line. or try to access your database via PHPAdmin
If still no chance:
Here is fix - i got for google
Use Extension manager->Discover and Install, possibly followed by an Extension manager->Database and Fix when needed.
Joomla requires a proper working infrastructure. Something must have failed otherwise the update should have succeeded. The above steps are normal procedure for fixing when something went wrong. An alterative would be to restore and try again.
Also, Joomla allows you to break down the steps. Using the Extension manager install from directory is the least resourceful way to update. It requires you to download, extract and copy it to the webserver yourself.
Hopefully this will help someone. I had this issue after a server move and it turned out that it was due to a module (wp_posts) that had old db credentials in it, i corrected the credentials which fixed the issue.
Unrelated but one other thing to check if you have this type of issue is can you update things in admin, I had a secondary issues with was that APC cache was not enabled on the new webserver, i discovered that by trying to update things in admin and viewing errors.
The error 0 message is very unhelpful, it seems this could be module specific though rather than joomla itself but it seems quite poor that a module can block the entire site form working, some error trapping needed me thinks!
Cannot comment, yet ... (as a comment to logicc's answer)
Well, the "Error: 0" is indeed not very helpful, but with debugging turned on, you at least get a good idea of where the problem might be coming from:
24 JDatabaseDriver->loadObjectList() /.../modules/mod_wpposts/helper.php:91
25 JDatabaseDriverMysql->connect() /.../libraries/joomla/database/driver.php:1312
About the module blocking the entire page - that might make sense in some cases (a module so important that you would rather have the page not render, at all, than in part?), but it certainly seems like a bad default. For now, I think modules should take care of that themselves with some try-catch-ing.

php mysql: Duplicate entry on production but not on dev

Oke, i've been busting my head on this one.
I'm gonna try and keep things short, however, if you need more info, don't hesitate to ask.
I've written an import repo for an external firm, so we can import their data into our service.
quick overview of implemented logic?
ftp, grab xml file, parse it with simple_xml and do db stuff using laravel eloquent component.
on my dev machine,
every run gets parsed fully and all data is inserted correctly into the database.
problem
when i try the same thing on my production server.
I'm receiving a duplicate entry error, always on the same exact record. (unless i'm using another file)
pre script setup to help detect the error
on each run i do the following:
make sure i'm using the exact same files on both dev and prod
environment... (i've disabled the ftpgrab and uploaded manually to
the correct location)
truncate all the related tables so i'm always
starting with empty! tables.
i've manually triple-zillion checked for duplicates in the xml, but they're not in there.... and the fact that
my dev machine parses the file correctly confirms this.
what i tried
at this point, i've got no more clues as to how i'm supposed to debug this properly.
by now, i've checked so many things (most of them i can't even remember), all of which seemed pretty unrelated to me, but i had to try them.
those things include:
automatic disconnects due to browser
mysql wait timeouts
php script timeouts
memory settings
none of them seem to help (which was exactly what i was expecting)
another fact
my php version on my dev is 5.4.4 and the version on the production server is 5.3.2 (i know this is bad practise, but i'm not using any new features, it's really dead easy code, though it has quite a few lines :-) )
i've been suspecting this to be the cause, but
i've now switched to 5.3.14 on my dev... still the import runs without an issue
the changes from 5.3.2 to 5.3.14 are probably pretty minor
i've tried to manually compile the exact same php version, but i'm to inexperienced to properly do this. moreover, it probably wouldn't have the exact same specs anyway (i think it's pretty impossibly to ./configure exactly the same, considering the use of MacOs vs Ubuntu? especially for a noob like me)
So i've abandoned this path.
I've tried to find the differences in the php versions, but i can't seem to stumble upon anything that might be the cause to all this.
there was a change related to non-numeric keys in arrays (or strings for that matter) in version 5.4.4 (i think) but since i've now come to the conclusion that 5.3.14 also works, this definitely is not the issue. --- looking around insecurely hoping not having said anything downright stupid ---
quick thought while writing this:
the thing is, even though i'm getting the duplicate error statement.
The record did get inserted into the database.
moreover, the error gets triggered when having processed about 2700 (of total 6000) records.
the bound data to the query is actually the data of the second record in the xml file.)
I'm sincerely hoping anyone could put me on the right track for this issue :(
If you made it this far, but don't have a clue about what's going on, thx for reading and sticking to it.
If you might have clue, please enlighten me!

Eclipse PDT content assist for PHP just stopps working randomly

My problem is, that my Eclipse PDT randomly looses PHP content assist. It happened about a dozen times now and I can't figure out, what causes this. It used to happen about once in two weeks. I install a plugin or just close Eclipse and sometimes, when I start it up next time, it looses basic PHP assit, like "in_array()". But all project specific assistance works fine though.
I went through a lot of tips, checking my window > prefs > php content assist, checking if PHP support is added to the project, checking my project's .buildpath, making a clean build, starting Eclipse with -clean option. These things just don't help.
What I used to do (and will do now) is to restore an Eclipse backup, meaning I have to restore my pdt_workspace and my Eclipse install folder both or PHP assist will not work. I've tried restoring parts of these folders or just on of these, but it seems, I have to restore both of them to get content assist back. I went through this a dozen times now, so fortunately I make weekly backups. ;-)
I don't know, what makes these problems happen. Does anyone have some similar problem or any idea about this?
/sorry for bad english/
UPDATE:
I don't know what's going on really, but I got PHP assist working again, two times. First time it started working I've been a lot of install/uninstall and it just came back working. But I've lost it again for no reason. This time, I've uninstalled Yiiclipse and Zen Coding plugin and PHP assist started working. But I reinstalled them and PHP assist is still working! WTF?!
I can't see any logic in this....
I managed to solve my problem. After a lot of testing I ended up removing Zen Coding and Yiiclipse both and doing a clean + build on all projects. This seem to solve my problems and give back PHP code assist.
The downside is, I don't have Yiiclipse and Zen Coding now....
Well, after much grief with this I opened up Eclipse, and right click the project, go to Add PHP support... and voilá. That did the trick.
I experienced this issue due to Upgrade from Helios -> Luna & Content Assist, Key references, variables etc. suddenly stopped working. This was due to incompatible db structure in h2 database from older one.
To resolve this, just remove the data or files from :
<your workspace directory>/.metadata/.plugins/org.eclipse.dltk.core.index.sql.h2

Page does not change after file update/upload

I really need help on this one.
I am working on a site and made some changes on some lines, but after I uploaded it there were no changes happening. I have cleared my cache, even did ccleaner and a restart. Open the file again via ftp and the code is there but when I go to the site nothing has changed. I have also tried different browsers.
Sorry for bad English, but I really needed your help.
edit 1: i have tried deleting the file and i get 404 page. But when i uploaded it again, with the changed code, it display no changes at all again.
edit 2: i really think it's on the server side problem and any idea about it would be helpful, not some file being misplaced or something. i know i am working with the same file and put it on the right folder.
EDIT 3: SOLVED, the technical personnel said that the server is running eaccelerator and mtime was disabled and was causing the problem.
Correlate to a localhost (xampp or similar), i.e. if you don't see the same issue than you know it must be a transfer issue. Divide and Conquer in this manner to troubleshoot.

Categories