I'm using Joomla mainly because I'm trying CiviCRM. Joomla is quite easy to install and it runs well on my server.
I've installed CiviCRM, which works well on local server, but CiviCRM app doesn't work well from outside the local server.
I can see that Firefox doesn't load correctly some js files, the location indicates my internal server address instead of the alias.
How do I solve this?
I solve this problem by manually updating the civicrm.settings and changing some values that were pointing localhost instead of my server URL.
Related
Currently, I developing a WordPress plugin with React frontend.
I tried to connect my backend (PHP) running on a virtual host with webpack devserver with hot module replacement (HMR).
Is there any config how to do it.
note: I tried with devserver proxy but cant figure it out.
Thanks in advance.
Getting HMR is always complicated for custom setup like these. Theoretically, this is pretty simple. You simply need to run the webpack-dev-server with the HMR module. On your PHP file, make sure it uses the JS file generated from webpack-dev-server. The code to refresh is bundled in the JS file so it should work.
However, the devil is in the details. You'll need to make sure the communication between your page and webpack-dev-server works without issue. Monitor your websocket network request and make sure they communicate as expected.
An issue you'll probably encounter is security since the websocket connection is expecting a different host. In this case, you can use config from the following answer: I am getting an "Invalid Host header" message when connecting to webpack-dev-server remotely
Another issue could be that the JS file tries to connect to the wrong location. Eg: It thinks that your host is where the websocket connection is. If this is the case, you can use the public setting. See here for documentation: https://webpack.js.org/configuration/dev-server/#devserverpublic
To me this is akin to running with a reverse proxy. You can see this discussion to understand the problem: https://github.com/webpack/webpack-dev-server/issues/804
There might be other problems. You just need to check the websocket connection and make sure they communicate without problems
How you refer to the generated js file is a separate problem. A simple example would be setting the port to 8081 and bundling the js file into bundle.js. Then in your php code, refer to it as http://localhost:8081/bundle.js
I've installed in my remote server, via Softaculous, Laravel 8.
In order to access directly to the APP, just like when running php artisan serve in my local machine, in CPanel i defined the document root to the folder Laravel\public.
Everything works exactly as it should! I type the address (ex: myDomain.com) and the App runs perfectly...
However i don't want to being always typing php artisan serve while developing, so i tried to replicate the cpanel struture in my local machine.
To achive thar, i've created a virtualhost in XAMPP httpd-vhosts.conf pointing to the folder Laravel\public, and created the host file in windows system, like always.
When accessing the location in my local machine the first page renders perfectly, but as soon as i make a request for a new view, by example:
Route::get('/posts', function () {
return view('posts.index');
});
I get a "Not Found The requested URL was not found on this server" error! I'm sure is not a coding error because the same code runs flawlessly in remote server.
Which technique is used by cpanel to allow laravel to work directly from \public folder without necessity to initiate anything and how to replicate that in local development machine?
Well...
After much reading, backs and forwards, i believe this behavior depends on the way Apache its served by XAMPP.
So, the solution i adopted was change my local development tool to LARAGON.
Everything worked just fine with a lot of new features that donĀ“t exist in XAMPP.
I uploaded a php script to a subdomain that I own, for testing and customizing purposes before it goes live (I had planned on moving everything over to the root domain when done).
Someone then suggested that I work on in Xampp instead as it is all locally installed and therefore much faster, etc.
Thing is, I had already customized the script a lot (mostly CSS but also uploaded graphics via the admin panel, etc) while it was up live on the web host, so I would like to run a copy of the most up-to-date version of it in Xampp and continue customizing it from there.
I downloaded a copy of all my files by FTP into htdocs > Test folder. I also downloaded a copy of the database via phpmyadmin and imported it via phpmyadmin into my localhost.
The big problem I have is when I try to access the scritp via localhost, the url immediately reverts back to the live url. How do I set it to link to the local host copy instead?
Thanks.
Based on AbraCadaver's suggestion, I found the answer lied in changing the URL parameters in config.php
Thanks
I have installed wordpress on my IIS server using web plaform intaller, everything is working fine when i am working on localhost.
when when i am trying to browse from external or another pc, the links are stayed http://localhost/page.php, which should be http://myserver/page.php
even the styling is not applied because of that.
how do I change the Path and make it work??
Thanks
You will have saved in the database that your site url was http://localhost. To access it from everywhere, I'd use your IP address instead, that way you should be able to see it on your local and external machines.
Do a quick export of your db, open in a text editor.
Find/ replace 'localhost' and change it to whatever your computer's IP is.
Import your changed sql file. Should be all good :)
so I've been using Zend framework to develop the site locally and everything works just fine....but then after I upload everything into a remote server, zend framework did not work even though I changed none of the source code.....
so here's what I know...
the remote server supports PHP, MySQL, etc just fine and they are of the latest versions
remote server supports .htaccess and mod rewrite just fine and they are enabled and I've tested them
I did not change any of the source code and the source code works perfectly on the local server...
Zend Framework is not boostrapping properly...whenever I go to a controller page such as http://mysite.com/controller/action <---not a real url, it would instead display a 404 error....so I know that it's not being redirected to index.php as it should....
any idea on what could possibly be wrong and on how and where I should start to tackle solving this problem?
thanks in advance
Is the server you're connecting to a shared hosting account? If so, that ended up being an issue for me. If you don't have access to your hosting root (godaddy or like hosting), you may need to just restructure your directory layout to work completely within the public_html. Not quite as secure unless you do some extra work here an there, but the 404 error reminded me of why I dropped hosting for my own actual server.
You could tell us the error but... here are some issues that can make it not to work:
mod_rewrite is off
.htaccess file still points you to localhost (or wherever you hosted it first)
incorrect configuration for php.ini file (if you have a static include you should change it so it sends to the correct include folder)
directory/file rights
If you send the error maybe we can help you more
I'd start by checking the error logs. If its a Linux server you'd be checking somewhere in /var/log, probably even /var/log/apache2/.
Check the access and the error logs.
Possible causes
Directory/file read/write rights.
PHP version difference
User (apache? the user running the script) rights.
Path troubles -> different path, maybe using some absolute paths still?