PHP - Php Run On Windows 7
hi , is there any software that i can use to run my php script on my windows 7?
i had wamp2 but it seems to not work any more , so , is there any more software i can use? Similar TutorialsHello everyone, I have a PHP script allows users to upload a zip file with JPG images to a server. The script unzips the folder and renames it. The issue I am having is in regard to the actual .zip files. When I create a zip file on a Mac, everything works fine, but when I create a compressed file on Windows the script fails. I'm assuming that there is some type of different signature for a Windows .zip folder and a Mac .zip folder. Any suggestions for what I can do? Thanks in advance. Hi,
I have a .txt file with data in the following way:
FRENEMY : a person with whom one is friendly despite a fundamental dislike or rivalry :
There seems to be a frenemy relationship between John and Andrew.
PORTMANTEAU : a word or morpheme whose form and meaning are derived from a blending of two or more distinct forms (as smog from smoke and fog) : Lewis Carroll's Jabberwocky is loaded with portmanteau words.
The following is my PHP:
<?php //Check your text file exits if (file_exists('interesting_words.txt')) { //Retrieve content of text file $content = file_get_contents('interesting_words.txt', true); //Add every line of file to array $lines = explode("\n", $content); //Cycle through all line in file $words = array(); foreach ($lines as $line) { //Split word and description by : list($word, $description, $example) = explode(':', $line); //Create a words array to hold word and description $words[] = array('word' => ucfirst(trim($word)), 'description' => ucfirst(trim($description)), 'example' => ucfirst(trim($example))); } //Generate random number from date //Remove to generate random word every page load srand(date("ymd")); //Use random number from 0 to the cound of words array to pick word of the day $word_of_the_day = $words[rand(0, (count($words) -1))]; //Use word, descriptionand example keys to print the results. echo '<span id="word">'.$word_of_the_day['word'] . '</span>'.'<br>'.'<br>'; echo '<span id="description">'.$word_of_the_day['description'].'</span>'.'<br>'.'<br>'; echo '<span id="example">'.$word_of_the_day['example'].'</span>'.'<br>'.'<br>'; } ?>I would like to have it displayed in the following way: FRENEMY a person with whom one is friendly despite a fundamental dislike or rivalry. BUTTON One would click the button to open a new popup window to show example sentences. My problem is how do I go about coding for the window part. All help appreciated. Many thanks Edited by Ch0cu3r, 21 November 2014 - 04:29 PM. Added code tags How do you put libssh2 on a windows server running php 5.3.10? Dear my friends I'm new wit PHP language,i installed WAMP5 which include Apache/2.2.6 and PHP version 5.2.5 i connect my PHP file to MSSQL to get data from this DB,when i execute this script from explorer i got the result successfully but when i want execute this script from windows CMD i got an error (Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 127488 bytes) in C:\wamp\www\smulog\smulog.php on line 8. i changed memory_limit parameter from 2M to 990M also i add line in .htaccess file php_value memory_limit=999M and the problem still appear to me,do you have any idea to solve this problem please?? Do you need to compile your own version of PHP with SSH extensions in order to use SSH with PHP running on a Windows Server? <SCRIPT LANGUAGE="JavaScript"> <!-- Begin function popUp(URL,URL2) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL,'" + id + "', 'toolbar=0,scrollbars=1,location=0,top=10,left=10,statusbar=0,menubar=0,resizable=0,width=408,height=400');"); day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL2,'" + id + "', 'toolbar=0,scrollbars=1,location=0,top=10,left=450,statusbar=0,menubar=0,resizable=0,width=408,height=400');"); } // End --> </script>I have a map which shows sales people by location and if more then one sales person exists then I would need 2 pop up windows. This works great other than the fact that the areas with one sales person are getting a blank 2nd popup as a second salesperson does not exist. Any help would be appreciated. Thanks In Advance Edited by phpbeginner, 27 June 2014 - 05:52 AM. Hi,
I am trying to setup cakephp cake console in win7 and run cake bake as in the link below.I set up the env variable in win7 as below with a php and cakeapp entry in this Path.I have easyPHP 12.1 and php works fine. I get an error with php in failing to load. dynamic library but the php dir is in the path below so I have no idea .
I cant set my php env var is my problem . The php.ini is in this dir specified below.
http://www.nurelm.co...ols-in-windows/
E:\Program Files\EasyPHP-12.1\php\php546x121019214357\;E:\AA-website design\acl\app\Console\;
Hi all, I like to write scripts for my Aastra IP phone. 480i. I have done all my scripts with Apache on windows. I thought I would try it on Linux with the AsteriskNOW FreePBX 1.4 load. Phone system software for those that do not know. So my code is below something very simple to display on the screen. Ignore the $textmenu code that works fine. The problem is it does not open a file and do something then write the file. On my Windows / Apache box the screen will display on the phone and open the file and do whatever. On my Linux box it will display the screen fine but will not open that file. Why would it be ingnoreing those PHP file commands? Any ideas? It file commands work if I run it with php script.php but not when I use my phone to launch that script. Now keep in mind Windows/Apache is fine no problem. I thought maybe it was a php.ini setting on the linux box? <?php $textmenu = "<AastraIPPhoneTextMenu style = \"numbered\">\n"; $textmenu .= "<Title>------- Test -------</Title>\n"; $textmenu .= "<MenuItem>\n"; $textmenu .= "<Prompt>Applications</Prompt>\n"; $textmenu .= "<URI>http://65.205.71.13/xml/menu/menu.php?source=all</URI>\n"; $textmenu .= "</MenuItem>\n"; $textmenu .= "<SoftKey index = \"1\">\n"; $textmenu .= "<Label>Select</Label>\n"; $textmenu .= "<URI>SoftKey:Select</URI>\n"; $textmenu .= "</SoftKey>\n"; $textmenu .= "<SoftKey index = \"6\">\n"; $textmenu .= "<Label>Exit</Label>\n"; $textmenu .= "<URI>SoftKey:Exit</URI>\n"; $textmenu .= "</SoftKey>\n"; $textmenu .= "</AastraIPPhoneTextMenu>\n"; echo $textmenu; $fp=fopen("/var/www/html/aastra/awa-det/conference/test.txt","w+"); fwrite($fp); fclose($fp); ?> Hi i need help with this Code: [Select] read -p "Enter a password" pass if test "$pass" = "jerry" then echo "Password verified." else echo "Access denied." fifi works in unix only. Is there an alternative for windows ? Thanks in advance Hai, i have a project which is build from mac os and then i transfer all the file to windows and run it. Alot of error showing on windows but none on mac os. I already check the short tag but still alot of problem to run from windows. Anyone know whats the problem?
My IDE (Nusphere's PhpED) runs on Windows but is configured so that both the web server as well as all project files are located on a development Linux server. Since the project files are located on the Linux server, the git repository is located there as well and not on my PC. Every now again, my IDE complains that content was externally modified and whether I wish to reload the file. Also, I was recently asked to set git's core.autocrlf to true on a project I was collaborating on which prevented me from adding any changes to git (git complained that LF will be replaced by CRLF). The IDE allows file encoding to be changed (system default, UTF-8, Windows-1252, or ISO-8859-01) as well as the default file format (Unix, Windows, Mac, or autodetect). Any recommendations on how best to configure git and these ide settings? Thanks Is there a class out there that validates window filenames? Thank you. How can i check whether php is installed or not on windows? I didn't installed wamp or xamp. But i have installed Zend Apache. And i can do http://localhost/ from browser. I'm trying this simple script on my windows server 2008 standard edition but keep getting errors. Code: [Select] <?php error_reporting(-1); ini_set( 'display_errors' , 1 ); $file=fopen("2.txt","a") ; fwrite($file,"Hai"); ?> Code: [Select] Warning: fopen(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '1.0/no DST' instead in C:\inetpub\wwwroot\10.php on line 3 Warning: fopen(2.txt): failed to open stream: Permission denied in C:\inetpub\wwwroot\10.php on line 3 Warning: fwrite(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '1.0/no DST' instead in C:\inetpub\wwwroot\10.php on line 4 Warning: fwrite() expects parameter 1 to be resource, boolean given in C:\inetpub\wwwroot\10.php on line 4 Any help is appreciated. Hello,
I want to know first, how to start new pages or small windows
Next, how to temporarily store data and then delete upon exit of chat so that memory can be saved
How to embed objects like images (objects?)
How to have resizable or set the size of input field for the message
Show a sign like "person is typing" when other person is inputting data
I'll probably get yelled at, I'm trying to amass all the information I need
I'll research each subject as I accomplish a task
Right now I could really use a download script that saves a photo, gets url of photo and searches the document for "By Name" and cuts out / stores the Name part and then renames the file with an increment of one, instead I have to do 300 clicks with my mouse. = ineptitude or ignorance
That is theoretically the ideal case but I have to sift through photos, see which ones are good eg. face is covered by watermark
Thanks for any help
Edited by greenace92, 02 December 2014 - 07:52 PM. Hi, I'm not totally sure if this is the right section for this question but... I have my dev environment (my laptop) - windows vista, apache web server, also using my laptop as a client. I have my php project on the web server, I go to the login page in my browser (IE8) and login in, if it's valid it reloads the page with the user detail etc..it works. I've moved it onto a linux server (i think it still uses apache), I go to the login page in my browser (IE8) and login in. A blank page is displayed BUT if i hit refresh the user detail is displayed as expected. Also if I logout, again a blank page (it should display the login page) but when I hit refresh this time, it stays blank. I won't post my code just yet as I was wondering if anyone ever had the same issue before? Windows..works ok, Linux..doesn't work ok till refresh, but even then that doesn't work for the logout. My other thought is that it may work ok in windows because everythings on my laptop as in c:/php and the web server. Not much to go on I know but it may ring a bell with someone. thanks I'm looking for vb8js PHP extension compiled for windows???
http://php.net/manual/en/book.v8js.php
this extension is used to interpret javascript
i want to test this extension on my local server WAMP .
i searched for it for few days but i couldn't find a working compiled version
if you have a working one please share it and explain how to install it in WAMP or in the local server in general
best regards
Abdalla
I set up functionality for a client that got moved to their server after I wrote and tested the functionality. It does not work on their server and I am trying to trouble shoot the problem as I do not have ftp access to the server.
I believe that I have narrowed it down to either I do not know how to access the temp files on their server, Windows IIS, OR the security on the server is not allowing me to upload to the temp files.
Here is the form used to upload to the server.
<form enctype="multipart/form-data" action="#" method="post" > <input type="hidden" name="upload_csv" value="TRUE" /> <p><label for="userfile">Upload CSV:</label> <input type="hidden" name="MAX_FILE_SIZE" value="45000000" /> <input type="file" id="userfile" name="userfile" title="userfile" value="" /></p> <p><input type="submit" name="upload_csv" value="Upload CSV" /></p> </form> Here is the test code: <?php $csvfile = $_FILES['userfile']['tmp_name']; $size = $_FILES['userfile']['size']; if($_POST['upload_csv']){ //---------------------------------validation code here if($problem){ echo '<div class="error">Did not pass validation</div>'; include("upload_csv.inc.php"); }else{ if (($handle = fopen($csvfile, "r")) !== FALSE) { //--------------------------------------------------------------this is where the code that imports the data from the csv and to the database goes echo '<div class="message"><p>CSV has been opened!</p></div>'; }elseif(!$csvfile){ echo '<div class="error">Problem #1</div>'; }else{ echo '<div class="error">Problem #2</div>'; } } }else{ include("upload_csv.inc.php"); } ?> This code generated the error message: Problem #2. One more bit of information: the permissions on the server is set so that nothing can be uploaded by an external script. I do not know much about servers, but it seems to me that because the security is so tight on the server, the security is the reason that this does not work...??? I appreciate help with this. I just am not knowledgeable on how the $_FILES['userfile']['tmp_name'] code actually works? Hi, I made a small php configuration that runs a cmd command that is designed to create a Scheduled Task on Windows. Code snippet $createTaskCmd = "schtasks.exe /CREATE /SC MONTHLY /D 15 /TN mytask /TR C:\Windows\System32\notepad.exe /ST 00:00:10 /f /RU System"; shell_exec($createTaskCmd); keep in mind I also tried using, 'exec' and I also tried out this solution. I'm trying to create a temporary task and have it be destroyed much later. Hi,
I am a newbie at php and I recently tried making a small php configuration that runs on the localhost. execution.php <?php echo "first script has been executed"; exec('execution2.php'); ?> execution2.php <?php echo "Second script has been executed"; ?> The script is designed to call another php file whereas on the web page I would expect seeing, "first script has been executed" and "Second script has been executed". I am honestly not sure how the execution method is supposed to work however I am not planning on using "include" or "require" since they do not meet my criteria for another project. I am using xampp localhost server on a windows 10 computer. I tried entering "localhost:8080/dir/execution.php" however it did not work.
Any help would be appreciated, thanks! |