Live reload not possible in IDE since sql server not acccessible remotely - php

Scenario: PHP/mySQL web project hosted on remote server with FTP access
IDE: Atom
Problem: I want to be able to use live reload so that edits are instantly viewed in browser. This cannot be done since remote MySQL server is only accessible within domain - thus PDO/PHP cannot access data and web page cannot be created.
jscript and CSS can be edited live with Chrome debugger tools but requires copy/paste to upload changes with FTP.
Is there a solution to this scenario?

Related

HTMP/PHP opening remote text document in browser not working Apache( IIS)

I have had a basic intranet working fine for a few years running on an IIS server. Our ERP server drops automated reports into a shared (read only) location the users can access on the LAN. 10.0.1.111
To make things simpler, i created a web page which links to named documents with better titles etc in an alphabetical list.
These opened and displayed in a basic webpage (which was all that was wanted) using
<a href="file://10.0.1.111/PRT/01PRINT105" target=_blank>Purchase Report</a><BR>
Everything works fine and still does, from the old server.
I then copied the Intranet to an Apache server running on a synology NAS drive and nothing works.
Any help recommendations gratefully received. No error messages displayed, just a page that doesn't do anything.*
*The initial page with links show, the hyperlinks don't do anything
PHP or HTML

PHP Desktop Not responding on AJAX CALL

I am trying to convert my existing website into PHP Desktop Application using PHP Desktop, everything is working fine but when i am trying to login i am using ajax call for login it does not responding. it does not even print any error message on php desktop console.
It might be that your ajax code is making a request to http://127.0.0.1/some_resource, but phpdesktop web server is running at http://127.0.0.1:1673/ - as you can see in your console logs. PHP Desktop assigns a random web port to avoid conflicts with existing software. In a php script you can know the port by checking $_SERVER variable. If you want to set a fixed web server port then you can do so by editing settings.json file (see the Settings wiki page in phpdesktop project).
You have to check your ajax code to know what url it is trying to access, you can do this using Developer Tools window, you can open it in phpdesktop using mouse context menu.
You don't really have to set fixed web port if you can modify your ajax code to not use full paths with domain names and just the path like "/some_resource".

ERR_CONNECTION_REFUSED while accessing an image file on local network

I have 2 websites running in my IIS in one machine. One is the PHP website and another is the ASP.NET WebApi. The PHP site is my family website which is kind of an adapter between HTML and WebAPI. Now, in my PHP site I have a page which loads all family pictures from a selected folder on my home wifi network.
If I browse PHP site from the same machine where API is hosted then everything works great. But when I browse my PHP site from other machine in my home wifi network I see ERR_CONNECTION_REFUSED
As far as the permisssions are concerned I have IUSR full control over my image folder.
Any idea where I am missing the mark?
Your Internet is not working or the server is not set up to receive http request

Drupal Site is very Slow after migrating

I migrate a Drupal website from live server to my staging server.
Ist
I export full database and import in local and delete all cache tables data.
2nd
I download zip file of code and upload in staging server and change database username , pass in setting.php file
Now My web site at staging is very very slow it takes upto 5 minutes to load any page
can any one let me know where I make mistake in migration and now how I can make fast my site at staging. I think it is not reason of staging server because same site at my own machine is also slow when I setup it on my local machine. same site is very fast at production server.I am new to drupal please anyone point my mistake where I make mistake so site is slow
Check error logs (Drupal's "Recent log messages" under the "Reports" menu, as well as PHP error logs and Apache logs on your server). Use Firebug in Firefox, or dev tools in other browsers to see if some assets (images, CSS files, JS files) are missing.

Link to file on different server

I am working on a invoice report with my companies intranet. I would like to be able to link the invoice number to the actual invoice. My problem is that the file resides on a different server and not the web server.
When I'm on the computer I have to use the remote desktop connection to access the server to get to the files.
I've tried \SERVER\file_path.pdf and file:\\SERVER\file_path.pdf and neither works.
What you are doing is disabled by design. This sort of link to a local file will work in some browsers as long as the HTML is also called from a local file (ie file:///pageContainingLink). If not, it's a security vulnerability. It won't work at all in webkit based browsers.
See <A>nchor Link to Local File? (<a href='file:///{path}'>DEAD LINK</a> not working in FireFox but in IE)
And Cross-browser link to file on local system
If you want to get this to work, you'll need the other server to be a web-server too so that you can link to http://intranet2/fileYouWant.pdf
Try creating a symbolic link from the network share \SERVER\ to your machine --> X:\pathtoyourapacheroot\distantdocuments on your server machine
Then you should be able to use it just has if your file was on your machine x:\pathtoyourapacheroot\distantdocuments\file_path.pdf.

Categories