how to run laravel application in phpdesktop application? - php

I have downloaded phpdesktop application and copied working laravel application into the phpdesktop www directory. Also enabled the necessary extension in php-ini file inside phpdesktop application.
Index page of the application is working properly. but I am getting the following error messages when accessing other pages.
Error 404: Not Found
File not found
phpdesktop doesn't have apache server to enable mod_rewrite to solve this issue. How to overcome this issue? Plz guide.

for laravel, you need to change www_directory, point it towards "www/public"
"web_server": {
"listen_on": ["127.0.0.1", 0],
"www_directory": "www/public",
"index_files": ["index.html", "index.php"],
"cgi_interpreter": "php/php-cgi.exe",
"cgi_extensions": ["php"],
"cgi_temp_dir": "",
"404_handler": "/pretty-urls.php",
"hide_files": []
},

phpDesktop 57 is currently using php 7.1.x if you want to run latest version of the laravel then just download the required version of php from official website and delete all the files and folder from the php folder inside phpDesktop except php.ini and put all the downloaded files and folder of php in php directory then you will be able to run laravel application inside phpDesktop.
you can have a reference from here: Just Check this article

Related

Laravel 5.8 error 500 uploaded in shared hosting cpanel

I uploaded a laravel-5.8 project to a shared hosting cpanel.
The problem is when I access index.php it gives me an error 500.
Here is my project directory
I didn't transfer the public folder yet. but it should work when access.
stage.example.com/public/ instead it displays error 500.
I changed the database credentials.
I haven't changed the path in index.php since I didn't move the public folder yet.
path:index.php
I tried putting phpinfo.php in the root folder to check the requirements for laravel 5.8 all of this was met, except for the PHP version, according to phpinfo, PHP version is 5.6. but when I checked under myphpadmin>web server the PHP version is 7.2.7.
PHP >= 7.1.3
BCMath PHP Extension
Ctype PHP Extension
JSON PHP Extension
Mbstring PHP Extension
OpenSSL PHP Extension
PDO PHP Extension
Tokenizer PHP Extension
XML PHP Extension
I hope someone can help I wanted to run my laravel5.8 project in Cpanel.
I have answered this question in another post. Have a look at it and see if helps:
What is the easiest and quickest method to deploy a Laravel web application live?
I tried putting phpinfo.php in the root folder to check the requirements for laravel 5.8 all of this was met, except for the PHP version, according to phpinfo, PHP version is 5.6. but when I checked under myphpadmin>web server the PHP version is 7.2.7
I have no idea what "myphpadmin" is, anyway since you're running PHP 5.6 Laravel can't work.
In cPanel you should have an option to select the PHP version, select the latest available, 7.3 if your cPanel is updated.
If you have blank page maybe you need to change the path to the autoload.php file in index.php. This file is in vendor folder.
Change :
require __DIR__.'/bootstrap/autoload.php';
by
require __DIR__.'/vendor/autoload.php';

Laravel: Blank CSS Files on deployed project

I am trying to figure out why all the CSS and Javascript files are being display as empty files on a Laravel 5.6 project running on Ubuntu 16.04 LTS with Plesk 17.5 Server Onyx. This happened after deployment.
I was reading a couple of old questions and I've tried most of the solutions without any luck:
Note #1:
Only CSS and Javascript files are displayed as empty files, routing works fine for other files.
Attempts made so far:
Moved the file .htaccess from public to the root project folder.
Added guo+w permissions to storage and bootstrap/cache
Used mix('css/app.css') and asset('themes/default/css/style.css') to access to CSS & JS files. I've also tried relative and full-qualified paths.
Note #2:
If I access in the URL with public/path/file.css I can see the file proplery. But whenever I change from mix('css/app.css') to mix('public/css/app.css') I get Undefined Index when I set the debug=true.
Well, maybe there are more attempts that I don't remember right now. Any suggestions to solve this "issue"?

Unisharp laravel filemanager unable to 'browse server' in ckeditor

I have been trying to apply Unisharp Laravel Filemanager. But, the issue I am facing is that when ever I try to insert image in CKeditor and click on the Browse Server button, a new window pops up with an HTTP 404 error response code saying:
The requested URL was not found on this server.
I have followed all the steps as mentioned in the docs of Unisharp Laravel Filemanager for installation and integration. Also I am using Laravel 5.4 and Unisharp FileManager 1.6 (released August 2016).
What is causing this 404 error and how can I correct it?
In the lfm.php file the very first setting is a routes setting. That needs to be changed from false to true.
First make sure the following lines were added before App\Providers\AppServiceProvider::class, on the config/app.php
Unisharp\Laravelfilemanager\LaravelFilemanagerServiceProvider::class,
Intervention\Image\ImageServiceProvider::class,
then.
Make sure lfm.php is present in config folder.
Make sure the routes were loaded by running php artisan route:list
if you followed the installation guide and those are not present use php artisan config:cache then run the two vendor publish command on the guide
Hope this helps

Unable to load Image ImageMagick for PHP on Azure

So, I have started to explore Azure, and trying to setup a PHP, MySQL on my Free Azure tier.
I have a WebApp setup on Azure, and phpinfo() is coming up nicely.
I am getting trouble setting up ImageMagick though.
I am on on the default PHP 5.4.42
I downloaded the extension dlls for ImageMagick from https://pecl.php.net/package/imagick/3.1.2/windows
Specifically, i got the http://windows.php.net/downloads/pecl/releases/imagick/3.1.2/php_imagick-3.1.2-5.4-nts-vc9-x86.zip file, which is nts version for PHP 5.4
Next, i followed the steps at https://azure.microsoft.com/en-us/documentation/articles/web-sites-php-configure/
I created a folder under my wwwroot folder called 'bin'. So now mu site path looks like /site/wwwroot/bin.
In this bin folder, i copied the php_imagick.dll file AND the other 8 Core_RL*.* files.
Next, In my Azure app settings, i added PHP_EXTENSIONS key, with value bin\php_imagick.dll
I then restarted my web app, but i am only getting the below error in my azure logs:
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\home\site\wwwroot\bin\php_imagick.dll' - The specified module could not be found.
in Unknown on line 0
As alternatives, now I have changed my PHP version to 5.6(latest on Azure), and have put the corresponding version of imagick files from pecl site. This did not fix anything.
I have also tried the ini method, by creating ext and ini folders under the site folder, and creating the corresponding 'PHP_INI_SCAN_DIR' setting, but on restart of app, nothing shows up in the phpinfo(). Very sad :(
Please suggest what can I attempt to fix this issue.
Not all the versions of Imagemagick are compatible.
Here is a repo https://github.com/snobu/php-imagick-webapps that has the right resources referenced.
Download these resources (NTS Versions)
http://windows.php.net/downloads/pecl/releases/imagick/3.3.0rc2/php_imagick-3.3.0rc2-5.6-nts-vc11-x86.zip
http://www.imagemagick.org/download/binaries/ImageMagick-6.9.2-8-Q16-x86-dll.exe
Follow the steps in this Article, It just works http://blogs.msdn.com/b/azureossds/archive/2015/12/01/php-imagemagick-on-azure-web-apps.aspx

Deploying Laravel Over FTP

I am working on deploying a Laravel app to a bluehost server and I am running into some trouble.
Currently, I uploaded all of the Laravel files to the root of the server, then uploaded the contents of the "public" folder to the "public_html" folder. From here I opened the "bootstrap/paths.php" file and changed the public path to
'public' => __DIR__.'/../public_html',
After this, I am still unable to get content to display. Am I missing something? It looks like bluehost is running PHP 5.4.24.
Any help with this would be appreciated.
Thanks!
EDIT: The error log shows
[09-Apr-2014 09:04:02] PHP Fatal error: require() [function.require]: Failed opening required 'DIR/../bootstrap/autoload.php' (include_path='.:/usr/lib64/php:/usr/share/pear') in /home1/regmuel/public_html/index.php on line 21
Could anyone help me figure this error out. I can clearly see what the problem is, I'm just not sure how to go about fixing it.
It looks like __DIR__ isn't getting parsed, are you sure your host isn't running PHP 5.2.* if you run phpinfo() on your host what version does it give?
__DIR__ is only available from PHP 5.3.0 onwards
RMcLeod's answer is perfect, just wanted to add to it something that I ran into with my web host (specifically Bluehost). Even after the version of PHP running on the server was 5.4.40 (found using php -v via an SSH terminal), I was running into the same problem where it was picking up an older version of PHP when interpreting my index.php and wouldn't recognize the DIR constant.
I had to add the line
AddHandler application/x-httpd-php54s .php
to the top of the .htaccess file which is in the same folder as my index.php
Just for context, I was trying to set up my laravel 4.2 app on bluehost and it relies heavily on this constant.

Categories