Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I want to access the Telegram-CLI using PHP.
I'm compiled Telegram-CLI and loged in to my account, and its works like a charm.
I installed LAMP ([in Linux], Apache, MySQL, PHP) and i tested them works.
I even installed these [following] PHP packages one-by-one using "Composer" and tested the examples but i couldnt make them run...
Also it seems their forum are abandoned to get my questions answer.
php-client for telegram-cli
A wrapper for Telegram-CLI
PHP Wrapper and Drupal module using Telegram CLI
I have no idea how the "Composer" works and how to make them work?
Could somebody tell me how to make one of them work in simple way.
Edit:
All steps of building Telegram-cli, loging in for first time and run it as deamon has beed completed.
This project has been installed on php project root dir using "Composer".
Example.php file has been moved to web server root directory.
But also unning it cause a 500 Internal server error.
The error line is:
$telegram = new \Zyberspace\Telegram\Cli\Client('unix:///tmp/tg.sck');
notices:
The file has been checked and is already there.
And the telegram-cli is running as a daemon on root user.
Edit 2:
I added a telegramd group and telegramd user assigned to that group.
I detacted that php commands running under apache user account.
I changed the apache user group to telegramd.
But again nothing...
So, Please help me
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I have a project folder that I've been working on with with WAMP on Windows, but I moved everything over to MAMP on the Mac. I've got the project file uploaded to a webspace and everything works fine, so I know the code is fine. I've imported all the MYSQL data from WAMP.
I can access the .html files with no problems on the Mac but when I try to run a .php file I receive the message localhost is currently unable to handle this request. and the error code 500.
I've been searching for hours and can't find a fix for this.
Any ideas as to why I am seeing these messages and cant access any .php files?
Some extra info on the mamp setup:
Apache port: 8888
MYSQL port: 8889
The first thing that comes to mind is making sure that you hit the correct folder. The easiest way is probably by adding a test.php file in your project public root and putting something like <?php echo "hello world"; in there. And then you just browse to localhost:8888/my-project/test.php and check if the world gets greeted.
The second thing I would do is check the error logs. "localhost is currently unable to handle this request." is not very helpful for debugging. You should be able to find apache_error.log and php_error.log inside /Applications/MAMP/logs
Feel free to ask if that didn't help locating the issue, or if you are still stuck...
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I have at home a personal web server running apache where I have a /var/www/{project_folder} to serve my websites, where I access them by the other machines by the IP/{project_folder}, nothing new for now. :)
I have some new projects done with laravel, but I only run them at my local machine to use the cli command to serve where it always runs at localhost:{door}
I would like to put that projects at my web server but I'm facing some difficulties because I only have some basic knowledge about apache and I'm having trouble to figure out the configuration.
I believe someone have already done that :)
Thanks in advance.
Assuming that you already have PHP working with Apache, so your httpd.conf file is fully configured so that if you have a file ending with .php will be handled properly.
All you have to do now is place your project in the htdocs folder where you have all normal project in. That's it.
You could install composer and install Laravel with it. For example via
"composer create-project laravel/laravel --prefer-dist".
See here
Now the tricky part:
If you want to access the site via http://localhost/your-project and not via http://localhost/your-project/public, then do this (depending on you OS):
Activate Mod_Alias
Goto '<IfModule alias_module>'
Then add this line inside:
Alias /your-project/ "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/your-project/public/"
In this case you don't need virtual hosts.
Let me know if you have further questions.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am planning to develop a webpage where anyone can upload a file. I want to do this because I want to make a webpage where my friends can upload a file, if they think that that file will help others (eg: a free tutorial pdf on Unix).
To develop and test this webpage what is needed ? As far as I think now:
Webserver ? I tried installing apache2 but had some issues
mysql-server ? I installed mysql-server ,but have issues with creating user for db
php
What else would I need ? (Assuming 'download' functionality will be added later, NOT NOW)
I am developing this in Ubuntu 12.04
Thanks
You don't need MySQL for the problem as described. All that would be required is a web server with a working PHP install. You can see the PHP documentation for how to handle the file uploads.
once you have installed and configured wamp/lamp.
platform(window, linux) doesnt matter a web application is not platform dependent. wamp/lamp will install mysql(database server), and apache(web server). thirdly determine you web scripting language(php, jsp, asp ect).if php, your php scripts must be executed by the web server ie you have to place them under c:\wamp\www\sitefolder\
How to: http://www.w3schools.com/php/php_file_upload.asp
you can test if on your local machine
then with Apache running, type in your browser www.localhost\sitefolder\yourscipt.php.
assuming you have an active domain and hosting account you may need to consider the
::::
-determine the upload size limit, location, and file type on the php
-you may require/though not a must client side scriptiing jquery- ajax for asynchronous requests.
-security will be of concern, you dont want some harmful data scripts on your site.
verify upload limit with your hosing provider..
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
i have windows 7 home premium 64bit.
So i decided to try out some php, so i downloaded wampserver. First, i tried to change the index file in the www directory, but even when i quit wampserver by right clicking and clicking exit on the wampserver icon, notepad++ says the file is still open in an other application.
So i tried following this tutorial (How to create a Virtual Host in WampServer) but i cant edit the httpd-vhosts.conf file because of the same issue.
thanks in advance
PS:clicking "stop all services" doesnt work either.
edit:
computer restart did not resolve my issue.
notepad says access denied when trying to save the file.
permissions are read/write
Exit wampserver and run again by right clicking the wampserver and choose run as administrator. Then you should be able to stop and start the services.
Open notepad the same way by right clicking it and choosing Run as Administrator. Then you should be able to save the files.
thanks to raouf Athar. later in the tutorial it said that notepad++ needs to run as administrator to change these files, and it seems that instead of saying "needs administrator", notepad simply says that another program is using the file.
thanks to all who tried to help me
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
Can PHP pages be run locally?
I am trying several demos on creating a contact form, at the moment I am trying this one:
http://www.html-form-guide.com/contact-form/php-email-contact-form.html
I have downloaded the source files and put my own email address in, but when I click submit I get directed to the PHP page. The form's action attribute is set to that PHP page, so I was wondering if it is because PHP is not able to run locally? If I want the form to submit and send to my email would I need to put the downloaded source pages online to make them work?
This is not the only tutorial I've used where this happens.
Sorry if this is a silly question - newbie web developer :).
Thanks.
PHP, in this context, is a server side language. It must be run by a webserver.
The webserver can be installed and run locally.
PHP needs to be executed server-side, which means you will need to set up a local webserver.
The best way to go would be taking a look at WAMP or MAMP or LAMP, depending on your operating system.
You need to be running a PHP server locally, and have the file "hosted" by the server (in the same folder, but usually /var/www/). There are a verity of free programs for this. I like WAMP ( http://sourceforge.net/projects/wampserver/)
You should simple install WAMP server. If you use Windows I recommend this one: http://www.easyphp.org/
When you install it you should copy php file to projects directory and then you can run in your browser http://localhost/projects/ to see your file and to execute it