i transferred a website over to a new server. as far as i can tell, everything came with it. databases, SSL, everything. It was a cpanel package script:
/scripts/pkgacct fileserv
its Sugar CRM. it still works on the old server, but when i try to use it on the new server, it just downloads index.php
and leaves me at a blank screen. any ideas? i was thinking possibly a PHP or Apache module or something, but I've never set up sugar CRM myself, and in setup guides, i couldn't find any special modules or anything that I need.
this is a problem i've dealt with before, but all the typical fixes aren't working. there are other websites running, so PHP and apache are working just fine. I edited .htaccess and everything too. but any suggestions at all would be very helpful. assume i've done absolutely nothing so far, just in case I missed something obvious.
Yeah it's probably apache, either A) the new server does not have PHP installed and apache does not have the module installed either or B) apache does not have the module installed to execute php scripts.
I think the comment under your question is heading in the right direction:
PHP code is not being executed, instead code shows on the page
Related
I experienced strange behaviour of wordpress. Whenever I want to publish a post or page it says "Missed schedule". But I have no intention to schedule. I want to publish something directly.
Some times later (I assume when wp-cron runs) the pages gets published. But this bahaviour is immense problem for me developing the page, as the customizer crashes and is not able to update changes. Usually a "immediately" published post should be published, well, immediately. Never had this issue before on other systems. I do not need the scheduling function at all, but now I am forced to schedule anything?
Setup:
CentOS 7, PHP 7.4, Apache 2.4, MySQL (Fresh Setup of the LAMP Server) Als tried PHP 7.3/MariaDB.
Installation of latest wordpress 5.5.1 without any issues (but also tests with older versions caused the problem)
Check of Servertime vs. Wordpress timezone - everything fine here
Standard Theme adter installation, no plugins active!
Checked the rights for apache user, everything fine (755/644)
Checked the "run wp cron" plugins, but thats not solving the issue.
I assume there is some problem with wp-cron or the db but most probably my server setup is missing some dependency/configuration? (But I tried different Tutorials for installation, so must be something very basic...)
Somehow it seems like nobody every experienced this issue, as I googled for hours... Hopefully sombody with more backend experience can explain whats happening here and how to fix it.
Here is a picutre of how the workflow looks like
If you are publishing without schedule Wordpress will publish it unless something prevents it from happening.
There is a known issue where if you use localhost server may have issues with Gutenberg so for test purpose try https://wordpress.org/plugins/classic-editor/ and see if its fixing it for you. If it does its probably a problem with your server settings preventing the rest api to work or issue with wp-cron.php.
Same problem here with all installations of WP in a VPS.
No useful info on google.
Somebody has find a workarround: change Centos+plesk to Ubuntu+Plesk. This seems to work fine.
I have finally found a solution to the problem. Changing the system is not a useful option for me.
In this forum they explain the problem: here
And it brings us an explanation in the plesk forums: here
It is basically a problem in CentOS7, the UTC file is not valid and this causes problems in publishing changes in WordPress.
The problem is solved by replacing that file "/usr/share/zoneinfo/UTC" with a correct copy (I have taken it from another server with CentOS6).
And everything works correctly.
You don't even need to reboot.
I need some help with my course material created for moodle. The problem is that after I upgraded the 2.2.11 moodle version to version 2.8.3 , the course main index.php file it's not interpreted anymore and it shows the source of that index.php file. Also with the upgrading process I switched to a new php 5.6.3 version(The new moodle it works only with 5.4 or higher versions, and I think this is the problem, because with the 5.3 php version it worked everything fine) upgrade.The error is :that when I try to acces the course, instead of the course material place it appears the index.php source code.
If your PHP code is not executing and instead is loading as plaintext, then I'm 80% sure this is a problem with PHP rather than Moodle itself.
First thing you need to do is check that PHP is installed and running.
You can do this by running this code:
<? phpinfo(); ?>
If you get a return, then it's working, if not, then revisit your cPanel and have a gander at your settings.
Check that your Apache server is running PHP by checking your httpd.conf file.
And I know it sounds daft, but also check your index.php file's syntax. (Especially if PHP turns out to be running fine) because that would generally mean that you have a syntax error. If it boils down to this, check that all your statements, otherwise the server will just assume it's plaintext. Easiest way to do this is using NotePad++. Click on any
Tldr: This is probably PHP not running correctly. Nothing to do with Moodle I imagine. But I could be wrong.
I'm trying to update a site that's using php. I built the site and tested it on this machine. But today, the Php won't run on my local machine.
To test, I went back to the most basic php page I have:
<?php
phpinfo();
?>
When I navigate to this file, in Firefox (28), the result is a blank page. (The page source shows just my code.) In IE 11, I'm asking whether I want to open or save the file.
Searching for my original problem (which was that my php code was showing up rather than running), it was suggested that php wasn't installed. I don't know how it would have gotten uninstalled, but I went ahead and installed it again (from http://www.microsoft.com/web/platform/phponwindows.aspx) and still no joy.
Windows 7 SP1
Updates in response to suggestions:
Pardon the beginning stuff, but I'm not primarily a web developer. (I do databases.) This is stuff I'm doing for an organization I'm involved in. I don't actually remember having installed/configured a web server in the first place, nor do I remember having installed php before yesterday (though maybe my son did that for me).
After seeing the replies here, I followed the instructions on this page: http://webmasterjuice.com/how-to-activate-built-in-web-server-windows, but I'm still seeing the same thing.
Update:
I've confirmed that IIS is running and the php was installed. I've followed instructions I found online for getting php working in Windows 7 with IIS. However, it still doesn't make sense to me to have to do this. I'm sure I didn't do any of this when I started working with php. I'm not trying to use my computer as a web server. No interest in working through localhost.
I'm creating the file in a simple web-oriented editor (Crimson Editor). Until recently, I could use the editor's preview function on a file, whether HTML or PHP, and it would run correctly. I'm baffled as to why this stopped working.
A few things to look for:
It's php running besides been installed? (obvious, but maybe it got killed by some reason)
Have you included the phpinfo() call inside a html document?
Obviously you named the file with a .php extension and saved it within the document root of the server..?
I'm starting a new project using Linux and PHP, but for the early dev state i'm now, I'm trying to use XAMPP for now.
I'm Running Ubuntu 10.04 x64 on a laptop, And got everything I need. The site I should build is based upon CodeIgniter and some implementation of smarty, but I think this is not that important because the same site runs pretty well on windows (with XAMPP )
The Problem I have is, if I put some php file on the root (like foo.php) with phpinfo() on it, the server parsed it as it should be, but when I try to get the url for one CodeIgniter app (as http://localhost/site/site.php ), Firefox tries to download the file & Chrome alerts some server error.
Again, the site as it works perfectly on windows (I share code using mercurial, if that's important)
I have around 3 codeigniter apps sharing the same System folder, and those get pickup by the loader (as site.php, admin.php...), but anyone I pick I still getting the same msg.
Also, the server list all the files perfectly, and tried to rename the file and then asked for the same (to see if the problem is cache or something) but I get a 404.
I'm also a newbie on apache and linux in general, I don't know what to do...
Check your apache.conf and httpd.conf. There are configuration entries called AddHandler which assign a module to each file extension which should handle this. If no module is provided the apache will send the file as plain text to the client.
I am running a PHP site that uses Ajax and jQuery as well. The site will run fine for quite some time, and suddently my pages (and ajax-retrieved sub-pages) comes back with the message
PHP has encountered an Access Violation at 77FCAFF8
It seems that rebooting the server corrects the issue. Running PHP Version 5.1.6 (Windows NT 5.0 build 2195). I did a some searching on here and some other sites, and there seems to be no fix..
URL REMOVED
UPDATE:
I think I'm on to something.. will get back to you.
UPDATE
After reviewing the IIS setup, i noticed there was no Handler Mapping setup for the website. This, of course begs the question - how did it ever work in the first place, when it was originally setup this way!? I added the handler mapping and it seems to be Okay so far.
UPDATE
The problem popped its heads out again this morning after 36 hours without encounering it. Back to the drawing board.
UPDATE
We ended up just moving the site to a secondary web server where we were able to upgrade PHP without an issue.
This is a PHP issue somewhere. You could spend some time narrowing down which function you're using that is causing the problem. I would instead upgrade to a newer version of PHP. If still no luck, try a slightly older version. There have been significant changes with version 5.3.2.
After some research I think this may be the solution (Taken from http://bugs.php.net/bug.php?id=28929 ):
[2010-06-11 15:12 UTC] in2ishun at yahoo dot com
***************** SOLUTION!!!!
I realize this issue is AGES old, but it still manages to be the top hit on Google searches as of now (6/2010).
I fixed my own instance of seeing this error. W2k3, IIS6, PHP 5.2.6, MySQL 5.1.
The problem is in the pathing. When I used the MSI installer for MySQL without doing an "advanced" installation (where I could manage the install details), it added a path to the system environment that contained spaces. Even after changing the path environment to use the Windows short-name location of the mysql bin directory, it still didn't work.
The solution was for me to reinstall mysql and set the default installation path to just off the root (e.g. C:\mysql). Once I did that the error went away and my app started working.
There are a number of sites with a variety of potential solutions to this issue and several of them mentioned paths and the "libmysql.dll" file (in the "bin" directory of your mysql installation).
If this helps you solve your problem, consider leaving a comment here so others can see that it works.