Typo3 local installation on webserver - php

My local installation of a Typo3 Page worked perfectly fine on a Xampp Server but when I tried moving it to my webserver I get the error
The Fluid template files [Path to my layout.html] could not be loaded.
More information regarding this error might be available online.
I transferred the files from Htdocs with FTP and the database with phpmyadmin import/export.
What could cause this error?

In this generality there are multiple reasons possible:
Can the apache user access the files? (the FTP user mostly is different than the apache user and the correct file- und folder-permissions can be lost easily)
Have you the same filenames and pathes?
don't use the windows folder separator \ on unix-servers.
is your local file systems case insensitive? Linux is case sensitive and /test/is another folder than /Test/.

Did you set your correct domain record on the pagge tree root?
If not please set the domain record to the actual url you try to reach the page.

Related

How to configure local PHP to show directory content

I have a local version of Windows php to test my webpage. I run it using php.exe. It has a built-in webserver so pages can be accessed from a browser through localhost:/path.
If I enter an URL pointing to a file it opens that file in browser. I would like to configure it so that it shows the content of a directory if URL points to a directory. E.g. after inserting URL http://localhost:1234/foo/bar/ into the browser I would want to see the files in the bar directory listed in the browser. Similarly how other webservers do it when configured so.
My local PHP returns 404 instead.
Is there any way how to achieve that for this built-in webserver in php.exe? How?
The built-in server is specifically for quick development and debugging as stated in the command line server doc and directory listing is one of the features is lacks. This answer provides an example for building yours though.

Wordpress version issue

I have a Wordpress 4.5.4 website I downloaded from a remote server to my local development server installing both, the files and the database.
On the remote server is working "apparently OK" but on my local server is doing something strange because on lot of files is doing the following appending:
http://<domain>.com/wp-content/themes/mytemplate/style.css?ver=1.8.4
Notice the version at the end: 1.8.4 while the current version is: 4.5.4
(this situation happens with lot of files)
Then I checked on the server and for these files the version at the end is the right one: 4.5.4
Then on both, on the remote server and on the local development server I read the global variable: $wp_version and on both cases I got the right version: 4.5.4, so I don't know why the 1.8.4 at the end as default version for those files on my local development server?
On my local development server the website looks really different than on the remote server and the files I download as well as the database is the right one, because on the root of the remote directory I put a dummy file and I can read it via the browser using the url. Also, I tried changing the database password on the wp-config.php file on the server and I got database connection error, so the files I downloaded and the database are the right ones.
Any idea on how to solve this?
EDIT 1
Remote server: CentOS release 6.8 / PHP v5.3.24 / MySql v14.14
Local Dev server: Windows 7 / Wamp64 / PHP v7.0.0 / MySql v14.14
EDIT 2
On the local development server I modified the .htaccess file and the Windows' hosts file to use the same domain and avoid the necessity of these kind of changes (and be totally transparent for browsers). I do this with tons of websites, so for me is a normal procedure. Then my problem is not a localhost/domain.com conflict.
The version add in a wp_enqueue_script() or wp_enqueue_style() is an optional value, and is related to the script version.
This value could be add the developper for caching purpose but it is not always corresponding to the WordPress version. The example you show is only relative to the theme and it's certainly hardcoded by the developper (this could be great to show us the wp_enqueue_style() ).
If version is set to false, a version number is automatically added equal to current installed WordPress version. But, some script can check and enqueue different file (I think about for minify css that will not load when you are enqueuing file locally).
In case, verify that both server show the same
get_bloginfo('version');
If not, change your local value with phpmyAdmin.
Hope it gives you some hints.
You need to manually update the siteurl and home options in the _options table and replace your domain with something like http://localhost, and remember to add the port number if you are running it at a different port than the usual 80

CodeIgniter was insensitive about case, and now it is?

So basically, I ran XAMPP on my Mac and I built a pretty huge CI website. It worked perfectly.
I then when to make a DigitalOcean account, installed Ubuntu+Lamp, put my database there, and then uploaded my website.
On the very first page, I get this error:
Unable to load the requested file: Login_view.php
I checked, and indeed there was no file called Login_view.php WITH AN UPPERCASE L. But there was a file called login_view.php, that on my XAMPP server it was able to load perfectly well.
I guess this has to do with case sensitivity, and since it's 1:1 the exact same CI project I have on my localhost, I guess it's something to do with the configuration of the server.
How can I configure my Ubuntu server, or the Apache, to be case insensitive with CI?
You can use Apache mod_speling with the CheckCaseOnly directive.

wordpress downloading php file instead of viewing the webpage

I installed wordpress on my local machine (backtrack) for experimenting. After I got everything setup I moved it to an Ubuntu Server so that everybody can access those pages at work. I followed the same instructions, I moved the wordpress folder into /var/www but I created a new database with the same username, password and hostname.
The problem is whenever I access the webpage #ubuntu it tries to download the file, if access the page #backtrack it goes to the dashboard and everything is fine.
I did not have an .htaccess file on either machine sop I created one just to see if it will fix the problem but it did not.
Apache works fine because I can get to some folders I have setup by going to
"http://ubuntuserver/folder name"
and the logs shows no errors because it is delivering the webpage to the client just fine but the client is downloading it instead.
Any Ideas why this is happening??
Sounds like you haven't installed the PHP module for Apache or enabled it to use PHP using AddType in the Apache config file.
It seems that your WebServer ( Apache here, i suppose ) is not configured to use PHP module and/or is missing some PHP configuration options.
See here for some basic configuration tutorial.

How to make sure php has write permissions on wp dedicated server

I have been struggling with this for some time. I moved my wordpress site over from a PRQ domain to a dedicated server. The script is used for picture uploads. I didn't like the folder structure of wordpress by date and instead have a file structure in uploads that places the picture in a subfolder with the post id as the name. This worked just fine on the PRQ domain, but now fails to work on the new server. I am not super knowledgeable about being a server admin, but here is what i have tried.
chown-ing the uploads to the username:apache, apache:apache, nobody:apache, nobody:nobody. I also tried all these combinations up to wp-content and the public_html. all recursively of course.
chmod-ing all the folders to 777, 775, 755, 766.
safe-mode is not running
tried using mkdir and wp_mkdir_p actions.
Restarts on apache throughout just to make sure changes were saved and made.
None of this has any affect.
I have seen a few places that people have suggested getting ahold of the server host to give php writing capabilites. Would I have to do this even though it is a dedicated server that I installed everything on? If not, is there a config or setting I am missing. I see no reason why I can't make a new directory.
WP 3.5.1
php 5.3.3
Apache/2.2.15 (CentOS)
linux os
Check your server logs, you will find your answers there. Blindly trying things doesn't get you out of trouble. Their location should be /var/log/httpd/ .
Also, i do suspect that permissions is not an issue, but the way your php code acts, maybe you upgraded from php 5.2.x and there's something not working properly in php 5.3.x. Also, turn on wp error reporting from your wp-config.php file(see WP_DEBUG i think is called)

Categories