top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

PHP: System can not find the files?

0 votes
303 views

I always ran my php files as /localhost/myfile.php. Now the system cannot find the files. It says "waiting for local host" and stays in an infinite loop. All the files are in /var/www.

posted Jun 15, 2014 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Please check that your server (Apache, lighttpd, etc..) is running. Consult your server documentation on how to do that (on linux its usually service NAME start command).

Example
$ service httpd start

answer Jun 15, 2014 by Seema Siddique
Similar Questions
0 votes

I have some files in a directory - some are uploaded via ftp and some other are created by a php script.

Scandir just finds the uploaded files, but none of the created files. I can't run chown() because the server is part of shared hosting.

I can't find anything about this behaviour in the documentation.

+1 vote

This works -

$out = system("ls -l ",$retvals);
printf("%s", $out);

This does -

echo exec("ls -l");

This does not -

if( !file_exists("/var/www/orders.txt"));
{
 $out = system("touch /var/www/orders.txt", $ret);
 $out2 = system("chmod 766 /var/www/orders.txt", $ret);
 echo 'file2
';
 echo file_exists("/var/www/orders.txt");
}

and this does not -

if( !file_exists("/var/www/orders.txt"));
{
 exec("touch /var/www/orders.txt");
 exec("chmod 766 /var/www/orders.txt");
 echo 'file2
';
 echo file_exists("/var/www/orders.txt");
}
+1 vote

I'm writing my first php extension and I need to list included files (in PHP script) from RINIT function, but I cannot figure out how.

I deep into PHP source code and I think it's related to EG(included_files), but I can't to access the list.

PHP_RINIT_FUNCTION(extname)
{
 // SAPI NAME AND PHP SCRIPT FILE HANDLE PATH
 char *pt_var_sapi_name = sapi_module.name;
 char *pt_var_file_handle_path = SG(request_info).path_translated;

 // HOW CAN I USE EG(included_files) to get included files list?

 return SUCCESS;
}
...