Running php code in html file - php-5.3

I was processing PHP code in html
<h1><?php echo "this is testing" ?></h1>
Adding this line in .htaccess
AddType application/x-httpd-php5 .html .htm
It was working in php version 5.2 but while I upgraded my php version to 5.3.6, it stopped working. Any suggestion on how it will support for php 5.3 or above?

Related

Loading bundled static assets in React Native WebView

I have a React Native project where I'm trying to bundle some pre-generated HTML, JS, and CSS with the application, and have a WebView render the web assets using the react-native-community/react-native-webview library. I can load the index.html file just fine, but it won't load the other assets because it seems to be pointing to the wrong path. I've tried using baseUrl but it doesn't seem to work.
My React Native code looks like this:
<WebView
source={{ uri: './assets/index.html' }}
allowFileAccessFromFileURLs={true}
allowUniversalAccessFromFileURLs={true}
originWhitelist={["*"]}
mixedContentMode='always'
/>
And then as part of the build process, my assets directory has this structure:
ios
|- assets
|- index.html
|- js
|- main.js
|- css
|- main.css
I have this as part of the Copy Bundle Resources step in Xcode, so the assets directory is included with the ios app bundle.
Inside index.html is this code:
<html>
<head>
<link rel="stylesheet" href="/css/main.css">
</head>
<body>
Hello World!
<script type="text/javascript" src="/js/main.js"></script>
</body>
</html>
Going back to the original question, when I run this application, I can see the "Hello world!" so that tells me the HTML is loading, but the CSS and the JS files don't load because as far as I can tell it's trying to load from file:///assets/js/main.js instead of being relative to the app bundle location. Is there any way I can get this to work as desired?
I'd really, really like to avoid having to change the script src from /js/main.js if at all possible. The actual application I'm building auto-generates these files from a separate react project I have.
I have a sample minimal project that demonstrates this issue here:
https://github.com/jabbawookiees/psyduck
You can just clone this project then run the following if you want to try fixing it:
yarn install
cd ios && pod install && cd ..
yarn run react-native run-ios
What I ended up doing was bundling a web server with my iOS app and serving the resources from there.
https://github.com/futurepress/react-native-static-server

I released my Dart Web app but after deploying it bootstrap all.css was not found

I used webdev to build my Dart Angular web application with the following command:
webdev build -r
Everything works besides bootstrap, the browser gives error 404 not found for all.css file.
I checked on the build result and all.css does not exists, just the all.scss file.
Should web dev convert this sass file to regular css when it's releasing the application.
I have components that use scss files and I have no issue with them (I know they are compiled to my main.js file)
Any help I'd be thankful.
For now I logged into my local test and manually copied the resulting all.css with my chrome source into my build but I don't think I should do this every time I do a new build.

IT Hit WebDAV Sample App not running with tomcat

I have downloaded the sample app [ITHitWebDAVServerLibJava.tar.gz] trying to understand how this IT Hit Webdav work.
I started the demo app with Tomcat 8, running on JDK 1.8. From the tomcat console / log, it seems everything just fine, however when I access the main page, it doesn't list out the sample folders & files as how it suppose to (referring to the online demo).
screen : main page is render without listing out the folders & files
I downloaded the sample app and unzip it, without changing the folder structure of it. I have just edited the WEB-INF\web.xml so that it point to the correct trial license file. Please advise if I have missed out some configuration? Should I move out certain files from the WEB-INF folder? Is there any step by step setup guide this demo?
screen : unzipped sample app folder without changing the folder structure
Also, I have downloaded the trial version of AJAX library as well [ITHitWebDAVAJAXLibraryTrial.tar.gz], please advise how should I put this library into the main sample app? As in I should put this library files under which folder of the main sample app?
Please advise.
The default HTML page supplied with IT Hit WebDAV Server Library for Java sample servers use IT Hit WebDAV Ajax Library to list and browse WebDAV server content as well as to open documents for editing.
You can install IT Hit WebDAV Ajax Library from NPM using NPM command-line tool.
Install the Node.js, it installs NPM command-line tool.
Navigate to '\sample_folder\WEB-INF\wwwroot\' folder.
Execute:
npm install webdav.client
This will download IT Hit WebDAV Ajax Library library into the wwwroot folder.

Getting 404 File Not Found on Apache 2.4, FastCGI and Ubuntu 14.04

My first step was install HHVM following this guide: https://github.com/facebook/hhvm/wiki/Prebuilt-packages-on-Ubuntu-14.04
Then i run the script with the command: ´sudo /usr/share/hhvm/install_fastcgi.sh
Then i test if hhvm was installed with command ´php -v´ and the output is OK, says that HIPHOP VM is runing.
The problem arrives when i try to access to a PHP file, Apache always return 404 error. In the other hand html files and static files works good. I only receive 404 error with php files.
I search on Google and found many people with same issue but no solutions. Perhaps someone can help.

How to install ImageMagick on Windows 7 (2)

Hopefully, despite similar question titles, this isn't a duplicate issue.
I've installed ImageMagick-6.7.5-6-Q16-windows-dll.exe.
I have php_imagick_dyn-Q16.dll renamed to php_imagick.dll in PHP's ext directory.
I have extension=php_imagick.dll in my php.ini.
I try to run a basic test: php -r "var_dump(class_exists('Imagick'));".
I get this error:
PHP Startup: imagick: Unable to initialise module
Module compiled with module API=20060613
PHP compiled with module API=20090626
These options must match.
CLI has stopped working.
Windows can check online for a solution to the problem.
> Check online for a solution and close the program
> Close the program
What have I done wrong?
First install :
Link
Download :
http://www.sk89q.com/2010/03/vc6-windows-binaries-for-imagick-2-3-0/
Choose the TS one
Open your php.ini file
Add this line :
extension=php_imagick.dll
Restart your apache server
open php_info()
Now your imagick lib is ready to use.
This works for me.

Resources